Mercurial > pidgin
comparison console/gntdebug.c @ 14125:7dfa024c1a4a
[gaim-migrate @ 16763]
Redirect the debug messages to stderr when started with -d.
Fix the order of the windows in the windowlist.
committer: Tailor Script <tailor@pidgin.im>
| author | Sadrul Habib Chowdhury <imadil@gmail.com> |
|---|---|
| date | Tue, 15 Aug 2006 04:07:38 +0000 |
| parents | 2d1b41e3cf0d |
| children | 43d9afee9c3c |
comparison
equal
deleted
inserted
replaced
| 14124:e5db1a91e190 | 14125:7dfa024c1a4a |
|---|---|
| 78 reset_debug_win(GntWidget *w, gpointer null) | 78 reset_debug_win(GntWidget *w, gpointer null) |
| 79 { | 79 { |
| 80 debug.window = debug.tview = NULL; | 80 debug.window = debug.tview = NULL; |
| 81 } | 81 } |
| 82 | 82 |
| 83 static void | |
| 84 print_stderr(const char *string) | |
| 85 { | |
| 86 g_printerr("%s", string); | |
| 87 } | |
| 88 | |
| 83 void gg_debug_window_show() | 89 void gg_debug_window_show() |
| 84 { | 90 { |
| 85 if (debug.window == NULL) | 91 if (debug.window == NULL) |
| 86 { | 92 { |
| 87 debug.window = gnt_vbox_new(FALSE); | 93 debug.window = gnt_vbox_new(FALSE); |
| 100 gnt_widget_show(debug.window); | 106 gnt_widget_show(debug.window); |
| 101 } | 107 } |
| 102 | 108 |
| 103 void gg_debug_init() | 109 void gg_debug_init() |
| 104 { | 110 { |
| 111 g_set_print_handler(print_stderr); /* Redirect the debug messages to stderr */ | |
| 105 if (gaim_debug_is_enabled()) | 112 if (gaim_debug_is_enabled()) |
| 106 gg_debug_window_show(); | 113 gg_debug_window_show(); |
| 107 } | 114 } |
| 108 | 115 |
| 109 void gg_debug_uninit() | 116 void gg_debug_uninit() |
