comparison console/gntdebug.c @ 13985:a7b1d2ab9cb0

[gaim-migrate @ 16555] Do not crash when you close the debug window, or use the "/clear" command. Enable the stuff in gntaccount.c that were waiting on the request-ui. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Mon, 24 Jul 2006 01:03:07 +0000
parents b7a99d54a5a9
children 7573bd40a190
comparison
equal deleted inserted replaced
13984:599b35acd842 13985:a7b1d2ab9cb0
78 GaimDebugUiOps *gg_debug_get_ui_ops() 78 GaimDebugUiOps *gg_debug_get_ui_ops()
79 { 79 {
80 return &uiops; 80 return &uiops;
81 } 81 }
82 82
83 static void
84 reset_debug_win(GntWidget *w, gpointer null)
85 {
86 debug.window = debug.tview = NULL;
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);
88 gnt_box_set_toplevel(GNT_BOX(debug.window), TRUE); 94 gnt_box_set_toplevel(GNT_BOX(debug.window), TRUE);
89 gnt_box_set_title(GNT_BOX(debug.window), _("Debug Window")); 95 gnt_box_set_title(GNT_BOX(debug.window), _("Debug Window"));
90 96
91 debug.tview = gnt_text_view_new(); 97 debug.tview = gnt_text_view_new();
92 gnt_box_add_widget(GNT_BOX(debug.window), debug.tview); 98 gnt_box_add_widget(GNT_BOX(debug.window), debug.tview);
99
100 g_signal_connect(G_OBJECT(debug.window), "destroy", G_CALLBACK(reset_debug_win), NULL);
93 } 101 }
94 102
95 gnt_widget_show(debug.window); 103 gnt_widget_show(debug.window);
96 } 104 }
97 105