# HG changeset patch # User Sadrul Habib Chowdhury # Date 1156198099 0 # Node ID 43d9afee9c3c5ee614a963767f985b16c254e18d # Parent 2f82c2494f3fdb65cb3cb2da2e135338addbfda9 [gaim-migrate @ 16959] Fix a bug where `gntgaim -v` does bad things to the terminal. Bug reported by Mark Schneider. committer: Tailor Script diff -r 2f82c2494f3f -r 43d9afee9c3c console/gntdebug.c --- a/console/gntdebug.c Mon Aug 21 21:35:38 2006 +0000 +++ b/console/gntdebug.c Mon Aug 21 22:08:19 2006 +0000 @@ -106,11 +106,18 @@ gnt_widget_show(debug.window); } +static gboolean +start_with_debugwin(gpointer null) +{ + gg_debug_window_show(); + return FALSE; +} + void gg_debug_init() { g_set_print_handler(print_stderr); /* Redirect the debug messages to stderr */ if (gaim_debug_is_enabled()) - gg_debug_window_show(); + g_timeout_add(0, start_with_debugwin, NULL); } void gg_debug_uninit() diff -r 2f82c2494f3f -r 43d9afee9c3c console/gntgaim.c --- a/console/gntgaim.c Mon Aug 21 21:35:38 2006 +0000 +++ b/console/gntgaim.c Mon Aug 21 22:08:19 2006 +0000 @@ -153,7 +153,6 @@ " -v, --version display the current version and exit\n"), VERSION, name); } - gnt_quit(); gaim_print_utf8_to_console(stdout, text); g_free(text); } @@ -305,8 +304,6 @@ /* XXX: Don't puke */ freopen(".error", "w", stderr); - gnt_init(); - /* Initialize the libgaim stuff */ if (!init_libgaim(argc, argv)) return 0;