src/gtkdebug.c

changeset 5625
ac8c09def58a
parent 5535
21c0f915e06a
child 5631
7f510b22ccf5
equal deleted inserted replaced
5624:b1240853c0e7 5625:ac8c09def58a
179 gtk_widget_show_all(win->window); 179 gtk_widget_show_all(win->window);
180 180
181 return win; 181 return win;
182 } 182 }
183 183
184 static void
185 debug_enabled_cb(const char *name, GaimPrefType type, gpointer value,
186 gpointer data)
187 {
188 if (debug_win == NULL)
189 gaim_gtk_debug_window_show();
190 else
191 gaim_gtk_debug_window_hide();
192 }
193
194 void
195 gaim_gtk_debug_init(void)
196 {
197 /* Debug window preferences. */
198 gaim_prefs_add_none("/gaim/gtk/debug");
199 gaim_prefs_add_bool("/gaim/gtk/debug/enabled", FALSE);
200 gaim_prefs_add_bool("/gaim/gtk/debug/timestamps", FALSE);
201 gaim_prefs_add_bool("/gaim/gtk/debug/toolbar", TRUE);
202 gaim_prefs_add_int("/gaim/gtk/debug/width", 400);
203 gaim_prefs_add_int("/gaim/gtk/debug/height", 150);
204
205 gaim_prefs_connect_callback("/gaim/gtk/debug/enabled",
206 debug_enabled_cb, NULL);
207 }
208
184 void 209 void
185 gaim_gtk_debug_window_show(void) 210 gaim_gtk_debug_window_show(void)
186 { 211 {
187 if (debug_win == NULL) 212 if (debug_win == NULL)
188 debug_win = debug_window_new(); 213 debug_win = debug_window_new();

mercurial