changeset 14274:43d9afee9c3c

[gaim-migrate @ 16959] Fix a bug where `gntgaim -v` does bad things to the terminal. Bug reported by Mark Schneider. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Mon, 21 Aug 2006 22:08:19 +0000
parents 2f82c2494f3f
children c61d932c2a52
files console/gntdebug.c console/gntgaim.c
diffstat 2 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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()
--- 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;