aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-alert-dialog.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 /e-util/e-alert-dialog.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 'e-util/e-alert-dialog.c')
-rw-r--r--e-util/e-alert-dialog.c23
1 files changed, 21 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;
+}