comparison console/gntdebug.c @ 14059:2d1b41e3cf0d

[gaim-migrate @ 16674] Add a way to change some preferences (the preferences for the conversations do not do anything yet). I used the request-api for this, which I think is cool. But too many preferences will make the dialog long, which may not fit in the screen. It looks alright for now though. You can pop the dialog up with "/prefs" command in a converastion. And some other minor fixes. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Wed, 09 Aug 2006 03:41:45 +0000
parents 7573bd40a190
children 7dfa024c1a4a
comparison
equal deleted inserted replaced
14058:32a71e64ceae 14059:2d1b41e3cf0d
17 static gboolean 17 static gboolean
18 debug_window_kpress_cb(GntWidget *wid, const char *key, GntTextView *view) 18 debug_window_kpress_cb(GntWidget *wid, const char *key, GntTextView *view)
19 { 19 {
20 if (key[0] == 27) 20 if (key[0] == 27)
21 { 21 {
22 /* XXX: This doesn't seem to always work */
23 if (strcmp(key+1, GNT_KEY_DOWN) == 0) 22 if (strcmp(key+1, GNT_KEY_DOWN) == 0)
24 gnt_text_view_scroll(view, 1); 23 gnt_text_view_scroll(view, 1);
25 else if (strcmp(key+1, GNT_KEY_UP) == 0) 24 else if (strcmp(key+1, GNT_KEY_UP) == 0)
26 gnt_text_view_scroll(view, -1); 25 gnt_text_view_scroll(view, -1);
27 else if (strcmp(key+1, GNT_KEY_PGDOWN) == 0) 26 else if (strcmp(key+1, GNT_KEY_PGDOWN) == 0)
59 default: 58 default:
60 break; 59 break;
61 } 60 }
62 61
63 gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(debug.tview), args, flag); 62 gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(debug.tview), args, flag);
64 gnt_text_view_next_line(GNT_TEXT_VIEW(debug.tview));
65 gnt_text_view_scroll(GNT_TEXT_VIEW(debug.tview), 0); 63 gnt_text_view_scroll(GNT_TEXT_VIEW(debug.tview), 0);
66
67 g_signal_connect(G_OBJECT(debug.window), "key_pressed", G_CALLBACK(debug_window_kpress_cb), debug.tview);
68 } 64 }
69 } 65 }
70 66
71 static GaimDebugUiOps uiops = 67 static GaimDebugUiOps uiops =
72 { 68 {
93 gnt_box_set_title(GNT_BOX(debug.window), _("Debug Window")); 89 gnt_box_set_title(GNT_BOX(debug.window), _("Debug Window"));
94 90
95 debug.tview = gnt_text_view_new(); 91 debug.tview = gnt_text_view_new();
96 gnt_box_add_widget(GNT_BOX(debug.window), debug.tview); 92 gnt_box_add_widget(GNT_BOX(debug.window), debug.tview);
97 93
94 /* XXX: Add checkboxes/buttons for Clear, Pause, Timestamps */
95
98 g_signal_connect(G_OBJECT(debug.window), "destroy", G_CALLBACK(reset_debug_win), NULL); 96 g_signal_connect(G_OBJECT(debug.window), "destroy", G_CALLBACK(reset_debug_win), NULL);
97 g_signal_connect(G_OBJECT(debug.window), "key_pressed", G_CALLBACK(debug_window_kpress_cb), debug.tview);
99 } 98 }
100 99
101 gnt_widget_show(debug.window); 100 gnt_widget_show(debug.window);
102 } 101 }
103 102