Mercurial > pidgin.yaz
annotate plugins/gestures/gestures.c @ 14025:e1fd2a8bd40b
[gaim-migrate @ 16624]
Change "Alias:" to "Local alias:" in the account editor to hopefully
avoid minor confusion
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 03 Aug 2006 07:57:52 +0000 |
parents | 5f3d5f30590a |
children |
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 | |
12912
5f3d5f30590a
[gaim-migrate @ 15265]
Richard Laager <rlaager@wiktel.com>
parents:
12816
diff
changeset
|
56 switch_page(GaimGtkWindow *win, GtkDirectionType dir) |
5f3d5f30590a
[gaim-migrate @ 15265]
Richard Laager <rlaager@wiktel.com>
parents:
12816
diff
changeset
|
57 { |
5f3d5f30590a
[gaim-migrate @ 15265]
Richard Laager <rlaager@wiktel.com>
parents:
12816
diff
changeset
|
58 int count, current; |
5f3d5f30590a
[gaim-migrate @ 15265]
Richard Laager <rlaager@wiktel.com>
parents:
12816
diff
changeset
|
59 |
5f3d5f30590a
[gaim-migrate @ 15265]
Richard Laager <rlaager@wiktel.com>
parents:
12816
diff
changeset
|
60 #if GTK_CHECK_VERSION(2,2,0) |
5f3d5f30590a
[gaim-migrate @ 15265]
Richard Laager <rlaager@wiktel.com>
parents:
12816
diff
changeset
|
61 count = gtk_notebook_get_n_pages(GTK_NOTEBOOK(win->notebook)); |
5f3d5f30590a
[gaim-migrate @ 15265]
Richard Laager <rlaager@wiktel.com>
parents:
12816
diff
changeset
|
62 #else |
5f3d5f30590a
[gaim-migrate @ 15265]
Richard Laager <rlaager@wiktel.com>
parents:
12816
diff
changeset
|
63 count = g_list_length(GTK_NOTEBOOK(win->notebook)->children); |
5f3d5f30590a
[gaim-migrate @ 15265]
Richard Laager <rlaager@wiktel.com>
parents:
12816
diff
changeset
|
64 #endif |
5f3d5f30590a
[gaim-migrate @ 15265]
Richard Laager <rlaager@wiktel.com>
parents:
12816
diff
changeset
|
65 current = gtk_notebook_get_current_page(GTK_NOTEBOOK(win->notebook)); |
5f3d5f30590a
[gaim-migrate @ 15265]
Richard Laager <rlaager@wiktel.com>
parents:
12816
diff
changeset
|
66 |
5f3d5f30590a
[gaim-migrate @ 15265]
Richard Laager <rlaager@wiktel.com>
parents:
12816
diff
changeset
|
67 if (dir == GTK_DIR_LEFT) |
5f3d5f30590a
[gaim-migrate @ 15265]
Richard Laager <rlaager@wiktel.com>
parents:
12816
diff
changeset
|
68 { |
5f3d5f30590a
[gaim-migrate @ 15265]
Richard Laager <rlaager@wiktel.com>
parents:
12816
diff
changeset
|
69 gtk_notebook_set_current_page(GTK_NOTEBOOK(win->notebook), current - 1); |
5f3d5f30590a
[gaim-migrate @ 15265]
Richard Laager <rlaager@wiktel.com>
parents:
12816
diff
changeset
|
70 } |
5f3d5f30590a
[gaim-migrate @ 15265]
Richard Laager <rlaager@wiktel.com>
parents:
12816
diff
changeset
|
71 else if (dir == GTK_DIR_RIGHT) |
5f3d5f30590a
[gaim-migrate @ 15265]
Richard Laager <rlaager@wiktel.com>
parents:
12816
diff
changeset
|
72 { |
5f3d5f30590a
[gaim-migrate @ 15265]
Richard Laager <rlaager@wiktel.com>
parents:
12816
diff
changeset
|
73 if (current == count - 1) |
5f3d5f30590a
[gaim-migrate @ 15265]
Richard Laager <rlaager@wiktel.com>
parents:
12816
diff
changeset
|
74 gtk_notebook_set_current_page(GTK_NOTEBOOK(win->notebook), 0); |
5f3d5f30590a
[gaim-migrate @ 15265]
Richard Laager <rlaager@wiktel.com>
parents:
12816
diff
changeset
|
75 else |
5f3d5f30590a
[gaim-migrate @ 15265]
Richard Laager <rlaager@wiktel.com>
parents:
12816
diff
changeset
|
76 gtk_notebook_set_current_page(GTK_NOTEBOOK(win->notebook), current + 1); |
5f3d5f30590a
[gaim-migrate @ 15265]
Richard Laager <rlaager@wiktel.com>
parents:
12816
diff
changeset
|
77 } |
5f3d5f30590a
[gaim-migrate @ 15265]
Richard Laager <rlaager@wiktel.com>
parents:
12816
diff
changeset
|
78 } |
5f3d5f30590a
[gaim-migrate @ 15265]
Richard Laager <rlaager@wiktel.com>
parents:
12816
diff
changeset
|
79 |
5f3d5f30590a
[gaim-migrate @ 15265]
Richard Laager <rlaager@wiktel.com>
parents:
12816
diff
changeset
|
80 static void |
4390 | 81 stroke_prev_tab(GtkWidget *widget, void *data) |
82 { | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
83 GaimConversation *conv; |
11592 | 84 GaimGtkConversation *gtkconv; |
11581 | 85 GaimGtkWindow *win; |
4390 | 86 |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
87 conv = (GaimConversation *)data; |
11581 | 88 gtkconv = GAIM_GTK_CONVERSATION(conv); |
89 win = gtkconv->win; | |
4390 | 90 |
12912
5f3d5f30590a
[gaim-migrate @ 15265]
Richard Laager <rlaager@wiktel.com>
parents:
12816
diff
changeset
|
91 switch_page(win, GTK_DIR_LEFT); |
4390 | 92 } |
93 | |
94 static void | |
95 stroke_next_tab(GtkWidget *widget, void *data) | |
96 { | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
97 GaimConversation *conv; |
11592 | 98 GaimGtkWindow *win; |
4390 | 99 |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
100 conv = (GaimConversation *)data; |
11592 | 101 win = GAIM_GTK_CONVERSATION(conv)->win; |
4390 | 102 |
12912
5f3d5f30590a
[gaim-migrate @ 15265]
Richard Laager <rlaager@wiktel.com>
parents:
12816
diff
changeset
|
103 switch_page(win, GTK_DIR_RIGHT); |
4390 | 104 } |
105 | |
12323
fc464a0abccc
[gaim-migrate @ 14627]
Richard Laager <rlaager@wiktel.com>
parents:
11592
diff
changeset
|
106 static void |
4390 | 107 stroke_new_win(GtkWidget *widget, void *data) |
108 { | |
11592 | 109 GaimGtkWindow *new_win, *old_win; |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
110 GaimConversation *conv; |
4390 | 111 |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
112 conv = (GaimConversation *)data; |
11592 | 113 old_win = GAIM_GTK_CONVERSATION(conv)->win; |
4390 | 114 |
11592 | 115 if (gaim_gtk_conv_window_get_gtkconv_count(old_win) <= 1) |
4390 | 116 return; |
117 | |
11592 | 118 new_win = gaim_gtk_conv_window_new(); |
4390 | 119 |
11592 | 120 gaim_gtk_conv_window_remove_gtkconv(old_win, GAIM_GTK_CONVERSATION(conv)); |
121 gaim_gtk_conv_window_add_gtkconv(new_win, GAIM_GTK_CONVERSATION(conv)); | |
4390 | 122 |
11592 | 123 gaim_gtk_conv_window_show(new_win); |
4390 | 124 } |
125 | |
126 static void | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
127 attach_signals(GaimConversation *conv) |
4390 | 128 { |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
129 GaimGtkConversation *gtkconv; |
4390 | 130 |
131 gtkconv = GAIM_GTK_CONVERSATION(conv); | |
132 | |
133 gstroke_enable(gtkconv->imhtml); | |
134 gstroke_signal_connect(gtkconv->imhtml, "14789", stroke_close, conv); | |
135 gstroke_signal_connect(gtkconv->imhtml, "1456", stroke_close, conv); | |
5016
ae7760945ef2
[gaim-migrate @ 5352]
Christian Hammond <chipx86@chipx86.com>
parents:
4843
diff
changeset
|
136 gstroke_signal_connect(gtkconv->imhtml, "1489", stroke_close, conv); |
4390 | 137 gstroke_signal_connect(gtkconv->imhtml, "74123", stroke_next_tab, conv); |
138 gstroke_signal_connect(gtkconv->imhtml, "7456", stroke_next_tab, conv); | |
139 gstroke_signal_connect(gtkconv->imhtml, "96321", stroke_prev_tab, conv); | |
140 gstroke_signal_connect(gtkconv->imhtml, "9654", stroke_prev_tab, conv); | |
141 gstroke_signal_connect(gtkconv->imhtml, "25852", stroke_new_win, conv); | |
142 } | |
143 | |
144 static void | |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
145 new_conv_cb(GaimConversation *conv) |
4390 | 146 { |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
147 if (GAIM_IS_GTK_CONVERSATION(conv)) |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
148 attach_signals(conv); |
4390 | 149 } |
150 | |
151 #if 0 | |
152 static void | |
153 mouse_button_menu_cb(GtkMenuItem *item, gpointer data) | |
154 { | |
155 int button = (int)data; | |
156 | |
157 gstroke_set_mouse_button(button + 2); | |
158 } | |
159 #endif | |
160 | |
161 static void | |
162 toggle_draw_cb(GtkToggleButton *toggle, gpointer data) | |
163 { | |
5767
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
164 gaim_prefs_set_bool("/plugins/gtk/X11/gestures/visual", |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
165 gtk_toggle_button_get_active(toggle)); |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
166 } |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
167 |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
168 static void |
12816 | 169 visual_pref_cb(const char *name, GaimPrefType type, gconstpointer value, |
5767
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
170 gpointer data) |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
171 { |
7386 | 172 gstroke_set_draw_strokes((gboolean) GPOINTER_TO_INT(value) ); |
4390 | 173 } |
174 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
175 static gboolean |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
176 plugin_load(GaimPlugin *plugin) |
4390 | 177 { |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
178 GaimConversation *conv; |
4390 | 179 GList *l; |
180 | |
181 for (l = gaim_get_conversations(); l != NULL; l = l->next) { | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
182 conv = (GaimConversation *)l->data; |
4390 | 183 |
184 if (!GAIM_IS_GTK_CONVERSATION(conv)) | |
185 continue; | |
186 | |
187 attach_signals(conv); | |
188 } | |
189 | |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
190 gaim_signal_connect(gaim_conversations_get_handle(), |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
191 "conversation-created", |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
192 plugin, GAIM_CALLBACK(new_conv_cb), NULL); |
4390 | 193 |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
194 return TRUE; |
4390 | 195 } |
196 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
197 static gboolean |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
198 plugin_unload(GaimPlugin *plugin) |
4390 | 199 { |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
200 GaimConversation *conv; |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
201 GaimGtkConversation *gtkconv; |
4390 | 202 GList *l; |
203 | |
204 for (l = gaim_get_conversations(); l != NULL; l = l->next) { | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
205 conv = (GaimConversation *)l->data; |
4390 | 206 |
207 if (!GAIM_IS_GTK_CONVERSATION(conv)) | |
208 continue; | |
209 | |
210 gtkconv = GAIM_GTK_CONVERSATION(conv); | |
211 | |
212 gstroke_cleanup(gtkconv->imhtml); | |
12667
a99a0cc67713
[gaim-migrate @ 15010]
Richard Laager <rlaager@wiktel.com>
parents:
12600
diff
changeset
|
213 gstroke_disable(gtkconv->imhtml); |
4390 | 214 } |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
215 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
216 return TRUE; |
4390 | 217 } |
218 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
219 static GtkWidget * |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
220 get_config_frame(GaimPlugin *plugin) |
4390 | 221 { |
222 GtkWidget *ret; | |
223 GtkWidget *vbox; | |
224 GtkWidget *toggle; | |
225 #if 0 | |
226 GtkWidget *opt; | |
227 GtkWidget *menu, *item; | |
228 #endif | |
229 | |
230 /* Outside container */ | |
231 ret = gtk_vbox_new(FALSE, 18); | |
232 gtk_container_set_border_width(GTK_CONTAINER(ret), 12); | |
233 | |
234 /* Configuration frame */ | |
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
235 vbox = gaim_gtk_make_frame(ret, _("Mouse Gestures Configuration")); |
4390 | 236 |
237 #if 0 | |
238 /* Mouse button drop-down menu */ | |
239 menu = gtk_menu_new(); | |
240 opt = gtk_option_menu_new(); | |
241 | |
242 item = gtk_menu_item_new_with_label(_("Middle mouse button")); | |
243 g_signal_connect(G_OBJECT(item), "activate", | |
244 G_CALLBACK(mouse_button_menu_cb), opt); | |
245 gtk_menu_append(menu, item); | |
246 | |
247 item = gtk_menu_item_new_with_label(_("Right mouse button")); | |
248 g_signal_connect(G_OBJECT(item), "activate", | |
249 G_CALLBACK(mouse_button_menu_cb), opt); | |
250 gtk_menu_append(menu, item); | |
251 | |
252 gtk_box_pack_start(GTK_BOX(vbox), opt, FALSE, FALSE, 0); | |
253 gtk_option_menu_set_menu(GTK_OPTION_MENU(opt), menu); | |
254 gtk_option_menu_set_history(GTK_OPTION_MENU(opt), | |
255 gstroke_get_mouse_button() - 2); | |
256 #endif | |
257 | |
258 /* "Visual gesture display" checkbox */ | |
259 toggle = gtk_check_button_new_with_mnemonic(_("_Visual gesture display")); | |
260 gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); | |
261 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), | |
5767
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
262 gaim_prefs_get_bool("/plugins/gtk/X11/gestures/visual")); |
4390 | 263 g_signal_connect(G_OBJECT(toggle), "toggled", |
264 G_CALLBACK(toggle_draw_cb), NULL); | |
265 | |
266 gtk_widget_show_all(ret); | |
267 | |
268 return ret; | |
269 } | |
270 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
271 static GaimGtkPluginUiInfo ui_info = |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
272 { |
12600
e856f985a0b9
[gaim-migrate @ 14934]
Richard Laager <rlaager@wiktel.com>
parents:
12323
diff
changeset
|
273 get_config_frame, |
e856f985a0b9
[gaim-migrate @ 14934]
Richard Laager <rlaager@wiktel.com>
parents:
12323
diff
changeset
|
274 0 /* page_num (Reserved) */ |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
275 }; |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
276 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
277 static GaimPluginInfo info = |
4390 | 278 { |
9943 | 279 GAIM_PLUGIN_MAGIC, |
280 GAIM_MAJOR_VERSION, | |
281 GAIM_MINOR_VERSION, | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
282 GAIM_PLUGIN_STANDARD, /**< type */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
283 GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
284 0, /**< flags */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
285 NULL, /**< dependencies */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
286 GAIM_PRIORITY_DEFAULT, /**< priority */ |
4390 | 287 |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
288 GESTURES_PLUGIN_ID, /**< id */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
289 N_("Mouse Gestures"), /**< name */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
290 VERSION, /**< version */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
291 /** summary */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
292 N_("Provides support for mouse gestures"), |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
293 /** description */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
294 N_("Allows support for mouse gestures in conversation windows.\n" |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
295 "Drag the middle mouse button to perform certain actions:\n\n" |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
296 "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
|
297 "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
|
298 "conversation.\n" |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
299 "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
|
300 "conversation."), |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
301 "Christian Hammond <chipx86@gnupdate.org>", /**< author */ |
6371
8f94cce8faa5
[gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents:
6225
diff
changeset
|
302 GAIM_WEBSITE, /**< homepage */ |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
303 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
304 plugin_load, /**< load */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
305 plugin_unload, /**< unload */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
306 NULL, /**< destroy */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
307 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
308 &ui_info, /**< ui_info */ |
8993 | 309 NULL, /**< extra_info */ |
310 NULL, | |
311 NULL | |
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 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
314 static void |
5920
7d385de2f9cd
[gaim-migrate @ 6360]
Christian Hammond <chipx86@chipx86.com>
parents:
5873
diff
changeset
|
315 init_plugin(GaimPlugin *plugin) |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
316 { |
5767
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
317 gaim_prefs_add_none("/plugins/gtk"); |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
318 gaim_prefs_add_none("/plugins/gtk/X11"); |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
319 gaim_prefs_add_none("/plugins/gtk/X11/gestures"); |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
320 gaim_prefs_add_bool("/plugins/gtk/X11/gestures/visual", FALSE); |
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
321 |
10087 | 322 gaim_prefs_connect_callback(plugin, "/plugins/gtk/X11/gestures/visual", |
5767
c97d9ca044a7
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
323 visual_pref_cb, NULL); |
4390 | 324 } |
325 | |
6063 | 326 GAIM_INIT_PLUGIN(gestures, init_plugin, info) |