[Gpa-commits] r889 - trunk/src

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu May 8 13:08:11 CEST 2008


Author: marcus
Date: 2008-05-08 13:08:11 +0200 (Thu, 08 May 2008)
New Revision: 889

Modified:
   trunk/src/ChangeLog
   trunk/src/filesigndlg.c
   trunk/src/filesigndlg.h
Log:
2008-05-08  Marcus Brinkmann  <marcus at g10code.de>

	* filesigndlg.c (gpa_file_sign_dialog_constructor): Move signer
	list before everything else, don't use borders with frames, fix
	mnemonic conflict, replace vbox_mode with frame_mode.
	* filesigndlg.h (struct _GpaFileSignDialog): Replace vbox_mode
	with frame_mode.


Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog	2008-05-08 10:34:53 UTC (rev 888)
+++ trunk/src/ChangeLog	2008-05-08 11:08:11 UTC (rev 889)
@@ -1,5 +1,10 @@
 2008-05-08  Marcus Brinkmann  <marcus at g10code.de>
 
+	* filesigndlg.c (gpa_file_sign_dialog_constructor): Move signer
+	list before everything else, don't use borders with frames, fix
+	mnemonic conflict, replace vbox_mode with frame_mode.
+	* filesigndlg.h (struct _GpaFileSignDialog): Replace vbox_mode
+	with frame_mode.
 
 	* filesigndlg.h (struct _GpaFileSignDialog): New members vbox_mode
 	and force_sig_mode.

Modified: trunk/src/filesigndlg.c
===================================================================
--- trunk/src/filesigndlg.c	2008-05-08 10:34:53 UTC (rev 888)
+++ trunk/src/filesigndlg.c	2008-05-08 11:08:11 UTC (rev 889)
@@ -139,12 +139,14 @@
   GObject *object;
   GpaFileSignDialog *dialog;
   GtkWidget *vboxSign;
+  GtkWidget *label;
   GtkWidget *frameMode;
   GtkWidget *vboxMode;
   GtkWidget *radio_sign_comp;
   GtkWidget *radio_sign;
   GtkWidget *radio_sign_sep;
   GtkWidget *checkerArmor;
+  GtkWidget *frameWho;
   GtkWidget *vboxWho;
   GtkWidget *labelWho;
   GtkWidget *scrollerWho;
@@ -170,17 +172,40 @@
   gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
   gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
 
-  vboxSign = GTK_DIALOG (dialog)->vbox;
-  gtk_container_set_border_width (GTK_CONTAINER (vboxSign), 5);
+  vboxSign = gtk_vbox_new (FALSE, 5);
+  gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), vboxSign);
 
-  frameMode = gtk_frame_new (_("Signing Mode"));
-  gtk_container_set_border_width (GTK_CONTAINER (frameMode), 5);
+  frameWho = gtk_frame_new (NULL);
+  gtk_frame_set_shadow_type (GTK_FRAME (frameWho), GTK_SHADOW_NONE);
+  labelWho = gtk_label_new_with_mnemonic (_("<b>Sign _as</b>"));
+  gtk_label_set_use_markup (GTK_LABEL (labelWho), TRUE);
+  gtk_frame_set_label_widget (GTK_FRAME (frameWho), labelWho);
+  gtk_box_pack_start (GTK_BOX (vboxSign), frameWho, FALSE, FALSE, 0);
+
+  vboxWho = gtk_vbox_new (FALSE, 0);
+  gtk_container_add (GTK_CONTAINER (frameWho), vboxWho);
+
+  scrollerWho = gtk_scrolled_window_new (NULL, NULL);
+  gtk_widget_set_size_request (scrollerWho, 400, 200);
+  gtk_box_pack_start (GTK_BOX (vboxWho), scrollerWho, TRUE, TRUE, 0);
+  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrollerWho),
+				       GTK_SHADOW_IN);
+
+  clistWho = gpa_key_selector_new (TRUE);
+  dialog->clist_who = clistWho;
+  gtk_container_add (GTK_CONTAINER (scrollerWho), clistWho);
+  gtk_label_set_mnemonic_widget (GTK_LABEL (labelWho), clistWho);
+
+  frameMode = gtk_frame_new (NULL);
+  gtk_frame_set_shadow_type (GTK_FRAME (frameMode), GTK_SHADOW_NONE);
+  label = gtk_label_new (_("<b>Signing Mode</b>"));
+  gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
+  gtk_frame_set_label_widget (GTK_FRAME (frameMode), label);
   gtk_box_pack_start (GTK_BOX (vboxSign), frameMode, FALSE, FALSE, 0);
 
   vboxMode = gtk_vbox_new (FALSE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (vboxMode), 5);
   gtk_container_add (GTK_CONTAINER (frameMode), vboxMode);
-  dialog->vbox_mode = vboxMode;
+  dialog->frame_mode = frameMode;
 
   radio_sign_comp = gtk_radio_button_new_with_mnemonic
     (NULL, _("Si_gn and compress"));
@@ -189,7 +214,7 @@
 
   radio_sign =
     gtk_radio_button_new_with_mnemonic_from_widget
-    (GTK_RADIO_BUTTON (radio_sign_comp), _("_Cleartext signature"));
+    (GTK_RADIO_BUTTON (radio_sign_comp), _("Clear_text signature"));
   gtk_box_pack_start (GTK_BOX (vboxMode), radio_sign, FALSE, FALSE, 0);
   dialog->radio_sign = radio_sign;
 
@@ -198,28 +223,8 @@
     (GTK_RADIO_BUTTON (radio_sign_comp), _("_Detached signature"));
   gtk_box_pack_start (GTK_BOX (vboxMode), radio_sign_sep, FALSE, FALSE, 0);
   dialog->radio_sep = radio_sign_sep;
-
-  vboxWho = gtk_vbox_new (FALSE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (vboxWho), 5);
-  gtk_box_pack_start (GTK_BOX (vboxSign), vboxWho, TRUE, TRUE, 0);
-
-  labelWho = gtk_label_new_with_mnemonic (_("Sign _as "));
-  gtk_misc_set_alignment (GTK_MISC (labelWho), 0.0, 0.5);
-  gtk_box_pack_start (GTK_BOX (vboxWho), labelWho, FALSE, TRUE, 0);
-
-  scrollerWho = gtk_scrolled_window_new (NULL, NULL);
-  gtk_widget_set_size_request (scrollerWho, 400, 200);
-  gtk_box_pack_start (GTK_BOX (vboxWho), scrollerWho, TRUE, TRUE, 0);
-  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrollerWho),
-				       GTK_SHADOW_IN);
-
-  clistWho = gpa_key_selector_new (TRUE);
-  dialog->clist_who = clistWho;
-  gtk_container_add (GTK_CONTAINER (scrollerWho), clistWho);
-  gtk_label_set_mnemonic_widget (GTK_LABEL (labelWho), clistWho);
 			      
   checkerArmor = gtk_check_button_new_with_mnemonic (_("A_rmor"));
-  gtk_container_set_border_width (GTK_CONTAINER (checkerArmor), 5);
   gtk_box_pack_start (GTK_BOX (vboxSign), checkerArmor, FALSE, FALSE, 0);
   /* Take care of any child widgets there might be.  */
   gtk_widget_show_all (checkerArmor);
@@ -396,12 +401,12 @@
 				      gboolean force_sig_mode)
 {
   g_return_if_fail (GPA_IS_FILE_SIGN_DIALOG (dialog));
-  g_return_if_fail (dialog->vbox_mode != NULL);
+  g_return_if_fail (dialog->frame_mode != NULL);
 
   if (force_sig_mode == dialog->force_sig_mode)
     return;
 
-  gtk_widget_set_sensitive (dialog->vbox_mode, ! force_sig_mode);
+  gtk_widget_set_sensitive (dialog->frame_mode, ! force_sig_mode);
 }
 
 
@@ -412,7 +417,7 @@
 
   g_return_val_if_fail (GPA_IS_FILE_SIGN_DIALOG (dialog),
 			GPGME_SIG_MODE_NORMAL);
-  g_return_val_if_fail (dialog->vbox_mode != NULL, GPGME_SIG_MODE_NORMAL);
+  g_return_val_if_fail (dialog->frame_mode != NULL, GPGME_SIG_MODE_NORMAL);
 
   if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->radio_comp)))
     sig_mode = GPGME_SIG_MODE_NORMAL;
@@ -432,7 +437,7 @@
   GtkWidget *button = NULL;
 
   g_return_if_fail (GPA_IS_FILE_SIGN_DIALOG (dialog));
-  g_return_if_fail (dialog->vbox_mode != NULL);
+  g_return_if_fail (dialog->frame_mode != NULL);
 
   if (mode == GPGME_SIG_MODE_NORMAL)
     button = dialog->radio_comp;

Modified: trunk/src/filesigndlg.h
===================================================================
--- trunk/src/filesigndlg.h	2008-05-08 10:34:53 UTC (rev 888)
+++ trunk/src/filesigndlg.h	2008-05-08 11:08:11 UTC (rev 889)
@@ -40,7 +40,7 @@
 {
   GtkDialog parent;
 
-  GtkWidget *vbox_mode;
+  GtkWidget *frame_mode;
   GtkWidget *radio_comp;
   GtkWidget *radio_sign;
   GtkWidget *radio_sep;



More information about the Gpa-commits mailing list