Mercurial > pidgin
annotate finch/plugins/grouping.c @ 25067:fa462a39cd47
f->p2p_packet_sent and f->p2p_status initialization in yahoo_friend_new() redundant
author | Sulabh Mahajan <sulabh@soc.pidgin.im> |
---|---|
date | Sat, 12 Jul 2008 18:28:22 +0000 |
parents | bcaf4a037704 |
children | 8a488151e07a |
rev | line source |
---|---|
22173
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
1 /** |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
2 * @file grouping.c Provides different grouping options. |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
3 * |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
4 * Copyright (C) 2008 Sadrul Habib Chowdhury <sadrul@users.sourceforge.net> |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
5 * |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
6 * This program is free software; you can redistribute it and/or modify |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
7 * it under the terms of the GNU General Public License as published by |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
8 * the Free Software Foundation; either version 2 of the License, or |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
9 * (at your option) any later version. |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
10 * |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
11 * This program is distributed in the hope that it will be useful, |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
14 * GNU General Public License for more details. |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
15 * |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
16 * You should have received a copy of the GNU General Public License |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
17 * along with this program; if not, write to the Free Software |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
19 */ |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
20 |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
21 #define PURPLE_PLUGIN |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
22 |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
23 #include "internal.h" |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
24 #include "purple.h" |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
25 |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
26 #include "gntblist.h" |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
27 #include "gntplugin.h" |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
28 |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
29 #include "gnttree.h" |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
30 |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
31 /** |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
32 * Online/Offline |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
33 */ |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
34 static PurpleBlistNode online = {.type = PURPLE_BLIST_OTHER_NODE}, |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
35 offline = {.type = PURPLE_BLIST_OTHER_NODE}; |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
36 |
22190
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
37 static gboolean on_offline_init() |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
38 { |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
39 GntTree *tree = finch_blist_get_tree(); |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
40 |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
41 gnt_tree_add_row_after(tree, &online, |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
42 gnt_tree_create_row(tree, _("Online")), NULL, NULL); |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
43 gnt_tree_add_row_after(tree, &offline, |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
44 gnt_tree_create_row(tree, _("Offline")), NULL, &online); |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
45 |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
46 return TRUE; |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
47 } |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
48 |
22173
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
49 static gboolean on_offline_can_add_node(PurpleBlistNode *node) |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
50 { |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
51 switch (purple_blist_node_get_type(node)) { |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
52 case PURPLE_BLIST_CONTACT_NODE: |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
53 { |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
54 PurpleContact *contact = (PurpleContact*)node; |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
55 if (contact->currentsize > 0) |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
56 return TRUE; |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
57 return FALSE; |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
58 } |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
59 break; |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
60 case PURPLE_BLIST_BUDDY_NODE: |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
61 { |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
62 PurpleBuddy *buddy = (PurpleBuddy*)node; |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
63 if (PURPLE_BUDDY_IS_ONLINE(buddy)) |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
64 return TRUE; |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
65 if (purple_prefs_get_bool("/finch/blist/showoffline") && |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
66 purple_account_is_connected(purple_buddy_get_account(buddy))) |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
67 return TRUE; |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
68 return FALSE; |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
69 } |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
70 break; |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
71 case PURPLE_BLIST_CHAT_NODE: |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
72 { |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
73 PurpleChat *chat = (PurpleChat*)node; |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
74 return purple_account_is_connected(purple_chat_get_account(chat)); |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
75 } |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
76 break; |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
77 default: |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
78 return FALSE; |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
79 } |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
80 } |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
81 |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
82 static gpointer on_offline_find_parent(PurpleBlistNode *node) |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
83 { |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
84 gpointer ret = NULL; |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
85 |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
86 switch (purple_blist_node_get_type(node)) { |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
87 case PURPLE_BLIST_CONTACT_NODE: |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
88 node = (PurpleBlistNode*)purple_contact_get_priority_buddy((PurpleContact*)node); |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
89 ret = PURPLE_BUDDY_IS_ONLINE((PurpleBuddy*)node) ? &online : &offline; |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
90 break; |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
91 case PURPLE_BLIST_BUDDY_NODE: |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
92 ret = purple_blist_node_get_parent(node); |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
93 finch_blist_manager_add_node(ret); |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
94 break; |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
95 case PURPLE_BLIST_CHAT_NODE: |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
96 ret = &online; |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
97 break; |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
98 default: |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
99 break; |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
100 } |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
101 return ret; |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
102 } |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
103 |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
104 static gboolean on_offline_create_tooltip(gpointer selected_row, GString **body, char **tool_title) |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
105 { |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
106 static FinchBlistManager *def = NULL; |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
107 PurpleBlistNode *node = selected_row; |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
108 |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
109 if (def == NULL) |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
110 def = finch_blist_manager_find("default"); |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
111 |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
112 if (purple_blist_node_get_type(node) == PURPLE_BLIST_OTHER_NODE) { |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
113 /* There should be some easy way of getting the total online count, |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
114 * or total number of chats. Doing a loop here will probably be pretty |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
115 * expensive. */ |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
116 if (body) |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
117 *body = g_string_new(node == &online ? _("Online Buddies") : _("Offline Buddies")); |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
118 return TRUE; |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
119 } else { |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
120 return def ? def->create_tooltip(selected_row, body, tool_title) : FALSE; |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
121 } |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
122 } |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
123 |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
124 static FinchBlistManager on_offline = |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
125 { |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
126 "on-offline", |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
127 N_("Online/Offline"), |
22190
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
128 on_offline_init, |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
129 NULL, |
22173
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
130 on_offline_can_add_node, |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
131 on_offline_find_parent, |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
132 on_offline_create_tooltip, |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
133 {NULL, NULL, NULL, NULL} |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
134 }; |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
135 |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
136 /** |
22186
d1b8c8bef05b
Add a meebo-like grouping, where online contacts show up under the default
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22173
diff
changeset
|
137 * Meebo-like Grouping. |
d1b8c8bef05b
Add a meebo-like grouping, where online contacts show up under the default
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22173
diff
changeset
|
138 */ |
d1b8c8bef05b
Add a meebo-like grouping, where online contacts show up under the default
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22173
diff
changeset
|
139 static PurpleBlistNode meebo = {.type = PURPLE_BLIST_OTHER_NODE}; |
22190
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
140 static gboolean meebo_init() |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
141 { |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
142 GntTree *tree = finch_blist_get_tree(); |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
143 if (!g_list_find(gnt_tree_get_rows(tree), &meebo)) { |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
144 gnt_tree_add_row_last(tree, &meebo, |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
145 gnt_tree_create_row(tree, _("Offline")), NULL); |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
146 } |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
147 return TRUE; |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
148 } |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
149 |
22186
d1b8c8bef05b
Add a meebo-like grouping, where online contacts show up under the default
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22173
diff
changeset
|
150 static gpointer meebo_find_parent(PurpleBlistNode *node) |
d1b8c8bef05b
Add a meebo-like grouping, where online contacts show up under the default
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22173
diff
changeset
|
151 { |
d1b8c8bef05b
Add a meebo-like grouping, where online contacts show up under the default
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22173
diff
changeset
|
152 static FinchBlistManager *def = NULL; |
d1b8c8bef05b
Add a meebo-like grouping, where online contacts show up under the default
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22173
diff
changeset
|
153 if (def == NULL) |
d1b8c8bef05b
Add a meebo-like grouping, where online contacts show up under the default
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22173
diff
changeset
|
154 def = finch_blist_manager_find("default"); |
d1b8c8bef05b
Add a meebo-like grouping, where online contacts show up under the default
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22173
diff
changeset
|
155 |
d1b8c8bef05b
Add a meebo-like grouping, where online contacts show up under the default
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22173
diff
changeset
|
156 if (PURPLE_BLIST_NODE_IS_CONTACT(node)) { |
d1b8c8bef05b
Add a meebo-like grouping, where online contacts show up under the default
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22173
diff
changeset
|
157 PurpleBuddy *buddy = purple_contact_get_priority_buddy((PurpleContact*)node); |
d1b8c8bef05b
Add a meebo-like grouping, where online contacts show up under the default
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22173
diff
changeset
|
158 if (buddy && !PURPLE_BUDDY_IS_ONLINE(buddy)) { |
d1b8c8bef05b
Add a meebo-like grouping, where online contacts show up under the default
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22173
diff
changeset
|
159 return &meebo; |
d1b8c8bef05b
Add a meebo-like grouping, where online contacts show up under the default
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22173
diff
changeset
|
160 } |
d1b8c8bef05b
Add a meebo-like grouping, where online contacts show up under the default
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22173
diff
changeset
|
161 } |
d1b8c8bef05b
Add a meebo-like grouping, where online contacts show up under the default
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22173
diff
changeset
|
162 return def->find_parent(node); |
d1b8c8bef05b
Add a meebo-like grouping, where online contacts show up under the default
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22173
diff
changeset
|
163 } |
d1b8c8bef05b
Add a meebo-like grouping, where online contacts show up under the default
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22173
diff
changeset
|
164 |
d1b8c8bef05b
Add a meebo-like grouping, where online contacts show up under the default
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22173
diff
changeset
|
165 static FinchBlistManager meebo_group = |
d1b8c8bef05b
Add a meebo-like grouping, where online contacts show up under the default
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22173
diff
changeset
|
166 { |
d1b8c8bef05b
Add a meebo-like grouping, where online contacts show up under the default
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22173
diff
changeset
|
167 "meebo", |
d1b8c8bef05b
Add a meebo-like grouping, where online contacts show up under the default
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22173
diff
changeset
|
168 N_("Meebo"), |
22190
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
169 meebo_init, |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
170 NULL, |
22186
d1b8c8bef05b
Add a meebo-like grouping, where online contacts show up under the default
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22173
diff
changeset
|
171 NULL, |
d1b8c8bef05b
Add a meebo-like grouping, where online contacts show up under the default
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22173
diff
changeset
|
172 meebo_find_parent, |
d1b8c8bef05b
Add a meebo-like grouping, where online contacts show up under the default
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22173
diff
changeset
|
173 NULL, |
d1b8c8bef05b
Add a meebo-like grouping, where online contacts show up under the default
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22173
diff
changeset
|
174 {NULL, NULL, NULL, NULL} |
d1b8c8bef05b
Add a meebo-like grouping, where online contacts show up under the default
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22173
diff
changeset
|
175 }; |
d1b8c8bef05b
Add a meebo-like grouping, where online contacts show up under the default
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22173
diff
changeset
|
176 |
d1b8c8bef05b
Add a meebo-like grouping, where online contacts show up under the default
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22173
diff
changeset
|
177 /** |
22173
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
178 * No Grouping. |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
179 */ |
22190
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
180 static gboolean no_group_init() |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
181 { |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
182 GntTree *tree = finch_blist_get_tree(); |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
183 g_object_set(G_OBJECT(tree), "expander-level", 0, NULL); |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
184 return TRUE; |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
185 } |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
186 |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
187 static gboolean no_group_uninit() |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
188 { |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
189 GntTree *tree = finch_blist_get_tree(); |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
190 g_object_set(G_OBJECT(tree), "expander-level", 1, NULL); |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
191 return TRUE; |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
192 } |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
193 |
22173
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
194 static gboolean no_group_can_add_node(PurpleBlistNode *node) |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
195 { |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
196 return on_offline_can_add_node(node); /* These happen to be the same */ |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
197 } |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
198 |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
199 static gpointer no_group_find_parent(PurpleBlistNode *node) |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
200 { |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
201 gpointer ret = NULL; |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
202 |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
203 switch (purple_blist_node_get_type(node)) { |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
204 case PURPLE_BLIST_BUDDY_NODE: |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
205 ret = purple_blist_node_get_parent(node); |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
206 finch_blist_manager_add_node(ret); |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
207 break; |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
208 default: |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
209 break; |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
210 } |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
211 return ret; |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
212 } |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
213 |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
214 static FinchBlistManager no_group = |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
215 { |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
216 "no-group", |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
217 N_("No Grouping"), |
22190
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
218 no_group_init, |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22186
diff
changeset
|
219 no_group_uninit, |
22173
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
220 no_group_can_add_node, |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
221 no_group_find_parent, |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
222 NULL, |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
223 {NULL, NULL, NULL, NULL} |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
224 }; |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
225 |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
226 static gboolean |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
227 plugin_load(PurplePlugin *plugin) |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
228 { |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
229 finch_blist_install_manager(&on_offline); |
22186
d1b8c8bef05b
Add a meebo-like grouping, where online contacts show up under the default
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22173
diff
changeset
|
230 finch_blist_install_manager(&meebo_group); |
22173
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
231 finch_blist_install_manager(&no_group); |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
232 return TRUE; |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
233 } |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
234 |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
235 static gboolean |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
236 plugin_unload(PurplePlugin *plugin) |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
237 { |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
238 finch_blist_uninstall_manager(&on_offline); |
22186
d1b8c8bef05b
Add a meebo-like grouping, where online contacts show up under the default
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22173
diff
changeset
|
239 finch_blist_uninstall_manager(&meebo_group); |
22173
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
240 finch_blist_uninstall_manager(&no_group); |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
241 return TRUE; |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
242 } |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
243 |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
244 static PurplePluginInfo info = |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
245 { |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
246 PURPLE_PLUGIN_MAGIC, |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
247 PURPLE_MAJOR_VERSION, |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
248 PURPLE_MINOR_VERSION, |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
249 PURPLE_PLUGIN_STANDARD, |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
250 FINCH_PLUGIN_TYPE, |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
251 0, |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
252 NULL, |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
253 PURPLE_PRIORITY_DEFAULT, |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
254 "grouping", |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
255 N_("Grouping"), |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
256 VERSION, |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
257 N_("Provides alternate buddylist grouping options."), |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
258 N_("Provides alternate buddylist grouping options."), |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
259 "Sadrul H Chowdhury <sadrul@users.sourceforge.net>", |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
260 PURPLE_WEBSITE, |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
261 plugin_load, |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
262 plugin_unload, |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
263 NULL, |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
264 NULL, |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
265 NULL, |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
266 NULL, |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
267 NULL, |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
268 NULL,NULL,NULL,NULL |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
269 }; |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
270 |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
271 static void |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
272 init_plugin(PurplePlugin *plugin) |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
273 { |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
274 } |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
275 |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
276 PURPLE_INIT_PLUGIN(ignore, init_plugin, info) |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
277 |
85c365822504
Add a plugin to provide 'Online/Offline' grouping and no grouping.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
278 |