# HG changeset patch # User Sadrul Habib Chowdhury # Date 1155614858 0 # Node ID 7dfa024c1a4a7bf036a4b382ab4794ec40025e47 # Parent e5db1a91e190d1bd30928435c567a63a2ab8f278 [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 diff -r e5db1a91e190 -r 7dfa024c1a4a console/gntdebug.c --- a/console/gntdebug.c Tue Aug 15 04:05:27 2006 +0000 +++ b/console/gntdebug.c Tue Aug 15 04:07:38 2006 +0000 @@ -80,6 +80,12 @@ debug.window = debug.tview = NULL; } +static void +print_stderr(const char *string) +{ + g_printerr("%s", string); +} + void gg_debug_window_show() { if (debug.window == NULL) @@ -102,6 +108,7 @@ 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(); } diff -r e5db1a91e190 -r 7dfa024c1a4a console/libgnt/gntmain.c --- a/console/libgnt/gntmain.c Tue Aug 15 04:05:27 2006 +0000 +++ b/console/libgnt/gntmain.c Tue Aug 15 04:07:38 2006 +0000 @@ -273,8 +273,8 @@ { GntBox *box = GNT_BOX(iter->data); - gnt_tree_add_row_after(GNT_TREE(tree), box, - gnt_tree_create_row(GNT_TREE(tree), box->title), NULL, NULL); + gnt_tree_add_row_last(GNT_TREE(tree), box, + gnt_tree_create_row(GNT_TREE(tree), box->title), NULL); update_window_in_list(GNT_WIDGET(box)); } @@ -752,9 +752,9 @@ if ((GNT_IS_BOX(widget) && GNT_BOX(widget)->title) && window_list.window != widget && GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_CAN_TAKE_FOCUS)) { - gnt_tree_add_row_after(GNT_TREE(window_list.tree), widget, + gnt_tree_add_row_last(GNT_TREE(window_list.tree), widget, gnt_tree_create_row(GNT_TREE(window_list.tree), GNT_BOX(widget)->title), - NULL, NULL); + NULL); update_window_in_list(widget); } }