aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-05-30 06:54:55 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-05-30 07:15:21 +0800
commit4cdeae1de597d292264a15cf0afd05d34a514b9e (patch)
treed4bc39125c33bf67c98d5cc01b9cb4f5ca2891f4 /e-util
parent481ec13e185810444cf252313752cacb6e0b1d03 (diff)
downloadgsoc2013-evolution-4cdeae1de597d292264a15cf0afd05d34a514b9e.tar
gsoc2013-evolution-4cdeae1de597d292264a15cf0afd05d34a514b9e.tar.gz
gsoc2013-evolution-4cdeae1de597d292264a15cf0afd05d34a514b9e.tar.bz2
gsoc2013-evolution-4cdeae1de597d292264a15cf0afd05d34a514b9e.tar.lz
gsoc2013-evolution-4cdeae1de597d292264a15cf0afd05d34a514b9e.tar.xz
gsoc2013-evolution-4cdeae1de597d292264a15cf0afd05d34a514b9e.tar.zst
gsoc2013-evolution-4cdeae1de597d292264a15cf0afd05d34a514b9e.zip
Make EAlertDialog non-resizable.
Making EAlertDialog non-resizable is the only way at present for GTK+ to pick a resonable default size, otherwise we get alerts looking like this: https://bugzilla.gnome.org/attachment.cgi?id=221303 See https://bugzilla.gnome.org/681937 for details. Also drop the default window size hack in alert_dialog_constructed(). (cherry picked from commit 5b2ee4af6fafecfff78f15662c94e62470a9a43d)
Diffstat (limited to 'e-util')
-rw-r--r--e-util/e-alert-dialog.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/e-util/e-alert-dialog.c b/e-util/e-alert-dialog.c
index 8a75101997..b4e12ad8c9 100644
--- a/e-util/e-alert-dialog.c
+++ b/e-util/e-alert-dialog.c
@@ -125,8 +125,6 @@ alert_dialog_constructed (GObject *object)
GList *actions;
const gchar *primary, *secondary;
gint default_response;
- gint min_width = -1, prefer_width = -1;
- gint height;
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (e_alert_dialog_parent_class)->constructed (object);
@@ -138,6 +136,11 @@ alert_dialog_constructed (GObject *object)
gtk_window_set_title (GTK_WINDOW (dialog), " ");
+ /* XXX Making the window non-resizable is the only way at
+ * present for GTK+ to pick a reasonable default size.
+ * See https://bugzilla.gnome.org/681937 for details. */
+ gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
+
action_area = gtk_dialog_get_action_area (GTK_DIALOG (dialog));
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
@@ -251,17 +254,6 @@ alert_dialog_constructed (GObject *object)
gtk_widget_set_can_focus (widget, FALSE);
gtk_widget_show (widget);
- widget = GTK_WIDGET (dialog);
-
- height = gtk_widget_get_allocated_height (widget);
- gtk_widget_get_preferred_width_for_height (
- widget, height, &min_width, &prefer_width);
- if (min_width < prefer_width)
- gtk_window_set_default_size (
- GTK_WINDOW (dialog), MIN (
- (min_width + prefer_width) / 2,
- min_width * 5 / 4), -1);
-
pango_attr_list_unref (list);
}