Wed, 25 May 2022 23:52:45 -0500
Remove prpl-gtalk from XMPP console
It no longer exists, and complicates the code a bit.
|
39959
e47fcffd061b
migrate the libpurple plugins to using purple.h only
Gary Kramlich <grim@reaperworld.com>
parents:
37148
diff
changeset
|
1 | /* |
|
e47fcffd061b
migrate the libpurple plugins to using purple.h only
Gary Kramlich <grim@reaperworld.com>
parents:
37148
diff
changeset
|
2 | * This program is free software; you can redistribute it and/or |
|
e47fcffd061b
migrate the libpurple plugins to using purple.h only
Gary Kramlich <grim@reaperworld.com>
parents:
37148
diff
changeset
|
3 | * modify it under the terms of the GNU General Public License as |
|
e47fcffd061b
migrate the libpurple plugins to using purple.h only
Gary Kramlich <grim@reaperworld.com>
parents:
37148
diff
changeset
|
4 | * published by the Free Software Foundation; either version 2 of the |
|
e47fcffd061b
migrate the libpurple plugins to using purple.h only
Gary Kramlich <grim@reaperworld.com>
parents:
37148
diff
changeset
|
5 | * License, or (at your option) any later version. |
|
e47fcffd061b
migrate the libpurple plugins to using purple.h only
Gary Kramlich <grim@reaperworld.com>
parents:
37148
diff
changeset
|
6 | * |
|
e47fcffd061b
migrate the libpurple plugins to using purple.h only
Gary Kramlich <grim@reaperworld.com>
parents:
37148
diff
changeset
|
7 | * This program is distributed in the hope that it will be useful, but |
|
e47fcffd061b
migrate the libpurple plugins to using purple.h only
Gary Kramlich <grim@reaperworld.com>
parents:
37148
diff
changeset
|
8 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
|
e47fcffd061b
migrate the libpurple plugins to using purple.h only
Gary Kramlich <grim@reaperworld.com>
parents:
37148
diff
changeset
|
9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
e47fcffd061b
migrate the libpurple plugins to using purple.h only
Gary Kramlich <grim@reaperworld.com>
parents:
37148
diff
changeset
|
10 | * General Public License for more details. |
|
e47fcffd061b
migrate the libpurple plugins to using purple.h only
Gary Kramlich <grim@reaperworld.com>
parents:
37148
diff
changeset
|
11 | * |
|
e47fcffd061b
migrate the libpurple plugins to using purple.h only
Gary Kramlich <grim@reaperworld.com>
parents:
37148
diff
changeset
|
12 | * You should have received a copy of the GNU General Public License |
|
e47fcffd061b
migrate the libpurple plugins to using purple.h only
Gary Kramlich <grim@reaperworld.com>
parents:
37148
diff
changeset
|
13 | * along with this program; if not, write to the Free Software |
|
e47fcffd061b
migrate the libpurple plugins to using purple.h only
Gary Kramlich <grim@reaperworld.com>
parents:
37148
diff
changeset
|
14 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
|
e47fcffd061b
migrate the libpurple plugins to using purple.h only
Gary Kramlich <grim@reaperworld.com>
parents:
37148
diff
changeset
|
15 | * 02111-1301, USA. |
|
e47fcffd061b
migrate the libpurple plugins to using purple.h only
Gary Kramlich <grim@reaperworld.com>
parents:
37148
diff
changeset
|
16 | */ |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
17 | |
|
40439
e9838d634d5e
Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents:
39959
diff
changeset
|
18 | #include <glib/gi18n-lib.h> |
|
e9838d634d5e
Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents:
39959
diff
changeset
|
19 | |
|
40945
bbeb2e98ea5b
Use GPLUGIN_NATIVE_PLUGIN_DECLARE for all libpurple plugins and remove PURPLE_PLUGIN_INIT
Gary Kramlich <grim@reaperworld.com>
parents:
40885
diff
changeset
|
20 | #include <gplugin.h> |
|
bbeb2e98ea5b
Use GPLUGIN_NATIVE_PLUGIN_DECLARE for all libpurple plugins and remove PURPLE_PLUGIN_INIT
Gary Kramlich <grim@reaperworld.com>
parents:
40885
diff
changeset
|
21 | #include <gplugin-native.h> |
|
bbeb2e98ea5b
Use GPLUGIN_NATIVE_PLUGIN_DECLARE for all libpurple plugins and remove PURPLE_PLUGIN_INIT
Gary Kramlich <grim@reaperworld.com>
parents:
40885
diff
changeset
|
22 | |
|
39959
e47fcffd061b
migrate the libpurple plugins to using purple.h only
Gary Kramlich <grim@reaperworld.com>
parents:
37148
diff
changeset
|
23 | #include <purple.h> |
| 9583 | 24 | |
| 25 | #define STATENOTIFY_PLUGIN_ID "core-statenotify" | |
| 26 | ||
| 5267 | 27 | static void |
| 15884 | 28 | write_status(PurpleBuddy *buddy, const char *message) |
| 5267 | 29 | { |
|
24531
76e72697f7d6
Hide the blistnode, buddy, contact, group, and chat structs
Gary Kramlich <grim@reaperworld.com>
parents:
22880
diff
changeset
|
30 | PurpleAccount *account = NULL; |
|
40885
87f6241da196
Update purple_conversations_find_* to return PurpleConversations instead of subclasses
Gary Kramlich <grim@reaperworld.com>
parents:
40439
diff
changeset
|
31 | PurpleConversation *im; |
|
40990
7988932faf91
Convert the libpurple plugins to use PurpleConversationManager
Gary Kramlich <grim@reaperworld.com>
parents:
40945
diff
changeset
|
32 | PurpleConversationManager *manager; |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6441
diff
changeset
|
33 | const char *who; |
| 5267 | 34 | char buf[256]; |
|
10167
3f4db9c54e04
[gaim-migrate @ 11254]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9943
diff
changeset
|
35 | char *escaped; |
|
24531
76e72697f7d6
Hide the blistnode, buddy, contact, group, and chat structs
Gary Kramlich <grim@reaperworld.com>
parents:
22880
diff
changeset
|
36 | const gchar *buddy_name = NULL; |
|
76e72697f7d6
Hide the blistnode, buddy, contact, group, and chat structs
Gary Kramlich <grim@reaperworld.com>
parents:
22880
diff
changeset
|
37 | |
|
76e72697f7d6
Hide the blistnode, buddy, contact, group, and chat structs
Gary Kramlich <grim@reaperworld.com>
parents:
22880
diff
changeset
|
38 | account = purple_buddy_get_account(buddy); |
|
76e72697f7d6
Hide the blistnode, buddy, contact, group, and chat structs
Gary Kramlich <grim@reaperworld.com>
parents:
22880
diff
changeset
|
39 | buddy_name = purple_buddy_get_name(buddy); |
| 5267 | 40 | |
|
40990
7988932faf91
Convert the libpurple plugins to use PurpleConversationManager
Gary Kramlich <grim@reaperworld.com>
parents:
40945
diff
changeset
|
41 | manager = purple_conversation_manager_get_default(); |
|
7988932faf91
Convert the libpurple plugins to use PurpleConversationManager
Gary Kramlich <grim@reaperworld.com>
parents:
40945
diff
changeset
|
42 | im = purple_conversation_manager_find_im(manager, account, buddy_name); |
| 5267 | 43 | |
|
34632
ebe6b2a60305
Changed all arguments and return types of Chat and IMs to PurpleChatConversation and PurpleIMConversation.
Ankit Vani <a@nevitus.org>
parents:
34628
diff
changeset
|
44 | if (im == NULL) |
| 5267 | 45 | return; |
| 46 | ||
| 24761 | 47 | /* Prevent duplicate notifications for buddies in multiple groups */ |
|
34728
8efd73063ecf
Renamed buddy list functions to more appropriate/simler names.
Ankit Vani <a@nevitus.org>
parents:
34706
diff
changeset
|
48 | if (buddy != purple_blist_find_buddy(account, buddy_name)) |
|
24759
9f88e2d42845
Prevent the Buddy State Notification plugin from printing duplicate
Florian Quèze <florian@instantbird.org>
parents:
24531
diff
changeset
|
49 | return; |
|
9f88e2d42845
Prevent the Buddy State Notification plugin from printing duplicate
Florian Quèze <florian@instantbird.org>
parents:
24531
diff
changeset
|
50 | |
| 15884 | 51 | who = purple_buddy_get_alias(buddy); |
|
10167
3f4db9c54e04
[gaim-migrate @ 11254]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9943
diff
changeset
|
52 | escaped = g_markup_escape_text(who, -1); |
| 5267 | 53 | |
|
10167
3f4db9c54e04
[gaim-migrate @ 11254]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9943
diff
changeset
|
54 | g_snprintf(buf, sizeof(buf), message, escaped); |
|
3f4db9c54e04
[gaim-migrate @ 11254]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9943
diff
changeset
|
55 | g_free(escaped); |
| 5267 | 56 | |
|
40885
87f6241da196
Update purple_conversations_find_* to return PurpleConversations instead of subclasses
Gary Kramlich <grim@reaperworld.com>
parents:
40439
diff
changeset
|
57 | purple_conversation_write_system_message(im, buf, |
|
36084
2172bd6dad3e
Add purple_conversation_write_system_message
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35045
diff
changeset
|
58 | PURPLE_MESSAGE_ACTIVE_ONLY | PURPLE_MESSAGE_NO_LINKIFY); |
| 5267 | 59 | } |
| 60 | ||
| 61 | static void | |
| 15884 | 62 | buddy_status_changed_cb(PurpleBuddy *buddy, PurpleStatus *old_status, |
| 63 | PurpleStatus *status, void *data) | |
| 5267 | 64 | { |
| 11935 | 65 | gboolean available, old_available; |
| 66 | ||
|
22880
e44c97dec833
Do not show an erroneous message when the 'now listening' song for a
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20288
diff
changeset
|
67 | if (!purple_status_is_exclusive(status) || |
|
e44c97dec833
Do not show an erroneous message when the 'now listening' song for a
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20288
diff
changeset
|
68 | !purple_status_is_exclusive(old_status)) |
|
e44c97dec833
Do not show an erroneous message when the 'now listening' song for a
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20288
diff
changeset
|
69 | return; |
|
e44c97dec833
Do not show an erroneous message when the 'now listening' song for a
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20288
diff
changeset
|
70 | |
| 15884 | 71 | available = purple_status_is_available(status); |
| 72 | old_available = purple_status_is_available(old_status); | |
| 11935 | 73 | |
| 16481 | 74 | if (purple_prefs_get_bool("/plugins/core/statenotify/notify_away")) { |
| 11935 | 75 | if (available && !old_available) |
| 76 | write_status(buddy, _("%s is no longer away.")); | |
| 77 | else if (!available && old_available) | |
| 78 | write_status(buddy, _("%s has gone away.")); | |
| 79 | } | |
| 5267 | 80 | } |
| 81 | ||
| 82 | static void | |
| 15884 | 83 | buddy_idle_changed_cb(PurpleBuddy *buddy, gboolean old_idle, gboolean idle, |
| 11935 | 84 | void *data) |
| 5267 | 85 | { |
| 16481 | 86 | if (purple_prefs_get_bool("/plugins/core/statenotify/notify_idle")) { |
|
25833
9cdd935e0aba
In the state notify plugin, don't print out a status change if we get an update
Marcus Lundblad <malu@pidgin.im>
parents:
24761
diff
changeset
|
87 | if (idle && !old_idle) { |
| 11935 | 88 | write_status(buddy, _("%s has become idle.")); |
|
25833
9cdd935e0aba
In the state notify plugin, don't print out a status change if we get an update
Marcus Lundblad <malu@pidgin.im>
parents:
24761
diff
changeset
|
89 | } else if (!idle && old_idle) { |
| 11935 | 90 | write_status(buddy, _("%s is no longer idle.")); |
| 91 | } | |
| 92 | } | |
| 9583 | 93 | } |
| 94 | ||
|
11901
34394921fe76
[gaim-migrate @ 14192]
Francesco Fracassi <ffracassi@users.sourceforge.net>
parents:
11338
diff
changeset
|
95 | static void |
| 15884 | 96 | buddy_signon_cb(PurpleBuddy *buddy, void *data) |
|
11901
34394921fe76
[gaim-migrate @ 14192]
Francesco Fracassi <ffracassi@users.sourceforge.net>
parents:
11338
diff
changeset
|
97 | { |
| 16481 | 98 | if (purple_prefs_get_bool("/plugins/core/statenotify/notify_signon")) |
|
11901
34394921fe76
[gaim-migrate @ 14192]
Francesco Fracassi <ffracassi@users.sourceforge.net>
parents:
11338
diff
changeset
|
99 | write_status(buddy, _("%s has signed on.")); |
|
34394921fe76
[gaim-migrate @ 14192]
Francesco Fracassi <ffracassi@users.sourceforge.net>
parents:
11338
diff
changeset
|
100 | } |
|
34394921fe76
[gaim-migrate @ 14192]
Francesco Fracassi <ffracassi@users.sourceforge.net>
parents:
11338
diff
changeset
|
101 | |
|
34394921fe76
[gaim-migrate @ 14192]
Francesco Fracassi <ffracassi@users.sourceforge.net>
parents:
11338
diff
changeset
|
102 | static void |
| 15884 | 103 | buddy_signoff_cb(PurpleBuddy *buddy, void *data) |
|
11901
34394921fe76
[gaim-migrate @ 14192]
Francesco Fracassi <ffracassi@users.sourceforge.net>
parents:
11338
diff
changeset
|
104 | { |
| 16481 | 105 | if (purple_prefs_get_bool("/plugins/core/statenotify/notify_signon")) |
|
11901
34394921fe76
[gaim-migrate @ 14192]
Francesco Fracassi <ffracassi@users.sourceforge.net>
parents:
11338
diff
changeset
|
106 | write_status(buddy, _("%s has signed off.")); |
|
34394921fe76
[gaim-migrate @ 14192]
Francesco Fracassi <ffracassi@users.sourceforge.net>
parents:
11338
diff
changeset
|
107 | } |
|
34394921fe76
[gaim-migrate @ 14192]
Francesco Fracassi <ffracassi@users.sourceforge.net>
parents:
11338
diff
changeset
|
108 | |
| 15884 | 109 | static PurplePluginPrefFrame * |
| 110 | get_plugin_pref_frame(PurplePlugin *plugin) | |
| 9583 | 111 | { |
| 15884 | 112 | PurplePluginPrefFrame *frame; |
| 113 | PurplePluginPref *ppref; | |
| 9583 | 114 | |
| 15884 | 115 | frame = purple_plugin_pref_frame_new(); |
| 9583 | 116 | |
| 15884 | 117 | ppref = purple_plugin_pref_new_with_label(_("Notify When")); |
| 118 | purple_plugin_pref_frame_add(frame, ppref); | |
| 9583 | 119 | |
| 16481 | 120 | ppref = purple_plugin_pref_new_with_name_and_label("/plugins/core/statenotify/notify_away", _("Buddy Goes _Away")); |
| 15884 | 121 | purple_plugin_pref_frame_add(frame, ppref); |
|
10246
aa5bff72f94c
[gaim-migrate @ 11386]
Mark Doliner <markdoliner@pidgin.im>
parents:
10167
diff
changeset
|
122 | |
| 16481 | 123 | ppref = purple_plugin_pref_new_with_name_and_label("/plugins/core/statenotify/notify_idle", _("Buddy Goes _Idle")); |
| 15884 | 124 | purple_plugin_pref_frame_add(frame, ppref); |
|
10246
aa5bff72f94c
[gaim-migrate @ 11386]
Mark Doliner <markdoliner@pidgin.im>
parents:
10167
diff
changeset
|
125 | |
| 16481 | 126 | ppref = purple_plugin_pref_new_with_name_and_label("/plugins/core/statenotify/notify_signon", _("Buddy _Signs On/Off")); |
| 15884 | 127 | purple_plugin_pref_frame_add(frame, ppref); |
|
11901
34394921fe76
[gaim-migrate @ 14192]
Francesco Fracassi <ffracassi@users.sourceforge.net>
parents:
11338
diff
changeset
|
128 | |
| 9583 | 129 | return frame; |
| 5267 | 130 | } |
| 131 | ||
|
40945
bbeb2e98ea5b
Use GPLUGIN_NATIVE_PLUGIN_DECLARE for all libpurple plugins and remove PURPLE_PLUGIN_INIT
Gary Kramlich <grim@reaperworld.com>
parents:
40885
diff
changeset
|
132 | static GPluginPluginInfo * |
|
bbeb2e98ea5b
Use GPLUGIN_NATIVE_PLUGIN_DECLARE for all libpurple plugins and remove PURPLE_PLUGIN_INIT
Gary Kramlich <grim@reaperworld.com>
parents:
40885
diff
changeset
|
133 | state_notify_query(GError **error) |
|
36747
0b84912ce764
Refactored rest of libpurple C plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
36367
diff
changeset
|
134 | { |
|
0b84912ce764
Refactored rest of libpurple C plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
36367
diff
changeset
|
135 | const gchar * const authors[] = { |
|
0b84912ce764
Refactored rest of libpurple C plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
36367
diff
changeset
|
136 | "Christian Hammond <chipx86@gnupdate.org>", |
|
0b84912ce764
Refactored rest of libpurple C plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
36367
diff
changeset
|
137 | NULL |
|
0b84912ce764
Refactored rest of libpurple C plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
36367
diff
changeset
|
138 | }; |
|
0b84912ce764
Refactored rest of libpurple C plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
36367
diff
changeset
|
139 | |
|
0b84912ce764
Refactored rest of libpurple C plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
36367
diff
changeset
|
140 | return purple_plugin_info_new( |
|
36934
e7268aeb3b89
Renamed plugin info callback properties to end with "-cb", and their respective symbols.
Ankit Vani <a@nevitus.org>
parents:
36929
diff
changeset
|
141 | "id", STATENOTIFY_PLUGIN_ID, |
|
e7268aeb3b89
Renamed plugin info callback properties to end with "-cb", and their respective symbols.
Ankit Vani <a@nevitus.org>
parents:
36929
diff
changeset
|
142 | "name", N_("Buddy State Notification"), |
|
e7268aeb3b89
Renamed plugin info callback properties to end with "-cb", and their respective symbols.
Ankit Vani <a@nevitus.org>
parents:
36929
diff
changeset
|
143 | "version", DISPLAY_VERSION, |
|
e7268aeb3b89
Renamed plugin info callback properties to end with "-cb", and their respective symbols.
Ankit Vani <a@nevitus.org>
parents:
36929
diff
changeset
|
144 | "category", N_("Notification"), |
|
e7268aeb3b89
Renamed plugin info callback properties to end with "-cb", and their respective symbols.
Ankit Vani <a@nevitus.org>
parents:
36929
diff
changeset
|
145 | "summary", N_("Notifies in a conversation window when a " |
|
e7268aeb3b89
Renamed plugin info callback properties to end with "-cb", and their respective symbols.
Ankit Vani <a@nevitus.org>
parents:
36929
diff
changeset
|
146 | "buddy goes or returns from away or idle."), |
|
e7268aeb3b89
Renamed plugin info callback properties to end with "-cb", and their respective symbols.
Ankit Vani <a@nevitus.org>
parents:
36929
diff
changeset
|
147 | "description", N_("Notifies in a conversation window when a " |
|
e7268aeb3b89
Renamed plugin info callback properties to end with "-cb", and their respective symbols.
Ankit Vani <a@nevitus.org>
parents:
36929
diff
changeset
|
148 | "buddy goes or returns from away or idle."), |
|
e7268aeb3b89
Renamed plugin info callback properties to end with "-cb", and their respective symbols.
Ankit Vani <a@nevitus.org>
parents:
36929
diff
changeset
|
149 | "authors", authors, |
|
e7268aeb3b89
Renamed plugin info callback properties to end with "-cb", and their respective symbols.
Ankit Vani <a@nevitus.org>
parents:
36929
diff
changeset
|
150 | "website", PURPLE_WEBSITE, |
|
e7268aeb3b89
Renamed plugin info callback properties to end with "-cb", and their respective symbols.
Ankit Vani <a@nevitus.org>
parents:
36929
diff
changeset
|
151 | "abi-version", PURPLE_ABI_VERSION, |
|
e7268aeb3b89
Renamed plugin info callback properties to end with "-cb", and their respective symbols.
Ankit Vani <a@nevitus.org>
parents:
36929
diff
changeset
|
152 | "pref-frame-cb", get_plugin_pref_frame, |
|
36747
0b84912ce764
Refactored rest of libpurple C plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
36367
diff
changeset
|
153 | NULL |
|
0b84912ce764
Refactored rest of libpurple C plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
36367
diff
changeset
|
154 | ); |
|
0b84912ce764
Refactored rest of libpurple C plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
36367
diff
changeset
|
155 | } |
|
0b84912ce764
Refactored rest of libpurple C plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
36367
diff
changeset
|
156 | |
| 5267 | 157 | static gboolean |
|
40945
bbeb2e98ea5b
Use GPLUGIN_NATIVE_PLUGIN_DECLARE for all libpurple plugins and remove PURPLE_PLUGIN_INIT
Gary Kramlich <grim@reaperworld.com>
parents:
40885
diff
changeset
|
158 | state_notify_load(GPluginPlugin *plugin, GError **error) |
| 5267 | 159 | { |
| 15884 | 160 | void *blist_handle = purple_blist_get_handle(); |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6441
diff
changeset
|
161 | |
|
36747
0b84912ce764
Refactored rest of libpurple C plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
36367
diff
changeset
|
162 | purple_prefs_add_none("/plugins/core/statenotify"); |
|
0b84912ce764
Refactored rest of libpurple C plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
36367
diff
changeset
|
163 | purple_prefs_add_bool("/plugins/core/statenotify/notify_away", TRUE); |
|
0b84912ce764
Refactored rest of libpurple C plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
36367
diff
changeset
|
164 | purple_prefs_add_bool("/plugins/core/statenotify/notify_idle", TRUE); |
|
0b84912ce764
Refactored rest of libpurple C plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
36367
diff
changeset
|
165 | purple_prefs_add_bool("/plugins/core/statenotify/notify_signon", TRUE); |
|
0b84912ce764
Refactored rest of libpurple C plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
36367
diff
changeset
|
166 | |
| 15884 | 167 | purple_signal_connect(blist_handle, "buddy-status-changed", plugin, |
|
41314
0dc72eacd8bf
Replace PURPLE_CALLBACK by G_CALLBACK
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41078
diff
changeset
|
168 | G_CALLBACK(buddy_status_changed_cb), NULL); |
| 15884 | 169 | purple_signal_connect(blist_handle, "buddy-idle-changed", plugin, |
|
41314
0dc72eacd8bf
Replace PURPLE_CALLBACK by G_CALLBACK
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41078
diff
changeset
|
170 | G_CALLBACK(buddy_idle_changed_cb), NULL); |
| 15884 | 171 | purple_signal_connect(blist_handle, "buddy-signed-on", plugin, |
|
41314
0dc72eacd8bf
Replace PURPLE_CALLBACK by G_CALLBACK
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41078
diff
changeset
|
172 | G_CALLBACK(buddy_signon_cb), NULL); |
| 15884 | 173 | purple_signal_connect(blist_handle, "buddy-signed-off", plugin, |
|
41314
0dc72eacd8bf
Replace PURPLE_CALLBACK by G_CALLBACK
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41078
diff
changeset
|
174 | G_CALLBACK(buddy_signoff_cb), NULL); |
| 5267 | 175 | |
| 176 | return TRUE; | |
| 177 | } | |
| 178 | ||
|
36747
0b84912ce764
Refactored rest of libpurple C plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
36367
diff
changeset
|
179 | static gboolean |
|
41078
84e48180ef67
Update to gplugin 0.35.0
Gary Kramlich <grim@reaperworld.com>
parents:
40990
diff
changeset
|
180 | state_notify_unload(GPluginPlugin *plugin, gboolean shutdown, GError **error) |
| 5267 | 181 | { |
|
36747
0b84912ce764
Refactored rest of libpurple C plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
36367
diff
changeset
|
182 | return TRUE; |
| 5267 | 183 | } |
| 184 | ||
|
40945
bbeb2e98ea5b
Use GPLUGIN_NATIVE_PLUGIN_DECLARE for all libpurple plugins and remove PURPLE_PLUGIN_INIT
Gary Kramlich <grim@reaperworld.com>
parents:
40885
diff
changeset
|
185 | GPLUGIN_NATIVE_PLUGIN_DECLARE(state_notify) |