Mercurial > pidgin.yaz
annotate src/gtkdebug.c @ 5429:7d1a44cbd347
[gaim-migrate @ 5809]
I kind of like that better.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sun, 18 May 2003 09:23:49 +0000 |
parents | 96bde36bb76b |
children | 908f3d9ee660 |
rev | line source |
---|---|
5212 | 1 /** |
2 * @file gtkdebug.c GTK+ Debug API | |
3 * @ingroup gtkui | |
4 * | |
5 * gaim | |
6 * | |
7 * Copyright (C) 2002-2003, Christian Hammond <chipx86@gnupdate.org> | |
8 * | |
9 * This program is free software; you can redistribute it and/or modify | |
10 * it under the terms of the GNU General Public License as published by | |
11 * the Free Software Foundation; either version 2 of the License, or | |
12 * (at your option) any later version. | |
13 * | |
14 * This program is distributed in the hope that it will be useful, | |
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 * GNU General Public License for more details. | |
18 * | |
19 * You should have received a copy of the GNU General Public License | |
20 * along with this program; if not, write to the Free Software | |
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
22 */ | |
23 #include "gtkdebug.h" | |
24 #include "gaim.h" | |
25 #include "gtkimhtml.h" | |
26 #include <gtk/gtk.h> | |
27 | |
28 typedef struct | |
29 { | |
30 GtkWidget *window; | |
5428
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
31 GtkWidget *text; |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
32 |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
33 gboolean timestamps; |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
34 gboolean paused; |
5212 | 35 |
36 } DebugWindow; | |
37 | |
38 static char debug_fg_colors[][8] = { | |
39 "#000000", /**< All debug levels. */ | |
40 "#666666", /**< Blather. */ | |
41 "#000000", /**< Information. */ | |
42 "#660000", /**< Warnings. */ | |
43 "#FF0000", /**< Errors. */ | |
44 "#FF0000", /**< Fatal errors. */ | |
45 }; | |
46 | |
47 static DebugWindow *debug_win = NULL; | |
48 | |
49 static gint | |
50 debug_window_destroy(GtkWidget *w, GdkEvent *event, void *unused) | |
51 { | |
52 g_free(debug_win); | |
53 debug_win = NULL; | |
54 | |
55 if (misc_options & OPT_MISC_DEBUG) | |
56 misc_options ^= OPT_MISC_DEBUG; | |
57 | |
58 save_prefs(); | |
59 | |
60 return FALSE; | |
61 } | |
62 | |
5428
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
63 static void |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
64 __clear_cb(GtkWidget *w, DebugWindow *win) |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
65 { |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
66 gtk_imhtml_clear(GTK_IMHTML(win->text)); |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
67 } |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
68 |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
69 static void |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
70 __pause_cb(GtkWidget *w, DebugWindow *win) |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
71 { |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
72 win->paused = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)); |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
73 } |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
74 |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
75 static void |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
76 __timestamps_cb(GtkWidget *w, DebugWindow *win) |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
77 { |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
78 win->timestamps = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)); |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
79 } |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
80 |
5212 | 81 static DebugWindow * |
82 debug_window_new(void) | |
83 { | |
84 DebugWindow *win; | |
5428
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
85 GtkWidget *vbox; |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
86 GtkWidget *toolbar; |
5212 | 87 GtkWidget *sw; |
88 | |
89 win = g_new0(DebugWindow, 1); | |
90 | |
91 GAIM_DIALOG(win->window); | |
92 gtk_window_set_default_size(GTK_WINDOW(win->window), 500, 200); | |
93 gtk_window_set_role(GTK_WINDOW(win->window), "debug"); | |
94 gtk_window_set_title(GTK_WINDOW(win->window), _("Debug Window")); | |
95 | |
96 g_signal_connect(G_OBJECT(win->window), "delete_event", | |
97 G_CALLBACK(debug_window_destroy), NULL); | |
98 | |
5428
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
99 /* Setup the vbox */ |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
100 vbox = gtk_vbox_new(FALSE, 0); |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
101 gtk_container_add(GTK_CONTAINER(win->window), vbox); |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
102 |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
103 /* Setup our top button bar thingie. */ |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
104 toolbar = gtk_toolbar_new(); |
5429
7d1a44cbd347
[gaim-migrate @ 5809]
Christian Hammond <chipx86@chipx86.com>
parents:
5428
diff
changeset
|
105 gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_BOTH_HORIZ); |
7d1a44cbd347
[gaim-migrate @ 5809]
Christian Hammond <chipx86@chipx86.com>
parents:
5428
diff
changeset
|
106 gtk_toolbar_set_icon_size(GTK_TOOLBAR(toolbar), |
7d1a44cbd347
[gaim-migrate @ 5809]
Christian Hammond <chipx86@chipx86.com>
parents:
5428
diff
changeset
|
107 GTK_ICON_SIZE_SMALL_TOOLBAR); |
5428
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
108 |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
109 gtk_box_pack_start(GTK_BOX(vbox), toolbar, FALSE, FALSE, 0); |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
110 |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
111 #if 0 |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
112 /* Find button */ |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
113 gtk_toolbar_insert_stock(GTK_TOOLBAR(toolbar), GTK_STOCK_FIND, |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
114 NULL, NULL, NULL, NULL, -1); |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
115 |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
116 /* Save */ |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
117 gtk_toolbar_insert_stock(GTK_TOOLBAR(toolbar), GTK_STOCK_SAVE, |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
118 NULL, NULL, NULL, NULL, -1); |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
119 #endif |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
120 |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
121 /* Clear button */ |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
122 gtk_toolbar_insert_stock(GTK_TOOLBAR(toolbar), GTK_STOCK_CLEAR, |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
123 NULL, NULL, G_CALLBACK(__clear_cb), win, -1); |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
124 |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
125 gtk_toolbar_insert_space(GTK_TOOLBAR(toolbar), -1); |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
126 |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
127 /* Pause */ |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
128 gtk_toolbar_append_element(GTK_TOOLBAR(toolbar), |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
129 GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL, |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
130 _("Pause"), NULL, NULL, |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
131 NULL, G_CALLBACK(__pause_cb), win); |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
132 |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
133 /* Timestamps */ |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
134 gtk_toolbar_append_element(GTK_TOOLBAR(toolbar), |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
135 GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL, |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
136 _("Timestamps"), NULL, NULL, |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
137 NULL, G_CALLBACK(__timestamps_cb), win); |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
138 |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
139 /* Now our scrolled window... */ |
5212 | 140 sw = gtk_scrolled_window_new(NULL, NULL); |
141 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), | |
5428
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
142 GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
143 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
144 GTK_SHADOW_IN); |
5212 | 145 |
5428
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
146 /* ... which has a gtkimhtml in it. */ |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
147 win->text = gtk_imhtml_new(NULL, NULL); |
5212 | 148 |
5428
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
149 gtk_container_add(GTK_CONTAINER(sw), win->text); |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
150 |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
151 /* Pack it in... Not like that, sicko. */ |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
152 gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 0); |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
153 |
5212 | 154 gtk_widget_show_all(win->window); |
5428
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
155 |
5212 | 156 return win; |
157 } | |
158 | |
159 void | |
160 gaim_gtk_debug_window_show(void) | |
161 { | |
162 if (debug_win == NULL) | |
163 debug_win = debug_window_new(); | |
164 | |
165 gtk_widget_show(debug_win->window); | |
166 } | |
167 | |
168 void | |
169 gaim_gtk_debug_window_hide(void) | |
170 { | |
171 if (debug_win != NULL) { | |
172 gtk_widget_destroy(debug_win->window); | |
173 debug_window_destroy(NULL, NULL, NULL); | |
174 } | |
175 } | |
176 | |
177 static void | |
178 gaim_gtk_debug_print(GaimDebugLevel level, const char *category, | |
179 const char *format, va_list args) | |
180 { | |
5428
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
181 gchar *arg_s; |
5212 | 182 |
183 arg_s = g_strdup_vprintf(format, args); | |
184 | |
5428
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
185 if ((misc_options & OPT_MISC_DEBUG) && |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
186 debug_win != NULL && !debug_win->paused) { |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
187 |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
188 gchar *esc_s, *cat_s, *ts_s, *s; |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
189 |
5212 | 190 if (category == NULL) |
191 cat_s = g_strdup(""); | |
192 else | |
193 cat_s = g_strdup_printf("<b>%s:</b> ", category); | |
194 | |
5428
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
195 if (debug_win->timestamps) { |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
196 gchar mdate[64]; |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
197 time_t mtime = time(NULL); |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
198 |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
199 strftime(mdate, sizeof(mdate), "%H:%M:%S", localtime(&mtime)); |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
200 |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
201 ts_s = g_strdup_printf("(%s) ", mdate); |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
202 } |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
203 else |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
204 ts_s = g_strdup(""); |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
205 |
5212 | 206 esc_s = g_markup_escape_text(arg_s, -1); |
207 | |
5428
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
208 s = g_strdup_printf("<font color=\"%s\">%s%s%s</font>", |
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
209 debug_fg_colors[level], ts_s, cat_s, esc_s); |
5212 | 210 |
5428
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
211 g_free(ts_s); |
5212 | 212 g_free(esc_s); |
213 | |
214 if (level == GAIM_DEBUG_FATAL) { | |
215 gchar *temp = s; | |
216 | |
217 s = g_strdup_printf("<b>%s</b>", temp); | |
218 g_free(temp); | |
219 } | |
220 | |
221 g_free(cat_s); | |
222 | |
5428
96bde36bb76b
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
223 gtk_imhtml_append_text(GTK_IMHTML(debug_win->text), s, -1, 0); |
5212 | 224 |
225 g_free(s); | |
226 } | |
227 | |
5214
7ea282e1f615
[gaim-migrate @ 5584]
Christian Hammond <chipx86@chipx86.com>
parents:
5212
diff
changeset
|
228 if (opt_debug) { |
7ea282e1f615
[gaim-migrate @ 5584]
Christian Hammond <chipx86@chipx86.com>
parents:
5212
diff
changeset
|
229 if (category == NULL) |
7ea282e1f615
[gaim-migrate @ 5584]
Christian Hammond <chipx86@chipx86.com>
parents:
5212
diff
changeset
|
230 g_print("%s", arg_s); |
7ea282e1f615
[gaim-migrate @ 5584]
Christian Hammond <chipx86@chipx86.com>
parents:
5212
diff
changeset
|
231 else |
5217
6afeab1955b2
[gaim-migrate @ 5587]
Christian Hammond <chipx86@chipx86.com>
parents:
5215
diff
changeset
|
232 g_print("%s: %s", category, arg_s); |
5214
7ea282e1f615
[gaim-migrate @ 5584]
Christian Hammond <chipx86@chipx86.com>
parents:
5212
diff
changeset
|
233 } |
5212 | 234 |
235 g_free(arg_s); | |
236 } | |
237 | |
238 static GaimDebugUiOps ops = | |
239 { | |
240 gaim_gtk_debug_print | |
241 }; | |
242 | |
243 GaimDebugUiOps * | |
244 gaim_get_gtk_debug_ui_ops(void) | |
245 { | |
246 return &ops; | |
247 } | |
248 |