aboutsummaryrefslogtreecommitdiffstats
path: root/mail/e-mail-reader.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-03-25 04:47:53 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:41:47 +0800
commiteccfd921ed7a7017cf3b893c9146c4ee0438d86b (patch)
treec553f87e1b2e4a1fe22dd2c1f84f7cf577a6c26e /mail/e-mail-reader.c
parent9539cc3ff38ee6453a017eb06ae64c53402fbe8f (diff)
downloadgsoc2013-evolution-eccfd921ed7a7017cf3b893c9146c4ee0438d86b.tar
gsoc2013-evolution-eccfd921ed7a7017cf3b893c9146c4ee0438d86b.tar.gz
gsoc2013-evolution-eccfd921ed7a7017cf3b893c9146c4ee0438d86b.tar.bz2
gsoc2013-evolution-eccfd921ed7a7017cf3b893c9146c4ee0438d86b.tar.lz
gsoc2013-evolution-eccfd921ed7a7017cf3b893c9146c4ee0438d86b.tar.xz
gsoc2013-evolution-eccfd921ed7a7017cf3b893c9146c4ee0438d86b.tar.zst
gsoc2013-evolution-eccfd921ed7a7017cf3b893c9146c4ee0438d86b.zip
Fix alignment of extra widgets in EAlertDialogs.
Add e_alert_dialog_get_content_area(), which returns the GtkVBox containing the primary and secondary labels. Use this instead of gtk_dialog_get_content_area() to maintain the dialog's left margin beneath the image.
Diffstat (limited to 'mail/e-mail-reader.c')
-rw-r--r--mail/e-mail-reader.c79
1 files changed, 47 insertions, 32 deletions
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index b70bebb7b9..79439d3f08 100644
--- a/mail/e-mail-reader.c
+++ b/mail/e-mail-reader.c
@@ -658,7 +658,8 @@ check_close_browser_reader (EMailReader *reader)
if (!parent)
parent = e_mail_reader_get_window (reader);
- dialog = e_alert_dialog_new_for_args (parent, "mail:ask-reply-close-browser", NULL);
+ dialog = e_alert_dialog_new_for_args (
+ parent, "mail:ask-reply-close-browser", NULL);
response = gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
@@ -1254,18 +1255,22 @@ action_mail_reply_all_check (CamelFolder *folder,
if (recip_count >= 15) {
GtkWidget *dialog;
- GtkWidget *content_area, *check;
+ GtkWidget *check;
+ GtkWidget *container;
gint response;
dialog = e_alert_dialog_new_for_args (
e_mail_reader_get_window (reader),
"mail:ask-reply-many-recips", NULL);
+ container = e_alert_dialog_get_content_area (
+ E_ALERT_DIALOG (dialog));
+
/* Check buttons */
- check = gtk_check_button_new_with_mnemonic (_("_Do not ask me again."));
- gtk_container_set_border_width (GTK_CONTAINER (check), 12);
- content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
- gtk_box_pack_start (GTK_BOX (content_area), check, FALSE, FALSE, 0);
+ check = gtk_check_button_new_with_mnemonic (
+ _("_Do not ask me again."));
+ gtk_box_pack_start (
+ GTK_BOX (container), check, FALSE, FALSE, 0);
gtk_widget_show (check);
response = gtk_dialog_run (GTK_DIALOG (dialog));
@@ -1282,11 +1287,16 @@ action_mail_reply_all_check (CamelFolder *folder,
gtk_widget_destroy (dialog);
- if (response == GTK_RESPONSE_NO)
- type = E_MAIL_REPLY_TO_SENDER;
- else if (response == GTK_RESPONSE_CANCEL || response == GTK_RESPONSE_DELETE_EVENT) {
- g_object_unref (message);
- return;
+ switch (response) {
+ case GTK_RESPONSE_NO:
+ type = E_MAIL_REPLY_TO_SENDER;
+ break;
+ case GTK_RESPONSE_CANCEL:
+ case GTK_RESPONSE_DELETE_EVENT:
+ g_object_unref (message);
+ return;
+ default:
+ break;
}
}
@@ -1411,20 +1421,22 @@ action_mail_reply_sender_check (CamelFolder *folder,
it's a Reply-To: munged list message... unless we're ignoring munging */
if (ask_ignore_list_reply_to || !munged_list_message) {
GtkWidget *dialog;
- GtkWidget *content_area, *check;
+ GtkWidget *check;
+ GtkWidget *container;
gint response;
dialog = e_alert_dialog_new_for_args (
e_mail_reader_get_window (reader),
"mail:ask-list-private-reply", NULL);
+ container = e_alert_dialog_get_content_area (
+ E_ALERT_DIALOG (dialog));
+
/* Check buttons */
check = gtk_check_button_new_with_mnemonic (
_("_Do not ask me again."));
- gtk_container_set_border_width ((GtkContainer *)check, 12);
- content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
gtk_box_pack_start (
- GTK_BOX (content_area), check, FALSE, FALSE, 0);
+ GTK_BOX (container), check, FALSE, FALSE, 0);
gtk_widget_show (check);
response = gtk_dialog_run (GTK_DIALOG (dialog));
@@ -1446,8 +1458,7 @@ action_mail_reply_sender_check (CamelFolder *folder,
} else if (ask_list_reply_to) {
GtkWidget *dialog;
- GtkWidget *content_area;
- GtkWidget *vbox;
+ GtkWidget *container;
GtkWidget *check_again;
GtkWidget *check_always_ignore;
gint response;
@@ -1456,22 +1467,20 @@ action_mail_reply_sender_check (CamelFolder *folder,
e_mail_reader_get_window (reader),
"mail:ask-list-honour-reply-to", NULL);
- /*Check buttons*/
- vbox = gtk_vbox_new (FALSE, 0);
- content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
- gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
- gtk_box_pack_start (GTK_BOX (content_area), vbox, FALSE, FALSE, 0);
- gtk_widget_show (vbox);
+ container = e_alert_dialog_get_content_area (
+ E_ALERT_DIALOG (dialog));
check_again = gtk_check_button_new_with_mnemonic (
_("_Do not ask me again."));
- gtk_box_pack_start (GTK_BOX (vbox), check_again, FALSE, FALSE, 0);
+ gtk_box_pack_start (
+ GTK_BOX (container), check_again, FALSE, FALSE, 0);
gtk_widget_show (check_again);
check_always_ignore = gtk_check_button_new_with_mnemonic (
_("_Always ignore Reply-To: for mailing lists."));
gtk_box_pack_start (
- GTK_BOX (vbox), check_always_ignore, FALSE, FALSE, 0);
+ GTK_BOX (container), check_always_ignore,
+ FALSE, FALSE, 0);
gtk_widget_show (check_always_ignore);
response = gtk_dialog_run (GTK_DIALOG (dialog));
@@ -1487,13 +1496,19 @@ action_mail_reply_sender_check (CamelFolder *folder,
gtk_widget_destroy (dialog);
- if (response == GTK_RESPONSE_NO)
- type = E_MAIL_REPLY_TO_FROM;
- else if (response == GTK_RESPONSE_OK)
- type = E_MAIL_REPLY_TO_LIST;
- else if (response == GTK_RESPONSE_CANCEL || response == GTK_RESPONSE_DELETE_EVENT) {
- g_object_unref (message);
- goto exit;
+ switch (response) {
+ case GTK_RESPONSE_NO:
+ type = E_MAIL_REPLY_TO_FROM;
+ break;
+ case GTK_RESPONSE_OK:
+ type = E_MAIL_REPLY_TO_LIST;
+ break;
+ case GTK_RESPONSE_CANCEL:
+ case GTK_RESPONSE_DELETE_EVENT:
+ g_object_unref (message);
+ goto exit;
+ default:
+ break;
}
}