Mon, 30 Jun 2025 23:04:59 -0500
Update metainfo.xml for the release
And prepare for the next release right away.
Testing Done:
Ran `meson dist`
Reviewed at https://reviews.imfreedom.org/r/4041/
| 4390 | 1 | /* |
| 15884 | 2 | * Mouse gestures plugin for Purple |
| 4390 | 3 | * |
| 4 | * Copyright (C) 2003 Christian Hammond. | |
|
6485
3c7ba18e32f1
[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
3c7ba18e32f1
[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 | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
16749
diff
changeset
|
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
|
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
16749
diff
changeset
|
19 | * 02111-1301, USA. |
| 4390 | 20 | */ |
|
40497
2f45a03838e9
Fix gestures plugin
Elliott S <quantum.analyst@gmail.com>
parents:
40360
diff
changeset
|
21 | |
|
2f45a03838e9
Fix gestures plugin
Elliott S <quantum.analyst@gmail.com>
parents:
40360
diff
changeset
|
22 | #include <glib/gi18n-lib.h> |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5767
diff
changeset
|
23 | |
|
40360
e21f3bbcc2a5
Update all of the pidgin code to include purple.h
Gary Kramlich <grim@reaperworld.com>
parents:
40197
diff
changeset
|
24 | #include <purple.h> |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5767
diff
changeset
|
25 | |
|
40502
875489636847
pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents:
40497
diff
changeset
|
26 | #include <pidgin.h> |
| 4390 | 27 | |
| 28 | #include "gstroke.h" | |
| 29 | ||
|
6371
e92b66ee5518
[gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents:
6225
diff
changeset
|
30 | #define GESTURES_PLUGIN_ID "gtk-x11-gestures" |
|
42451
b706b229d5f4
Convert Gestures plugin prefs to GSettings
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42202
diff
changeset
|
31 | #define SETTINGS_SCHEMA_ID "im.pidgin.Pidgin.plugin.Gestures" |
| 4390 | 32 | |
| 33 | static void | |
| 34 | stroke_close(GtkWidget *widget, void *data) | |
| 35 | { | |
| 15884 | 36 | PurpleConversation *conv; |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
37 | PidginConversation *gtkconv; |
| 4390 | 38 | |
| 15884 | 39 | conv = (PurpleConversation *)data; |
| 4390 | 40 | |
| 41 | /* Double-check */ | |
|
15705
6ea0a722c797
Looks like someone had a sed accident
Sean Egan <seanegan@pidgin.im>
parents:
15692
diff
changeset
|
42 | if (!PIDGIN_IS_PIDGIN_CONVERSATION(conv)) |
| 4390 | 43 | return; |
| 44 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
45 | gtkconv = PIDGIN_CONVERSATION(conv); |
| 4390 | 46 | |
|
40497
2f45a03838e9
Fix gestures plugin
Elliott S <quantum.analyst@gmail.com>
parents:
40360
diff
changeset
|
47 | gstroke_cleanup(gtkconv->history); |
|
34660
68c776e3436e
Refactored pidgin plugins to use the GObject conversation API
Ankit Vani <a@nevitus.org>
parents:
34655
diff
changeset
|
48 | g_object_unref(conv); |
| 4390 | 49 | } |
| 50 | ||
| 51 | static void | |
| 52 | stroke_prev_tab(GtkWidget *widget, void *data) | |
| 53 | { | |
| 15884 | 54 | PurpleConversation *conv; |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
55 | PidginConversation *gtkconv; |
|
41184
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41078
diff
changeset
|
56 | GtkWidget *win; |
| 4390 | 57 | |
|
41184
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41078
diff
changeset
|
58 | conv = (PurpleConversation *)data; |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
59 | gtkconv = PIDGIN_CONVERSATION(conv); |
|
41184
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41078
diff
changeset
|
60 | win = gtk_widget_get_toplevel(gtkconv->tab_cont); |
| 4390 | 61 | |
|
41696
35f8ce475b21
Rename PidginConversationWindow to PidginDisplayWindow as it holds more than conversations now
Gary Kramlich <grim@reaperworld.com>
parents:
41314
diff
changeset
|
62 | pidgin_display_window_select_previous(PIDGIN_DISPLAY_WINDOW(win)); |
| 4390 | 63 | } |
| 64 | ||
| 65 | static void | |
| 66 | stroke_next_tab(GtkWidget *widget, void *data) | |
| 67 | { | |
| 15884 | 68 | PurpleConversation *conv; |
|
41184
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41078
diff
changeset
|
69 | PidginConversation *gtkconv; |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41078
diff
changeset
|
70 | GtkWidget *win; |
| 4390 | 71 | |
|
41184
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41078
diff
changeset
|
72 | conv = (PurpleConversation *)data; |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41078
diff
changeset
|
73 | gtkconv = PIDGIN_CONVERSATION(conv); |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41078
diff
changeset
|
74 | win = gtk_widget_get_toplevel(gtkconv->tab_cont); |
| 4390 | 75 | |
|
41696
35f8ce475b21
Rename PidginConversationWindow to PidginDisplayWindow as it holds more than conversations now
Gary Kramlich <grim@reaperworld.com>
parents:
41314
diff
changeset
|
76 | pidgin_display_window_select_next(PIDGIN_DISPLAY_WINDOW(win)); |
| 4390 | 77 | } |
| 78 | ||
|
12323
f52908fb23b0
[gaim-migrate @ 14627]
Richard Laager <rlaager@pidgin.im>
parents:
11592
diff
changeset
|
79 | static void |
| 4390 | 80 | stroke_new_win(GtkWidget *widget, void *data) |
| 81 | { | |
|
41184
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41078
diff
changeset
|
82 | GtkWidget *new_win, *old_win; |
| 15884 | 83 | PurpleConversation *conv; |
| 4390 | 84 | |
| 15884 | 85 | conv = (PurpleConversation *)data; |
|
41184
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41078
diff
changeset
|
86 | old_win = gtk_widget_get_parent(PIDGIN_CONVERSATION(conv)->tab_cont); |
| 4390 | 87 | |
|
41696
35f8ce475b21
Rename PidginConversationWindow to PidginDisplayWindow as it holds more than conversations now
Gary Kramlich <grim@reaperworld.com>
parents:
41314
diff
changeset
|
88 | if(pidgin_display_window_get_count(PIDGIN_DISPLAY_WINDOW(old_win)) <= 1) { |
| 4390 | 89 | return; |
|
41184
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41078
diff
changeset
|
90 | } |
| 4390 | 91 | |
|
41696
35f8ce475b21
Rename PidginConversationWindow to PidginDisplayWindow as it holds more than conversations now
Gary Kramlich <grim@reaperworld.com>
parents:
41314
diff
changeset
|
92 | new_win = pidgin_display_window_new(); |
| 4390 | 93 | |
|
41696
35f8ce475b21
Rename PidginConversationWindow to PidginDisplayWindow as it holds more than conversations now
Gary Kramlich <grim@reaperworld.com>
parents:
41314
diff
changeset
|
94 | pidgin_display_window_remove(PIDGIN_DISPLAY_WINDOW(old_win), |
|
41184
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41078
diff
changeset
|
95 | conv); |
|
41696
35f8ce475b21
Rename PidginConversationWindow to PidginDisplayWindow as it holds more than conversations now
Gary Kramlich <grim@reaperworld.com>
parents:
41314
diff
changeset
|
96 | pidgin_display_window_add(PIDGIN_DISPLAY_WINDOW(new_win), conv); |
| 4390 | 97 | |
|
42202
2273647d24b0
Use gtk_widget_set_visible for everything
Gary Kramlich <grim@reaperworld.com>
parents:
41696
diff
changeset
|
98 | gtk_widget_set_visible(new_win, TRUE); |
| 4390 | 99 | } |
| 100 | ||
| 101 | static void | |
| 15884 | 102 | attach_signals(PurpleConversation *conv) |
| 4390 | 103 | { |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
104 | PidginConversation *gtkconv; |
| 4390 | 105 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
106 | gtkconv = PIDGIN_CONVERSATION(conv); |
| 4390 | 107 | |
|
40497
2f45a03838e9
Fix gestures plugin
Elliott S <quantum.analyst@gmail.com>
parents:
40360
diff
changeset
|
108 | gstroke_enable(gtkconv->history); |
|
2f45a03838e9
Fix gestures plugin
Elliott S <quantum.analyst@gmail.com>
parents:
40360
diff
changeset
|
109 | gstroke_signal_connect(gtkconv->history, "14789", stroke_close, conv); |
|
2f45a03838e9
Fix gestures plugin
Elliott S <quantum.analyst@gmail.com>
parents:
40360
diff
changeset
|
110 | gstroke_signal_connect(gtkconv->history, "1456", stroke_close, conv); |
|
2f45a03838e9
Fix gestures plugin
Elliott S <quantum.analyst@gmail.com>
parents:
40360
diff
changeset
|
111 | gstroke_signal_connect(gtkconv->history, "1489", stroke_close, conv); |
|
2f45a03838e9
Fix gestures plugin
Elliott S <quantum.analyst@gmail.com>
parents:
40360
diff
changeset
|
112 | gstroke_signal_connect(gtkconv->history, "74123", stroke_next_tab, conv); |
|
2f45a03838e9
Fix gestures plugin
Elliott S <quantum.analyst@gmail.com>
parents:
40360
diff
changeset
|
113 | gstroke_signal_connect(gtkconv->history, "7456", stroke_next_tab, conv); |
|
2f45a03838e9
Fix gestures plugin
Elliott S <quantum.analyst@gmail.com>
parents:
40360
diff
changeset
|
114 | gstroke_signal_connect(gtkconv->history, "96321", stroke_prev_tab, conv); |
|
2f45a03838e9
Fix gestures plugin
Elliott S <quantum.analyst@gmail.com>
parents:
40360
diff
changeset
|
115 | gstroke_signal_connect(gtkconv->history, "9654", stroke_prev_tab, conv); |
|
2f45a03838e9
Fix gestures plugin
Elliott S <quantum.analyst@gmail.com>
parents:
40360
diff
changeset
|
116 | gstroke_signal_connect(gtkconv->history, "25852", stroke_new_win, conv); |
| 4390 | 117 | } |
| 118 | ||
| 119 | static void | |
| 15884 | 120 | new_conv_cb(PurpleConversation *conv) |
| 4390 | 121 | { |
|
15705
6ea0a722c797
Looks like someone had a sed accident
Sean Egan <seanegan@pidgin.im>
parents:
15692
diff
changeset
|
122 | if (PIDGIN_IS_PIDGIN_CONVERSATION(conv)) |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
123 | attach_signals(conv); |
| 4390 | 124 | } |
| 125 | ||
|
29741
3fbd100877f9
Pull in GtkComboBox changes from GTK+3 branch.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29499
diff
changeset
|
126 | static void |
|
42451
b706b229d5f4
Convert Gestures plugin prefs to GSettings
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42202
diff
changeset
|
127 | settings_change_cb(GSettings *settings, char *key, G_GNUC_UNUSED gpointer data) |
| 4390 | 128 | { |
|
42451
b706b229d5f4
Convert Gestures plugin prefs to GSettings
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42202
diff
changeset
|
129 | if(purple_strequal(key, "button")) { |
|
b706b229d5f4
Convert Gestures plugin prefs to GSettings
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42202
diff
changeset
|
130 | gstroke_set_mouse_button(g_settings_get_enum(settings, key)); |
|
b706b229d5f4
Convert Gestures plugin prefs to GSettings
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42202
diff
changeset
|
131 | } else if(purple_strequal(key, "visual")) { |
|
b706b229d5f4
Convert Gestures plugin prefs to GSettings
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42202
diff
changeset
|
132 | gstroke_set_draw_strokes(g_settings_get_boolean(settings, key)); |
|
b706b229d5f4
Convert Gestures plugin prefs to GSettings
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42202
diff
changeset
|
133 | } else { |
|
b706b229d5f4
Convert Gestures plugin prefs to GSettings
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42202
diff
changeset
|
134 | g_warning("Got gestures settings change for unknown key: %s", key); |
|
b706b229d5f4
Convert Gestures plugin prefs to GSettings
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42202
diff
changeset
|
135 | } |
| 4390 | 136 | } |
| 137 | ||
|
40894
80d9d7a73a60
Convert the Pidgin plugins to use GPLUGIN_NATIVE_PLUGIN_DECLARE
Gary Kramlich <grim@reaperworld.com>
parents:
40688
diff
changeset
|
138 | static GPluginPluginInfo * |
|
80d9d7a73a60
Convert the Pidgin plugins to use GPLUGIN_NATIVE_PLUGIN_DECLARE
Gary Kramlich <grim@reaperworld.com>
parents:
40688
diff
changeset
|
139 | gestures_query(GError **error) |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
140 | { |
|
36754
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
141 | const gchar * const authors[] = { |
|
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
142 | "Christian Hammond <chipx86@gnupdate.org>", |
|
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
143 | NULL |
|
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
144 | }; |
| 4390 | 145 | |
|
42453
1c13bc243b7d
Remove PidginPluginInfo
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42451
diff
changeset
|
146 | return purple_plugin_info_new( |
|
36935
5384600e613c
Made finch and pidgin pref property names shorter: "gnt-pref-frame-cb" and "gtk-config-frame-cb"
Ankit Vani <a@nevitus.org>
parents:
36934
diff
changeset
|
147 | "id", GESTURES_PLUGIN_ID, |
|
5384600e613c
Made finch and pidgin pref property names shorter: "gnt-pref-frame-cb" and "gtk-config-frame-cb"
Ankit Vani <a@nevitus.org>
parents:
36934
diff
changeset
|
148 | "name", N_("Mouse Gestures"), |
|
5384600e613c
Made finch and pidgin pref property names shorter: "gnt-pref-frame-cb" and "gtk-config-frame-cb"
Ankit Vani <a@nevitus.org>
parents:
36934
diff
changeset
|
149 | "version", DISPLAY_VERSION, |
|
5384600e613c
Made finch and pidgin pref property names shorter: "gnt-pref-frame-cb" and "gtk-config-frame-cb"
Ankit Vani <a@nevitus.org>
parents:
36934
diff
changeset
|
150 | "category", N_("User interface"), |
|
5384600e613c
Made finch and pidgin pref property names shorter: "gnt-pref-frame-cb" and "gtk-config-frame-cb"
Ankit Vani <a@nevitus.org>
parents:
36934
diff
changeset
|
151 | "summary", N_("Provides support for mouse gestures"), |
|
5384600e613c
Made finch and pidgin pref property names shorter: "gnt-pref-frame-cb" and "gtk-config-frame-cb"
Ankit Vani <a@nevitus.org>
parents:
36934
diff
changeset
|
152 | "description", N_("Allows support for mouse gestures in " |
|
5384600e613c
Made finch and pidgin pref property names shorter: "gnt-pref-frame-cb" and "gtk-config-frame-cb"
Ankit Vani <a@nevitus.org>
parents:
36934
diff
changeset
|
153 | "conversation windows. Drag the middle " |
|
5384600e613c
Made finch and pidgin pref property names shorter: "gnt-pref-frame-cb" and "gtk-config-frame-cb"
Ankit Vani <a@nevitus.org>
parents:
36934
diff
changeset
|
154 | "mouse button to perform certain " |
|
5384600e613c
Made finch and pidgin pref property names shorter: "gnt-pref-frame-cb" and "gtk-config-frame-cb"
Ankit Vani <a@nevitus.org>
parents:
36934
diff
changeset
|
155 | "actions:\n" |
|
5384600e613c
Made finch and pidgin pref property names shorter: "gnt-pref-frame-cb" and "gtk-config-frame-cb"
Ankit Vani <a@nevitus.org>
parents:
36934
diff
changeset
|
156 | " • Drag down and then to the right to " |
|
5384600e613c
Made finch and pidgin pref property names shorter: "gnt-pref-frame-cb" and "gtk-config-frame-cb"
Ankit Vani <a@nevitus.org>
parents:
36934
diff
changeset
|
157 | "close a conversation.\n" |
|
5384600e613c
Made finch and pidgin pref property names shorter: "gnt-pref-frame-cb" and "gtk-config-frame-cb"
Ankit Vani <a@nevitus.org>
parents:
36934
diff
changeset
|
158 | " • Drag up and then to the left to " |
|
5384600e613c
Made finch and pidgin pref property names shorter: "gnt-pref-frame-cb" and "gtk-config-frame-cb"
Ankit Vani <a@nevitus.org>
parents:
36934
diff
changeset
|
159 | "switch to the previous conversation.\n" |
|
5384600e613c
Made finch and pidgin pref property names shorter: "gnt-pref-frame-cb" and "gtk-config-frame-cb"
Ankit Vani <a@nevitus.org>
parents:
36934
diff
changeset
|
160 | " • Drag up and then to the right to " |
|
5384600e613c
Made finch and pidgin pref property names shorter: "gnt-pref-frame-cb" and "gtk-config-frame-cb"
Ankit Vani <a@nevitus.org>
parents:
36934
diff
changeset
|
161 | "switch to the next conversation."), |
|
5384600e613c
Made finch and pidgin pref property names shorter: "gnt-pref-frame-cb" and "gtk-config-frame-cb"
Ankit Vani <a@nevitus.org>
parents:
36934
diff
changeset
|
162 | "authors", authors, |
|
5384600e613c
Made finch and pidgin pref property names shorter: "gnt-pref-frame-cb" and "gtk-config-frame-cb"
Ankit Vani <a@nevitus.org>
parents:
36934
diff
changeset
|
163 | "website", PURPLE_WEBSITE, |
|
5384600e613c
Made finch and pidgin pref property names shorter: "gnt-pref-frame-cb" and "gtk-config-frame-cb"
Ankit Vani <a@nevitus.org>
parents:
36934
diff
changeset
|
164 | "abi-version", PURPLE_ABI_VERSION, |
|
42451
b706b229d5f4
Convert Gestures plugin prefs to GSettings
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42202
diff
changeset
|
165 | "settings-schema", SETTINGS_SCHEMA_ID, |
|
36754
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
166 | NULL |
|
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
167 | ); |
|
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
168 | } |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5016
diff
changeset
|
169 | |
|
36754
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
170 | static gboolean |
|
40894
80d9d7a73a60
Convert the Pidgin plugins to use GPLUGIN_NATIVE_PLUGIN_DECLARE
Gary Kramlich <grim@reaperworld.com>
parents:
40688
diff
changeset
|
171 | gestures_load(GPluginPlugin *plugin, GError **error) |
|
36754
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
172 | { |
|
42451
b706b229d5f4
Convert Gestures plugin prefs to GSettings
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42202
diff
changeset
|
173 | GSettings *settings = NULL; |
|
36754
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
174 | PurpleConversation *conv; |
|
40952
53fa03701534
Port Pidgin to the new PurpleConversationManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40894
diff
changeset
|
175 | PurpleConversationManager *manager; |
|
53fa03701534
Port Pidgin to the new PurpleConversationManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40894
diff
changeset
|
176 | GList *list; |
|
16749
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
177 | |
|
42451
b706b229d5f4
Convert Gestures plugin prefs to GSettings
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42202
diff
changeset
|
178 | settings = g_settings_new_with_backend(SETTINGS_SCHEMA_ID, |
|
b706b229d5f4
Convert Gestures plugin prefs to GSettings
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42202
diff
changeset
|
179 | purple_core_get_settings_backend()); |
|
5767
8ae2df3826e8
[gaim-migrate @ 6192]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
180 | |
|
42451
b706b229d5f4
Convert Gestures plugin prefs to GSettings
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42202
diff
changeset
|
181 | g_signal_connect(settings, "changed", |
|
b706b229d5f4
Convert Gestures plugin prefs to GSettings
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42202
diff
changeset
|
182 | G_CALLBACK(settings_change_cb), NULL); |
|
b706b229d5f4
Convert Gestures plugin prefs to GSettings
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42202
diff
changeset
|
183 | gstroke_set_mouse_button(g_settings_get_enum(settings, "button")); |
|
b706b229d5f4
Convert Gestures plugin prefs to GSettings
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42202
diff
changeset
|
184 | gstroke_set_draw_strokes(g_settings_get_boolean(settings, "visual")); |
|
b706b229d5f4
Convert Gestures plugin prefs to GSettings
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42202
diff
changeset
|
185 | g_object_unref(settings); |
|
36754
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
186 | |
|
40952
53fa03701534
Port Pidgin to the new PurpleConversationManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40894
diff
changeset
|
187 | manager = purple_conversation_manager_get_default(); |
|
53fa03701534
Port Pidgin to the new PurpleConversationManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40894
diff
changeset
|
188 | list = purple_conversation_manager_get_all(manager); |
|
53fa03701534
Port Pidgin to the new PurpleConversationManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40894
diff
changeset
|
189 | while(list != NULL) { |
|
53fa03701534
Port Pidgin to the new PurpleConversationManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40894
diff
changeset
|
190 | conv = PURPLE_CONVERSATION(list->data); |
|
36754
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
191 | |
|
40952
53fa03701534
Port Pidgin to the new PurpleConversationManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40894
diff
changeset
|
192 | if(!PIDGIN_IS_PIDGIN_CONVERSATION(conv)) { |
|
53fa03701534
Port Pidgin to the new PurpleConversationManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40894
diff
changeset
|
193 | list = g_list_delete_link(list, list); |
|
53fa03701534
Port Pidgin to the new PurpleConversationManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40894
diff
changeset
|
194 | |
|
36754
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
195 | continue; |
|
40952
53fa03701534
Port Pidgin to the new PurpleConversationManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40894
diff
changeset
|
196 | } |
|
36754
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
197 | |
|
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
198 | attach_signals(conv); |
|
40952
53fa03701534
Port Pidgin to the new PurpleConversationManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40894
diff
changeset
|
199 | |
|
53fa03701534
Port Pidgin to the new PurpleConversationManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40894
diff
changeset
|
200 | list = g_list_delete_link(list, list); |
|
36754
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
201 | } |
|
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
202 | |
|
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
203 | purple_signal_connect(purple_conversations_get_handle(), |
|
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
204 | "conversation-created", |
|
41314
0dc72eacd8bf
Replace PURPLE_CALLBACK by G_CALLBACK
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41184
diff
changeset
|
205 | plugin, G_CALLBACK(new_conv_cb), NULL); |
|
36754
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
206 | |
|
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
207 | return TRUE; |
| 4390 | 208 | } |
| 209 | ||
|
36754
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
210 | static gboolean |
|
42451
b706b229d5f4
Convert Gestures plugin prefs to GSettings
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42202
diff
changeset
|
211 | gestures_unload(G_GNUC_UNUSED GPluginPlugin *plugin, |
|
b706b229d5f4
Convert Gestures plugin prefs to GSettings
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42202
diff
changeset
|
212 | G_GNUC_UNUSED gboolean shutdown, G_GNUC_UNUSED GError **error) |
|
36754
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
213 | { |
|
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
214 | PurpleConversation *conv; |
|
40952
53fa03701534
Port Pidgin to the new PurpleConversationManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40894
diff
changeset
|
215 | PurpleConversationManager *manager; |
|
36754
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
216 | PidginConversation *gtkconv; |
|
40952
53fa03701534
Port Pidgin to the new PurpleConversationManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40894
diff
changeset
|
217 | GList *list; |
|
53fa03701534
Port Pidgin to the new PurpleConversationManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40894
diff
changeset
|
218 | |
|
53fa03701534
Port Pidgin to the new PurpleConversationManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40894
diff
changeset
|
219 | manager = purple_conversation_manager_get_default(); |
|
53fa03701534
Port Pidgin to the new PurpleConversationManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40894
diff
changeset
|
220 | list = purple_conversation_manager_get_all(manager); |
|
36754
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
221 | |
|
40952
53fa03701534
Port Pidgin to the new PurpleConversationManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40894
diff
changeset
|
222 | while(list != NULL) { |
|
53fa03701534
Port Pidgin to the new PurpleConversationManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40894
diff
changeset
|
223 | conv = PURPLE_CONVERSATION(list->data); |
|
36754
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
224 | |
|
40952
53fa03701534
Port Pidgin to the new PurpleConversationManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40894
diff
changeset
|
225 | if (!PIDGIN_IS_PIDGIN_CONVERSATION(conv)) { |
|
53fa03701534
Port Pidgin to the new PurpleConversationManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40894
diff
changeset
|
226 | list = g_list_delete_link(list, list); |
|
53fa03701534
Port Pidgin to the new PurpleConversationManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40894
diff
changeset
|
227 | |
|
36754
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
228 | continue; |
|
40952
53fa03701534
Port Pidgin to the new PurpleConversationManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40894
diff
changeset
|
229 | } |
|
36754
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
230 | |
|
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
231 | gtkconv = PIDGIN_CONVERSATION(conv); |
|
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
232 | |
|
40497
2f45a03838e9
Fix gestures plugin
Elliott S <quantum.analyst@gmail.com>
parents:
40360
diff
changeset
|
233 | gstroke_cleanup(gtkconv->history); |
|
2f45a03838e9
Fix gestures plugin
Elliott S <quantum.analyst@gmail.com>
parents:
40360
diff
changeset
|
234 | gstroke_disable(gtkconv->history); |
|
40952
53fa03701534
Port Pidgin to the new PurpleConversationManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40894
diff
changeset
|
235 | |
|
53fa03701534
Port Pidgin to the new PurpleConversationManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40894
diff
changeset
|
236 | list = g_list_delete_link(list, list); |
|
36754
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
237 | } |
|
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
238 | |
|
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
239 | return TRUE; |
|
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
240 | } |
|
8250d6be8c02
Started refactoring pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34660
diff
changeset
|
241 | |
|
40894
80d9d7a73a60
Convert the Pidgin plugins to use GPLUGIN_NATIVE_PLUGIN_DECLARE
Gary Kramlich <grim@reaperworld.com>
parents:
40688
diff
changeset
|
242 | GPLUGIN_NATIVE_PLUGIN_DECLARE(gestures) |