--- a/glibre.c Sat Jul 24 14:29:09 2010 -0500
+++ b/glibre.c Sat Jul 24 14:50:29 2010 -0500
@@ -213,6 +213,7 @@
glibre_load_config(void) {
GKeyFile *key_file = NULL;
gchar *conf_file = NULL, *layout_file = NULL;
conf_file = glibre_config_file("glibre.conf");
@@ -243,6 +244,15 @@
+ width = g_key_file_get_integer(key_file, "window", "width", NULL); + height = g_key_file_get_integer(key_file, "window", "height", NULL); + width = (width > 0) ? width : -1; + height = (height > 0) ? height : -1; + gtk_window_set_default_size(GTK_WINDOW(window.window), width, height); glibre_load_entry(GLIBRE_ENTRIES_GROUP, GLIBRE_REGEX, window.regex_entry);
glibre_load_entry(GLIBRE_ENTRIES_GROUP, GLIBRE_REPLACE_WITH, window.replace_entry);
@@ -319,6 +329,7 @@
GKeyFile *key_file = NULL;
gchar *conf_dir = NULL, *conf_file = NULL, *layout_file = NULL;
conf_dir = glibre_config_file(NULL);
if(g_mkdir_with_parents(conf_dir, 0755) != 0) {
@@ -345,6 +356,11 @@
key_file = g_key_file_new();
+ gtk_window_get_size(GTK_WINDOW(window.window), &width, &height); + g_key_file_set_integer(key_file, "window", "width", width); + g_key_file_set_integer(key_file, "window", "height", height); glibre_save_entry(GLIBRE_ENTRIES_GROUP, GLIBRE_REGEX, window.regex_entry);
glibre_save_entry(GLIBRE_ENTRIES_GROUP, GLIBRE_REPLACE_WITH, window.replace_entry);