Mercurial > pidgin
annotate plugins/gestures/gestures.c @ 6371:8f94cce8faa5
[gaim-migrate @ 6876]
I think I touched almost every file. Here's what happened.
I started off fixing up the Makefile.am and configure.ac files to help with
the core/UI split some. Then I got annoyed with the
build_{allow,deny}_list() functions that everything used, and decided to
core/UI split privacy. While doing that, I decided to redesign the dialog.
So now, a lot has changed, but not really so much. Just that most files
got affected.
Oh yeah, and the UI stuff was taken out of internal.h and moved to
gtkinternal.h. If you use this, please be aware of this change.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Tue, 05 Aug 2003 10:55:04 +0000 |
parents | d0d68bf39081 |
children | 70d5122bc3ff |
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" |
6371
8f94cce8faa5
[gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents:
6225
diff
changeset
|
22 #include "gtkinternal.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" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5767
diff
changeset
|
26 |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5767
diff
changeset
|
27 #include "gtkconv.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5767
diff
changeset
|
28 #include "gtkplugin.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5767
diff
changeset
|
29 #include "gtkutils.h" |
4390 | 30 |
31 #include "gstroke.h" | |
32 | |
6371
8f94cce8faa5
[gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents:
6225
diff
changeset
|
33 #define GESTURES_PLUGIN_ID "gtk-x11-gestures" |
4390 | 34 |
35 static void | |
36 stroke_close(GtkWidget *widget, void *data) | |
37 { | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
38 GaimConversation *conv; |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
39 GaimGtkConversation *gtkconv; |
4390 | 40 |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
41 conv = (GaimConversation *)data; |
4390 | 42 |
43 /* Double-check */ | |
44 if (!GAIM_IS_GTK_CONVERSATION(conv)) | |
45 return; | |
46 | |
47 gtkconv = GAIM_GTK_CONVERSATION(conv); | |
48 | |
49 gstroke_cleanup(gtkconv->imhtml); | |
50 gaim_conversation_destroy(conv); | |
51 } | |
52 | |
53 static void | |
54 stroke_prev_tab(GtkWidget *widget, void *data) | |
55 { | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
56 GaimConversation *conv; |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
57 GaimWindow *win; |
4390 | 58 unsigned int index; |
59 | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
60 conv = (GaimConversation *)data; |
4390 | 61 win = gaim_conversation_get_window(conv); |
62 index = gaim_conversation_get_index(conv); | |
63 | |
64 if (index == 0) | |
65 index = gaim_window_get_conversation_count(win) - 1; | |
66 else | |
67 index--; | |
68 | |
69 gaim_window_switch_conversation(win, index); | |
70 } | |
71 | |
72 static void | |
73 stroke_next_tab(GtkWidget *widget, void *data) | |
74 { | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
75 GaimConversation *conv; |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
76 GaimWindow *win; |
4390 | 77 unsigned int index; |
78 | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
79 conv = (GaimConversation *)data; |
4390 | 80 win = gaim_conversation_get_window(conv); |
81 index = gaim_conversation_get_index(conv); | |
82 | |
83 if (index == gaim_window_get_conversation_count(win) - 1) | |
84 index = 0; | |
85 else | |
86 index++; | |
87 | |
88 gaim_window_switch_conversation(win, index); | |
89 } | |
90 | |
91 void | |
92 stroke_new_win(GtkWidget *widget, void *data) | |
93 { | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
94 GaimWindow *new_win, *old_win; |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
95 GaimConversation *conv; |
4390 | 96 |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
97 conv = (GaimConversation *)data; |
4390 | 98 old_win = gaim_conversation_get_window(conv); |
99 | |
100 if (gaim_window_get_conversation_count(old_win) <= 1) | |
101 return; | |
102 | |
103 new_win = gaim_window_new(); | |
104 | |
105 gaim_window_remove_conversation(old_win, gaim_conversation_get_index(conv)); | |
106 gaim_window_add_conversation(new_win, conv); | |
107 | |
108 gaim_window_show(new_win); | |
109 } | |
110 | |
111 static void | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
112 attach_signals(GaimConversation *conv) |
4390 | 113 { |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
114 GaimGtkConversation *gtkconv; |
4390 | 115 |
116 gtkconv = GAIM_GTK_CONVERSATION(conv); | |
117 | |
118 gstroke_enable(gtkconv->imhtml); | |
119 gstroke_signal_connect(gtkconv->imhtml, "14789", stroke_close, conv); | |
120 gstroke_signal_connect(gtkconv->imhtml, "1456", stroke_close, conv); | |
5016
ae7760945ef2
[gaim-migrate @ 5352]
Christian Hammond <chipx86@chipx86.com>
parents:
4843
diff
changeset
|
121 gstroke_signal_connect(gtkconv->imhtml, "1489", stroke_close, conv); |
4390 | 122 gstroke_signal_connect(gtkconv->imhtml, "74123", stroke_next_tab, conv); |
123 gstroke_signal_connect(gtkconv->imhtml, "7456", stroke_next_tab, conv); | |
124 gstroke_signal_connect(gtkconv->imhtml, "96321", stroke_prev_tab, conv); | |
125 gstroke_signal_connect(gtkconv->imhtml, "9654", stroke_prev_tab, conv); | |
126 gstroke_signal_connect(gtkconv->imhtml, "25852", stroke_new_win, conv); | |
127 } | |
128 | |
129 static void | |
130 new_conv_cb(char *who) | |
131 { | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
132 GaimConversation *conv; |
4390 | 133 |
134 conv = gaim_find_conversation(who); | |
135 | |
136 if (conv == NULL || !GAIM_IS_GTK_CONVERSATION(conv)) | |
137 return; | |
138 | |
139 attach_signals(conv); | |
140 } | |
141 | |
142 #if 0 | |
143 static void | |
144 mouse_button_menu_cb(GtkMenuItem *item, gpointer data) | |
145 { | |
146 int button = (int)data; | |
147 | |
148 gstroke_set_mouse_button(button + 2); | |
149 } | |
150 #endif | |
151 | |
152 static void | |
153 toggle_draw_cb(GtkToggleButton *toggle, gpointer data) | |
154 { | |
5767
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
155 gaim_prefs_set_bool("/plugins/gtk/X11/gestures/visual", |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
156 gtk_toggle_button_get_active(toggle)); |
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 |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
159 static void |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
160 visual_pref_cb(const char *name, GaimPrefType type, gpointer value, |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
161 gpointer data) |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
162 { |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
163 gstroke_set_draw_strokes((gboolean)value); |
4390 | 164 } |
165 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
166 static gboolean |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
167 plugin_load(GaimPlugin *plugin) |
4390 | 168 { |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
169 GaimConversation *conv; |
4390 | 170 GList *l; |
171 | |
172 for (l = gaim_get_conversations(); l != NULL; l = l->next) { | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
173 conv = (GaimConversation *)l->data; |
4390 | 174 |
175 if (!GAIM_IS_GTK_CONVERSATION(conv)) | |
176 continue; | |
177 | |
178 attach_signals(conv); | |
179 } | |
180 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
181 gaim_signal_connect(plugin, event_new_conversation, new_conv_cb, NULL); |
4390 | 182 |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
183 return TRUE; |
4390 | 184 } |
185 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
186 static gboolean |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
187 plugin_unload(GaimPlugin *plugin) |
4390 | 188 { |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
189 GaimConversation *conv; |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
190 GaimGtkConversation *gtkconv; |
4390 | 191 GList *l; |
192 | |
193 for (l = gaim_get_conversations(); l != NULL; l = l->next) { | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
194 conv = (GaimConversation *)l->data; |
4390 | 195 |
196 if (!GAIM_IS_GTK_CONVERSATION(conv)) | |
197 continue; | |
198 | |
199 gtkconv = GAIM_GTK_CONVERSATION(conv); | |
200 | |
201 gstroke_cleanup(gtkconv->imhtml); | |
202 } | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
203 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
204 return TRUE; |
4390 | 205 } |
206 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
207 static GtkWidget * |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
208 get_config_frame(GaimPlugin *plugin) |
4390 | 209 { |
210 GtkWidget *ret; | |
211 GtkWidget *vbox; | |
212 GtkWidget *toggle; | |
213 #if 0 | |
214 GtkWidget *opt; | |
215 GtkWidget *menu, *item; | |
216 #endif | |
217 | |
218 /* Outside container */ | |
219 ret = gtk_vbox_new(FALSE, 18); | |
220 gtk_container_set_border_width(GTK_CONTAINER(ret), 12); | |
221 | |
222 /* Configuration frame */ | |
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
223 vbox = gaim_gtk_make_frame(ret, _("Mouse Gestures Configuration")); |
4390 | 224 |
225 #if 0 | |
226 /* Mouse button drop-down menu */ | |
227 menu = gtk_menu_new(); | |
228 opt = gtk_option_menu_new(); | |
229 | |
230 item = gtk_menu_item_new_with_label(_("Middle mouse button")); | |
231 g_signal_connect(G_OBJECT(item), "activate", | |
232 G_CALLBACK(mouse_button_menu_cb), opt); | |
233 gtk_menu_append(menu, item); | |
234 | |
235 item = gtk_menu_item_new_with_label(_("Right mouse button")); | |
236 g_signal_connect(G_OBJECT(item), "activate", | |
237 G_CALLBACK(mouse_button_menu_cb), opt); | |
238 gtk_menu_append(menu, item); | |
239 | |
240 gtk_box_pack_start(GTK_BOX(vbox), opt, FALSE, FALSE, 0); | |
241 gtk_option_menu_set_menu(GTK_OPTION_MENU(opt), menu); | |
242 gtk_option_menu_set_history(GTK_OPTION_MENU(opt), | |
243 gstroke_get_mouse_button() - 2); | |
244 #endif | |
245 | |
246 /* "Visual gesture display" checkbox */ | |
247 toggle = gtk_check_button_new_with_mnemonic(_("_Visual gesture display")); | |
248 gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); | |
249 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), | |
5767
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
250 gaim_prefs_get_bool("/plugins/gtk/X11/gestures/visual")); |
4390 | 251 g_signal_connect(G_OBJECT(toggle), "toggled", |
252 G_CALLBACK(toggle_draw_cb), NULL); | |
253 | |
254 gtk_widget_show_all(ret); | |
255 | |
256 return ret; | |
257 } | |
258 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
259 static GaimGtkPluginUiInfo ui_info = |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
260 { |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
261 get_config_frame |
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 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
264 static GaimPluginInfo info = |
4390 | 265 { |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
266 2, /**< api_version */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
267 GAIM_PLUGIN_STANDARD, /**< type */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
268 GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
269 0, /**< flags */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
270 NULL, /**< dependencies */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
271 GAIM_PRIORITY_DEFAULT, /**< priority */ |
4390 | 272 |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
273 GESTURES_PLUGIN_ID, /**< id */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
274 N_("Mouse Gestures"), /**< name */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
275 VERSION, /**< version */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
276 /** summary */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
277 N_("Provides support for mouse gestures"), |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
278 /** description */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
279 N_("Allows support for mouse gestures in conversation windows.\n" |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
280 "Drag the middle mouse button to perform certain actions:\n\n" |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
281 "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
|
282 "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
|
283 "conversation.\n" |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
284 "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
|
285 "conversation."), |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
286 "Christian Hammond <chipx86@gnupdate.org>", /**< author */ |
6371
8f94cce8faa5
[gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents:
6225
diff
changeset
|
287 GAIM_WEBSITE, /**< homepage */ |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
288 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
289 plugin_load, /**< load */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
290 plugin_unload, /**< unload */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
291 NULL, /**< destroy */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
292 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
293 &ui_info, /**< ui_info */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
294 NULL /**< extra_info */ |
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 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
297 static void |
5920
7d385de2f9cd
[gaim-migrate @ 6360]
Christian Hammond <chipx86@chipx86.com>
parents:
5873
diff
changeset
|
298 init_plugin(GaimPlugin *plugin) |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
299 { |
5767
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
300 gaim_prefs_add_none("/plugins/gtk"); |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
301 gaim_prefs_add_none("/plugins/gtk/X11"); |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
302 gaim_prefs_add_none("/plugins/gtk/X11/gestures"); |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
303 gaim_prefs_add_bool("/plugins/gtk/X11/gestures/visual", FALSE); |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
304 |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
305 gaim_prefs_connect_callback("/plugins/gtk/X11/gestures/visual", |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
306 visual_pref_cb, NULL); |
4390 | 307 } |
308 | |
6063 | 309 GAIM_INIT_PLUGIN(gestures, init_plugin, info) |