Mercurial > pidgin
comparison src/gtkdebug.c @ 5794:5e93fc46d1af
[gaim-migrate @ 6219]
Removed the __ prefix from static functions. I love them, but ANSI C
knocked on my door and threatened to sue, saying they own all rights to
them, so I was forced to remove them.
committer: Tailor Script <tailor@pidgin.im>
| author | Christian Hammond <chipx86@chipx86.com> |
|---|---|
| date | Sat, 07 Jun 2003 07:57:24 +0000 |
| parents | ec032cb2f9ec |
| children | eb9cfee31244 |
comparison
equal
deleted
inserted
replaced
| 5793:952710ac6635 | 5794:5e93fc46d1af |
|---|---|
| 62 | 62 |
| 63 return FALSE; | 63 return FALSE; |
| 64 } | 64 } |
| 65 | 65 |
| 66 static gboolean | 66 static gboolean |
| 67 __configure_cb(GtkWidget *w, GdkEventConfigure *event, DebugWindow *win) | 67 configure_cb(GtkWidget *w, GdkEventConfigure *event, DebugWindow *win) |
| 68 { | 68 { |
| 69 if (GTK_WIDGET_VISIBLE(w)) { | 69 if (GTK_WIDGET_VISIBLE(w)) { |
| 70 gaim_prefs_set_int("/gaim/gtk/debug/width", event->width); | 70 gaim_prefs_set_int("/gaim/gtk/debug/width", event->width); |
| 71 gaim_prefs_set_int("/gaim/gtk/debug/height", event->height); | 71 gaim_prefs_set_int("/gaim/gtk/debug/height", event->height); |
| 72 } | 72 } |
| 73 | 73 |
| 74 return FALSE; | 74 return FALSE; |
| 75 } | 75 } |
| 76 | 76 |
| 77 static void | 77 static void |
| 78 __clear_cb(GtkWidget *w, DebugWindow *win) | 78 clear_cb(GtkWidget *w, DebugWindow *win) |
| 79 { | 79 { |
| 80 gtk_imhtml_clear(GTK_IMHTML(win->text)); | 80 gtk_imhtml_clear(GTK_IMHTML(win->text)); |
| 81 } | 81 } |
| 82 | 82 |
| 83 static void | 83 static void |
| 84 __pause_cb(GtkWidget *w, DebugWindow *win) | 84 pause_cb(GtkWidget *w, DebugWindow *win) |
| 85 { | 85 { |
| 86 win->paused = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)); | 86 win->paused = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)); |
| 87 } | 87 } |
| 88 | 88 |
| 89 static void | 89 static void |
| 90 __timestamps_cb(GtkWidget *w, DebugWindow *win) | 90 timestamps_cb(GtkWidget *w, DebugWindow *win) |
| 91 { | 91 { |
| 92 win->timestamps = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)); | 92 win->timestamps = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)); |
| 93 | 93 |
| 94 gaim_prefs_set_bool("/gaim/gtk/debug/timestamps", win->timestamps); | 94 gaim_prefs_set_bool("/gaim/gtk/debug/timestamps", win->timestamps); |
| 95 } | 95 } |
| 125 gtk_window_set_title(GTK_WINDOW(win->window), _("Debug Window")); | 125 gtk_window_set_title(GTK_WINDOW(win->window), _("Debug Window")); |
| 126 | 126 |
| 127 g_signal_connect(G_OBJECT(win->window), "delete_event", | 127 g_signal_connect(G_OBJECT(win->window), "delete_event", |
| 128 G_CALLBACK(debug_window_destroy), NULL); | 128 G_CALLBACK(debug_window_destroy), NULL); |
| 129 g_signal_connect(G_OBJECT(win->window), "configure_event", | 129 g_signal_connect(G_OBJECT(win->window), "configure_event", |
| 130 G_CALLBACK(__configure_cb), win); | 130 G_CALLBACK(configure_cb), win); |
| 131 | 131 |
| 132 /* Setup the vbox */ | 132 /* Setup the vbox */ |
| 133 vbox = gtk_vbox_new(FALSE, 0); | 133 vbox = gtk_vbox_new(FALSE, 0); |
| 134 gtk_container_add(GTK_CONTAINER(win->window), vbox); | 134 gtk_container_add(GTK_CONTAINER(win->window), vbox); |
| 135 | 135 |
| 152 NULL, NULL, NULL, NULL, -1); | 152 NULL, NULL, NULL, NULL, -1); |
| 153 #endif | 153 #endif |
| 154 | 154 |
| 155 /* Clear button */ | 155 /* Clear button */ |
| 156 gtk_toolbar_insert_stock(GTK_TOOLBAR(toolbar), GTK_STOCK_CLEAR, | 156 gtk_toolbar_insert_stock(GTK_TOOLBAR(toolbar), GTK_STOCK_CLEAR, |
| 157 NULL, NULL, G_CALLBACK(__clear_cb), win, -1); | 157 NULL, NULL, G_CALLBACK(clear_cb), win, -1); |
| 158 | 158 |
| 159 gtk_toolbar_insert_space(GTK_TOOLBAR(toolbar), -1); | 159 gtk_toolbar_insert_space(GTK_TOOLBAR(toolbar), -1); |
| 160 | 160 |
| 161 /* Pause */ | 161 /* Pause */ |
| 162 gtk_toolbar_append_element(GTK_TOOLBAR(toolbar), | 162 gtk_toolbar_append_element(GTK_TOOLBAR(toolbar), |
| 163 GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL, | 163 GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL, |
| 164 _("Pause"), NULL, NULL, | 164 _("Pause"), NULL, NULL, |
| 165 NULL, G_CALLBACK(__pause_cb), win); | 165 NULL, G_CALLBACK(pause_cb), win); |
| 166 | 166 |
| 167 /* Timestamps */ | 167 /* Timestamps */ |
| 168 button = gtk_toolbar_append_element(GTK_TOOLBAR(toolbar), | 168 button = gtk_toolbar_append_element(GTK_TOOLBAR(toolbar), |
| 169 GTK_TOOLBAR_CHILD_TOGGLEBUTTON, | 169 GTK_TOOLBAR_CHILD_TOGGLEBUTTON, |
| 170 NULL, _("Timestamps"), NULL, NULL, | 170 NULL, _("Timestamps"), NULL, NULL, |
| 171 NULL, G_CALLBACK(__timestamps_cb), | 171 NULL, G_CALLBACK(timestamps_cb), |
| 172 win); | 172 win); |
| 173 | 173 |
| 174 win->timestamps_handle = | 174 win->timestamps_handle = |
| 175 gaim_prefs_connect_callback("/gaim/gtk/debug/timestamps", | 175 gaim_prefs_connect_callback("/gaim/gtk/debug/timestamps", |
| 176 timestamps_pref_cb, button); | 176 timestamps_pref_cb, button); |
| 223 gaim_prefs_add_bool("/gaim/gtk/debug/toolbar", TRUE); | 223 gaim_prefs_add_bool("/gaim/gtk/debug/toolbar", TRUE); |
| 224 gaim_prefs_add_int("/gaim/gtk/debug/width", 450); | 224 gaim_prefs_add_int("/gaim/gtk/debug/width", 450); |
| 225 gaim_prefs_add_int("/gaim/gtk/debug/height", 250); | 225 gaim_prefs_add_int("/gaim/gtk/debug/height", 250); |
| 226 | 226 |
| 227 gaim_prefs_connect_callback("/gaim/gtk/debug/enabled", | 227 gaim_prefs_connect_callback("/gaim/gtk/debug/enabled", |
| 228 debug_enabled_cb, NULL); | 228 debug_enabled_cb, NULL); |
| 229 } | 229 } |
| 230 | 230 |
| 231 void | 231 void |
| 232 gaim_gtk_debug_window_show(void) | 232 gaim_gtk_debug_window_show(void) |
| 233 { | 233 { |
