aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/backup-restore
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 /plugins/backup-restore
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 'plugins/backup-restore')
-rw-r--r--plugins/backup-restore/backup-restore.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/plugins/backup-restore/backup-restore.c b/plugins/backup-restore/backup-restore.c
index 2ff0ff1bc9..aa0693ece3 100644
--- a/plugins/backup-restore/backup-restore.c
+++ b/plugins/backup-restore/backup-restore.c
@@ -113,7 +113,9 @@ sanity_check (const gchar *filename)
static guint32
dialog_prompt_user (GtkWindow *parent, const gchar *string, const gchar *tag, ...)
{
- GtkWidget *mbox, *check = NULL;
+ GtkWidget *dialog;
+ GtkWidget *check = NULL;
+ GtkWidget *container;
va_list ap;
gint button;
guint32 mask = 0;
@@ -123,24 +125,25 @@ dialog_prompt_user (GtkWindow *parent, const gchar *string, const gchar *tag, ..
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));
+
check = gtk_check_button_new_with_mnemonic (string);
/* We should hardcode this to true */
- gtk_toggle_button_set_active ((GtkToggleButton *)check, TRUE);
- gtk_container_set_border_width ((GtkContainer *)check, 12);
- gtk_box_pack_start ((GtkBox *)gtk_dialog_get_content_area ((GtkDialog *) mbox), check, TRUE, TRUE, 0);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), TRUE);
+ 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 (button == GTK_RESPONSE_YES)
mask |= BR_OK;
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check)))
mask |= BR_START;
- gtk_widget_destroy (mbox);
+ gtk_widget_destroy (dialog);
return mask;
}