Mercurial > pidgin.yaz
diff src/gtkdebug.c @ 5625:73c9dc20e41a
[gaim-migrate @ 6032]
The GTK+ debug system now has its own init(), where it adds its own prefs
and sets up callbacks.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sun, 01 Jun 2003 03:21:55 +0000 |
parents | 933739f789f9 |
children | 960fe32ea9b7 |
line wrap: on
line diff
--- a/src/gtkdebug.c Sun Jun 01 02:19:35 2003 +0000 +++ b/src/gtkdebug.c Sun Jun 01 03:21:55 2003 +0000 @@ -181,6 +181,31 @@ return win; } +static void +debug_enabled_cb(const char *name, GaimPrefType type, gpointer value, + gpointer data) +{ + if (debug_win == NULL) + gaim_gtk_debug_window_show(); + else + gaim_gtk_debug_window_hide(); +} + +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); +} + void gaim_gtk_debug_window_show(void) {