Mercurial > pidgin
annotate plugins/gestures/gestures.c @ 6116:de49cfd8fd59
[gaim-migrate @ 6579]
This fixes "perl plugin handling event_buddy_signon called twice"
http://sourceforge.net/tracker/index.php?func=detail&aid=727796&group_id=235&atid=100235
Also cleaned up history.c a tad bit and removed a printf--thanks to SimGuy.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 13 Jul 2003 23:26:06 +0000 |
parents | 5239a3b4ab33 |
children | d0d68bf39081 |
rev | line source |
---|---|
4390 | 1 /* |
2 * Mouse gestures plugin for Gaim | |
3 * | |
4 * Copyright (C) 2003 Christian Hammond. | |
5 * | |
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. | |
15 * | |
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" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5767
diff
changeset
|
22 |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5767
diff
changeset
|
23 #include "debug.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5767
diff
changeset
|
24 #include "prefs.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5767
diff
changeset
|
25 |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5767
diff
changeset
|
26 #include "gtkconv.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5767
diff
changeset
|
27 #include "gtkplugin.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5767
diff
changeset
|
28 #include "gtkutils.h" |
4390 | 29 |
30 #include "gstroke.h" | |
31 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
32 #define GESTURES_PLUGIN_ID "gtk-gestures" |
4390 | 33 |
34 static void | |
35 stroke_close(GtkWidget *widget, void *data) | |
36 { | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
37 GaimConversation *conv; |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
38 GaimGtkConversation *gtkconv; |
4390 | 39 |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
40 conv = (GaimConversation *)data; |
4390 | 41 |
42 /* Double-check */ | |
43 if (!GAIM_IS_GTK_CONVERSATION(conv)) | |
44 return; | |
45 | |
46 gtkconv = GAIM_GTK_CONVERSATION(conv); | |
47 | |
48 gstroke_cleanup(gtkconv->imhtml); | |
49 gaim_conversation_destroy(conv); | |
50 } | |
51 | |
52 static void | |
53 stroke_prev_tab(GtkWidget *widget, void *data) | |
54 { | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
55 GaimConversation *conv; |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
56 GaimWindow *win; |
4390 | 57 unsigned int index; |
58 | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
59 conv = (GaimConversation *)data; |
4390 | 60 win = gaim_conversation_get_window(conv); |
61 index = gaim_conversation_get_index(conv); | |
62 | |
63 if (index == 0) | |
64 index = gaim_window_get_conversation_count(win) - 1; | |
65 else | |
66 index--; | |
67 | |
68 gaim_window_switch_conversation(win, index); | |
69 } | |
70 | |
71 static void | |
72 stroke_next_tab(GtkWidget *widget, void *data) | |
73 { | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
74 GaimConversation *conv; |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
75 GaimWindow *win; |
4390 | 76 unsigned int index; |
77 | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
78 conv = (GaimConversation *)data; |
4390 | 79 win = gaim_conversation_get_window(conv); |
80 index = gaim_conversation_get_index(conv); | |
81 | |
82 if (index == gaim_window_get_conversation_count(win) - 1) | |
83 index = 0; | |
84 else | |
85 index++; | |
86 | |
87 gaim_window_switch_conversation(win, index); | |
88 } | |
89 | |
90 void | |
91 stroke_new_win(GtkWidget *widget, void *data) | |
92 { | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
93 GaimWindow *new_win, *old_win; |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
94 GaimConversation *conv; |
4390 | 95 |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
96 conv = (GaimConversation *)data; |
4390 | 97 old_win = gaim_conversation_get_window(conv); |
98 | |
99 if (gaim_window_get_conversation_count(old_win) <= 1) | |
100 return; | |
101 | |
102 new_win = gaim_window_new(); | |
103 | |
104 gaim_window_remove_conversation(old_win, gaim_conversation_get_index(conv)); | |
105 gaim_window_add_conversation(new_win, conv); | |
106 | |
107 gaim_window_show(new_win); | |
108 } | |
109 | |
110 static void | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
111 attach_signals(GaimConversation *conv) |
4390 | 112 { |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
113 GaimGtkConversation *gtkconv; |
4390 | 114 |
115 gtkconv = GAIM_GTK_CONVERSATION(conv); | |
116 | |
117 gstroke_enable(gtkconv->imhtml); | |
118 gstroke_signal_connect(gtkconv->imhtml, "14789", stroke_close, conv); | |
119 gstroke_signal_connect(gtkconv->imhtml, "1456", stroke_close, conv); | |
5016
ae7760945ef2
[gaim-migrate @ 5352]
Christian Hammond <chipx86@chipx86.com>
parents:
4843
diff
changeset
|
120 gstroke_signal_connect(gtkconv->imhtml, "1489", stroke_close, conv); |
4390 | 121 gstroke_signal_connect(gtkconv->imhtml, "74123", stroke_next_tab, conv); |
122 gstroke_signal_connect(gtkconv->imhtml, "7456", stroke_next_tab, conv); | |
123 gstroke_signal_connect(gtkconv->imhtml, "96321", stroke_prev_tab, conv); | |
124 gstroke_signal_connect(gtkconv->imhtml, "9654", stroke_prev_tab, conv); | |
125 gstroke_signal_connect(gtkconv->imhtml, "25852", stroke_new_win, conv); | |
126 } | |
127 | |
128 static void | |
129 new_conv_cb(char *who) | |
130 { | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
131 GaimConversation *conv; |
4390 | 132 |
133 conv = gaim_find_conversation(who); | |
134 | |
135 if (conv == NULL || !GAIM_IS_GTK_CONVERSATION(conv)) | |
136 return; | |
137 | |
138 attach_signals(conv); | |
139 } | |
140 | |
141 #if 0 | |
142 static void | |
143 mouse_button_menu_cb(GtkMenuItem *item, gpointer data) | |
144 { | |
145 int button = (int)data; | |
146 | |
147 gstroke_set_mouse_button(button + 2); | |
148 } | |
149 #endif | |
150 | |
151 static void | |
152 toggle_draw_cb(GtkToggleButton *toggle, gpointer data) | |
153 { | |
5767
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
154 gaim_prefs_set_bool("/plugins/gtk/X11/gestures/visual", |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
155 gtk_toggle_button_get_active(toggle)); |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
156 } |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
157 |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
158 static void |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
159 visual_pref_cb(const char *name, GaimPrefType type, gpointer value, |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
160 gpointer data) |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
161 { |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
162 gstroke_set_draw_strokes((gboolean)value); |
4390 | 163 } |
164 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
165 static gboolean |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
166 plugin_load(GaimPlugin *plugin) |
4390 | 167 { |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
168 GaimConversation *conv; |
4390 | 169 GList *l; |
170 | |
171 for (l = gaim_get_conversations(); l != NULL; l = l->next) { | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
172 conv = (GaimConversation *)l->data; |
4390 | 173 |
174 if (!GAIM_IS_GTK_CONVERSATION(conv)) | |
175 continue; | |
176 | |
177 attach_signals(conv); | |
178 } | |
179 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
180 gaim_signal_connect(plugin, event_new_conversation, new_conv_cb, NULL); |
4390 | 181 |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
182 return TRUE; |
4390 | 183 } |
184 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
185 static gboolean |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
186 plugin_unload(GaimPlugin *plugin) |
4390 | 187 { |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
188 GaimConversation *conv; |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
189 GaimGtkConversation *gtkconv; |
4390 | 190 GList *l; |
191 | |
192 for (l = gaim_get_conversations(); l != NULL; l = l->next) { | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
193 conv = (GaimConversation *)l->data; |
4390 | 194 |
195 if (!GAIM_IS_GTK_CONVERSATION(conv)) | |
196 continue; | |
197 | |
198 gtkconv = GAIM_GTK_CONVERSATION(conv); | |
199 | |
200 gstroke_cleanup(gtkconv->imhtml); | |
201 } | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
202 |
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 GtkWidget * |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
207 get_config_frame(GaimPlugin *plugin) |
4390 | 208 { |
209 GtkWidget *ret; | |
210 GtkWidget *vbox; | |
211 GtkWidget *toggle; | |
212 #if 0 | |
213 GtkWidget *opt; | |
214 GtkWidget *menu, *item; | |
215 #endif | |
216 | |
217 /* Outside container */ | |
218 ret = gtk_vbox_new(FALSE, 18); | |
219 gtk_container_set_border_width(GTK_CONTAINER(ret), 12); | |
220 | |
221 /* Configuration frame */ | |
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
222 vbox = gaim_gtk_make_frame(ret, _("Mouse Gestures Configuration")); |
4390 | 223 |
224 #if 0 | |
225 /* Mouse button drop-down menu */ | |
226 menu = gtk_menu_new(); | |
227 opt = gtk_option_menu_new(); | |
228 | |
229 item = gtk_menu_item_new_with_label(_("Middle mouse button")); | |
230 g_signal_connect(G_OBJECT(item), "activate", | |
231 G_CALLBACK(mouse_button_menu_cb), opt); | |
232 gtk_menu_append(menu, item); | |
233 | |
234 item = gtk_menu_item_new_with_label(_("Right mouse button")); | |
235 g_signal_connect(G_OBJECT(item), "activate", | |
236 G_CALLBACK(mouse_button_menu_cb), opt); | |
237 gtk_menu_append(menu, item); | |
238 | |
239 gtk_box_pack_start(GTK_BOX(vbox), opt, FALSE, FALSE, 0); | |
240 gtk_option_menu_set_menu(GTK_OPTION_MENU(opt), menu); | |
241 gtk_option_menu_set_history(GTK_OPTION_MENU(opt), | |
242 gstroke_get_mouse_button() - 2); | |
243 #endif | |
244 | |
245 /* "Visual gesture display" checkbox */ | |
246 toggle = gtk_check_button_new_with_mnemonic(_("_Visual gesture display")); | |
247 gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); | |
248 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), | |
5767
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
249 gaim_prefs_get_bool("/plugins/gtk/X11/gestures/visual")); |
4390 | 250 g_signal_connect(G_OBJECT(toggle), "toggled", |
251 G_CALLBACK(toggle_draw_cb), NULL); | |
252 | |
253 gtk_widget_show_all(ret); | |
254 | |
255 return ret; | |
256 } | |
257 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
258 static GaimGtkPluginUiInfo ui_info = |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
259 { |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
260 get_config_frame |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
261 }; |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
262 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
263 static GaimPluginInfo info = |
4390 | 264 { |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
265 2, /**< api_version */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
266 GAIM_PLUGIN_STANDARD, /**< type */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
267 GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
268 0, /**< flags */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
269 NULL, /**< dependencies */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
270 GAIM_PRIORITY_DEFAULT, /**< priority */ |
4390 | 271 |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
272 GESTURES_PLUGIN_ID, /**< id */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
273 N_("Mouse Gestures"), /**< name */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
274 VERSION, /**< version */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
275 /** summary */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
276 N_("Provides support for mouse gestures"), |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
277 /** description */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
278 N_("Allows support for mouse gestures in conversation windows.\n" |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
279 "Drag the middle mouse button to perform certain actions:\n\n" |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
280 "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
|
281 "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
|
282 "conversation.\n" |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
283 "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
|
284 "conversation."), |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
285 "Christian Hammond <chipx86@gnupdate.org>", /**< author */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
286 WEBSITE, /**< homepage */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
287 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
288 plugin_load, /**< load */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
289 plugin_unload, /**< unload */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
290 NULL, /**< destroy */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
291 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
292 &ui_info, /**< ui_info */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
293 NULL /**< extra_info */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
294 }; |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
295 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
296 static void |
5920
7d385de2f9cd
[gaim-migrate @ 6360]
Christian Hammond <chipx86@chipx86.com>
parents:
5873
diff
changeset
|
297 init_plugin(GaimPlugin *plugin) |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
298 { |
5767
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
299 gaim_prefs_add_none("/plugins/gtk"); |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
300 gaim_prefs_add_none("/plugins/gtk/X11"); |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
301 gaim_prefs_add_none("/plugins/gtk/X11/gestures"); |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
302 gaim_prefs_add_bool("/plugins/gtk/X11/gestures/visual", FALSE); |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
303 |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
304 gaim_prefs_connect_callback("/plugins/gtk/X11/gestures/visual", |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
305 visual_pref_cb, NULL); |
4390 | 306 } |
307 | |
6063 | 308 GAIM_INIT_PLUGIN(gestures, init_plugin, info) |