Mercurial > pidgin
changeset 5642:1693a3027dc8
[gaim-migrate @ 6056]
Moved the add prefs for the GTK debug window back into gtkprefs.c. This was
causing a wonderful problem of debug prefs getting overwritten, so this is
unfortunately a special case. Aww, my prefs init :(
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sun, 01 Jun 2003 21:18:48 +0000 |
parents | 5e9babc828c4 |
children | eb685809108b |
files | src/gtkdebug.c src/gtkprefs.c src/main.c |
diffstat | 3 files changed, 19 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkdebug.c Sun Jun 01 20:27:35 2003 +0000 +++ b/src/gtkdebug.c Sun Jun 01 21:18:48 2003 +0000 @@ -105,6 +105,9 @@ height = gaim_prefs_get_int("/gaim/gtk/debug/height"); GAIM_DIALOG(win->window); + gaim_debug(GAIM_DEBUG_INFO, "gtkdebug", "Setting dimensions to %d, %d\n", + width, height); + gtk_window_set_default_size(GTK_WINDOW(win->window), width, height); gtk_window_set_role(GTK_WINDOW(win->window), "debug"); gtk_window_set_title(GTK_WINDOW(win->window), _("Debug Window")); @@ -193,14 +196,6 @@ void gaim_gtk_debug_init(void) { - /* Debug window preferences. */ - gaim_prefs_add_none("/gaim/gtk/debug"); - gaim_prefs_add_bool("/gaim/gtk/debug/enabled", FALSE); - gaim_prefs_add_bool("/gaim/gtk/debug/timestamps", FALSE); - gaim_prefs_add_bool("/gaim/gtk/debug/toolbar", TRUE); - gaim_prefs_add_int("/gaim/gtk/debug/width", 400); - gaim_prefs_add_int("/gaim/gtk/debug/height", 150); - gaim_prefs_connect_callback("/gaim/gtk/debug/enabled", debug_enabled_cb, NULL); }
--- a/src/gtkprefs.c Sun Jun 01 20:27:35 2003 +0000 +++ b/src/gtkprefs.c Sun Jun 01 21:18:48 2003 +0000 @@ -2782,6 +2782,20 @@ gaim_prefs_add_int("/gaim/gtk/conversations/im/default_height", 160); gaim_prefs_add_int("/gaim/gtk/conversations/im/entry_height", 50); + /* Debug window preferences. */ + /* + * NOTE: This must be set before prefs are loaded, and the callbacks + * set after they are loaded, since prefs sets the enabled + * preference here and that loads the window, which calls the + * configure event, which overrrides the width and height! :P + */ + gaim_prefs_add_none("/gaim/gtk/debug"); + gaim_prefs_add_bool("/gaim/gtk/debug/enabled", FALSE); + gaim_prefs_add_bool("/gaim/gtk/debug/timestamps", FALSE); + gaim_prefs_add_bool("/gaim/gtk/debug/toolbar", TRUE); + gaim_prefs_add_int("/gaim/gtk/debug/width", 450); + gaim_prefs_add_int("/gaim/gtk/debug/height", 250); + /* Idle */ gaim_prefs_add_none("/gaim/gtk/idle"); gaim_prefs_add_string("/gaim/gtk/idle/reporting_method", "system");
--- a/src/main.c Sun Jun 01 20:27:35 2003 +0000 +++ b/src/main.c Sun Jun 01 21:18:48 2003 +0000 @@ -887,13 +887,13 @@ gaim_prefs_init(); gaim_gtk_prefs_init(); - gaim_gtk_debug_init(); - if (!gaim_prefs_load()) { load_prefs(); gaim_prefs_sync(); } + gaim_gtk_debug_init(); + plugin_search_paths[0] = LIBDIR; plugin_search_paths[1] = gaim_user_dir(); plugin_search_paths[2] = g_strdup_printf("%s/plugins", gaim_user_dir());