Mercurial > pidgin
annotate plugins/gestures/gestures.c @ 11033:50224ac8184d
[gaim-migrate @ 12919]
Ok, this is debug window filtering. Sadrul was going to do this with a text entry, but I like this better, feel free to disagree with me. It's not the prettiest in a couple places, most notable gtkmain.c where a bunch of categories that don't currently have a home get registered. I added some plugin_(un)load functions to some plugins to place the (un)register functions. Though I didn't do that for the prpls. Comments and cleanups welcome. (Oh, I've been seeing some crashes on quit, but I haven't been able to get it to happen reliably so I'm not sure if it's my code or some transient HEAD oscar/other crash.)
committer: Tailor Script <tailor@pidgin.im>
author | Etan Reisner <pidgin@unreliablesource.net> |
---|---|
date | Tue, 28 Jun 2005 06:13:07 +0000 |
parents | de9af04c50ff |
children | bb0d7b719af2 |
rev | line source |
---|---|
4390 | 1 /* |
2 * Mouse gestures plugin for Gaim | |
3 * | |
4 * Copyright (C) 2003 Christian Hammond. | |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
5 * |
4390 | 6 * This program is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU General Public License as | |
8 * published by the Free Software Foundation; either version 2 of the | |
9 * License, or (at your option) any later version. | |
10 * | |
11 * This program is distributed in the hope that it will be useful, but | |
12 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 * General Public License for more details. | |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
15 * |
4390 | 16 * You should have received a copy of the GNU General Public License |
17 * along with this program; if not, write to the Free Software | |
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
19 * 02111-1307, USA. | |
20 */ | |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5767
diff
changeset
|
21 #include "internal.h" |
9791 | 22 #include "gtkgaim.h" |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5767
diff
changeset
|
23 |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5767
diff
changeset
|
24 #include "debug.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5767
diff
changeset
|
25 #include "prefs.h" |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
26 #include "signals.h" |
9943 | 27 #include "version.h" |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5767
diff
changeset
|
28 |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5767
diff
changeset
|
29 #include "gtkconv.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5767
diff
changeset
|
30 #include "gtkplugin.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5767
diff
changeset
|
31 #include "gtkutils.h" |
4390 | 32 |
33 #include "gstroke.h" | |
34 | |
6371
8f94cce8faa5
[gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents:
6225
diff
changeset
|
35 #define GESTURES_PLUGIN_ID "gtk-x11-gestures" |
4390 | 36 |
37 static void | |
38 stroke_close(GtkWidget *widget, void *data) | |
39 { | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
40 GaimConversation *conv; |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
41 GaimGtkConversation *gtkconv; |
4390 | 42 |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
43 conv = (GaimConversation *)data; |
4390 | 44 |
45 /* Double-check */ | |
46 if (!GAIM_IS_GTK_CONVERSATION(conv)) | |
47 return; | |
48 | |
49 gtkconv = GAIM_GTK_CONVERSATION(conv); | |
50 | |
51 gstroke_cleanup(gtkconv->imhtml); | |
52 gaim_conversation_destroy(conv); | |
53 } | |
54 | |
55 static void | |
56 stroke_prev_tab(GtkWidget *widget, void *data) | |
57 { | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
58 GaimConversation *conv; |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
59 GaimConvWindow *win; |
10842 | 60 GList *conversations; |
4390 | 61 |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
62 conv = (GaimConversation *)data; |
4390 | 63 win = gaim_conversation_get_window(conv); |
64 | |
10842 | 65 for (conversations = gaim_conv_window_get_conversations(win); |
66 conversations != NULL; | |
67 conversations = conversations->next) | |
68 { | |
69 if (conversations->data == conv) | |
70 { | |
71 if (conversations->prev != NULL) { | |
72 gaim_conv_window_switch_conversation(win, | |
73 conversations->prev->data); | |
74 } else { | |
75 gaim_conv_window_switch_conversation(win, | |
76 g_list_last(conversations)->data); | |
77 } | |
4390 | 78 |
10842 | 79 return; |
80 } | |
81 } | |
4390 | 82 } |
83 | |
84 static void | |
85 stroke_next_tab(GtkWidget *widget, void *data) | |
86 { | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
87 GaimConversation *conv; |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
88 GaimConvWindow *win; |
10842 | 89 GList *conversations; |
4390 | 90 |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
91 conv = (GaimConversation *)data; |
4390 | 92 win = gaim_conversation_get_window(conv); |
93 | |
10842 | 94 for (conversations = gaim_conv_window_get_conversations(win); |
95 conversations != NULL; | |
96 conversations = conversations->next) | |
97 { | |
98 if (conversations->data == conv) | |
99 { | |
100 if (conversations->next != NULL) { | |
101 gaim_conv_window_switch_conversation(win, | |
102 conversations->next->data); | |
103 } else { | |
104 gaim_conv_window_switch_conversation(win, | |
105 g_list_first(conversations)->data); | |
106 } | |
4390 | 107 |
10842 | 108 return; |
109 } | |
110 } | |
4390 | 111 } |
112 | |
113 void | |
114 stroke_new_win(GtkWidget *widget, void *data) | |
115 { | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
116 GaimConvWindow *new_win, *old_win; |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
117 GaimConversation *conv; |
4390 | 118 |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
119 conv = (GaimConversation *)data; |
4390 | 120 old_win = gaim_conversation_get_window(conv); |
121 | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
122 if (gaim_conv_window_get_conversation_count(old_win) <= 1) |
4390 | 123 return; |
124 | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
125 new_win = gaim_conv_window_new(); |
4390 | 126 |
10824 | 127 gaim_conv_window_remove_conversation(old_win, conv); |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
128 gaim_conv_window_add_conversation(new_win, conv); |
4390 | 129 |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
130 gaim_conv_window_show(new_win); |
4390 | 131 } |
132 | |
133 static void | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
134 attach_signals(GaimConversation *conv) |
4390 | 135 { |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
136 GaimGtkConversation *gtkconv; |
4390 | 137 |
138 gtkconv = GAIM_GTK_CONVERSATION(conv); | |
139 | |
140 gstroke_enable(gtkconv->imhtml); | |
141 gstroke_signal_connect(gtkconv->imhtml, "14789", stroke_close, conv); | |
142 gstroke_signal_connect(gtkconv->imhtml, "1456", stroke_close, conv); | |
5016
ae7760945ef2
[gaim-migrate @ 5352]
Christian Hammond <chipx86@chipx86.com>
parents:
4843
diff
changeset
|
143 gstroke_signal_connect(gtkconv->imhtml, "1489", stroke_close, conv); |
4390 | 144 gstroke_signal_connect(gtkconv->imhtml, "74123", stroke_next_tab, conv); |
145 gstroke_signal_connect(gtkconv->imhtml, "7456", stroke_next_tab, conv); | |
146 gstroke_signal_connect(gtkconv->imhtml, "96321", stroke_prev_tab, conv); | |
147 gstroke_signal_connect(gtkconv->imhtml, "9654", stroke_prev_tab, conv); | |
148 gstroke_signal_connect(gtkconv->imhtml, "25852", stroke_new_win, conv); | |
149 } | |
150 | |
151 static void | |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
152 new_conv_cb(GaimConversation *conv) |
4390 | 153 { |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
154 if (GAIM_IS_GTK_CONVERSATION(conv)) |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
155 attach_signals(conv); |
4390 | 156 } |
157 | |
158 #if 0 | |
159 static void | |
160 mouse_button_menu_cb(GtkMenuItem *item, gpointer data) | |
161 { | |
162 int button = (int)data; | |
163 | |
164 gstroke_set_mouse_button(button + 2); | |
165 } | |
166 #endif | |
167 | |
168 static void | |
169 toggle_draw_cb(GtkToggleButton *toggle, gpointer data) | |
170 { | |
5767
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
171 gaim_prefs_set_bool("/plugins/gtk/X11/gestures/visual", |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
172 gtk_toggle_button_get_active(toggle)); |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
173 } |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
174 |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
175 static void |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
176 visual_pref_cb(const char *name, GaimPrefType type, gpointer value, |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
177 gpointer data) |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
178 { |
7386 | 179 gstroke_set_draw_strokes((gboolean) GPOINTER_TO_INT(value) ); |
4390 | 180 } |
181 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
182 static gboolean |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
183 plugin_load(GaimPlugin *plugin) |
4390 | 184 { |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
185 GaimConversation *conv; |
4390 | 186 GList *l; |
187 | |
11033
50224ac8184d
[gaim-migrate @ 12919]
Etan Reisner <pidgin@unreliablesource.net>
parents:
10842
diff
changeset
|
188 gaim_debug_register_category("gestures"); |
50224ac8184d
[gaim-migrate @ 12919]
Etan Reisner <pidgin@unreliablesource.net>
parents:
10842
diff
changeset
|
189 |
4390 | 190 for (l = gaim_get_conversations(); l != NULL; l = l->next) { |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
191 conv = (GaimConversation *)l->data; |
4390 | 192 |
193 if (!GAIM_IS_GTK_CONVERSATION(conv)) | |
194 continue; | |
195 | |
196 attach_signals(conv); | |
197 } | |
198 | |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
199 gaim_signal_connect(gaim_conversations_get_handle(), |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
200 "conversation-created", |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
201 plugin, GAIM_CALLBACK(new_conv_cb), NULL); |
4390 | 202 |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
203 return TRUE; |
4390 | 204 } |
205 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
206 static gboolean |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
207 plugin_unload(GaimPlugin *plugin) |
4390 | 208 { |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
209 GaimConversation *conv; |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
210 GaimGtkConversation *gtkconv; |
4390 | 211 GList *l; |
212 | |
213 for (l = gaim_get_conversations(); l != NULL; l = l->next) { | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
214 conv = (GaimConversation *)l->data; |
4390 | 215 |
216 if (!GAIM_IS_GTK_CONVERSATION(conv)) | |
217 continue; | |
218 | |
219 gtkconv = GAIM_GTK_CONVERSATION(conv); | |
220 | |
221 gstroke_cleanup(gtkconv->imhtml); | |
222 } | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
223 |
11033
50224ac8184d
[gaim-migrate @ 12919]
Etan Reisner <pidgin@unreliablesource.net>
parents:
10842
diff
changeset
|
224 gaim_debug_register_category("gestures"); |
50224ac8184d
[gaim-migrate @ 12919]
Etan Reisner <pidgin@unreliablesource.net>
parents:
10842
diff
changeset
|
225 |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
226 return TRUE; |
4390 | 227 } |
228 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
229 static GtkWidget * |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
230 get_config_frame(GaimPlugin *plugin) |
4390 | 231 { |
232 GtkWidget *ret; | |
233 GtkWidget *vbox; | |
234 GtkWidget *toggle; | |
235 #if 0 | |
236 GtkWidget *opt; | |
237 GtkWidget *menu, *item; | |
238 #endif | |
239 | |
240 /* Outside container */ | |
241 ret = gtk_vbox_new(FALSE, 18); | |
242 gtk_container_set_border_width(GTK_CONTAINER(ret), 12); | |
243 | |
244 /* Configuration frame */ | |
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
245 vbox = gaim_gtk_make_frame(ret, _("Mouse Gestures Configuration")); |
4390 | 246 |
247 #if 0 | |
248 /* Mouse button drop-down menu */ | |
249 menu = gtk_menu_new(); | |
250 opt = gtk_option_menu_new(); | |
251 | |
252 item = gtk_menu_item_new_with_label(_("Middle mouse button")); | |
253 g_signal_connect(G_OBJECT(item), "activate", | |
254 G_CALLBACK(mouse_button_menu_cb), opt); | |
255 gtk_menu_append(menu, item); | |
256 | |
257 item = gtk_menu_item_new_with_label(_("Right mouse button")); | |
258 g_signal_connect(G_OBJECT(item), "activate", | |
259 G_CALLBACK(mouse_button_menu_cb), opt); | |
260 gtk_menu_append(menu, item); | |
261 | |
262 gtk_box_pack_start(GTK_BOX(vbox), opt, FALSE, FALSE, 0); | |
263 gtk_option_menu_set_menu(GTK_OPTION_MENU(opt), menu); | |
264 gtk_option_menu_set_history(GTK_OPTION_MENU(opt), | |
265 gstroke_get_mouse_button() - 2); | |
266 #endif | |
267 | |
268 /* "Visual gesture display" checkbox */ | |
269 toggle = gtk_check_button_new_with_mnemonic(_("_Visual gesture display")); | |
270 gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); | |
271 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), | |
5767
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
272 gaim_prefs_get_bool("/plugins/gtk/X11/gestures/visual")); |
4390 | 273 g_signal_connect(G_OBJECT(toggle), "toggled", |
274 G_CALLBACK(toggle_draw_cb), NULL); | |
275 | |
276 gtk_widget_show_all(ret); | |
277 | |
278 return ret; | |
279 } | |
280 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
281 static GaimGtkPluginUiInfo ui_info = |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
282 { |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
283 get_config_frame |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
284 }; |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
285 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
286 static GaimPluginInfo info = |
4390 | 287 { |
9943 | 288 GAIM_PLUGIN_MAGIC, |
289 GAIM_MAJOR_VERSION, | |
290 GAIM_MINOR_VERSION, | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
291 GAIM_PLUGIN_STANDARD, /**< type */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
292 GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
293 0, /**< flags */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
294 NULL, /**< dependencies */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
295 GAIM_PRIORITY_DEFAULT, /**< priority */ |
4390 | 296 |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
297 GESTURES_PLUGIN_ID, /**< id */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
298 N_("Mouse Gestures"), /**< name */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
299 VERSION, /**< version */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
300 /** summary */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
301 N_("Provides support for mouse gestures"), |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
302 /** description */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
303 N_("Allows support for mouse gestures in conversation windows.\n" |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
304 "Drag the middle mouse button to perform certain actions:\n\n" |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
305 "Drag down and then to the right to close a conversation.\n" |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
306 "Drag up and then to the left to switch to the previous " |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
307 "conversation.\n" |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
308 "Drag up and then to the right to switch to the next " |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
309 "conversation."), |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
310 "Christian Hammond <chipx86@gnupdate.org>", /**< author */ |
6371
8f94cce8faa5
[gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents:
6225
diff
changeset
|
311 GAIM_WEBSITE, /**< homepage */ |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
312 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
313 plugin_load, /**< load */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
314 plugin_unload, /**< unload */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
315 NULL, /**< destroy */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
316 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
317 &ui_info, /**< ui_info */ |
8993 | 318 NULL, /**< extra_info */ |
319 NULL, | |
320 NULL | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
321 }; |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
322 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
323 static void |
5920
7d385de2f9cd
[gaim-migrate @ 6360]
Christian Hammond <chipx86@chipx86.com>
parents:
5873
diff
changeset
|
324 init_plugin(GaimPlugin *plugin) |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
325 { |
5767
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
326 gaim_prefs_add_none("/plugins/gtk"); |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
327 gaim_prefs_add_none("/plugins/gtk/X11"); |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
328 gaim_prefs_add_none("/plugins/gtk/X11/gestures"); |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
329 gaim_prefs_add_bool("/plugins/gtk/X11/gestures/visual", FALSE); |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
330 |
10087 | 331 gaim_prefs_connect_callback(plugin, "/plugins/gtk/X11/gestures/visual", |
5767
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
332 visual_pref_cb, NULL); |
4390 | 333 } |
334 | |
6063 | 335 GAIM_INIT_PLUGIN(gestures, init_plugin, info) |