Don't load invalid window geometry data from the config file.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1912 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2007-09-27 11:29:54 +00:00
parent 14e661f9fd
commit 86adc018ba
2 changed files with 15 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2007-09-27 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/keyfile.c:
Don't load invalid window geometry data from the config file.
2007-09-27 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/keybindings.c:

View File

@ -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) ?