Mercurial > pidgin
annotate plugins/gestures/gestures.c @ 10420:854c972ea863
[gaim-migrate @ 11671]
The ability to add, modify and _save_ new statuses. This hopefully
brings our functionality slightly past where it is in oldstatus.
This could use a bit of testing, but I think it's pretty good.
We still can't edit substatuses.
Primitive types like "unset" should be hidden from the status selector
dropdown. "Online" and "offline" should maybe be hidden... but someone
in #gaim mentioned that it might be a good way to choose which accounts
are offline for a given status. Eh.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 26 Dec 2004 05:23:51 +0000 |
parents | 9fdbfe832fac |
children | 8d52201620d0 |
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; |
4390 | 60 unsigned int index; |
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 index = gaim_conversation_get_index(conv); | |
65 | |
66 if (index == 0) | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
67 index = gaim_conv_window_get_conversation_count(win) - 1; |
4390 | 68 else |
69 index--; | |
70 | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
71 gaim_conv_window_switch_conversation(win, index); |
4390 | 72 } |
73 | |
74 static void | |
75 stroke_next_tab(GtkWidget *widget, void *data) | |
76 { | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
77 GaimConversation *conv; |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
78 GaimConvWindow *win; |
4390 | 79 unsigned int index; |
80 | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
81 conv = (GaimConversation *)data; |
4390 | 82 win = gaim_conversation_get_window(conv); |
83 index = gaim_conversation_get_index(conv); | |
84 | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
85 if (index == gaim_conv_window_get_conversation_count(win) - 1) |
4390 | 86 index = 0; |
87 else | |
88 index++; | |
89 | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
90 gaim_conv_window_switch_conversation(win, index); |
4390 | 91 } |
92 | |
93 void | |
94 stroke_new_win(GtkWidget *widget, void *data) | |
95 { | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
96 GaimConvWindow *new_win, *old_win; |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
97 GaimConversation *conv; |
4390 | 98 |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
99 conv = (GaimConversation *)data; |
4390 | 100 old_win = gaim_conversation_get_window(conv); |
101 | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
102 if (gaim_conv_window_get_conversation_count(old_win) <= 1) |
4390 | 103 return; |
104 | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
105 new_win = gaim_conv_window_new(); |
4390 | 106 |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
107 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
|
108 gaim_conv_window_add_conversation(new_win, conv); |
4390 | 109 |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
110 gaim_conv_window_show(new_win); |
4390 | 111 } |
112 | |
113 static void | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
114 attach_signals(GaimConversation *conv) |
4390 | 115 { |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
116 GaimGtkConversation *gtkconv; |
4390 | 117 |
118 gtkconv = GAIM_GTK_CONVERSATION(conv); | |
119 | |
120 gstroke_enable(gtkconv->imhtml); | |
121 gstroke_signal_connect(gtkconv->imhtml, "14789", stroke_close, conv); | |
122 gstroke_signal_connect(gtkconv->imhtml, "1456", stroke_close, conv); | |
5016
ae7760945ef2
[gaim-migrate @ 5352]
Christian Hammond <chipx86@chipx86.com>
parents:
4843
diff
changeset
|
123 gstroke_signal_connect(gtkconv->imhtml, "1489", stroke_close, conv); |
4390 | 124 gstroke_signal_connect(gtkconv->imhtml, "74123", stroke_next_tab, conv); |
125 gstroke_signal_connect(gtkconv->imhtml, "7456", stroke_next_tab, conv); | |
126 gstroke_signal_connect(gtkconv->imhtml, "96321", stroke_prev_tab, conv); | |
127 gstroke_signal_connect(gtkconv->imhtml, "9654", stroke_prev_tab, conv); | |
128 gstroke_signal_connect(gtkconv->imhtml, "25852", stroke_new_win, conv); | |
129 } | |
130 | |
131 static void | |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
132 new_conv_cb(GaimConversation *conv) |
4390 | 133 { |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
134 if (GAIM_IS_GTK_CONVERSATION(conv)) |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
135 attach_signals(conv); |
4390 | 136 } |
137 | |
138 #if 0 | |
139 static void | |
140 mouse_button_menu_cb(GtkMenuItem *item, gpointer data) | |
141 { | |
142 int button = (int)data; | |
143 | |
144 gstroke_set_mouse_button(button + 2); | |
145 } | |
146 #endif | |
147 | |
148 static void | |
149 toggle_draw_cb(GtkToggleButton *toggle, gpointer data) | |
150 { | |
5767
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
151 gaim_prefs_set_bool("/plugins/gtk/X11/gestures/visual", |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
152 gtk_toggle_button_get_active(toggle)); |
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 |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
155 static void |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
156 visual_pref_cb(const char *name, GaimPrefType type, gpointer value, |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
157 gpointer data) |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
158 { |
7386 | 159 gstroke_set_draw_strokes((gboolean) GPOINTER_TO_INT(value) ); |
4390 | 160 } |
161 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
162 static gboolean |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
163 plugin_load(GaimPlugin *plugin) |
4390 | 164 { |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
165 GaimConversation *conv; |
4390 | 166 GList *l; |
167 | |
168 for (l = gaim_get_conversations(); l != NULL; l = l->next) { | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
169 conv = (GaimConversation *)l->data; |
4390 | 170 |
171 if (!GAIM_IS_GTK_CONVERSATION(conv)) | |
172 continue; | |
173 | |
174 attach_signals(conv); | |
175 } | |
176 | |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
177 gaim_signal_connect(gaim_conversations_get_handle(), |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
178 "conversation-created", |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
179 plugin, GAIM_CALLBACK(new_conv_cb), NULL); |
4390 | 180 |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
181 return TRUE; |
4390 | 182 } |
183 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
184 static gboolean |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
185 plugin_unload(GaimPlugin *plugin) |
4390 | 186 { |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
187 GaimConversation *conv; |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
188 GaimGtkConversation *gtkconv; |
4390 | 189 GList *l; |
190 | |
191 for (l = gaim_get_conversations(); l != NULL; l = l->next) { | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
192 conv = (GaimConversation *)l->data; |
4390 | 193 |
194 if (!GAIM_IS_GTK_CONVERSATION(conv)) | |
195 continue; | |
196 | |
197 gtkconv = GAIM_GTK_CONVERSATION(conv); | |
198 | |
199 gstroke_cleanup(gtkconv->imhtml); | |
200 } | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
201 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
202 return TRUE; |
4390 | 203 } |
204 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
205 static GtkWidget * |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
206 get_config_frame(GaimPlugin *plugin) |
4390 | 207 { |
208 GtkWidget *ret; | |
209 GtkWidget *vbox; | |
210 GtkWidget *toggle; | |
211 #if 0 | |
212 GtkWidget *opt; | |
213 GtkWidget *menu, *item; | |
214 #endif | |
215 | |
216 /* Outside container */ | |
217 ret = gtk_vbox_new(FALSE, 18); | |
218 gtk_container_set_border_width(GTK_CONTAINER(ret), 12); | |
219 | |
220 /* Configuration frame */ | |
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
221 vbox = gaim_gtk_make_frame(ret, _("Mouse Gestures Configuration")); |
4390 | 222 |
223 #if 0 | |
224 /* Mouse button drop-down menu */ | |
225 menu = gtk_menu_new(); | |
226 opt = gtk_option_menu_new(); | |
227 | |
228 item = gtk_menu_item_new_with_label(_("Middle mouse button")); | |
229 g_signal_connect(G_OBJECT(item), "activate", | |
230 G_CALLBACK(mouse_button_menu_cb), opt); | |
231 gtk_menu_append(menu, item); | |
232 | |
233 item = gtk_menu_item_new_with_label(_("Right mouse button")); | |
234 g_signal_connect(G_OBJECT(item), "activate", | |
235 G_CALLBACK(mouse_button_menu_cb), opt); | |
236 gtk_menu_append(menu, item); | |
237 | |
238 gtk_box_pack_start(GTK_BOX(vbox), opt, FALSE, FALSE, 0); | |
239 gtk_option_menu_set_menu(GTK_OPTION_MENU(opt), menu); | |
240 gtk_option_menu_set_history(GTK_OPTION_MENU(opt), | |
241 gstroke_get_mouse_button() - 2); | |
242 #endif | |
243 | |
244 /* "Visual gesture display" checkbox */ | |
245 toggle = gtk_check_button_new_with_mnemonic(_("_Visual gesture display")); | |
246 gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); | |
247 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), | |
5767
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
248 gaim_prefs_get_bool("/plugins/gtk/X11/gestures/visual")); |
4390 | 249 g_signal_connect(G_OBJECT(toggle), "toggled", |
250 G_CALLBACK(toggle_draw_cb), NULL); | |
251 | |
252 gtk_widget_show_all(ret); | |
253 | |
254 return ret; | |
255 } | |
256 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
257 static GaimGtkPluginUiInfo ui_info = |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
258 { |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
259 get_config_frame |
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 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
262 static GaimPluginInfo info = |
4390 | 263 { |
9943 | 264 GAIM_PLUGIN_MAGIC, |
265 GAIM_MAJOR_VERSION, | |
266 GAIM_MINOR_VERSION, | |
5205
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 */ |
8993 | 294 NULL, /**< extra_info */ |
295 NULL, | |
296 NULL | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
297 }; |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
298 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
299 static void |
5920
7d385de2f9cd
[gaim-migrate @ 6360]
Christian Hammond <chipx86@chipx86.com>
parents:
5873
diff
changeset
|
300 init_plugin(GaimPlugin *plugin) |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
301 { |
5767
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
302 gaim_prefs_add_none("/plugins/gtk"); |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
303 gaim_prefs_add_none("/plugins/gtk/X11"); |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
304 gaim_prefs_add_none("/plugins/gtk/X11/gestures"); |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
305 gaim_prefs_add_bool("/plugins/gtk/X11/gestures/visual", FALSE); |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
306 |
10087 | 307 gaim_prefs_connect_callback(plugin, "/plugins/gtk/X11/gestures/visual", |
5767
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
308 visual_pref_cb, NULL); |
4390 | 309 } |
310 | |
6063 | 311 GAIM_INIT_PLUGIN(gestures, init_plugin, info) |