aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-utils.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-03-25 04:47:53 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-03-25 04:50:19 +0800
commita09a95559ef640f23da644aef845607774c79f38 (patch)
treea1409cab397c54b6e8581178dfcb9b5cd01379f8 /mail/em-utils.c
parentd5d651cf7885a2d61cb542a990f00489537224c2 (diff)
downloadgsoc2013-evolution-a09a95559ef640f23da644aef845607774c79f38.tar
gsoc2013-evolution-a09a95559ef640f23da644aef845607774c79f38.tar.gz
gsoc2013-evolution-a09a95559ef640f23da644aef845607774c79f38.tar.bz2
gsoc2013-evolution-a09a95559ef640f23da644aef845607774c79f38.tar.lz
gsoc2013-evolution-a09a95559ef640f23da644aef845607774c79f38.tar.xz
gsoc2013-evolution-a09a95559ef640f23da644aef845607774c79f38.tar.zst
gsoc2013-evolution-a09a95559ef640f23da644aef845607774c79f38.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/em-utils.c')
-rw-r--r--mail/em-utils.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/mail/em-utils.c b/mail/em-utils.c
index 15008abd51..e674c61528 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -128,7 +128,8 @@ em_utils_prompt_user (GtkWindow *parent,
const gchar *tag,
...)
{
- GtkWidget *mbox, *check = NULL;
+ GtkWidget *dialog;
+ GtkWidget *check = NULL;
GtkWidget *container;
va_list ap;
gint button;
@@ -146,24 +147,27 @@ em_utils_prompt_user (GtkWindow *parent,
alert = e_alert_new_valist (tag, ap);
va_end (ap);
- mbox = e_alert_dialog_new (parent, alert);
+ dialog = e_alert_dialog_new (parent, alert);
g_object_unref (alert);
+ container = e_alert_dialog_get_content_area (E_ALERT_DIALOG (dialog));
+
if (promptkey) {
- check = gtk_check_button_new_with_mnemonic (_("_Do not show this message again"));
- container = gtk_dialog_get_content_area (GTK_DIALOG (mbox));
- gtk_box_pack_start (GTK_BOX (container), check, FALSE, FALSE, 0);
+ check = gtk_check_button_new_with_mnemonic (
+ _("_Do not show this message again"));
+ gtk_box_pack_start (
+ GTK_BOX (container), check, FALSE, FALSE, 0);
gtk_widget_show (check);
}
- button = gtk_dialog_run ((GtkDialog *) mbox);
+ button = gtk_dialog_run (GTK_DIALOG (dialog));
if (promptkey)
gconf_client_set_bool (
client, promptkey,
!gtk_toggle_button_get_active (
GTK_TOGGLE_BUTTON (check)), NULL);
- gtk_widget_destroy (mbox);
+ gtk_widget_destroy (dialog);
g_object_unref (client);