diff options
author | Dan Vrátil <dvratil@redhat.com> | 2011-10-07 20:29:37 +0800 |
---|---|---|
committer | Dan Vrátil <dvratil@redhat.com> | 2011-10-07 20:29:37 +0800 |
commit | 03a438c3acff6e97146836a84da7236b69cd37fe (patch) | |
tree | 88c202f9b3b36757cfdfc61e4b667573705d9b73 | |
parent | e61283b1096a66a811eba8c43f72087e6341ffc6 (diff) | |
download | gsoc2013-evolution-03a438c3acff6e97146836a84da7236b69cd37fe.tar gsoc2013-evolution-03a438c3acff6e97146836a84da7236b69cd37fe.tar.gz gsoc2013-evolution-03a438c3acff6e97146836a84da7236b69cd37fe.tar.bz2 gsoc2013-evolution-03a438c3acff6e97146836a84da7236b69cd37fe.tar.lz gsoc2013-evolution-03a438c3acff6e97146836a84da7236b69cd37fe.tar.xz gsoc2013-evolution-03a438c3acff6e97146836a84da7236b69cd37fe.tar.zst gsoc2013-evolution-03a438c3acff6e97146836a84da7236b69cd37fe.zip |
Bug #658066 - Security dialog is too big
Fixed security dialog default size and resizing issues by simplifying
the layout and replacing GtkVBoxes by GtkGrids.
-rw-r--r-- | mail/em-format-html-display.c | 28 | ||||
-rw-r--r-- | mail/mail-dialogs.ui | 68 |
2 files changed, 21 insertions, 75 deletions
diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c index a2a49defaa..158b647641 100644 --- a/mail/em-format-html-display.c +++ b/mail/em-format-html-display.c @@ -206,7 +206,7 @@ efhd_xpkcs7mime_viewcert_clicked (GtkWidget *button, #endif static void -efhd_xpkcs7mime_add_cert_table (GtkWidget *vbox, +efhd_xpkcs7mime_add_cert_table (GtkWidget *grid, CamelDList *certlist, struct _smime_pobject *po) { @@ -260,7 +260,7 @@ efhd_xpkcs7mime_add_cert_table (GtkWidget *vbox, info = info->next; } - gtk_box_pack_start ((GtkBox *) vbox, (GtkWidget *) table, TRUE, TRUE, 6); + gtk_container_add (GTK_CONTAINER (grid), GTK_WIDGET (table)); } static void @@ -269,7 +269,7 @@ efhd_xpkcs7mime_validity_clicked (GtkWidget *button, { struct _smime_pobject *po = (struct _smime_pobject *) pobject; GtkBuilder *builder; - GtkWidget *vbox, *w; + GtkWidget *grid, *w; if (po->widget) /* FIXME: window raise? */ @@ -280,11 +280,11 @@ efhd_xpkcs7mime_validity_clicked (GtkWidget *button, po->widget = e_builder_get_widget(builder, "message_security_dialog"); - vbox = e_builder_get_widget(builder, "signature_vbox"); + grid = e_builder_get_widget(builder, "signature_grid"); w = gtk_label_new (_(smime_sign_table[po->valid->sign.status].description)); gtk_misc_set_alignment ((GtkMisc *) w, 0.0, 0.5); gtk_label_set_line_wrap ((GtkLabel *) w, TRUE); - gtk_box_pack_start ((GtkBox *) vbox, w, TRUE, TRUE, 6); + gtk_container_add (GTK_CONTAINER (grid), w); if (po->valid->sign.description) { GtkTextBuffer *buffer; @@ -294,6 +294,7 @@ efhd_xpkcs7mime_validity_clicked (GtkWidget *button, "hscrollbar_policy", GTK_POLICY_AUTOMATIC, "vscrollbar_policy", GTK_POLICY_AUTOMATIC, "shadow_type", GTK_SHADOW_IN, + "expand", TRUE, "child", g_object_new(gtk_text_view_get_type(), "buffer", buffer, "cursor_visible", FALSE, @@ -304,19 +305,19 @@ efhd_xpkcs7mime_validity_clicked (GtkWidget *button, NULL); g_object_unref (buffer); - gtk_box_pack_start ((GtkBox *) vbox, w, TRUE, TRUE, 6); + gtk_container_add (GTK_CONTAINER (grid), w); } if (!camel_dlist_empty (&po->valid->sign.signers)) - efhd_xpkcs7mime_add_cert_table (vbox, &po->valid->sign.signers, po); + efhd_xpkcs7mime_add_cert_table (grid, &po->valid->sign.signers, po); - gtk_widget_show_all (vbox); + gtk_widget_show_all (grid); - vbox = e_builder_get_widget(builder, "encryption_vbox"); + grid = e_builder_get_widget(builder, "encryption_grid"); w = gtk_label_new (_(smime_encrypt_table[po->valid->encrypt.status].description)); gtk_misc_set_alignment ((GtkMisc *) w, 0.0, 0.5); gtk_label_set_line_wrap ((GtkLabel *) w, TRUE); - gtk_box_pack_start ((GtkBox *) vbox, w, TRUE, TRUE, 6); + gtk_container_add (GTK_CONTAINER (grid), w); if (po->valid->encrypt.description) { GtkTextBuffer *buffer; @@ -326,6 +327,7 @@ efhd_xpkcs7mime_validity_clicked (GtkWidget *button, "hscrollbar_policy", GTK_POLICY_AUTOMATIC, "vscrollbar_policy", GTK_POLICY_AUTOMATIC, "shadow_type", GTK_SHADOW_IN, + "expand", TRUE, "child", g_object_new(gtk_text_view_get_type(), "buffer", buffer, "cursor_visible", FALSE, @@ -336,13 +338,13 @@ efhd_xpkcs7mime_validity_clicked (GtkWidget *button, NULL); g_object_unref (buffer); - gtk_box_pack_start ((GtkBox *) vbox, w, TRUE, TRUE, 6); + gtk_container_add (GTK_CONTAINER (grid), w); } if (!camel_dlist_empty (&po->valid->encrypt.encrypters)) - efhd_xpkcs7mime_add_cert_table (vbox, &po->valid->encrypt.encrypters, po); + efhd_xpkcs7mime_add_cert_table (grid, &po->valid->encrypt.encrypters, po); - gtk_widget_show_all (vbox); + gtk_widget_show_all (grid); g_object_unref (builder); diff --git a/mail/mail-dialogs.ui b/mail/mail-dialogs.ui index 58a9f8c2aa..d3382dc18d 100644 --- a/mail/mail-dialogs.ui +++ b/mail/mail-dialogs.ui @@ -578,41 +578,13 @@ Please select a follow up action from the "Flag" menu.</property> </packing> </child> <child> - <object class="GtkHBox" id="hbox170"> + <object class="GtkGrid" id="signature_grid"> <property name="visible">True</property> + <property name="orientation">GTK_ORIENTATION_VERTICAL</property> <child> - <object class="GtkLabel" id="label465"> - <property name="visible">True</property> - <property name="xpad">12</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkTable" id="table10"> - <property name="visible">True</property> - <property name="column_spacing">6</property> - <property name="row_spacing">2</property> - <child> - <object class="GtkVBox" id="signature_vbox"> - <property name="visible">True</property> - <child> - <placeholder/> - </child> - </object> - </child> - </object> - <packing> - <property name="position">1</property> - </packing> + <placeholder/> </child> </object> - <packing> - <property name="position">1</property> - </packing> </child> </object> <packing> @@ -641,41 +613,13 @@ Please select a follow up action from the "Flag" menu.</property> </packing> </child> <child> - <object class="GtkHBox" id="hbox171"> + <object class="GtkGrid" id="encryption_grid"> <property name="visible">True</property> + <property name="orientation">GTK_ORIENTATION_VERTICAL</property> <child> - <object class="GtkLabel" id="label478"> - <property name="visible">True</property> - <property name="xpad">12</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkTable" id="table11"> - <property name="visible">True</property> - <property name="column_spacing">6</property> - <property name="row_spacing">2</property> - <child> - <object class="GtkVBox" id="encryption_vbox"> - <property name="visible">True</property> - <child> - <placeholder/> - </child> - </object> - </child> - </object> - <packing> - <property name="position">1</property> - </packing> + <placeholder/> </child> </object> - <packing> - <property name="position">1</property> - </packing> </child> </object> <packing> |