Mercurial > pidgin
annotate plugins/gestures/gestures.c @ 7714:3d9d3d21e600
[gaim-migrate @ 8359]
I rock so hard! This is just too easy. WYSIWYG foreground and background
colors.
The observant commit watcher will note that I'm not really paying too close
attention to the toolbar UI yet. And as a result, it doesn't really work too
great. The plan is to make the toolbar its own GtkWidget, which will attach
to a GtkIMHtml. The GtkIMHtml will emit signals to it, telling it what state
it should be in, and the toolbar will manipulate the GtkIMHtml accordingly.
This way, anything that has text entry can have a toolbar with which to edit
it.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Wed, 03 Dec 2003 04:17:42 +0000 |
parents | 414c701ef1ff |
children | d7b8eb1f0a18 |
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" |
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" |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
26 #include "signals.h" |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5767
diff
changeset
|
27 |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5767
diff
changeset
|
28 #include "gtkconv.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5767
diff
changeset
|
29 #include "gtkplugin.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5767
diff
changeset
|
30 #include "gtkutils.h" |
4390 | 31 |
32 #include "gstroke.h" | |
33 | |
6371
8f94cce8faa5
[gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents:
6225
diff
changeset
|
34 #define GESTURES_PLUGIN_ID "gtk-x11-gestures" |
4390 | 35 |
36 static void | |
37 stroke_close(GtkWidget *widget, void *data) | |
38 { | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
39 GaimConversation *conv; |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
40 GaimGtkConversation *gtkconv; |
4390 | 41 |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
42 conv = (GaimConversation *)data; |
4390 | 43 |
44 /* Double-check */ | |
45 if (!GAIM_IS_GTK_CONVERSATION(conv)) | |
46 return; | |
47 | |
48 gtkconv = GAIM_GTK_CONVERSATION(conv); | |
49 | |
50 gstroke_cleanup(gtkconv->imhtml); | |
51 gaim_conversation_destroy(conv); | |
52 } | |
53 | |
54 static void | |
55 stroke_prev_tab(GtkWidget *widget, void *data) | |
56 { | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
57 GaimConversation *conv; |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
58 GaimConvWindow *win; |
4390 | 59 unsigned int index; |
60 | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
61 conv = (GaimConversation *)data; |
4390 | 62 win = gaim_conversation_get_window(conv); |
63 index = gaim_conversation_get_index(conv); | |
64 | |
65 if (index == 0) | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
66 index = gaim_conv_window_get_conversation_count(win) - 1; |
4390 | 67 else |
68 index--; | |
69 | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
70 gaim_conv_window_switch_conversation(win, index); |
4390 | 71 } |
72 | |
73 static void | |
74 stroke_next_tab(GtkWidget *widget, void *data) | |
75 { | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
76 GaimConversation *conv; |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
77 GaimConvWindow *win; |
4390 | 78 unsigned int index; |
79 | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
80 conv = (GaimConversation *)data; |
4390 | 81 win = gaim_conversation_get_window(conv); |
82 index = gaim_conversation_get_index(conv); | |
83 | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
84 if (index == gaim_conv_window_get_conversation_count(win) - 1) |
4390 | 85 index = 0; |
86 else | |
87 index++; | |
88 | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
89 gaim_conv_window_switch_conversation(win, index); |
4390 | 90 } |
91 | |
92 void | |
93 stroke_new_win(GtkWidget *widget, void *data) | |
94 { | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
95 GaimConvWindow *new_win, *old_win; |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
96 GaimConversation *conv; |
4390 | 97 |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
98 conv = (GaimConversation *)data; |
4390 | 99 old_win = gaim_conversation_get_window(conv); |
100 | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
101 if (gaim_conv_window_get_conversation_count(old_win) <= 1) |
4390 | 102 return; |
103 | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
104 new_win = gaim_conv_window_new(); |
4390 | 105 |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
106 gaim_conv_window_remove_conversation(old_win, gaim_conversation_get_index(conv)); |
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
107 gaim_conv_window_add_conversation(new_win, conv); |
4390 | 108 |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
109 gaim_conv_window_show(new_win); |
4390 | 110 } |
111 | |
112 static void | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
113 attach_signals(GaimConversation *conv) |
4390 | 114 { |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
115 GaimGtkConversation *gtkconv; |
4390 | 116 |
117 gtkconv = GAIM_GTK_CONVERSATION(conv); | |
118 | |
119 gstroke_enable(gtkconv->imhtml); | |
120 gstroke_signal_connect(gtkconv->imhtml, "14789", stroke_close, conv); | |
121 gstroke_signal_connect(gtkconv->imhtml, "1456", stroke_close, conv); | |
5016
ae7760945ef2
[gaim-migrate @ 5352]
Christian Hammond <chipx86@chipx86.com>
parents:
4843
diff
changeset
|
122 gstroke_signal_connect(gtkconv->imhtml, "1489", stroke_close, conv); |
4390 | 123 gstroke_signal_connect(gtkconv->imhtml, "74123", stroke_next_tab, conv); |
124 gstroke_signal_connect(gtkconv->imhtml, "7456", stroke_next_tab, conv); | |
125 gstroke_signal_connect(gtkconv->imhtml, "96321", stroke_prev_tab, conv); | |
126 gstroke_signal_connect(gtkconv->imhtml, "9654", stroke_prev_tab, conv); | |
127 gstroke_signal_connect(gtkconv->imhtml, "25852", stroke_new_win, conv); | |
128 } | |
129 | |
130 static void | |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
131 new_conv_cb(GaimConversation *conv) |
4390 | 132 { |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
133 if (GAIM_IS_GTK_CONVERSATION(conv)) |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
134 attach_signals(conv); |
4390 | 135 } |
136 | |
137 #if 0 | |
138 static void | |
139 mouse_button_menu_cb(GtkMenuItem *item, gpointer data) | |
140 { | |
141 int button = (int)data; | |
142 | |
143 gstroke_set_mouse_button(button + 2); | |
144 } | |
145 #endif | |
146 | |
147 static void | |
148 toggle_draw_cb(GtkToggleButton *toggle, gpointer data) | |
149 { | |
5767
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
150 gaim_prefs_set_bool("/plugins/gtk/X11/gestures/visual", |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
151 gtk_toggle_button_get_active(toggle)); |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
152 } |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
153 |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
154 static void |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
155 visual_pref_cb(const char *name, GaimPrefType type, gpointer value, |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
156 gpointer data) |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
157 { |
7386 | 158 gstroke_set_draw_strokes((gboolean) GPOINTER_TO_INT(value) ); |
4390 | 159 } |
160 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
161 static gboolean |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
162 plugin_load(GaimPlugin *plugin) |
4390 | 163 { |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
164 GaimConversation *conv; |
4390 | 165 GList *l; |
166 | |
167 for (l = gaim_get_conversations(); l != NULL; l = l->next) { | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
168 conv = (GaimConversation *)l->data; |
4390 | 169 |
170 if (!GAIM_IS_GTK_CONVERSATION(conv)) | |
171 continue; | |
172 | |
173 attach_signals(conv); | |
174 } | |
175 | |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
176 gaim_signal_connect(gaim_conversations_get_handle(), |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
177 "conversation-created", |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
178 plugin, GAIM_CALLBACK(new_conv_cb), NULL); |
4390 | 179 |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
180 return TRUE; |
4390 | 181 } |
182 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
183 static gboolean |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
184 plugin_unload(GaimPlugin *plugin) |
4390 | 185 { |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
186 GaimConversation *conv; |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
187 GaimGtkConversation *gtkconv; |
4390 | 188 GList *l; |
189 | |
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 gtkconv = GAIM_GTK_CONVERSATION(conv); | |
197 | |
198 gstroke_cleanup(gtkconv->imhtml); | |
199 } | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
200 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
201 return TRUE; |
4390 | 202 } |
203 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
204 static GtkWidget * |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
205 get_config_frame(GaimPlugin *plugin) |
4390 | 206 { |
207 GtkWidget *ret; | |
208 GtkWidget *vbox; | |
209 GtkWidget *toggle; | |
210 #if 0 | |
211 GtkWidget *opt; | |
212 GtkWidget *menu, *item; | |
213 #endif | |
214 | |
215 /* Outside container */ | |
216 ret = gtk_vbox_new(FALSE, 18); | |
217 gtk_container_set_border_width(GTK_CONTAINER(ret), 12); | |
218 | |
219 /* Configuration frame */ | |
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
220 vbox = gaim_gtk_make_frame(ret, _("Mouse Gestures Configuration")); |
4390 | 221 |
222 #if 0 | |
223 /* Mouse button drop-down menu */ | |
224 menu = gtk_menu_new(); | |
225 opt = gtk_option_menu_new(); | |
226 | |
227 item = gtk_menu_item_new_with_label(_("Middle mouse button")); | |
228 g_signal_connect(G_OBJECT(item), "activate", | |
229 G_CALLBACK(mouse_button_menu_cb), opt); | |
230 gtk_menu_append(menu, item); | |
231 | |
232 item = gtk_menu_item_new_with_label(_("Right mouse button")); | |
233 g_signal_connect(G_OBJECT(item), "activate", | |
234 G_CALLBACK(mouse_button_menu_cb), opt); | |
235 gtk_menu_append(menu, item); | |
236 | |
237 gtk_box_pack_start(GTK_BOX(vbox), opt, FALSE, FALSE, 0); | |
238 gtk_option_menu_set_menu(GTK_OPTION_MENU(opt), menu); | |
239 gtk_option_menu_set_history(GTK_OPTION_MENU(opt), | |
240 gstroke_get_mouse_button() - 2); | |
241 #endif | |
242 | |
243 /* "Visual gesture display" checkbox */ | |
244 toggle = gtk_check_button_new_with_mnemonic(_("_Visual gesture display")); | |
245 gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); | |
246 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), | |
5767
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
247 gaim_prefs_get_bool("/plugins/gtk/X11/gestures/visual")); |
4390 | 248 g_signal_connect(G_OBJECT(toggle), "toggled", |
249 G_CALLBACK(toggle_draw_cb), NULL); | |
250 | |
251 gtk_widget_show_all(ret); | |
252 | |
253 return ret; | |
254 } | |
255 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
256 static GaimGtkPluginUiInfo ui_info = |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
257 { |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
258 get_config_frame |
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 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
261 static GaimPluginInfo info = |
4390 | 262 { |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
263 2, /**< api_version */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
264 GAIM_PLUGIN_STANDARD, /**< type */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
265 GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
266 0, /**< flags */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
267 NULL, /**< dependencies */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
268 GAIM_PRIORITY_DEFAULT, /**< priority */ |
4390 | 269 |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
270 GESTURES_PLUGIN_ID, /**< id */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
271 N_("Mouse Gestures"), /**< name */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
272 VERSION, /**< version */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
273 /** summary */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
274 N_("Provides support for mouse gestures"), |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
275 /** description */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
276 N_("Allows support for mouse gestures in conversation windows.\n" |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
277 "Drag the middle mouse button to perform certain actions:\n\n" |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
278 "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
|
279 "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
|
280 "conversation.\n" |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
281 "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
|
282 "conversation."), |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
283 "Christian Hammond <chipx86@gnupdate.org>", /**< author */ |
6371
8f94cce8faa5
[gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents:
6225
diff
changeset
|
284 GAIM_WEBSITE, /**< homepage */ |
5205
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 plugin_load, /**< load */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
287 plugin_unload, /**< unload */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
288 NULL, /**< destroy */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
289 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
290 &ui_info, /**< ui_info */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
291 NULL /**< extra_info */ |
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 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
294 static void |
5920
7d385de2f9cd
[gaim-migrate @ 6360]
Christian Hammond <chipx86@chipx86.com>
parents:
5873
diff
changeset
|
295 init_plugin(GaimPlugin *plugin) |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
296 { |
5767
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
297 gaim_prefs_add_none("/plugins/gtk"); |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
298 gaim_prefs_add_none("/plugins/gtk/X11"); |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
299 gaim_prefs_add_none("/plugins/gtk/X11/gestures"); |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
300 gaim_prefs_add_bool("/plugins/gtk/X11/gestures/visual", FALSE); |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
301 |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
302 gaim_prefs_connect_callback("/plugins/gtk/X11/gestures/visual", |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
303 visual_pref_cb, NULL); |
4390 | 304 } |
305 | |
6063 | 306 GAIM_INIT_PLUGIN(gestures, init_plugin, info) |