diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-03-25 04:47:53 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:41:47 +0800 |
commit | eccfd921ed7a7017cf3b893c9146c4ee0438d86b (patch) | |
tree | c553f87e1b2e4a1fe22dd2c1f84f7cf577a6c26e /e-util | |
parent | 9539cc3ff38ee6453a017eb06ae64c53402fbe8f (diff) | |
download | gsoc2013-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 'e-util')
-rw-r--r-- | e-util/e-alert-dialog.c | 23 | ||||
-rw-r--r-- | e-util/e-alert-dialog.h | 1 |
2 files changed, 22 insertions, 2 deletions
diff --git a/e-util/e-alert-dialog.c b/e-util/e-alert-dialog.c index 6d24dcde65..83ef05c68e 100644 --- a/e-util/e-alert-dialog.c +++ b/e-util/e-alert-dialog.c @@ -26,7 +26,7 @@ #include "e-util.h" struct _EAlertDialogPrivate { - GtkWindow *parent; + GtkWidget *content_area; /* not referenced */ EAlert *alert; }; @@ -184,6 +184,7 @@ alert_dialog_constructed (GObject *object) widget = gtk_vbox_new (FALSE, 12); gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0); + dialog->priv->content_area = widget; gtk_widget_show (widget); container = widget; @@ -334,7 +335,7 @@ e_alert_run_dialog_for_args (GtkWindow *parent, /** * e_alert_dialog_get_alert: - * @dialog: a #EAlertDialog + * @dialog: an #EAlertDialog * * Returns the #EAlert associated with @dialog. * @@ -347,3 +348,21 @@ e_alert_dialog_get_alert (EAlertDialog *dialog) return dialog->priv->alert; } + +/** + * e_alert_dialog_get_content_area: + * @dialog: an #EAlertDialog + * + * Returns the vertical box containing the primary and secondary labels. + * Use this to pack additional widgets into the dialog with the proper + * horizontal alignment (maintaining the left margin below the image). + * + * Returns: the content area #GtkBox + **/ +GtkWidget * +e_alert_dialog_get_content_area (EAlertDialog *dialog) +{ + g_return_val_if_fail (E_IS_ALERT_DIALOG (dialog), NULL); + + return dialog->priv->content_area; +} diff --git a/e-util/e-alert-dialog.h b/e-util/e-alert-dialog.h index 5a23d72c4f..a8d1b1d6d5 100644 --- a/e-util/e-alert-dialog.h +++ b/e-util/e-alert-dialog.h @@ -73,6 +73,7 @@ gint e_alert_run_dialog_for_args (GtkWindow *parent, const gchar *tag, ...) G_GNUC_NULL_TERMINATED; EAlert * e_alert_dialog_get_alert (EAlertDialog *dialog); +GtkWidget * e_alert_dialog_get_content_area (EAlertDialog *dialog); G_END_DECLS |