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:01:36 +0800
commit5b2ee4af6fafecfff78f15662c94e62470a9a43d (patch)
tree5bcee8c0d9e1fcd968303cf63ea620ce5ace2d11 /e-util
parent13089f0d5088cf138697121a0839bd7d3ed85e42 (diff)
downloadgsoc2013-evolution-5b2ee4af6fafecfff78f15662c94e62470a9a43d.tar.gz
gsoc2013-evolution-5b2ee4af6fafecfff78f15662c94e62470a9a43d.tar.zst
gsoc2013-evolution-5b2ee4af6fafecfff78f15662c94e62470a9a43d.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().
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);
}