diff --git a/ChangeLog b/ChangeLog index 61f82001..c6cc9c02 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-09-27 Enrico Tröger + + * src/keyfile.c: + Don't load invalid window geometry data from the config file. + + 2007-09-27 Nick Treleaven * src/keybindings.c: diff --git a/src/keyfile.c b/src/keyfile.c index b5adfcc7..19dfd25c 100644 --- a/src/keyfile.c +++ b/src/keyfile.c @@ -611,11 +611,20 @@ static void load_ui_prefs(GKeyFile *config) } else { + gint i; + ui_prefs.geometry[0] = geo[0]; ui_prefs.geometry[1] = geo[1]; ui_prefs.geometry[2] = geo[2]; ui_prefs.geometry[3] = geo[3]; ui_prefs.geometry[4] = geo[4]; + + // don't use insane values + for (i = 0; i < 4; i++) + { + if (ui_prefs.geometry[i] < -1) + ui_prefs.geometry[i] = -1; + } } hpan_position = utils_get_setting_integer(config, PACKAGE, "treeview_position", 156); vpan_position = utils_get_setting_integer(config, PACKAGE, "msgwindow_position", (geo) ?