Fri, 09 Sep 2016 12:43:59 -0500
enable meanwhile
|
20147
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
1 | /* pidgin |
| 5212 | 2 | * |
|
15931
716b5fac1895
Re-sed the copyright notices so they don't all talk about Purple.
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
3 | * Pidgin is the legal property of its developers, whose names are too numerous |
| 8046 | 4 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 5 | * source distribution. | |
|
7152
112d0e52d04b
[gaim-migrate @ 7719]
Christian Hammond <chipx86@chipx86.com>
parents:
7150
diff
changeset
|
6 | * |
| 5212 | 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by | |
| 9 | * the Free Software Foundation; either version 2 of the License, or | |
| 10 | * (at your option) any later version. | |
| 11 | * | |
| 12 | * This program is distributed in the hope that it will be useful, | |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 15 | * GNU General Public License for more details. | |
| 16 | * | |
| 17 | * You should have received a copy of the GNU General Public License | |
| 18 | * along with this program; if not, write to the Free Software | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19065
diff
changeset
|
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 5212 | 20 | */ |
| 9791 | 21 | #include "internal.h" |
| 15577 | 22 | #include "pidgin.h" |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5818
diff
changeset
|
23 | |
|
9480
b4d46aa1be7d
[gaim-migrate @ 10305]
Mark Doliner <markdoliner@pidgin.im>
parents:
8953
diff
changeset
|
24 | #include "notify.h" |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5818
diff
changeset
|
25 | #include "prefs.h" |
| 8953 | 26 | #include "request.h" |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5818
diff
changeset
|
27 | #include "util.h" |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5818
diff
changeset
|
28 | |
| 5212 | 29 | #include "gtkdebug.h" |
|
9709
2e73f176cc80
[gaim-migrate @ 10570]
Mark Doliner <markdoliner@pidgin.im>
parents:
9504
diff
changeset
|
30 | #include "gtkdialogs.h" |
| 8953 | 31 | #include "gtkutils.h" |
|
33095
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
32 | #include "gtkwebview.h" |
|
15883
969b74a3e27a
According to etags, pidgin/ should be completely clean of references to 'gaim' as a client
Sean Egan <seanegan@pidgin.im>
parents:
15882
diff
changeset
|
33 | #include "pidginstock.h" |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5818
diff
changeset
|
34 | |
|
35633
e4618d775e0d
Add --enable-glib-errors-trace configure switch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35527
diff
changeset
|
35 | #ifdef ENABLE_GLIBTRACE |
|
e4618d775e0d
Add --enable-glib-errors-trace configure switch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35527
diff
changeset
|
36 | #include <execinfo.h> |
|
30795
4fc1b7cc2e06
Use GRegex where available. Fixes #12601.
Eion Robb <eion@robbmob.com>
parents:
29747
diff
changeset
|
37 | #endif |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
38 | |
|
11473
38b35dc600ce
[gaim-migrate @ 13714]
Gary Kramlich <grim@reaperworld.com>
parents:
11450
diff
changeset
|
39 | #include <gdk/gdkkeysyms.h> |
|
38b35dc600ce
[gaim-migrate @ 13714]
Gary Kramlich <grim@reaperworld.com>
parents:
11450
diff
changeset
|
40 | |
|
33170
ce4447562d64
Add checks for old GTK+2 stuff.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33167
diff
changeset
|
41 | #include "gtk3compat.h" |
|
ce4447562d64
Add checks for old GTK+2 stuff.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33167
diff
changeset
|
42 | |
|
33922
61f997b47954
Split debug window HTML into a separate file.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33921
diff
changeset
|
43 | #include "gtkdebug.html.h" |
|
61f997b47954
Split debug window HTML into a separate file.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33921
diff
changeset
|
44 | |
| 5212 | 45 | typedef struct |
| 46 | { | |
| 47 | GtkWidget *window; | |
|
5428
5788d3bc050a
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
48 | GtkWidget *text; |
|
33092
a68f8b2b6873
Always use GRegex in the Debug Window.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33091
diff
changeset
|
49 | GtkWidget *filter; |
|
a68f8b2b6873
Always use GRegex in the Debug Window.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33091
diff
changeset
|
50 | GtkWidget *expression; |
|
a68f8b2b6873
Always use GRegex in the Debug Window.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33091
diff
changeset
|
51 | GtkWidget *filterlevel; |
| 11033 | 52 | |
|
5428
5788d3bc050a
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
53 | gboolean paused; |
| 5212 | 54 | |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
55 | gboolean invert; |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
56 | gboolean highlight; |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
57 | guint timer; |
|
30795
4fc1b7cc2e06
Use GRegex where available. Fixes #12601.
Eion Robb <eion@robbmob.com>
parents:
29747
diff
changeset
|
58 | GRegex *regex; |
| 5212 | 59 | } DebugWindow; |
| 60 | ||
| 61 | static DebugWindow *debug_win = NULL; | |
|
17232
8593d66c708b
When the /pidgin/debug/enabled pref is toggled, wait until the next
Mark Doliner <markdoliner@pidgin.im>
parents:
17040
diff
changeset
|
62 | static guint debug_enabled_timer = 0; |
| 5212 | 63 | |
| 64 | static gint | |
| 65 | debug_window_destroy(GtkWidget *w, GdkEvent *event, void *unused) | |
| 66 | { | |
| 15884 | 67 | purple_prefs_disconnect_by_handle(pidgin_debug_get_handle()); |
|
9502
d43f69354213
[gaim-migrate @ 10329]
Mark Doliner <markdoliner@pidgin.im>
parents:
9501
diff
changeset
|
68 | |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
69 | if(debug_win->timer != 0) { |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
70 | const gchar *text; |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
71 | |
|
26753
a8dca8faae69
A patch from Arunan Balasubramaniam to use timeouts in seconds instead of
Arunan Balasubramaniam <foss@abala.me>
parents:
26482
diff
changeset
|
72 | purple_timeout_remove(debug_win->timer); |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
73 | |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
74 | text = gtk_entry_get_text(GTK_ENTRY(debug_win->expression)); |
|
16123
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
75 | purple_prefs_set_string(PIDGIN_PREFS_ROOT "/debug/regex", text); |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
76 | } |
|
33539
12e93808f35d
Fix some warnings in debug and conv windows
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33538
diff
changeset
|
77 | if (debug_win->regex != NULL) |
|
12e93808f35d
Fix some warnings in debug and conv windows
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33538
diff
changeset
|
78 | g_regex_unref(debug_win->regex); |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
79 | |
|
9502
d43f69354213
[gaim-migrate @ 10329]
Mark Doliner <markdoliner@pidgin.im>
parents:
9501
diff
changeset
|
80 | /* If the "Save Log" dialog is open then close it */ |
| 15884 | 81 | purple_request_close_with_handle(debug_win); |
|
5704
3170b0bd2b40
[gaim-migrate @ 6125]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
82 | |
| 5212 | 83 | g_free(debug_win); |
| 84 | debug_win = NULL; | |
| 85 | ||
|
16123
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
86 | purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/debug/enabled", FALSE); |
|
9480
b4d46aa1be7d
[gaim-migrate @ 10305]
Mark Doliner <markdoliner@pidgin.im>
parents:
8953
diff
changeset
|
87 | |
|
5530
ba1ad464b56f
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5430
diff
changeset
|
88 | return FALSE; |
|
ba1ad464b56f
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5430
diff
changeset
|
89 | } |
| 5212 | 90 | |
|
5530
ba1ad464b56f
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5430
diff
changeset
|
91 | static gboolean |
|
5794
ebdbb7dc6658
[gaim-migrate @ 6219]
Christian Hammond <chipx86@chipx86.com>
parents:
5738
diff
changeset
|
92 | configure_cb(GtkWidget *w, GdkEventConfigure *event, DebugWindow *win) |
|
5530
ba1ad464b56f
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5430
diff
changeset
|
93 | { |
|
32913
af2c726febce
Fix all deprecated GTK_WIDGET_* macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32912
diff
changeset
|
94 | if (gtk_widget_get_visible(w)) { |
|
16123
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
95 | purple_prefs_set_int(PIDGIN_PREFS_ROOT "/debug/width", event->width); |
|
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
96 | purple_prefs_set_int(PIDGIN_PREFS_ROOT "/debug/height", event->height); |
|
5530
ba1ad464b56f
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5430
diff
changeset
|
97 | } |
| 5212 | 98 | |
| 99 | return FALSE; | |
| 100 | } | |
| 101 | ||
| 8953 | 102 | static void |
|
9502
d43f69354213
[gaim-migrate @ 10329]
Mark Doliner <markdoliner@pidgin.im>
parents:
9501
diff
changeset
|
103 | save_writefile_cb(void *user_data, const char *filename) |
| 8953 | 104 | { |
|
9502
d43f69354213
[gaim-migrate @ 10329]
Mark Doliner <markdoliner@pidgin.im>
parents:
9501
diff
changeset
|
105 | DebugWindow *win = (DebugWindow *)user_data; |
|
9489
3ee8fdcdbac9
[gaim-migrate @ 10314]
Mark Doliner <markdoliner@pidgin.im>
parents:
9486
diff
changeset
|
106 | FILE *fp; |
| 8953 | 107 | char *tmp; |
| 108 | ||
|
10589
4e10236e06d4
[gaim-migrate @ 11994]
Daniel Atallah <datallah@pidgin.im>
parents:
10448
diff
changeset
|
109 | if ((fp = g_fopen(filename, "w+")) == NULL) { |
|
34449
bbcb198650b7
Notify API: extend purple_notify_message with PurpleRequestCommonParameters
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
34333
diff
changeset
|
110 | purple_notify_error(win, NULL, _("Unable to open file."), NULL, NULL); |
| 8953 | 111 | return; |
|
9480
b4d46aa1be7d
[gaim-migrate @ 10305]
Mark Doliner <markdoliner@pidgin.im>
parents:
8953
diff
changeset
|
112 | } |
| 8953 | 113 | |
|
35500
ae6432ea326f
Fixed namespace issues in Pidgin.
Ankit Vani <a@nevitus.org>
parents:
35454
diff
changeset
|
114 | tmp = pidgin_webview_get_body_text(PIDGIN_WEBVIEW(win->text)); |
| 15884 | 115 | fprintf(fp, "Pidgin Debug Log : %s\n", purple_date_format_full(NULL)); |
| 8953 | 116 | fprintf(fp, "%s", tmp); |
| 117 | g_free(tmp); | |
| 118 | ||
| 119 | fclose(fp); | |
| 120 | } | |
| 121 | ||
| 122 | static void | |
| 123 | save_cb(GtkWidget *w, DebugWindow *win) | |
| 124 | { | |
|
21175
c6d76b49c206
disapproval of revision '8ba833993a115415727bb1b70362e0bd1603c169'
Richard Laager <rlaager@pidgin.im>
parents:
21174
diff
changeset
|
125 | purple_request_file(win, _("Save Debug Log"), "purple-debug.log", TRUE, |
|
34333
b92698241603
Request API refactoring: switch purple_request_file to PurpleRequestCommonParameters
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
34308
diff
changeset
|
126 | G_CALLBACK(save_writefile_cb), NULL, NULL, win); |
| 8953 | 127 | } |
| 128 | ||
| 129 | static void | |
|
5794
ebdbb7dc6658
[gaim-migrate @ 6219]
Christian Hammond <chipx86@chipx86.com>
parents:
5738
diff
changeset
|
130 | clear_cb(GtkWidget *w, DebugWindow *win) |
|
5428
5788d3bc050a
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
131 | { |
|
35500
ae6432ea326f
Fixed namespace issues in Pidgin.
Ankit Vani <a@nevitus.org>
parents:
35454
diff
changeset
|
132 | pidgin_webview_safe_execute_script(PIDGIN_WEBVIEW(win->text), "clear();"); |
|
5428
5788d3bc050a
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
133 | } |
|
5788d3bc050a
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
134 | |
|
5788d3bc050a
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
135 | static void |
|
5794
ebdbb7dc6658
[gaim-migrate @ 6219]
Christian Hammond <chipx86@chipx86.com>
parents:
5738
diff
changeset
|
136 | pause_cb(GtkWidget *w, DebugWindow *win) |
|
5428
5788d3bc050a
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
137 | { |
|
29746
f7a7722bee2f
Remove GTK_CHECK_VERSION(2,4,0) checks.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29745
diff
changeset
|
138 | win->paused = gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(w)); |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
139 | |
|
33920
6a4eaacdd207
Rewrite debug window pausing in JS.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33919
diff
changeset
|
140 | if (win->paused) |
|
35500
ae6432ea326f
Fixed namespace issues in Pidgin.
Ankit Vani <a@nevitus.org>
parents:
35454
diff
changeset
|
141 | pidgin_webview_safe_execute_script(PIDGIN_WEBVIEW(win->text), "pauseOutput();"); |
|
33920
6a4eaacdd207
Rewrite debug window pausing in JS.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33919
diff
changeset
|
142 | else |
|
35500
ae6432ea326f
Fixed namespace issues in Pidgin.
Ankit Vani <a@nevitus.org>
parents:
35454
diff
changeset
|
143 | pidgin_webview_safe_execute_script(PIDGIN_WEBVIEW(win->text), "resumeOutput();"); |
|
5428
5788d3bc050a
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
144 | } |
|
5788d3bc050a
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
145 | |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
146 | /****************************************************************************** |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
147 | * regex stuff |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
148 | *****************************************************************************/ |
| 11033 | 149 | static void |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
150 | regex_clear_color(GtkWidget *w) { |
|
33924
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
151 | GtkStyleContext *context = gtk_widget_get_style_context(w); |
|
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
152 | gtk_style_context_remove_class(context, "good-filter"); |
|
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
153 | gtk_style_context_remove_class(context, "bad-filter"); |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
154 | } |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
155 | |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
156 | static void |
|
33924
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
157 | regex_change_color(GtkWidget *w, gboolean success) { |
|
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
158 | GtkStyleContext *context = gtk_widget_get_style_context(w); |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
159 | |
|
33924
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
160 | if (success) { |
|
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
161 | gtk_style_context_add_class(context, "good-filter"); |
|
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
162 | gtk_style_context_remove_class(context, "bad-filter"); |
|
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
163 | } else { |
|
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
164 | gtk_style_context_add_class(context, "bad-filter"); |
|
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
165 | gtk_style_context_remove_class(context, "good-filter"); |
|
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
166 | } |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
167 | } |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
168 | |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
169 | static void |
|
33095
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
170 | regex_toggle_filter(DebugWindow *win, gboolean filter) |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
171 | { |
|
35500
ae6432ea326f
Fixed namespace issues in Pidgin.
Ankit Vani <a@nevitus.org>
parents:
35454
diff
changeset
|
172 | pidgin_webview_safe_execute_script(PIDGIN_WEBVIEW(win->text), "regex.clear();"); |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
173 | |
|
33095
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
174 | if (filter) { |
|
33923
0fcc5635daba
Rewrite debug window filter in JS.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33922
diff
changeset
|
175 | const char *text; |
|
0fcc5635daba
Rewrite debug window filter in JS.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33922
diff
changeset
|
176 | char *regex; |
|
0fcc5635daba
Rewrite debug window filter in JS.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33922
diff
changeset
|
177 | char *script; |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
178 | |
|
33923
0fcc5635daba
Rewrite debug window filter in JS.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33922
diff
changeset
|
179 | text = gtk_entry_get_text(GTK_ENTRY(win->expression)); |
|
35500
ae6432ea326f
Fixed namespace issues in Pidgin.
Ankit Vani <a@nevitus.org>
parents:
35454
diff
changeset
|
180 | regex = pidgin_webview_quote_js_string(text); |
|
33923
0fcc5635daba
Rewrite debug window filter in JS.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33922
diff
changeset
|
181 | script = g_strdup_printf("regex.filterAll(%s, %s, %s);", |
|
0fcc5635daba
Rewrite debug window filter in JS.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33922
diff
changeset
|
182 | regex, |
|
0fcc5635daba
Rewrite debug window filter in JS.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33922
diff
changeset
|
183 | win->invert ? "true" : "false", |
|
0fcc5635daba
Rewrite debug window filter in JS.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33922
diff
changeset
|
184 | win->highlight ? "true" : "false"); |
|
35500
ae6432ea326f
Fixed namespace issues in Pidgin.
Ankit Vani <a@nevitus.org>
parents:
35454
diff
changeset
|
185 | pidgin_webview_safe_execute_script(PIDGIN_WEBVIEW(win->text), script); |
|
33923
0fcc5635daba
Rewrite debug window filter in JS.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33922
diff
changeset
|
186 | g_free(script); |
|
0fcc5635daba
Rewrite debug window filter in JS.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33922
diff
changeset
|
187 | g_free(regex); |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
188 | } |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
189 | } |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
190 | |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
191 | static void |
| 15884 | 192 | regex_pref_filter_cb(const gchar *name, PurplePrefType type, |
|
12816
5f93e09fa9a6
[gaim-migrate @ 15164]
Mark Doliner <markdoliner@pidgin.im>
parents:
12231
diff
changeset
|
193 | gconstpointer val, gpointer data) |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
194 | { |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
195 | DebugWindow *win = (DebugWindow *)data; |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
196 | gboolean active = GPOINTER_TO_INT(val), current; |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
197 | |
|
33095
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
198 | if (!win || !win->window) |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
199 | return; |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
200 | |
|
29746
f7a7722bee2f
Remove GTK_CHECK_VERSION(2,4,0) checks.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29745
diff
changeset
|
201 | current = gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(win->filter)); |
|
33095
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
202 | if (active != current) |
|
29746
f7a7722bee2f
Remove GTK_CHECK_VERSION(2,4,0) checks.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29745
diff
changeset
|
203 | gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(win->filter), active); |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
204 | } |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
205 | |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
206 | static void |
| 15884 | 207 | regex_pref_expression_cb(const gchar *name, PurplePrefType type, |
|
12816
5f93e09fa9a6
[gaim-migrate @ 15164]
Mark Doliner <markdoliner@pidgin.im>
parents:
12231
diff
changeset
|
208 | gconstpointer val, gpointer data) |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
209 | { |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
210 | DebugWindow *win = (DebugWindow *)data; |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
211 | const gchar *exp = (const gchar *)val; |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
212 | |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
213 | gtk_entry_set_text(GTK_ENTRY(win->expression), exp); |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
214 | } |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
215 | |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
216 | static void |
| 15884 | 217 | regex_pref_invert_cb(const gchar *name, PurplePrefType type, |
|
12816
5f93e09fa9a6
[gaim-migrate @ 15164]
Mark Doliner <markdoliner@pidgin.im>
parents:
12231
diff
changeset
|
218 | gconstpointer val, gpointer data) |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
219 | { |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
220 | DebugWindow *win = (DebugWindow *)data; |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
221 | gboolean active = GPOINTER_TO_INT(val); |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
222 | |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
223 | win->invert = active; |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
224 | |
|
33095
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
225 | if (gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(win->filter))) |
|
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
226 | regex_toggle_filter(win, TRUE); |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
227 | } |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
228 | |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
229 | static void |
| 15884 | 230 | regex_pref_highlight_cb(const gchar *name, PurplePrefType type, |
|
12816
5f93e09fa9a6
[gaim-migrate @ 15164]
Mark Doliner <markdoliner@pidgin.im>
parents:
12231
diff
changeset
|
231 | gconstpointer val, gpointer data) |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
232 | { |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
233 | DebugWindow *win = (DebugWindow *)data; |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
234 | gboolean active = GPOINTER_TO_INT(val); |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
235 | |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
236 | win->highlight = active; |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
237 | |
|
33095
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
238 | if (gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(win->filter))) |
|
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
239 | regex_toggle_filter(win, TRUE); |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
240 | } |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
241 | |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
242 | static gboolean |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
243 | regex_timer_cb(DebugWindow *win) { |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
244 | const gchar *text; |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
245 | |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
246 | text = gtk_entry_get_text(GTK_ENTRY(win->expression)); |
|
16123
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
247 | purple_prefs_set_string(PIDGIN_PREFS_ROOT "/debug/regex", text); |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
248 | |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
249 | win->timer = 0; |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
250 | |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
251 | return FALSE; |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
252 | } |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
253 | |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
254 | static void |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
255 | regex_changed_cb(GtkWidget *w, DebugWindow *win) { |
|
33095
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
256 | const gchar *text; |
|
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
257 | |
|
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
258 | if (gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(win->filter))) { |
|
29746
f7a7722bee2f
Remove GTK_CHECK_VERSION(2,4,0) checks.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29745
diff
changeset
|
259 | gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(win->filter), |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
260 | FALSE); |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
261 | } |
| 11033 | 262 | |
|
33095
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
263 | if (win->timer == 0) |
|
26753
a8dca8faae69
A patch from Arunan Balasubramaniam to use timeouts in seconds instead of
Arunan Balasubramaniam <foss@abala.me>
parents:
26482
diff
changeset
|
264 | win->timer = purple_timeout_add_seconds(5, (GSourceFunc)regex_timer_cb, win); |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
265 | |
|
33095
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
266 | text = gtk_entry_get_text(GTK_ENTRY(win->expression)); |
|
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
267 | |
|
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
268 | if (text == NULL || *text == '\0') { |
|
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
269 | regex_clear_color(win->expression); |
|
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
270 | gtk_widget_set_sensitive(win->filter, FALSE); |
|
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
271 | return; |
|
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
272 | } |
|
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
273 | |
|
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
274 | if (win->regex) |
|
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
275 | g_regex_unref(win->regex); |
|
33923
0fcc5635daba
Rewrite debug window filter in JS.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33922
diff
changeset
|
276 | #if GLIB_CHECK_VERSION(2,34,0) |
|
0fcc5635daba
Rewrite debug window filter in JS.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33922
diff
changeset
|
277 | win->regex = g_regex_new(text, G_REGEX_CASELESS|G_REGEX_JAVASCRIPT_COMPAT, 0, NULL); |
|
0fcc5635daba
Rewrite debug window filter in JS.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33922
diff
changeset
|
278 | #else |
|
33095
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
279 | win->regex = g_regex_new(text, G_REGEX_CASELESS, 0, NULL); |
|
33923
0fcc5635daba
Rewrite debug window filter in JS.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33922
diff
changeset
|
280 | #endif |
|
33095
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
281 | if (win->regex == NULL) { |
|
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
282 | /* failed to compile */ |
|
33924
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
283 | regex_change_color(win->expression, FALSE); |
|
33095
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
284 | gtk_widget_set_sensitive(win->filter, FALSE); |
|
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
285 | } else { |
|
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
286 | /* compiled successfully */ |
|
33924
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
287 | regex_change_color(win->expression, TRUE); |
|
33095
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
288 | gtk_widget_set_sensitive(win->filter, TRUE); |
|
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
289 | } |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
290 | } |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
291 | |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
292 | static void |
|
11450
52e566659430
[gaim-migrate @ 13689]
Gary Kramlich <grim@reaperworld.com>
parents:
11312
diff
changeset
|
293 | regex_key_release_cb(GtkWidget *w, GdkEventKey *e, DebugWindow *win) { |
|
36254
3ee545012e46
Make keypad Enter enable, and Escape disable, debug filtering.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
35633
diff
changeset
|
294 | if (gtk_widget_is_sensitive(win->filter)) { |
|
3ee545012e46
Make keypad Enter enable, and Escape disable, debug filtering.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
35633
diff
changeset
|
295 | GtkToggleToolButton *tb = GTK_TOGGLE_TOOL_BUTTON(win->filter); |
|
3ee545012e46
Make keypad Enter enable, and Escape disable, debug filtering.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
35633
diff
changeset
|
296 | if ((e->keyval == GDK_KEY_Return || e->keyval == GDK_KEY_KP_Enter) && |
|
3ee545012e46
Make keypad Enter enable, and Escape disable, debug filtering.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
35633
diff
changeset
|
297 | !gtk_toggle_tool_button_get_active(tb)) |
|
3ee545012e46
Make keypad Enter enable, and Escape disable, debug filtering.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
35633
diff
changeset
|
298 | { |
|
3ee545012e46
Make keypad Enter enable, and Escape disable, debug filtering.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
35633
diff
changeset
|
299 | gtk_toggle_tool_button_set_active(tb, TRUE); |
|
3ee545012e46
Make keypad Enter enable, and Escape disable, debug filtering.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
35633
diff
changeset
|
300 | } |
|
3ee545012e46
Make keypad Enter enable, and Escape disable, debug filtering.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
35633
diff
changeset
|
301 | if (e->keyval == GDK_KEY_Escape && |
|
3ee545012e46
Make keypad Enter enable, and Escape disable, debug filtering.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
35633
diff
changeset
|
302 | gtk_toggle_tool_button_get_active(tb)) |
|
3ee545012e46
Make keypad Enter enable, and Escape disable, debug filtering.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
35633
diff
changeset
|
303 | { |
|
3ee545012e46
Make keypad Enter enable, and Escape disable, debug filtering.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
35633
diff
changeset
|
304 | gtk_toggle_tool_button_set_active(tb, FALSE); |
|
3ee545012e46
Make keypad Enter enable, and Escape disable, debug filtering.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
35633
diff
changeset
|
305 | } |
|
11450
52e566659430
[gaim-migrate @ 13689]
Gary Kramlich <grim@reaperworld.com>
parents:
11312
diff
changeset
|
306 | } |
|
52e566659430
[gaim-migrate @ 13689]
Gary Kramlich <grim@reaperworld.com>
parents:
11312
diff
changeset
|
307 | } |
|
52e566659430
[gaim-migrate @ 13689]
Gary Kramlich <grim@reaperworld.com>
parents:
11312
diff
changeset
|
308 | |
|
52e566659430
[gaim-migrate @ 13689]
Gary Kramlich <grim@reaperworld.com>
parents:
11312
diff
changeset
|
309 | static void |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
310 | regex_menu_cb(GtkWidget *item, const gchar *pref) { |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
311 | gboolean active; |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
312 | |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
313 | active = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(item)); |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
314 | |
| 15884 | 315 | purple_prefs_set_bool(pref, active); |
| 11033 | 316 | } |
| 317 | ||
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
318 | static void |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
319 | regex_popup_cb(GtkEntry *entry, GtkWidget *menu, DebugWindow *win) { |
| 15568 | 320 | pidgin_separator(menu); |
| 321 | pidgin_new_check_item(menu, _("Invert"), | |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
322 | G_CALLBACK(regex_menu_cb), |
|
16123
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
323 | PIDGIN_PREFS_ROOT "/debug/invert", win->invert); |
| 15568 | 324 | pidgin_new_check_item(menu, _("Highlight matches"), |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
325 | G_CALLBACK(regex_menu_cb), |
|
16123
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
326 | PIDGIN_PREFS_ROOT "/debug/highlight", win->highlight); |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
327 | } |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
328 | |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
329 | static void |
|
33095
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
330 | regex_filter_toggled_cb(GtkToggleToolButton *button, DebugWindow *win) |
|
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
331 | { |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
332 | gboolean active; |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
333 | |
|
29746
f7a7722bee2f
Remove GTK_CHECK_VERSION(2,4,0) checks.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29745
diff
changeset
|
334 | active = gtk_toggle_tool_button_get_active(button); |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
335 | |
|
16123
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
336 | purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/debug/filter", active); |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
337 | |
|
35506
4252b2882889
Fix some remaining GTK_* macros as Elliott noticed
Ankit Vani <a@nevitus.org>
parents:
35500
diff
changeset
|
338 | if (!PIDGIN_IS_WEBVIEW(win->text)) |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
339 | return; |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
340 | |
|
33095
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
341 | regex_toggle_filter(win, active); |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
342 | } |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
343 | |
|
14541
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
344 | static void |
| 15884 | 345 | filter_level_pref_changed(const char *name, PurplePrefType type, gconstpointer value, gpointer data) |
|
14541
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
346 | { |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
347 | DebugWindow *win = data; |
|
33095
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
348 | int level = GPOINTER_TO_INT(value); |
|
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
349 | char *tmp; |
|
14541
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
350 | |
|
33095
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
351 | if (level != gtk_combo_box_get_active(GTK_COMBO_BOX(win->filterlevel))) |
|
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
352 | gtk_combo_box_set_active(GTK_COMBO_BOX(win->filterlevel), level); |
|
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
353 | |
|
33921
d1e2fdbc3d56
Rewrite debug window filtering in JS.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33920
diff
changeset
|
354 | tmp = g_strdup_printf("setFilterLevel('%d');", level); |
|
35500
ae6432ea326f
Fixed namespace issues in Pidgin.
Ankit Vani <a@nevitus.org>
parents:
35454
diff
changeset
|
355 | pidgin_webview_safe_execute_script(PIDGIN_WEBVIEW(win->text), tmp); |
|
33095
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
356 | g_free(tmp); |
|
14541
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
357 | } |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
358 | |
|
14541
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
359 | static void |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
360 | filter_level_changed_cb(GtkWidget *combo, gpointer null) |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
361 | { |
|
16123
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
362 | purple_prefs_set_int(PIDGIN_PREFS_ROOT "/debug/filterlevel", |
|
14541
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
363 | gtk_combo_box_get_active(GTK_COMBO_BOX(combo))); |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
364 | } |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
365 | |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
366 | static void |
| 15884 | 367 | toolbar_style_pref_changed_cb(const char *name, PurplePrefType type, gconstpointer value, gpointer data) |
|
14541
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
368 | { |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
369 | gtk_toolbar_set_style(GTK_TOOLBAR(data), GPOINTER_TO_INT(value)); |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
370 | } |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
371 | |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
372 | static void |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
373 | toolbar_icon_pref_changed(GtkWidget *item, GtkWidget *toolbar) |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
374 | { |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
375 | int style = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(item), "user_data")); |
|
16123
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
376 | purple_prefs_set_int(PIDGIN_PREFS_ROOT "/debug/style", style); |
|
14541
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
377 | } |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
378 | |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
379 | static gboolean |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
380 | toolbar_context(GtkWidget *toolbar, GdkEventButton *event, gpointer null) |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
381 | { |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
382 | GtkWidget *menu, *item; |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
383 | const char *text[3]; |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
384 | GtkToolbarStyle value[3]; |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
385 | int i; |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
386 | |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
387 | if (!(event->button == 3 && event->type == GDK_BUTTON_PRESS)) |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
388 | return FALSE; |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
389 | |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
390 | text[0] = _("_Icon Only"); value[0] = GTK_TOOLBAR_ICONS; |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
391 | text[1] = _("_Text Only"); value[1] = GTK_TOOLBAR_TEXT; |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
392 | text[2] = _("_Both Icon & Text"); value[2] = GTK_TOOLBAR_BOTH_HORIZ; |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
393 | |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
394 | menu = gtk_menu_new(); |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
395 | |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
396 | for (i = 0; i < 3; i++) { |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
397 | item = gtk_check_menu_item_new_with_mnemonic(text[i]); |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
398 | g_object_set_data(G_OBJECT(item), "user_data", GINT_TO_POINTER(value[i])); |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
399 | g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(toolbar_icon_pref_changed), toolbar); |
|
36256
a437550a9308
Remove -Wno-sign-compare and backport fixes from default.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31294
diff
changeset
|
400 | if (value[i] == (GtkToolbarStyle)purple_prefs_get_int(PIDGIN_PREFS_ROOT "/debug/style")) |
|
14541
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
401 | gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item), TRUE); |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
402 | gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
403 | } |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
404 | |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
405 | gtk_widget_show_all(menu); |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
406 | |
|
33110
a2923f41d05a
We have the exact button and event time to use here.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33095
diff
changeset
|
407 | gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, 3, event->time); |
|
14541
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
408 | return FALSE; |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
409 | } |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
410 | |
| 5212 | 411 | static DebugWindow * |
| 412 | debug_window_new(void) | |
| 413 | { | |
| 414 | DebugWindow *win; | |
|
5428
5788d3bc050a
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
415 | GtkWidget *vbox; |
|
5788d3bc050a
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
416 | GtkWidget *toolbar; |
|
10175
2bf5ed145e8a
[gaim-migrate @ 11290]
Mark Doliner <markdoliner@pidgin.im>
parents:
10087
diff
changeset
|
417 | GtkWidget *frame; |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
418 | gint width, height; |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
419 | void *handle; |
|
29745
ebf70b1934f1
New-fangled toolbar code and all that.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29694
diff
changeset
|
420 | GtkToolItem *item; |
|
33924
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
421 | GtkStyleContext *context; |
|
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
422 | GtkCssProvider *filter_css; |
|
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
423 | const gchar filter_style[] = |
|
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
424 | ".bad-filter {" |
|
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
425 | "color: @error_fg_color;" |
|
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
426 | "text-shadow: 0 1px @error_text_shadow;" |
|
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
427 | "background-image: none;" |
|
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
428 | "background-color: @error_bg_color;" |
|
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
429 | "}" |
|
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
430 | ".good-filter {" |
|
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
431 | "color: @question_fg_color;" |
|
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
432 | "text-shadow: 0 1px @question_text_shadow;" |
|
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
433 | "background-image: none;" |
|
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
434 | "background-color: @success_color;" |
|
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
435 | "}"; |
| 5212 | 436 | |
| 437 | win = g_new0(DebugWindow, 1); | |
| 438 | ||
|
16123
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
439 | width = purple_prefs_get_int(PIDGIN_PREFS_ROOT "/debug/width"); |
|
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
440 | height = purple_prefs_get_int(PIDGIN_PREFS_ROOT "/debug/height"); |
|
5530
ba1ad464b56f
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5430
diff
changeset
|
441 | |
|
29321
c089a3e0092e
De-dialogify the file-transfer and debug windows.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
29287
diff
changeset
|
442 | win->window = pidgin_create_window(_("Debug Window"), 0, "debug", TRUE); |
| 15884 | 443 | purple_debug_info("gtkdebug", "Setting dimensions to %d, %d\n", |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
444 | width, height); |
|
5642
d7b8b62542a3
[gaim-migrate @ 6056]
Christian Hammond <chipx86@chipx86.com>
parents:
5636
diff
changeset
|
445 | |
|
5530
ba1ad464b56f
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5430
diff
changeset
|
446 | gtk_window_set_default_size(GTK_WINDOW(win->window), width, height); |
| 5212 | 447 | |
| 448 | g_signal_connect(G_OBJECT(win->window), "delete_event", | |
| 11033 | 449 | G_CALLBACK(debug_window_destroy), NULL); |
|
5530
ba1ad464b56f
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5430
diff
changeset
|
450 | g_signal_connect(G_OBJECT(win->window), "configure_event", |
| 11033 | 451 | G_CALLBACK(configure_cb), win); |
| 5212 | 452 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15512
diff
changeset
|
453 | handle = pidgin_debug_get_handle(); |
|
22099
8e70e3ba6096
Modified patch from Gabriel (Sylar?) Schulof to deprecate PIDGIN_DIALOG. Closes #4535. (PS: I am aware of --author).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21743
diff
changeset
|
454 | |
|
5428
5788d3bc050a
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
455 | /* Setup the vbox */ |
|
35527
707c3c2b2c8a
Fix more gtk_[hv]box_new gtk3 deprecation warnings
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35506
diff
changeset
|
456 | vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); |
|
29321
c089a3e0092e
De-dialogify the file-transfer and debug windows.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
29287
diff
changeset
|
457 | gtk_container_add(GTK_CONTAINER(win->window), vbox); |
|
5428
5788d3bc050a
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
458 | |
|
16123
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
459 | if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/debug/toolbar")) { |
|
5530
ba1ad464b56f
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5430
diff
changeset
|
460 | /* Setup our top button bar thingie. */ |
|
ba1ad464b56f
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5430
diff
changeset
|
461 | toolbar = gtk_toolbar_new(); |
|
14541
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
462 | gtk_toolbar_set_show_arrow(GTK_TOOLBAR(toolbar), TRUE); |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
463 | g_signal_connect(G_OBJECT(toolbar), "button-press-event", G_CALLBACK(toolbar_context), win); |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
464 | |
| 11033 | 465 | gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), |
|
16123
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
466 | purple_prefs_get_int(PIDGIN_PREFS_ROOT "/debug/style")); |
|
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
467 | purple_prefs_connect_callback(handle, PIDGIN_PREFS_ROOT "/debug/style", |
|
14541
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
468 | toolbar_style_pref_changed_cb, toolbar); |
|
5530
ba1ad464b56f
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5430
diff
changeset
|
469 | gtk_toolbar_set_icon_size(GTK_TOOLBAR(toolbar), |
| 11033 | 470 | GTK_ICON_SIZE_SMALL_TOOLBAR); |
|
5428
5788d3bc050a
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
471 | |
|
5530
ba1ad464b56f
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5430
diff
changeset
|
472 | gtk_box_pack_start(GTK_BOX(vbox), toolbar, FALSE, FALSE, 0); |
|
5428
5788d3bc050a
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
473 | |
|
5530
ba1ad464b56f
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5430
diff
changeset
|
474 | /* Save */ |
|
29745
ebf70b1934f1
New-fangled toolbar code and all that.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29694
diff
changeset
|
475 | item = gtk_tool_button_new_from_stock(GTK_STOCK_SAVE); |
|
29747
4256b05bd720
Set debug window tool items to be "important" so that they show text when
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29746
diff
changeset
|
476 | gtk_tool_item_set_is_important(item, TRUE); |
|
29745
ebf70b1934f1
New-fangled toolbar code and all that.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29694
diff
changeset
|
477 | gtk_tool_item_set_tooltip_text(item, _("Save")); |
|
ebf70b1934f1
New-fangled toolbar code and all that.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29694
diff
changeset
|
478 | g_signal_connect(G_OBJECT(item), "clicked", G_CALLBACK(save_cb), win); |
|
ebf70b1934f1
New-fangled toolbar code and all that.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29694
diff
changeset
|
479 | gtk_container_add(GTK_CONTAINER(toolbar), GTK_WIDGET(item)); |
|
5428
5788d3bc050a
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
480 | |
|
5530
ba1ad464b56f
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5430
diff
changeset
|
481 | /* Clear button */ |
|
29745
ebf70b1934f1
New-fangled toolbar code and all that.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29694
diff
changeset
|
482 | item = gtk_tool_button_new_from_stock(GTK_STOCK_CLEAR); |
|
29747
4256b05bd720
Set debug window tool items to be "important" so that they show text when
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29746
diff
changeset
|
483 | gtk_tool_item_set_is_important(item, TRUE); |
|
29745
ebf70b1934f1
New-fangled toolbar code and all that.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29694
diff
changeset
|
484 | gtk_tool_item_set_tooltip_text(item, _("Clear")); |
|
ebf70b1934f1
New-fangled toolbar code and all that.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29694
diff
changeset
|
485 | g_signal_connect(G_OBJECT(item), "clicked", G_CALLBACK(clear_cb), win); |
|
ebf70b1934f1
New-fangled toolbar code and all that.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29694
diff
changeset
|
486 | gtk_container_add(GTK_CONTAINER(toolbar), GTK_WIDGET(item)); |
|
5428
5788d3bc050a
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
487 | |
|
29745
ebf70b1934f1
New-fangled toolbar code and all that.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29694
diff
changeset
|
488 | item = gtk_separator_tool_item_new(); |
|
ebf70b1934f1
New-fangled toolbar code and all that.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29694
diff
changeset
|
489 | gtk_container_add(GTK_CONTAINER(toolbar), GTK_WIDGET(item)); |
|
5428
5788d3bc050a
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
490 | |
|
5530
ba1ad464b56f
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5430
diff
changeset
|
491 | /* Pause */ |
|
29745
ebf70b1934f1
New-fangled toolbar code and all that.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29694
diff
changeset
|
492 | item = gtk_toggle_tool_button_new_from_stock(PIDGIN_STOCK_PAUSE); |
|
29747
4256b05bd720
Set debug window tool items to be "important" so that they show text when
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29746
diff
changeset
|
493 | gtk_tool_item_set_is_important(item, TRUE); |
|
29745
ebf70b1934f1
New-fangled toolbar code and all that.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29694
diff
changeset
|
494 | gtk_tool_item_set_tooltip_text(item, _("Pause")); |
|
ebf70b1934f1
New-fangled toolbar code and all that.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29694
diff
changeset
|
495 | g_signal_connect(G_OBJECT(item), "clicked", G_CALLBACK(pause_cb), win); |
|
ebf70b1934f1
New-fangled toolbar code and all that.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29694
diff
changeset
|
496 | gtk_container_add(GTK_CONTAINER(toolbar), GTK_WIDGET(item)); |
|
5428
5788d3bc050a
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
497 | |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
498 | /* regex stuff */ |
|
29745
ebf70b1934f1
New-fangled toolbar code and all that.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29694
diff
changeset
|
499 | item = gtk_separator_tool_item_new(); |
|
ebf70b1934f1
New-fangled toolbar code and all that.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29694
diff
changeset
|
500 | gtk_container_add(GTK_CONTAINER(toolbar), GTK_WIDGET(item)); |
| 11033 | 501 | |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
502 | /* regex toggle button */ |
|
29747
4256b05bd720
Set debug window tool items to be "important" so that they show text when
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29746
diff
changeset
|
503 | item = gtk_toggle_tool_button_new_from_stock(GTK_STOCK_FIND); |
|
4256b05bd720
Set debug window tool items to be "important" so that they show text when
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29746
diff
changeset
|
504 | gtk_tool_item_set_is_important(item, TRUE); |
|
4256b05bd720
Set debug window tool items to be "important" so that they show text when
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29746
diff
changeset
|
505 | win->filter = GTK_WIDGET(item); |
|
29745
ebf70b1934f1
New-fangled toolbar code and all that.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29694
diff
changeset
|
506 | gtk_tool_button_set_label(GTK_TOOL_BUTTON(win->filter), _("Filter")); |
|
ebf70b1934f1
New-fangled toolbar code and all that.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29694
diff
changeset
|
507 | gtk_tool_item_set_tooltip_text(GTK_TOOL_ITEM(win->filter), _("Filter")); |
|
ebf70b1934f1
New-fangled toolbar code and all that.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29694
diff
changeset
|
508 | g_signal_connect(G_OBJECT(win->filter), "clicked", G_CALLBACK(regex_filter_toggled_cb), win); |
|
ebf70b1934f1
New-fangled toolbar code and all that.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29694
diff
changeset
|
509 | gtk_container_add(GTK_CONTAINER(toolbar), GTK_WIDGET(win->filter)); |
|
ebf70b1934f1
New-fangled toolbar code and all that.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29694
diff
changeset
|
510 | |
|
11450
52e566659430
[gaim-migrate @ 13689]
Gary Kramlich <grim@reaperworld.com>
parents:
11312
diff
changeset
|
511 | /* we purposely disable the toggle button here in case |
| 15884 | 512 | * /purple/gtk/debug/expression has an empty string. If it does not have |
|
11450
52e566659430
[gaim-migrate @ 13689]
Gary Kramlich <grim@reaperworld.com>
parents:
11312
diff
changeset
|
513 | * an empty string, the change signal will get called and make the |
|
52e566659430
[gaim-migrate @ 13689]
Gary Kramlich <grim@reaperworld.com>
parents:
11312
diff
changeset
|
514 | * toggle button sensitive. |
|
52e566659430
[gaim-migrate @ 13689]
Gary Kramlich <grim@reaperworld.com>
parents:
11312
diff
changeset
|
515 | */ |
|
52e566659430
[gaim-migrate @ 13689]
Gary Kramlich <grim@reaperworld.com>
parents:
11312
diff
changeset
|
516 | gtk_widget_set_sensitive(win->filter, FALSE); |
|
29746
f7a7722bee2f
Remove GTK_CHECK_VERSION(2,4,0) checks.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29745
diff
changeset
|
517 | gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(win->filter), |
|
16123
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
518 | purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/debug/filter")); |
|
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
519 | purple_prefs_connect_callback(handle, PIDGIN_PREFS_ROOT "/debug/filter", |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
520 | regex_pref_filter_cb, win); |
| 8953 | 521 | |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
522 | /* regex entry */ |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
523 | win->expression = gtk_entry_new(); |
|
29745
ebf70b1934f1
New-fangled toolbar code and all that.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29694
diff
changeset
|
524 | item = gtk_tool_item_new(); |
|
ebf70b1934f1
New-fangled toolbar code and all that.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29694
diff
changeset
|
525 | gtk_widget_set_tooltip_text(win->expression, _("Right click for more options.")); |
|
ebf70b1934f1
New-fangled toolbar code and all that.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29694
diff
changeset
|
526 | gtk_container_add(GTK_CONTAINER(item), GTK_WIDGET(win->expression)); |
|
ebf70b1934f1
New-fangled toolbar code and all that.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29694
diff
changeset
|
527 | gtk_container_add(GTK_CONTAINER(toolbar), GTK_WIDGET(item)); |
|
29746
f7a7722bee2f
Remove GTK_CHECK_VERSION(2,4,0) checks.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29745
diff
changeset
|
528 | |
|
33924
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
529 | filter_css = gtk_css_provider_new(); |
|
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
530 | gtk_css_provider_load_from_data(filter_css, filter_style, -1, NULL); |
|
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
531 | context = gtk_widget_get_style_context(win->expression); |
|
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
532 | gtk_style_context_add_provider(context, |
|
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
533 | GTK_STYLE_PROVIDER(filter_css), |
|
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
534 | GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); |
|
788678d2e035
Fix background change in IP and debug filter entries.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33923
diff
changeset
|
535 | |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
536 | /* this needs to be before the text is set from the pref if we want it |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
537 | * to colorize a stored expression. |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
538 | */ |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
539 | g_signal_connect(G_OBJECT(win->expression), "changed", |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
540 | G_CALLBACK(regex_changed_cb), win); |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
541 | gtk_entry_set_text(GTK_ENTRY(win->expression), |
|
16123
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
542 | purple_prefs_get_string(PIDGIN_PREFS_ROOT "/debug/regex")); |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
543 | g_signal_connect(G_OBJECT(win->expression), "populate-popup", |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
544 | G_CALLBACK(regex_popup_cb), win); |
|
11450
52e566659430
[gaim-migrate @ 13689]
Gary Kramlich <grim@reaperworld.com>
parents:
11312
diff
changeset
|
545 | g_signal_connect(G_OBJECT(win->expression), "key-release-event", |
|
52e566659430
[gaim-migrate @ 13689]
Gary Kramlich <grim@reaperworld.com>
parents:
11312
diff
changeset
|
546 | G_CALLBACK(regex_key_release_cb), win); |
|
16123
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
547 | purple_prefs_connect_callback(handle, PIDGIN_PREFS_ROOT "/debug/regex", |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
548 | regex_pref_expression_cb, win); |
| 11033 | 549 | |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
550 | /* connect the rest of our pref callbacks */ |
|
16123
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
551 | win->invert = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/debug/invert"); |
|
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
552 | purple_prefs_connect_callback(handle, PIDGIN_PREFS_ROOT "/debug/invert", |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
553 | regex_pref_invert_cb, win); |
| 11033 | 554 | |
|
16123
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
555 | win->highlight = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/debug/highlight"); |
|
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
556 | purple_prefs_connect_callback(handle, PIDGIN_PREFS_ROOT "/debug/highlight", |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
557 | regex_pref_highlight_cb, win); |
|
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
558 | |
|
29745
ebf70b1934f1
New-fangled toolbar code and all that.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29694
diff
changeset
|
559 | item = gtk_separator_tool_item_new(); |
|
ebf70b1934f1
New-fangled toolbar code and all that.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29694
diff
changeset
|
560 | gtk_container_add(GTK_CONTAINER(toolbar), GTK_WIDGET(item)); |
|
14541
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
561 | |
|
29745
ebf70b1934f1
New-fangled toolbar code and all that.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29694
diff
changeset
|
562 | item = gtk_tool_item_new(); |
|
ebf70b1934f1
New-fangled toolbar code and all that.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29694
diff
changeset
|
563 | gtk_container_add(GTK_CONTAINER(item), gtk_label_new(_("Level "))); |
|
ebf70b1934f1
New-fangled toolbar code and all that.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29694
diff
changeset
|
564 | gtk_container_add(GTK_CONTAINER(toolbar), GTK_WIDGET(item)); |
|
29746
f7a7722bee2f
Remove GTK_CHECK_VERSION(2,4,0) checks.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29745
diff
changeset
|
565 | |
|
33133
9a31f084f259
Fix some merge errors.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33132
diff
changeset
|
566 | win->filterlevel = gtk_combo_box_text_new(); |
|
29745
ebf70b1934f1
New-fangled toolbar code and all that.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29694
diff
changeset
|
567 | item = gtk_tool_item_new(); |
|
ebf70b1934f1
New-fangled toolbar code and all that.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29694
diff
changeset
|
568 | gtk_widget_set_tooltip_text(win->filterlevel, _("Select the debug filter level.")); |
|
ebf70b1934f1
New-fangled toolbar code and all that.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29694
diff
changeset
|
569 | gtk_container_add(GTK_CONTAINER(item), win->filterlevel); |
|
ebf70b1934f1
New-fangled toolbar code and all that.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29694
diff
changeset
|
570 | gtk_container_add(GTK_CONTAINER(toolbar), GTK_WIDGET(item)); |
|
29746
f7a7722bee2f
Remove GTK_CHECK_VERSION(2,4,0) checks.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29745
diff
changeset
|
571 | |
|
33133
9a31f084f259
Fix some merge errors.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33132
diff
changeset
|
572 | gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(win->filterlevel), _("All")); |
|
9a31f084f259
Fix some merge errors.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33132
diff
changeset
|
573 | gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(win->filterlevel), _("Misc")); |
|
9a31f084f259
Fix some merge errors.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33132
diff
changeset
|
574 | gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(win->filterlevel), _("Info")); |
|
9a31f084f259
Fix some merge errors.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33132
diff
changeset
|
575 | gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(win->filterlevel), _("Warning")); |
|
9a31f084f259
Fix some merge errors.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33132
diff
changeset
|
576 | gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(win->filterlevel), _("Error ")); |
|
9a31f084f259
Fix some merge errors.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33132
diff
changeset
|
577 | gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(win->filterlevel), _("Fatal Error")); |
|
14541
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
578 | gtk_combo_box_set_active(GTK_COMBO_BOX(win->filterlevel), |
|
16123
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
579 | purple_prefs_get_int(PIDGIN_PREFS_ROOT "/debug/filterlevel")); |
|
33092
a68f8b2b6873
Always use GRegex in the Debug Window.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33091
diff
changeset
|
580 | |
|
16123
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
581 | purple_prefs_connect_callback(handle, PIDGIN_PREFS_ROOT "/debug/filterlevel", |
|
14541
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
582 | filter_level_pref_changed, win); |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
583 | g_signal_connect(G_OBJECT(win->filterlevel), "changed", |
|
b4b96a041230
[gaim-migrate @ 17198]
Peter McCurdy <cpirate@users.sourceforge.net>
parents:
14253
diff
changeset
|
584 | G_CALLBACK(filter_level_changed_cb), NULL); |
|
5530
ba1ad464b56f
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5430
diff
changeset
|
585 | } |
|
5428
5788d3bc050a
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
586 | |
|
33095
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
587 | /* Add the gtkwebview */ |
|
34274
9169710b5af5
Hide GtkWebViewToolbar stuff within the GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33934
diff
changeset
|
588 | frame = pidgin_create_webview(FALSE, &win->text, NULL); |
|
35500
ae6432ea326f
Fixed namespace issues in Pidgin.
Ankit Vani <a@nevitus.org>
parents:
35454
diff
changeset
|
589 | pidgin_webview_set_format_functions(PIDGIN_WEBVIEW(win->text), |
|
ae6432ea326f
Fixed namespace issues in Pidgin.
Ankit Vani <a@nevitus.org>
parents:
35454
diff
changeset
|
590 | PIDGIN_WEBVIEW_ALL ^ PIDGIN_WEBVIEW_SMILEY ^ PIDGIN_WEBVIEW_IMAGE); |
|
ae6432ea326f
Fixed namespace issues in Pidgin.
Ankit Vani <a@nevitus.org>
parents:
35454
diff
changeset
|
591 | pidgin_webview_load_html_string(PIDGIN_WEBVIEW(win->text), gtkdebug_html); |
|
10175
2bf5ed145e8a
[gaim-migrate @ 11290]
Mark Doliner <markdoliner@pidgin.im>
parents:
10087
diff
changeset
|
592 | gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); |
|
2bf5ed145e8a
[gaim-migrate @ 11290]
Mark Doliner <markdoliner@pidgin.im>
parents:
10087
diff
changeset
|
593 | gtk_widget_show(frame); |
|
5428
5788d3bc050a
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
594 | |
|
33111
e05551721abf
Obey the filter level when the Debug Window is first opened.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33110
diff
changeset
|
595 | clear_cb(NULL, win); |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
596 | |
| 5212 | 597 | gtk_widget_show_all(win->window); |
|
5428
5788d3bc050a
[gaim-migrate @ 5808]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
598 | |
| 5212 | 599 | return win; |
| 600 | } | |
| 601 | ||
|
17232
8593d66c708b
When the /pidgin/debug/enabled pref is toggled, wait until the next
Mark Doliner <markdoliner@pidgin.im>
parents:
17040
diff
changeset
|
602 | static gboolean |
|
8593d66c708b
When the /pidgin/debug/enabled pref is toggled, wait until the next
Mark Doliner <markdoliner@pidgin.im>
parents:
17040
diff
changeset
|
603 | debug_enabled_timeout_cb(gpointer data) |
|
8593d66c708b
When the /pidgin/debug/enabled pref is toggled, wait until the next
Mark Doliner <markdoliner@pidgin.im>
parents:
17040
diff
changeset
|
604 | { |
|
8593d66c708b
When the /pidgin/debug/enabled pref is toggled, wait until the next
Mark Doliner <markdoliner@pidgin.im>
parents:
17040
diff
changeset
|
605 | debug_enabled_timer = 0; |
|
8593d66c708b
When the /pidgin/debug/enabled pref is toggled, wait until the next
Mark Doliner <markdoliner@pidgin.im>
parents:
17040
diff
changeset
|
606 | |
|
8593d66c708b
When the /pidgin/debug/enabled pref is toggled, wait until the next
Mark Doliner <markdoliner@pidgin.im>
parents:
17040
diff
changeset
|
607 | if (data) |
|
8593d66c708b
When the /pidgin/debug/enabled pref is toggled, wait until the next
Mark Doliner <markdoliner@pidgin.im>
parents:
17040
diff
changeset
|
608 | pidgin_debug_window_show(); |
|
8593d66c708b
When the /pidgin/debug/enabled pref is toggled, wait until the next
Mark Doliner <markdoliner@pidgin.im>
parents:
17040
diff
changeset
|
609 | else |
|
8593d66c708b
When the /pidgin/debug/enabled pref is toggled, wait until the next
Mark Doliner <markdoliner@pidgin.im>
parents:
17040
diff
changeset
|
610 | pidgin_debug_window_hide(); |
|
8593d66c708b
When the /pidgin/debug/enabled pref is toggled, wait until the next
Mark Doliner <markdoliner@pidgin.im>
parents:
17040
diff
changeset
|
611 | |
|
8593d66c708b
When the /pidgin/debug/enabled pref is toggled, wait until the next
Mark Doliner <markdoliner@pidgin.im>
parents:
17040
diff
changeset
|
612 | return FALSE; |
|
8593d66c708b
When the /pidgin/debug/enabled pref is toggled, wait until the next
Mark Doliner <markdoliner@pidgin.im>
parents:
17040
diff
changeset
|
613 | } |
|
8593d66c708b
When the /pidgin/debug/enabled pref is toggled, wait until the next
Mark Doliner <markdoliner@pidgin.im>
parents:
17040
diff
changeset
|
614 | |
|
5625
ac8c09def58a
[gaim-migrate @ 6032]
Christian Hammond <chipx86@chipx86.com>
parents:
5535
diff
changeset
|
615 | static void |
| 15884 | 616 | debug_enabled_cb(const char *name, PurplePrefType type, |
|
12816
5f93e09fa9a6
[gaim-migrate @ 15164]
Mark Doliner <markdoliner@pidgin.im>
parents:
12231
diff
changeset
|
617 | gconstpointer value, gpointer data) |
|
5625
ac8c09def58a
[gaim-migrate @ 6032]
Christian Hammond <chipx86@chipx86.com>
parents:
5535
diff
changeset
|
618 | { |
|
17232
8593d66c708b
When the /pidgin/debug/enabled pref is toggled, wait until the next
Mark Doliner <markdoliner@pidgin.im>
parents:
17040
diff
changeset
|
619 | debug_enabled_timer = g_timeout_add(0, debug_enabled_timeout_cb, GINT_TO_POINTER(GPOINTER_TO_INT(value))); |
|
5625
ac8c09def58a
[gaim-migrate @ 6032]
Christian Hammond <chipx86@chipx86.com>
parents:
5535
diff
changeset
|
620 | } |
|
ac8c09def58a
[gaim-migrate @ 6032]
Christian Hammond <chipx86@chipx86.com>
parents:
5535
diff
changeset
|
621 | |
| 7150 | 622 | static void |
|
15880
d275b025481c
More Gaim to Pidgin changes
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
623 | pidgin_glib_log_handler(const gchar *domain, GLogLevelFlags flags, |
| 7150 | 624 | const gchar *msg, gpointer user_data) |
| 625 | { | |
| 15884 | 626 | PurpleDebugLevel level; |
| 7150 | 627 | char *new_msg = NULL; |
| 628 | char *new_domain = NULL; | |
| 629 | ||
|
7152
112d0e52d04b
[gaim-migrate @ 7719]
Christian Hammond <chipx86@chipx86.com>
parents:
7150
diff
changeset
|
630 | if ((flags & G_LOG_LEVEL_ERROR) == G_LOG_LEVEL_ERROR) |
| 15884 | 631 | level = PURPLE_DEBUG_ERROR; |
|
7152
112d0e52d04b
[gaim-migrate @ 7719]
Christian Hammond <chipx86@chipx86.com>
parents:
7150
diff
changeset
|
632 | else if ((flags & G_LOG_LEVEL_CRITICAL) == G_LOG_LEVEL_CRITICAL) |
| 15884 | 633 | level = PURPLE_DEBUG_FATAL; |
|
7152
112d0e52d04b
[gaim-migrate @ 7719]
Christian Hammond <chipx86@chipx86.com>
parents:
7150
diff
changeset
|
634 | else if ((flags & G_LOG_LEVEL_WARNING) == G_LOG_LEVEL_WARNING) |
| 15884 | 635 | level = PURPLE_DEBUG_WARNING; |
|
7152
112d0e52d04b
[gaim-migrate @ 7719]
Christian Hammond <chipx86@chipx86.com>
parents:
7150
diff
changeset
|
636 | else if ((flags & G_LOG_LEVEL_MESSAGE) == G_LOG_LEVEL_MESSAGE) |
| 15884 | 637 | level = PURPLE_DEBUG_INFO; |
|
7152
112d0e52d04b
[gaim-migrate @ 7719]
Christian Hammond <chipx86@chipx86.com>
parents:
7150
diff
changeset
|
638 | else if ((flags & G_LOG_LEVEL_INFO) == G_LOG_LEVEL_INFO) |
| 15884 | 639 | level = PURPLE_DEBUG_INFO; |
|
7152
112d0e52d04b
[gaim-migrate @ 7719]
Christian Hammond <chipx86@chipx86.com>
parents:
7150
diff
changeset
|
640 | else if ((flags & G_LOG_LEVEL_DEBUG) == G_LOG_LEVEL_DEBUG) |
| 15884 | 641 | level = PURPLE_DEBUG_MISC; |
|
7152
112d0e52d04b
[gaim-migrate @ 7719]
Christian Hammond <chipx86@chipx86.com>
parents:
7150
diff
changeset
|
642 | else |
|
112d0e52d04b
[gaim-migrate @ 7719]
Christian Hammond <chipx86@chipx86.com>
parents:
7150
diff
changeset
|
643 | { |
| 15884 | 644 | purple_debug_warning("gtkdebug", |
| 7150 | 645 | "Unknown glib logging level in %d\n", flags); |
| 646 | ||
| 15884 | 647 | level = PURPLE_DEBUG_MISC; /* This will never happen. */ |
| 7150 | 648 | } |
| 649 | ||
| 650 | if (msg != NULL) | |
| 15884 | 651 | new_msg = purple_utf8_try_convert(msg); |
| 7150 | 652 | |
| 653 | if (domain != NULL) | |
| 15884 | 654 | new_domain = purple_utf8_try_convert(domain); |
| 7150 | 655 | |
|
7152
112d0e52d04b
[gaim-migrate @ 7719]
Christian Hammond <chipx86@chipx86.com>
parents:
7150
diff
changeset
|
656 | if (new_msg != NULL) |
|
112d0e52d04b
[gaim-migrate @ 7719]
Christian Hammond <chipx86@chipx86.com>
parents:
7150
diff
changeset
|
657 | { |
|
35633
e4618d775e0d
Add --enable-glib-errors-trace configure switch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35527
diff
changeset
|
658 | #ifdef ENABLE_GLIBTRACE |
|
e4618d775e0d
Add --enable-glib-errors-trace configure switch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35527
diff
changeset
|
659 | void *bt_buff[20]; |
|
e4618d775e0d
Add --enable-glib-errors-trace configure switch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35527
diff
changeset
|
660 | size_t bt_size; |
|
e4618d775e0d
Add --enable-glib-errors-trace configure switch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35527
diff
changeset
|
661 | |
|
e4618d775e0d
Add --enable-glib-errors-trace configure switch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35527
diff
changeset
|
662 | bt_size = backtrace(bt_buff, 20); |
|
e4618d775e0d
Add --enable-glib-errors-trace configure switch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35527
diff
changeset
|
663 | fprintf(stderr, "\nBacktrace for \"%s\" (%s):\n", new_msg, |
|
e4618d775e0d
Add --enable-glib-errors-trace configure switch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35527
diff
changeset
|
664 | new_domain != NULL ? new_domain : "g_log"); |
|
e4618d775e0d
Add --enable-glib-errors-trace configure switch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35527
diff
changeset
|
665 | backtrace_symbols_fd(bt_buff, bt_size, STDERR_FILENO); |
|
e4618d775e0d
Add --enable-glib-errors-trace configure switch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35527
diff
changeset
|
666 | fprintf(stderr, "\n"); |
|
e4618d775e0d
Add --enable-glib-errors-trace configure switch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35527
diff
changeset
|
667 | #endif |
|
e4618d775e0d
Add --enable-glib-errors-trace configure switch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35527
diff
changeset
|
668 | |
| 15884 | 669 | purple_debug(level, (new_domain != NULL ? new_domain : "g_log"), |
|
7152
112d0e52d04b
[gaim-migrate @ 7719]
Christian Hammond <chipx86@chipx86.com>
parents:
7150
diff
changeset
|
670 | "%s\n", new_msg); |
| 7150 | 671 | |
| 672 | g_free(new_msg); | |
| 673 | } | |
| 674 | ||
|
14097
0c340861ab79
[gaim-migrate @ 16638]
Mark Doliner <markdoliner@pidgin.im>
parents:
13988
diff
changeset
|
675 | g_free(new_domain); |
| 7150 | 676 | } |
| 677 | ||
| 678 | #ifdef _WIN32 | |
| 679 | static void | |
|
15880
d275b025481c
More Gaim to Pidgin changes
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
680 | pidgin_glib_dummy_print_handler(const gchar *string) |
| 7150 | 681 | { |
| 682 | } | |
| 683 | #endif | |
| 684 | ||
|
5625
ac8c09def58a
[gaim-migrate @ 6032]
Christian Hammond <chipx86@chipx86.com>
parents:
5535
diff
changeset
|
685 | void |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15512
diff
changeset
|
686 | pidgin_debug_init(void) |
|
5625
ac8c09def58a
[gaim-migrate @ 6032]
Christian Hammond <chipx86@chipx86.com>
parents:
5535
diff
changeset
|
687 | { |
| 5684 | 688 | /* Debug window preferences. */ |
| 689 | /* | |
| 690 | * NOTE: This must be set before prefs are loaded, and the callbacks | |
| 691 | * set after they are loaded, since prefs sets the enabled | |
| 692 | * preference here and that loads the window, which calls the | |
|
8735
01248ea222d3
[gaim-migrate @ 9490]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
8046
diff
changeset
|
693 | * configure event, which overrides the width and height! :P |
| 5684 | 694 | */ |
| 695 | ||
|
16123
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
696 | purple_prefs_add_none(PIDGIN_PREFS_ROOT "/debug"); |
|
10307
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
10297
diff
changeset
|
697 | |
|
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
10297
diff
changeset
|
698 | /* Controls printing to the debug window */ |
|
16123
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
699 | purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/debug/enabled", FALSE); |
|
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
700 | purple_prefs_add_int(PIDGIN_PREFS_ROOT "/debug/filterlevel", PURPLE_DEBUG_ALL); |
|
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
701 | purple_prefs_add_int(PIDGIN_PREFS_ROOT "/debug/style", GTK_TOOLBAR_BOTH_HORIZ); |
|
10307
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
10297
diff
changeset
|
702 | |
|
16123
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
703 | purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/debug/toolbar", TRUE); |
|
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
704 | purple_prefs_add_int(PIDGIN_PREFS_ROOT "/debug/width", 450); |
|
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
705 | purple_prefs_add_int(PIDGIN_PREFS_ROOT "/debug/height", 250); |
| 5684 | 706 | |
|
16123
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
707 | purple_prefs_add_string(PIDGIN_PREFS_ROOT "/debug/regex", ""); |
|
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
708 | purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/debug/filter", FALSE); |
|
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
709 | purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/debug/invert", FALSE); |
|
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
710 | purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/debug/case_insensitive", FALSE); |
|
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
711 | purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/debug/highlight", FALSE); |
|
11256
fe82a0c5e5ec
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11243
diff
changeset
|
712 | |
|
16123
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
713 | purple_prefs_connect_callback(NULL, PIDGIN_PREFS_ROOT "/debug/enabled", |
|
5794
ebdbb7dc6658
[gaim-migrate @ 6219]
Christian Hammond <chipx86@chipx86.com>
parents:
5738
diff
changeset
|
714 | debug_enabled_cb, NULL); |
| 7150 | 715 | |
| 716 | #define REGISTER_G_LOG_HANDLER(name) \ | |
| 717 | g_log_set_handler((name), G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL \ | |
| 718 | | G_LOG_FLAG_RECURSION, \ | |
|
15880
d275b025481c
More Gaim to Pidgin changes
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
719 | pidgin_glib_log_handler, NULL) |
| 7150 | 720 | |
| 721 | /* Register the glib/gtk log handlers. */ | |
| 722 | REGISTER_G_LOG_HANDLER(NULL); | |
| 723 | REGISTER_G_LOG_HANDLER("Gdk"); | |
| 724 | REGISTER_G_LOG_HANDLER("Gtk"); | |
|
7229
0f85b503c030
[gaim-migrate @ 7799]
Herman Bloggs <herman@bluedigits.com>
parents:
7152
diff
changeset
|
725 | REGISTER_G_LOG_HANDLER("GdkPixbuf"); |
| 7150 | 726 | REGISTER_G_LOG_HANDLER("GLib"); |
| 727 | REGISTER_G_LOG_HANDLER("GModule"); | |
| 728 | REGISTER_G_LOG_HANDLER("GLib-GObject"); | |
| 729 | REGISTER_G_LOG_HANDLER("GThread"); | |
|
33532
66962f44ff47
Add JSON debug messages to our log
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33501
diff
changeset
|
730 | REGISTER_G_LOG_HANDLER("Json"); |
|
21743
7a0caaf628ff
applied changes from 10f341962a83e2380243c4e44bb685105e3091a2
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
21630
diff
changeset
|
731 | #ifdef USE_GSTREAMER |
|
7a0caaf628ff
applied changes from 10f341962a83e2380243c4e44bb685105e3091a2
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
21630
diff
changeset
|
732 | REGISTER_G_LOG_HANDLER("GStreamer"); |
|
7a0caaf628ff
applied changes from 10f341962a83e2380243c4e44bb685105e3091a2
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
21630
diff
changeset
|
733 | #endif |
| 7150 | 734 | |
| 735 | #ifdef _WIN32 | |
| 15884 | 736 | if (!purple_debug_is_enabled()) |
|
15880
d275b025481c
More Gaim to Pidgin changes
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
737 | g_set_print_handler(pidgin_glib_dummy_print_handler); |
| 7150 | 738 | #endif |
|
5625
ac8c09def58a
[gaim-migrate @ 6032]
Christian Hammond <chipx86@chipx86.com>
parents:
5535
diff
changeset
|
739 | } |
|
ac8c09def58a
[gaim-migrate @ 6032]
Christian Hammond <chipx86@chipx86.com>
parents:
5535
diff
changeset
|
740 | |
| 5212 | 741 | void |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15512
diff
changeset
|
742 | pidgin_debug_uninit(void) |
| 11033 | 743 | { |
| 15884 | 744 | purple_debug_set_ui_ops(NULL); |
|
17232
8593d66c708b
When the /pidgin/debug/enabled pref is toggled, wait until the next
Mark Doliner <markdoliner@pidgin.im>
parents:
17040
diff
changeset
|
745 | |
|
8593d66c708b
When the /pidgin/debug/enabled pref is toggled, wait until the next
Mark Doliner <markdoliner@pidgin.im>
parents:
17040
diff
changeset
|
746 | if (debug_enabled_timer != 0) |
|
8593d66c708b
When the /pidgin/debug/enabled pref is toggled, wait until the next
Mark Doliner <markdoliner@pidgin.im>
parents:
17040
diff
changeset
|
747 | g_source_remove(debug_enabled_timer); |
| 11033 | 748 | } |
| 749 | ||
| 750 | void | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15512
diff
changeset
|
751 | pidgin_debug_window_show(void) |
| 5212 | 752 | { |
| 753 | if (debug_win == NULL) | |
| 754 | debug_win = debug_window_new(); | |
| 755 | ||
| 756 | gtk_widget_show(debug_win->window); | |
|
5530
ba1ad464b56f
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5430
diff
changeset
|
757 | |
|
16123
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
758 | purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/debug/enabled", TRUE); |
| 5212 | 759 | } |
| 760 | ||
| 761 | void | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15512
diff
changeset
|
762 | pidgin_debug_window_hide(void) |
| 5212 | 763 | { |
| 764 | if (debug_win != NULL) { | |
| 765 | gtk_widget_destroy(debug_win->window); | |
| 766 | debug_window_destroy(NULL, NULL, NULL); | |
| 767 | } | |
| 768 | } | |
| 769 | ||
| 770 | static void | |
| 15884 | 771 | pidgin_debug_print(PurpleDebugLevel level, const char *category, |
|
33537
4998e86453d0
GTK debug window: append using js, not html
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33532
diff
changeset
|
772 | const char *arg_s) |
| 5212 | 773 | { |
|
33537
4998e86453d0
GTK debug window: append using js, not html
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33532
diff
changeset
|
774 | gchar *esc_s; |
|
17040
cb33027a36e4
Force timestamps always on for debug log and debug window. Making this
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16752
diff
changeset
|
775 | const char *mdate; |
|
cb33027a36e4
Force timestamps always on for debug log and debug window. Making this
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16752
diff
changeset
|
776 | time_t mtime; |
|
33537
4998e86453d0
GTK debug window: append using js, not html
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33532
diff
changeset
|
777 | gchar *js; |
|
5530
ba1ad464b56f
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5430
diff
changeset
|
778 | |
|
33537
4998e86453d0
GTK debug window: append using js, not html
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33532
diff
changeset
|
779 | if (debug_win == NULL) |
|
10307
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
10297
diff
changeset
|
780 | return; |
|
33537
4998e86453d0
GTK debug window: append using js, not html
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33532
diff
changeset
|
781 | if (!purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/debug/enabled")) |
|
4998e86453d0
GTK debug window: append using js, not html
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33532
diff
changeset
|
782 | return; |
|
10307
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
10297
diff
changeset
|
783 | |
|
17040
cb33027a36e4
Force timestamps always on for debug log and debug window. Making this
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16752
diff
changeset
|
784 | mtime = time(NULL); |
|
cb33027a36e4
Force timestamps always on for debug log and debug window. Making this
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16752
diff
changeset
|
785 | mdate = purple_utf8_strftime("%H:%M:%S", localtime(&mtime)); |
| 5212 | 786 | |
|
33537
4998e86453d0
GTK debug window: append using js, not html
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33532
diff
changeset
|
787 | esc_s = purple_escape_js(arg_s); |
| 5212 | 788 | |
|
33538
cbeb76707f12
Better implementation of purple_escape_js
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33537
diff
changeset
|
789 | js = g_strdup_printf("append(%d, '%s', '%s', %s);", |
|
33537
4998e86453d0
GTK debug window: append using js, not html
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33532
diff
changeset
|
790 | level, mdate, category ? category : "", esc_s); |
|
10307
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
10297
diff
changeset
|
791 | g_free(esc_s); |
| 5212 | 792 | |
|
35500
ae6432ea326f
Fixed namespace issues in Pidgin.
Ankit Vani <a@nevitus.org>
parents:
35454
diff
changeset
|
793 | pidgin_webview_safe_execute_script(PIDGIN_WEBVIEW(debug_win->text), js); |
|
33537
4998e86453d0
GTK debug window: append using js, not html
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33532
diff
changeset
|
794 | g_free(js); |
| 5212 | 795 | } |
| 796 | ||
|
16044
257072807aa8
Add a whimpy ui op to the debug API that returns TRUE if debugging
Mark Doliner <markdoliner@pidgin.im>
parents:
15931
diff
changeset
|
797 | static gboolean |
|
257072807aa8
Add a whimpy ui op to the debug API that returns TRUE if debugging
Mark Doliner <markdoliner@pidgin.im>
parents:
15931
diff
changeset
|
798 | pidgin_debug_is_enabled(PurpleDebugLevel level, const char *category) |
|
257072807aa8
Add a whimpy ui op to the debug API that returns TRUE if debugging
Mark Doliner <markdoliner@pidgin.im>
parents:
15931
diff
changeset
|
799 | { |
|
16045
d9add5eda4cd
Check if debug_win is != NULL before checking the preference. This
Mark Doliner <markdoliner@pidgin.im>
parents:
16044
diff
changeset
|
800 | return (debug_win != NULL && |
|
16123
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16045
diff
changeset
|
801 | purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/debug/enabled")); |
|
16044
257072807aa8
Add a whimpy ui op to the debug API that returns TRUE if debugging
Mark Doliner <markdoliner@pidgin.im>
parents:
15931
diff
changeset
|
802 | } |
|
257072807aa8
Add a whimpy ui op to the debug API that returns TRUE if debugging
Mark Doliner <markdoliner@pidgin.im>
parents:
15931
diff
changeset
|
803 | |
| 15884 | 804 | static PurpleDebugUiOps ops = |
| 5212 | 805 | { |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15512
diff
changeset
|
806 | pidgin_debug_print, |
|
16752
e6bcb1628c57
Patch from John 'rekkanoryo' Bailey to add the padding struct members in pidgin
Gary Kramlich <grim@reaperworld.com>
parents:
16490
diff
changeset
|
807 | pidgin_debug_is_enabled, |
|
e6bcb1628c57
Patch from John 'rekkanoryo' Bailey to add the padding struct members in pidgin
Gary Kramlich <grim@reaperworld.com>
parents:
16490
diff
changeset
|
808 | NULL, |
|
e6bcb1628c57
Patch from John 'rekkanoryo' Bailey to add the padding struct members in pidgin
Gary Kramlich <grim@reaperworld.com>
parents:
16490
diff
changeset
|
809 | NULL, |
|
e6bcb1628c57
Patch from John 'rekkanoryo' Bailey to add the padding struct members in pidgin
Gary Kramlich <grim@reaperworld.com>
parents:
16490
diff
changeset
|
810 | NULL, |
|
e6bcb1628c57
Patch from John 'rekkanoryo' Bailey to add the padding struct members in pidgin
Gary Kramlich <grim@reaperworld.com>
parents:
16490
diff
changeset
|
811 | NULL |
| 5212 | 812 | }; |
| 813 | ||
| 15884 | 814 | PurpleDebugUiOps * |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15512
diff
changeset
|
815 | pidgin_debug_get_ui_ops(void) |
| 5212 | 816 | { |
| 817 | return &ops; | |
| 818 | } | |
|
10087
e5b80a38939d
[gaim-migrate @ 11098]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9791
diff
changeset
|
819 | |
|
e5b80a38939d
[gaim-migrate @ 11098]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9791
diff
changeset
|
820 | void * |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15512
diff
changeset
|
821 | pidgin_debug_get_handle() { |
|
10087
e5b80a38939d
[gaim-migrate @ 11098]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9791
diff
changeset
|
822 | static int handle; |
|
e5b80a38939d
[gaim-migrate @ 11098]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9791
diff
changeset
|
823 | |
|
e5b80a38939d
[gaim-migrate @ 11098]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9791
diff
changeset
|
824 | return &handle; |
|
e5b80a38939d
[gaim-migrate @ 11098]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9791
diff
changeset
|
825 | } |
|
33095
1e0b4fac0fed
Convert the Debug Window to a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33094
diff
changeset
|
826 |