aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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));
}