aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Gryniewicz <dang@gentoo.org>2006-08-23 17:02:48 +0800
committerAndre Klapper <aklapper@src.gnome.org>2006-08-23 17:02:48 +0800
commit6c0397b958bb747b8381a116f082671b0f4d9d02 (patch)
tree8ac950d81d939451c0886c45d858b043fe20f103
parent7f04e3b5e8b22a55ef9c9557421d00817ed287ba (diff)
downloadgsoc2013-evolution-6c0397b958bb747b8381a116f082671b0f4d9d02.tar.gz
gsoc2013-evolution-6c0397b958bb747b8381a116f082671b0f4d9d02.tar.zst
gsoc2013-evolution-6c0397b958bb747b8381a116f082671b0f4d9d02.zip
Make sure default window sizes are positive numbers. Fixes bug 349967.
2006-08-23 Daniel Gryniewicz <dang@gentoo.org> * e-shell-window.c: Make sure default window sizes are positive numbers. Fixes bug 349967. Committed by Andre Klapper. svn path=/trunk/; revision=32640
-rw-r--r--shell/ChangeLog6
-rw-r--r--shell/e-shell-window.c8
2 files changed, 11 insertions, 3 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 6e0832b4ec..d881699f43 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,9 @@
+2006-08-23 Daniel Gryniewicz <dang@gentoo.org>
+
+ * e-shell-window.c:
+ Make sure default window sizes are positive numbers.
+ Fixes bug 349967. Committed by Andre Klapper.
+
2006-08-22 Andre Klapper <a9016009@gmx.de>
* e-shell-window-commands.c: Update some credits for
diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c
index e5fc700ab0..711f265e35 100644
--- a/shell/e-shell-window.c
+++ b/shell/e-shell-window.c
@@ -993,6 +993,7 @@ e_shell_window_new (EShell *shell,
BonoboUIContainer *ui_container;
char *default_component_id = NULL;
char *xmlfile;
+ gint width, height;
if (bonobo_window_construct (BONOBO_WINDOW (window),
bonobo_ui_container_new (),
@@ -1050,9 +1051,10 @@ e_shell_window_new (EShell *shell,
g_free(default_component_id);
g_object_unref (gconf_client);
- gtk_window_set_default_size (GTK_WINDOW (window),
- gconf_client_get_int (gconf_client, "/apps/evolution/shell/view_defaults/width", NULL),
- gconf_client_get_int (gconf_client, "/apps/evolution/shell/view_defaults/height", NULL));
+ width = gconf_client_get_int (gconf_client, "/apps/evolution/shell/view_defaults/width", NULL);
+ height = gconf_client_get_int (gconf_client, "/apps/evolution/shell/view_defaults/height", NULL);
+ gtk_window_set_default_size (GTK_WINDOW (window), (width >= 0) ? width : 0,
+ (height >= 0) ? height : 0);
if (gconf_client_get_bool (gconf_client, "/apps/evolution/shell/view_defaults/maximized", NULL)) {
gtk_window_maximize (GTK_WINDOW (window));
}