annotate plugins/gestures/gestures.c @ 12542:038ac22dd79b

[gaim-migrate @ 14855] If this is bad you better tell me really quickly committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 17 Dec 2005 21:28:54 +0000
parents fc464a0abccc
children e856f985a0b9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1 /*
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
2 * Mouse gestures plugin for Gaim
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
3 *
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
4 * Copyright (C) 2003 Christian Hammond.
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
5 *
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
6 * This program is free software; you can redistribute it and/or
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
7 * modify it under the terms of the GNU General Public License as
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
8 * published by the Free Software Foundation; either version 2 of the
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
9 * License, or (at your option) any later version.
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
10 *
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
11 * This program is distributed in the hope that it will be useful, but
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
14 * General Public License for more details.
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
15 *
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
16 * You should have received a copy of the GNU General Public License
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
17 * along with this program; if not, write to the Free Software
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
19 * 02111-1307, USA.
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
20 */
5872
059d95c67cda [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5767
diff changeset
21 #include "internal.h"
9791
4a15962c344a [gaim-migrate @ 10659]
Mark Doliner <mark@kingant.net>
parents: 8993
diff changeset
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
f8e395a054e2 [gaim-migrate @ 10835]
Nathan Walp <nwalp@pidgin.im>
parents: 9791
diff changeset
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
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
32
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
33 #include "gstroke.h"
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
34
6371
8f94cce8faa5 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 6225
diff changeset
35 #define GESTURES_PLUGIN_ID "gtk-x11-gestures"
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
36
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
37 static void
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
38 stroke_close(GtkWidget *widget, void *data)
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
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
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
42
5676
dae79aefac8d [gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents: 5530
diff changeset
43 conv = (GaimConversation *)data;
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
44
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
45 /* Double-check */
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
46 if (!GAIM_IS_GTK_CONVERSATION(conv))
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
47 return;
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
48
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
49 gtkconv = GAIM_GTK_CONVERSATION(conv);
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
50
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
51 gstroke_cleanup(gtkconv->imhtml);
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
52 gaim_conversation_destroy(conv);
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
53 }
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
54
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
55 static void
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
56 stroke_prev_tab(GtkWidget *widget, void *data)
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
57 {
5676
dae79aefac8d [gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents: 5530
diff changeset
58 GaimConversation *conv;
11592
f21d4310717e [gaim-migrate @ 13862]
Tim Ringenbach <marv@pidgin.im>
parents: 11581
diff changeset
59 GaimGtkConversation *gtkconv;
11581
9b3833da6840 [gaim-migrate @ 13851]
Tim Ringenbach <marv@pidgin.im>
parents: 11256
diff changeset
60 GaimGtkWindow *win;
10842
de9af04c50ff [gaim-migrate @ 12514]
Mark Doliner <mark@kingant.net>
parents: 10824
diff changeset
61 GList *conversations;
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
62
5676
dae79aefac8d [gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents: 5530
diff changeset
63 conv = (GaimConversation *)data;
11581
9b3833da6840 [gaim-migrate @ 13851]
Tim Ringenbach <marv@pidgin.im>
parents: 11256
diff changeset
64 gtkconv = GAIM_GTK_CONVERSATION(conv);
9b3833da6840 [gaim-migrate @ 13851]
Tim Ringenbach <marv@pidgin.im>
parents: 11256
diff changeset
65 win = gtkconv->win;
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
66
11581
9b3833da6840 [gaim-migrate @ 13851]
Tim Ringenbach <marv@pidgin.im>
parents: 11256
diff changeset
67 for (conversations = win->gtkconvs;
10842
de9af04c50ff [gaim-migrate @ 12514]
Mark Doliner <mark@kingant.net>
parents: 10824
diff changeset
68 conversations != NULL;
de9af04c50ff [gaim-migrate @ 12514]
Mark Doliner <mark@kingant.net>
parents: 10824
diff changeset
69 conversations = conversations->next)
de9af04c50ff [gaim-migrate @ 12514]
Mark Doliner <mark@kingant.net>
parents: 10824
diff changeset
70 {
11581
9b3833da6840 [gaim-migrate @ 13851]
Tim Ringenbach <marv@pidgin.im>
parents: 11256
diff changeset
71 if (conversations->data == gtkconv)
10842
de9af04c50ff [gaim-migrate @ 12514]
Mark Doliner <mark@kingant.net>
parents: 10824
diff changeset
72 {
de9af04c50ff [gaim-migrate @ 12514]
Mark Doliner <mark@kingant.net>
parents: 10824
diff changeset
73 if (conversations->prev != NULL) {
11581
9b3833da6840 [gaim-migrate @ 13851]
Tim Ringenbach <marv@pidgin.im>
parents: 11256
diff changeset
74 gaim_gtk_conv_window_switch_gtkconv(win,
10842
de9af04c50ff [gaim-migrate @ 12514]
Mark Doliner <mark@kingant.net>
parents: 10824
diff changeset
75 conversations->prev->data);
de9af04c50ff [gaim-migrate @ 12514]
Mark Doliner <mark@kingant.net>
parents: 10824
diff changeset
76 } else {
11581
9b3833da6840 [gaim-migrate @ 13851]
Tim Ringenbach <marv@pidgin.im>
parents: 11256
diff changeset
77 gaim_gtk_conv_window_switch_gtkconv(win,
10842
de9af04c50ff [gaim-migrate @ 12514]
Mark Doliner <mark@kingant.net>
parents: 10824
diff changeset
78 g_list_last(conversations)->data);
de9af04c50ff [gaim-migrate @ 12514]
Mark Doliner <mark@kingant.net>
parents: 10824
diff changeset
79 }
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
80
10842
de9af04c50ff [gaim-migrate @ 12514]
Mark Doliner <mark@kingant.net>
parents: 10824
diff changeset
81 return;
de9af04c50ff [gaim-migrate @ 12514]
Mark Doliner <mark@kingant.net>
parents: 10824
diff changeset
82 }
de9af04c50ff [gaim-migrate @ 12514]
Mark Doliner <mark@kingant.net>
parents: 10824
diff changeset
83 }
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
84 }
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
85
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
86 static void
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
87 stroke_next_tab(GtkWidget *widget, void *data)
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
88 {
5676
dae79aefac8d [gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents: 5530
diff changeset
89 GaimConversation *conv;
11592
f21d4310717e [gaim-migrate @ 13862]
Tim Ringenbach <marv@pidgin.im>
parents: 11581
diff changeset
90 GaimGtkWindow *win;
10842
de9af04c50ff [gaim-migrate @ 12514]
Mark Doliner <mark@kingant.net>
parents: 10824
diff changeset
91 GList *conversations;
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
92
5676
dae79aefac8d [gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents: 5530
diff changeset
93 conv = (GaimConversation *)data;
11592
f21d4310717e [gaim-migrate @ 13862]
Tim Ringenbach <marv@pidgin.im>
parents: 11581
diff changeset
94 win = GAIM_GTK_CONVERSATION(conv)->win;
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
95
11592
f21d4310717e [gaim-migrate @ 13862]
Tim Ringenbach <marv@pidgin.im>
parents: 11581
diff changeset
96 for (conversations = win->gtkconvs;
10842
de9af04c50ff [gaim-migrate @ 12514]
Mark Doliner <mark@kingant.net>
parents: 10824
diff changeset
97 conversations != NULL;
de9af04c50ff [gaim-migrate @ 12514]
Mark Doliner <mark@kingant.net>
parents: 10824
diff changeset
98 conversations = conversations->next)
de9af04c50ff [gaim-migrate @ 12514]
Mark Doliner <mark@kingant.net>
parents: 10824
diff changeset
99 {
11592
f21d4310717e [gaim-migrate @ 13862]
Tim Ringenbach <marv@pidgin.im>
parents: 11581
diff changeset
100 if (((GaimGtkConversation *)conversations->data)->active_conv == conv)
10842
de9af04c50ff [gaim-migrate @ 12514]
Mark Doliner <mark@kingant.net>
parents: 10824
diff changeset
101 {
de9af04c50ff [gaim-migrate @ 12514]
Mark Doliner <mark@kingant.net>
parents: 10824
diff changeset
102 if (conversations->next != NULL) {
11592
f21d4310717e [gaim-migrate @ 13862]
Tim Ringenbach <marv@pidgin.im>
parents: 11581
diff changeset
103 gaim_gtk_conv_window_switch_gtkconv(win,
10842
de9af04c50ff [gaim-migrate @ 12514]
Mark Doliner <mark@kingant.net>
parents: 10824
diff changeset
104 conversations->next->data);
de9af04c50ff [gaim-migrate @ 12514]
Mark Doliner <mark@kingant.net>
parents: 10824
diff changeset
105 } else {
11592
f21d4310717e [gaim-migrate @ 13862]
Tim Ringenbach <marv@pidgin.im>
parents: 11581
diff changeset
106 gaim_gtk_conv_window_switch_gtkconv(win,
10842
de9af04c50ff [gaim-migrate @ 12514]
Mark Doliner <mark@kingant.net>
parents: 10824
diff changeset
107 g_list_first(conversations)->data);
de9af04c50ff [gaim-migrate @ 12514]
Mark Doliner <mark@kingant.net>
parents: 10824
diff changeset
108 }
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
109
10842
de9af04c50ff [gaim-migrate @ 12514]
Mark Doliner <mark@kingant.net>
parents: 10824
diff changeset
110 return;
de9af04c50ff [gaim-migrate @ 12514]
Mark Doliner <mark@kingant.net>
parents: 10824
diff changeset
111 }
de9af04c50ff [gaim-migrate @ 12514]
Mark Doliner <mark@kingant.net>
parents: 10824
diff changeset
112 }
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
113 }
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
114
12323
fc464a0abccc [gaim-migrate @ 14627]
Richard Laager <rlaager@wiktel.com>
parents: 11592
diff changeset
115 static void
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
116 stroke_new_win(GtkWidget *widget, void *data)
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
117 {
11592
f21d4310717e [gaim-migrate @ 13862]
Tim Ringenbach <marv@pidgin.im>
parents: 11581
diff changeset
118 GaimGtkWindow *new_win, *old_win;
5676
dae79aefac8d [gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents: 5530
diff changeset
119 GaimConversation *conv;
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
120
5676
dae79aefac8d [gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents: 5530
diff changeset
121 conv = (GaimConversation *)data;
11592
f21d4310717e [gaim-migrate @ 13862]
Tim Ringenbach <marv@pidgin.im>
parents: 11581
diff changeset
122 old_win = GAIM_GTK_CONVERSATION(conv)->win;
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
123
11592
f21d4310717e [gaim-migrate @ 13862]
Tim Ringenbach <marv@pidgin.im>
parents: 11581
diff changeset
124 if (gaim_gtk_conv_window_get_gtkconv_count(old_win) <= 1)
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
125 return;
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
126
11592
f21d4310717e [gaim-migrate @ 13862]
Tim Ringenbach <marv@pidgin.im>
parents: 11581
diff changeset
127 new_win = gaim_gtk_conv_window_new();
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
128
11592
f21d4310717e [gaim-migrate @ 13862]
Tim Ringenbach <marv@pidgin.im>
parents: 11581
diff changeset
129 gaim_gtk_conv_window_remove_gtkconv(old_win, GAIM_GTK_CONVERSATION(conv));
f21d4310717e [gaim-migrate @ 13862]
Tim Ringenbach <marv@pidgin.im>
parents: 11581
diff changeset
130 gaim_gtk_conv_window_add_gtkconv(new_win, GAIM_GTK_CONVERSATION(conv));
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
131
11592
f21d4310717e [gaim-migrate @ 13862]
Tim Ringenbach <marv@pidgin.im>
parents: 11581
diff changeset
132 gaim_gtk_conv_window_show(new_win);
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
133 }
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
134
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
135 static void
5676
dae79aefac8d [gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents: 5530
diff changeset
136 attach_signals(GaimConversation *conv)
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
137 {
5676
dae79aefac8d [gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents: 5530
diff changeset
138 GaimGtkConversation *gtkconv;
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
139
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
140 gtkconv = GAIM_GTK_CONVERSATION(conv);
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
141
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
142 gstroke_enable(gtkconv->imhtml);
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
143 gstroke_signal_connect(gtkconv->imhtml, "14789", stroke_close, conv);
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
144 gstroke_signal_connect(gtkconv->imhtml, "1456", stroke_close, conv);
5016
ae7760945ef2 [gaim-migrate @ 5352]
Christian Hammond <chipx86@chipx86.com>
parents: 4843
diff changeset
145 gstroke_signal_connect(gtkconv->imhtml, "1489", stroke_close, conv);
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
146 gstroke_signal_connect(gtkconv->imhtml, "74123", stroke_next_tab, conv);
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
147 gstroke_signal_connect(gtkconv->imhtml, "7456", stroke_next_tab, conv);
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
148 gstroke_signal_connect(gtkconv->imhtml, "96321", stroke_prev_tab, conv);
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
149 gstroke_signal_connect(gtkconv->imhtml, "9654", stroke_prev_tab, conv);
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
150 gstroke_signal_connect(gtkconv->imhtml, "25852", stroke_new_win, conv);
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
151 }
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
152
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
153 static void
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
154 new_conv_cb(GaimConversation *conv)
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
155 {
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
156 if (GAIM_IS_GTK_CONVERSATION(conv))
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
157 attach_signals(conv);
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
158 }
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
159
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
160 #if 0
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
161 static void
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
162 mouse_button_menu_cb(GtkMenuItem *item, gpointer data)
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
163 {
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
164 int button = (int)data;
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
165
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
166 gstroke_set_mouse_button(button + 2);
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
167 }
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
168 #endif
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
169
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
170 static void
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
171 toggle_draw_cb(GtkToggleButton *toggle, gpointer data)
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
172 {
5767
c97d9ca044a7 [gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents: 5676
diff changeset
173 gaim_prefs_set_bool("/plugins/gtk/X11/gestures/visual",
c97d9ca044a7 [gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents: 5676
diff changeset
174 gtk_toggle_button_get_active(toggle));
c97d9ca044a7 [gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents: 5676
diff changeset
175 }
c97d9ca044a7 [gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents: 5676
diff changeset
176
c97d9ca044a7 [gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents: 5676
diff changeset
177 static void
c97d9ca044a7 [gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents: 5676
diff changeset
178 visual_pref_cb(const char *name, GaimPrefType type, gpointer value,
c97d9ca044a7 [gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents: 5676
diff changeset
179 gpointer data)
c97d9ca044a7 [gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents: 5676
diff changeset
180 {
7386
414c701ef1ff [gaim-migrate @ 7981]
Luke Schierer <lschiere@pidgin.im>
parents: 7118
diff changeset
181 gstroke_set_draw_strokes((gboolean) GPOINTER_TO_INT(value) );
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
182 }
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
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_load(GaimPlugin *plugin)
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
186 {
5676
dae79aefac8d [gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents: 5530
diff changeset
187 GaimConversation *conv;
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
188 GList *l;
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
189
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
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
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
192
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
193 if (!GAIM_IS_GTK_CONVERSATION(conv))
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
194 continue;
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
195
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
196 attach_signals(conv);
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
197 }
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
198
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
199 gaim_signal_connect(gaim_conversations_get_handle(),
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
200 "conversation-created",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
201 plugin, GAIM_CALLBACK(new_conv_cb), NULL);
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
202
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
203 return TRUE;
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
204 }
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
205
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
206 static gboolean
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
207 plugin_unload(GaimPlugin *plugin)
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
208 {
5676
dae79aefac8d [gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents: 5530
diff changeset
209 GaimConversation *conv;
dae79aefac8d [gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents: 5530
diff changeset
210 GaimGtkConversation *gtkconv;
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
211 GList *l;
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
212
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
213 for (l = gaim_get_conversations(); l != NULL; l = l->next) {
5676
dae79aefac8d [gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents: 5530
diff changeset
214 conv = (GaimConversation *)l->data;
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
215
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
216 if (!GAIM_IS_GTK_CONVERSATION(conv))
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
217 continue;
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
218
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
219 gtkconv = GAIM_GTK_CONVERSATION(conv);
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
220
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
221 gstroke_cleanup(gtkconv->imhtml);
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
222 }
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
223
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
224 return TRUE;
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
225 }
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
226
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
227 static GtkWidget *
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
228 get_config_frame(GaimPlugin *plugin)
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
229 {
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
230 GtkWidget *ret;
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
231 GtkWidget *vbox;
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
232 GtkWidget *toggle;
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
233 #if 0
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
234 GtkWidget *opt;
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
235 GtkWidget *menu, *item;
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
236 #endif
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
237
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
238 /* Outside container */
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
239 ret = gtk_vbox_new(FALSE, 18);
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
240 gtk_container_set_border_width(GTK_CONTAINER(ret), 12);
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
241
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
242 /* Configuration frame */
5530
2c4c975620f0 [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents: 5205
diff changeset
243 vbox = gaim_gtk_make_frame(ret, _("Mouse Gestures Configuration"));
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
244
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
245 #if 0
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
246 /* Mouse button drop-down menu */
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
247 menu = gtk_menu_new();
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
248 opt = gtk_option_menu_new();
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
249
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
250 item = gtk_menu_item_new_with_label(_("Middle mouse button"));
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
251 g_signal_connect(G_OBJECT(item), "activate",
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
252 G_CALLBACK(mouse_button_menu_cb), opt);
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
253 gtk_menu_append(menu, item);
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
254
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
255 item = gtk_menu_item_new_with_label(_("Right mouse button"));
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
256 g_signal_connect(G_OBJECT(item), "activate",
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
257 G_CALLBACK(mouse_button_menu_cb), opt);
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
258 gtk_menu_append(menu, item);
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
259
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
260 gtk_box_pack_start(GTK_BOX(vbox), opt, FALSE, FALSE, 0);
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
261 gtk_option_menu_set_menu(GTK_OPTION_MENU(opt), menu);
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
262 gtk_option_menu_set_history(GTK_OPTION_MENU(opt),
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
263 gstroke_get_mouse_button() - 2);
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
264 #endif
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
265
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
266 /* "Visual gesture display" checkbox */
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
267 toggle = gtk_check_button_new_with_mnemonic(_("_Visual gesture display"));
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
268 gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0);
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
269 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle),
5767
c97d9ca044a7 [gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents: 5676
diff changeset
270 gaim_prefs_get_bool("/plugins/gtk/X11/gestures/visual"));
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
271 g_signal_connect(G_OBJECT(toggle), "toggled",
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
272 G_CALLBACK(toggle_draw_cb), NULL);
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
273
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
274 gtk_widget_show_all(ret);
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
275
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
276 return ret;
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
277 }
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
278
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
279 static GaimGtkPluginUiInfo ui_info =
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
280 {
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
281 get_config_frame
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
282 };
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
283
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
284 static GaimPluginInfo info =
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
285 {
9943
f8e395a054e2 [gaim-migrate @ 10835]
Nathan Walp <nwalp@pidgin.im>
parents: 9791
diff changeset
286 GAIM_PLUGIN_MAGIC,
f8e395a054e2 [gaim-migrate @ 10835]
Nathan Walp <nwalp@pidgin.im>
parents: 9791
diff changeset
287 GAIM_MAJOR_VERSION,
f8e395a054e2 [gaim-migrate @ 10835]
Nathan Walp <nwalp@pidgin.im>
parents: 9791
diff changeset
288 GAIM_MINOR_VERSION,
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
289 GAIM_PLUGIN_STANDARD, /**< type */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
290 GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
291 0, /**< flags */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
292 NULL, /**< dependencies */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
293 GAIM_PRIORITY_DEFAULT, /**< priority */
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
294
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
295 GESTURES_PLUGIN_ID, /**< id */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
296 N_("Mouse Gestures"), /**< name */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
297 VERSION, /**< version */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
298 /** summary */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
299 N_("Provides support for mouse gestures"),
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
300 /** description */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
301 N_("Allows support for mouse gestures in conversation windows.\n"
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
302 "Drag the middle mouse button to perform certain actions:\n\n"
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
303 "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
304 "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
305 "conversation.\n"
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
306 "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
307 "conversation."),
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
308 "Christian Hammond <chipx86@gnupdate.org>", /**< author */
6371
8f94cce8faa5 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 6225
diff changeset
309 GAIM_WEBSITE, /**< homepage */
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
310
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
311 plugin_load, /**< load */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
312 plugin_unload, /**< unload */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
313 NULL, /**< destroy */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
314
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
315 &ui_info, /**< ui_info */
8993
294ae6548d4e [gaim-migrate @ 9768]
Luke Schierer <lschiere@pidgin.im>
parents: 8749
diff changeset
316 NULL, /**< extra_info */
294ae6548d4e [gaim-migrate @ 9768]
Luke Schierer <lschiere@pidgin.im>
parents: 8749
diff changeset
317 NULL,
294ae6548d4e [gaim-migrate @ 9768]
Luke Schierer <lschiere@pidgin.im>
parents: 8749
diff changeset
318 NULL
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
319 };
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
320
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
321 static void
5920
7d385de2f9cd [gaim-migrate @ 6360]
Christian Hammond <chipx86@chipx86.com>
parents: 5873
diff changeset
322 init_plugin(GaimPlugin *plugin)
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5016
diff changeset
323 {
5767
c97d9ca044a7 [gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents: 5676
diff changeset
324 gaim_prefs_add_none("/plugins/gtk");
c97d9ca044a7 [gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents: 5676
diff changeset
325 gaim_prefs_add_none("/plugins/gtk/X11");
c97d9ca044a7 [gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents: 5676
diff changeset
326 gaim_prefs_add_none("/plugins/gtk/X11/gestures");
c97d9ca044a7 [gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents: 5676
diff changeset
327 gaim_prefs_add_bool("/plugins/gtk/X11/gestures/visual", FALSE);
c97d9ca044a7 [gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents: 5676
diff changeset
328
10087
9fdbfe832fac [gaim-migrate @ 11098]
Stu Tomlinson <stu@nosnilmot.com>
parents: 9943
diff changeset
329 gaim_prefs_connect_callback(plugin, "/plugins/gtk/X11/gestures/visual",
5767
c97d9ca044a7 [gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents: 5676
diff changeset
330 visual_pref_cb, NULL);
4390
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
331 }
16540914c963 [gaim-migrate @ 4656]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
332
6063
5239a3b4ab33 [gaim-migrate @ 6513]
Nathan Walp <nwalp@pidgin.im>
parents: 5920
diff changeset
333 GAIM_INIT_PLUGIN(gestures, init_plugin, info)