Wed, 03 Jul 2013 22:18:55 +0530
Renamed PurpleBlistNode to PurpleBListNode
|
30649
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
1 | /* |
|
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
2 | * Purple's oscar protocol plugin |
|
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
3 | * This file is the legal property of its developers. |
|
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
4 | * Please see the AUTHORS file distributed alongside this file. |
|
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
5 | * |
|
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
6 | * This library is free software; you can redistribute it and/or |
|
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
7 | * modify it under the terms of the GNU Lesser General Public |
|
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
8 | * License as published by the Free Software Foundation; either |
|
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
9 | * version 2 of the License, or (at your option) any later version. |
|
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
10 | * |
|
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
11 | * This library is distributed in the hope that it will be useful, |
|
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
14 | * Lesser General Public License for more details. |
|
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
15 | * |
|
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
16 | * You should have received a copy of the GNU Lesser General Public |
|
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
17 | * License along with this library; if not, write to the Free Software |
|
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
|
30671
ed42e76a1377
disapproval of revision '0a1eea4ffff925d345bc2a05627ab89c932efe0e'
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30670
diff
changeset
|
19 | */ |
|
30649
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
20 | |
|
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
21 | #include "visibility.h" |
|
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
22 | |
|
31140
c2c21299d153
Add comments for translators
Mark Doliner <markdoliner@pidgin.im>
parents:
30819
diff
changeset
|
23 | /* Translators: This string is a menu option that, if selected, will cause |
|
c2c21299d153
Add comments for translators
Mark Doliner <markdoliner@pidgin.im>
parents:
30819
diff
changeset
|
24 | you to appear online to the chosen user even when your status is set to |
|
c2c21299d153
Add comments for translators
Mark Doliner <markdoliner@pidgin.im>
parents:
30819
diff
changeset
|
25 | Invisible. */ |
|
30652
a8dea7ac765f
Gettextized the code and rephrased some of the messages slightly.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30651
diff
changeset
|
26 | #define APPEAR_ONLINE N_("Appear Online") |
|
31140
c2c21299d153
Add comments for translators
Mark Doliner <markdoliner@pidgin.im>
parents:
30819
diff
changeset
|
27 | |
|
c2c21299d153
Add comments for translators
Mark Doliner <markdoliner@pidgin.im>
parents:
30819
diff
changeset
|
28 | /* Translators: This string is a menu option that, if selected, will cause |
|
c2c21299d153
Add comments for translators
Mark Doliner <markdoliner@pidgin.im>
parents:
30819
diff
changeset
|
29 | you to appear offline to the chosen user when your status is set to |
|
c2c21299d153
Add comments for translators
Mark Doliner <markdoliner@pidgin.im>
parents:
30819
diff
changeset
|
30 | Invisible (this is the default). */ |
|
30652
a8dea7ac765f
Gettextized the code and rephrased some of the messages slightly.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30651
diff
changeset
|
31 | #define DONT_APPEAR_ONLINE N_("Don't Appear Online") |
|
31140
c2c21299d153
Add comments for translators
Mark Doliner <markdoliner@pidgin.im>
parents:
30819
diff
changeset
|
32 | |
|
c2c21299d153
Add comments for translators
Mark Doliner <markdoliner@pidgin.im>
parents:
30819
diff
changeset
|
33 | /* Translators: This string is a menu option that, if selected, will cause |
|
c2c21299d153
Add comments for translators
Mark Doliner <markdoliner@pidgin.im>
parents:
30819
diff
changeset
|
34 | you to always appear offline to the chosen user (even when your status |
|
c2c21299d153
Add comments for translators
Mark Doliner <markdoliner@pidgin.im>
parents:
30819
diff
changeset
|
35 | isn't Invisible). */ |
|
30652
a8dea7ac765f
Gettextized the code and rephrased some of the messages slightly.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30651
diff
changeset
|
36 | #define APPEAR_OFFLINE N_("Appear Offline") |
|
31140
c2c21299d153
Add comments for translators
Mark Doliner <markdoliner@pidgin.im>
parents:
30819
diff
changeset
|
37 | |
|
c2c21299d153
Add comments for translators
Mark Doliner <markdoliner@pidgin.im>
parents:
30819
diff
changeset
|
38 | /* Translators: This string is a menu option that, if selected, will cause |
|
c2c21299d153
Add comments for translators
Mark Doliner <markdoliner@pidgin.im>
parents:
30819
diff
changeset
|
39 | you to appear offline to the chosen user if you are invisible, and |
|
c2c21299d153
Add comments for translators
Mark Doliner <markdoliner@pidgin.im>
parents:
30819
diff
changeset
|
40 | appear online to the chosen user if you are not invisible (this is the |
|
c2c21299d153
Add comments for translators
Mark Doliner <markdoliner@pidgin.im>
parents:
30819
diff
changeset
|
41 | default). */ |
|
30652
a8dea7ac765f
Gettextized the code and rephrased some of the messages slightly.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30651
diff
changeset
|
42 | #define DONT_APPEAR_OFFLINE N_("Don't Appear Offline") |
|
a8dea7ac765f
Gettextized the code and rephrased some of the messages slightly.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30651
diff
changeset
|
43 | |
|
30651
1b4eb37429c6
Removed callback data that was causing a segfault in Finch, because
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30650
diff
changeset
|
44 | static guint16 |
|
30655
5e49e33a987d
Two small fixes Mark suggested:
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30654
diff
changeset
|
45 | get_buddy_list_type(OscarData *od) |
|
30649
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
46 | { |
|
30651
1b4eb37429c6
Removed callback data that was causing a segfault in Finch, because
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30650
diff
changeset
|
47 | PurpleAccount *account = purple_connection_get_account(od->gc); |
|
1b4eb37429c6
Removed callback data that was causing a segfault in Finch, because
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30650
diff
changeset
|
48 | return purple_account_is_status_active(account, OSCAR_STATUS_ID_INVISIBLE) ? AIM_SSI_TYPE_PERMIT : AIM_SSI_TYPE_DENY; |
|
1b4eb37429c6
Removed callback data that was causing a segfault in Finch, because
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30650
diff
changeset
|
49 | } |
|
1b4eb37429c6
Removed callback data that was causing a segfault in Finch, because
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30650
diff
changeset
|
50 | |
|
1b4eb37429c6
Removed callback data that was causing a segfault in Finch, because
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30650
diff
changeset
|
51 | static gboolean |
|
1b4eb37429c6
Removed callback data that was causing a segfault in Finch, because
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30650
diff
changeset
|
52 | is_buddy_on_list(OscarData *od, const char *bname) |
|
1b4eb37429c6
Removed callback data that was causing a segfault in Finch, because
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30650
diff
changeset
|
53 | { |
|
31592
2b3dd7cca164
Add two hash tables to the oscar code that deals with your server stored
Mark Doliner <markdoliner@pidgin.im>
parents:
31140
diff
changeset
|
54 | return aim_ssi_itemlist_finditem(&od->ssi.local, NULL, bname, get_buddy_list_type(od)) != NULL; |
|
30651
1b4eb37429c6
Removed callback data that was causing a segfault in Finch, because
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30650
diff
changeset
|
55 | } |
|
30649
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
56 | |
|
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
57 | static void |
|
34699
09b2c9219b57
Renamed PurpleBlistNode to PurpleBListNode
Ankit Vani <a@nevitus.org>
parents:
31592
diff
changeset
|
58 | visibility_cb(PurpleBListNode *node, gpointer whatever) |
|
30649
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
59 | { |
|
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
60 | PurpleBuddy *buddy = PURPLE_BUDDY(node); |
|
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
61 | const char* bname = purple_buddy_get_name(buddy); |
|
30651
1b4eb37429c6
Removed callback data that was causing a segfault in Finch, because
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30650
diff
changeset
|
62 | OscarData *od = purple_connection_get_protocol_data(purple_account_get_connection(purple_buddy_get_account(buddy))); |
|
30655
5e49e33a987d
Two small fixes Mark suggested:
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30654
diff
changeset
|
63 | guint16 list_type = get_buddy_list_type(od); |
|
30649
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
64 | |
|
30651
1b4eb37429c6
Removed callback data that was causing a segfault in Finch, because
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30650
diff
changeset
|
65 | if (!is_buddy_on_list(od, bname)) { |
|
1b4eb37429c6
Removed callback data that was causing a segfault in Finch, because
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30650
diff
changeset
|
66 | aim_ssi_add_to_private_list(od, bname, list_type); |
|
30649
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
67 | } else { |
|
30651
1b4eb37429c6
Removed callback data that was causing a segfault in Finch, because
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30650
diff
changeset
|
68 | aim_ssi_del_from_private_list(od, bname, list_type); |
|
30649
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
69 | } |
|
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
70 | } |
|
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
71 | |
|
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
72 | PurpleMenuAction * |
|
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
73 | create_visibility_menu_item(OscarData *od, const char *bname) |
|
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
74 | { |
|
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
75 | PurpleAccount *account = purple_connection_get_account(od->gc); |
|
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
76 | gboolean invisible = purple_account_is_status_active(account, OSCAR_STATUS_ID_INVISIBLE); |
|
30651
1b4eb37429c6
Removed callback data that was causing a segfault in Finch, because
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30650
diff
changeset
|
77 | gboolean on_list = is_buddy_on_list(od, bname); |
|
30652
a8dea7ac765f
Gettextized the code and rephrased some of the messages slightly.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30651
diff
changeset
|
78 | const gchar *label; |
|
30649
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
79 | |
|
30652
a8dea7ac765f
Gettextized the code and rephrased some of the messages slightly.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30651
diff
changeset
|
80 | if (invisible) { |
|
a8dea7ac765f
Gettextized the code and rephrased some of the messages slightly.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30651
diff
changeset
|
81 | label = on_list ? _(DONT_APPEAR_ONLINE) : _(APPEAR_ONLINE); |
|
a8dea7ac765f
Gettextized the code and rephrased some of the messages slightly.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30651
diff
changeset
|
82 | } else { |
|
a8dea7ac765f
Gettextized the code and rephrased some of the messages slightly.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30651
diff
changeset
|
83 | label = on_list ? _(DONT_APPEAR_OFFLINE) : _(APPEAR_OFFLINE); |
|
a8dea7ac765f
Gettextized the code and rephrased some of the messages slightly.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30651
diff
changeset
|
84 | } |
|
a8dea7ac765f
Gettextized the code and rephrased some of the messages slightly.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30651
diff
changeset
|
85 | return purple_menu_action_new(label, PURPLE_CALLBACK(visibility_cb), NULL, NULL); |
|
30649
d96a69a9154e
Added a way to add a user to the (In)Visible list via the context menu.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
86 | } |
|
30650
1e60e49674dd
Added a way to view the Visible/Invisible lists.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30649
diff
changeset
|
87 | |
|
1e60e49674dd
Added a way to view the Visible/Invisible lists.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30649
diff
changeset
|
88 | static void |
|
30671
ed42e76a1377
disapproval of revision '0a1eea4ffff925d345bc2a05627ab89c932efe0e'
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30670
diff
changeset
|
89 | show_private_list(PurplePluginAction *action, guint16 list_type, const gchar *title, const gchar *list_description, const gchar *menu_action_name) |
|
30650
1e60e49674dd
Added a way to view the Visible/Invisible lists.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30649
diff
changeset
|
90 | { |
|
1e60e49674dd
Added a way to view the Visible/Invisible lists.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30649
diff
changeset
|
91 | PurpleConnection *gc = (PurpleConnection *) action->context; |
|
1e60e49674dd
Added a way to view the Visible/Invisible lists.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30649
diff
changeset
|
92 | OscarData *od = purple_connection_get_protocol_data(gc); |
|
1e60e49674dd
Added a way to view the Visible/Invisible lists.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30649
diff
changeset
|
93 | PurpleAccount *account = purple_connection_get_account(gc); |
|
30671
ed42e76a1377
disapproval of revision '0a1eea4ffff925d345bc2a05627ab89c932efe0e'
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30670
diff
changeset
|
94 | GSList *buddies, *filtered_buddies, *cur; |
|
ed42e76a1377
disapproval of revision '0a1eea4ffff925d345bc2a05627ab89c932efe0e'
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30670
diff
changeset
|
95 | gchar *text, *secondary; |
|
30650
1e60e49674dd
Added a way to view the Visible/Invisible lists.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30649
diff
changeset
|
96 | |
|
1e60e49674dd
Added a way to view the Visible/Invisible lists.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30649
diff
changeset
|
97 | buddies = purple_find_buddies(account, NULL); |
|
30671
ed42e76a1377
disapproval of revision '0a1eea4ffff925d345bc2a05627ab89c932efe0e'
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30670
diff
changeset
|
98 | filtered_buddies = NULL; |
|
30650
1e60e49674dd
Added a way to view the Visible/Invisible lists.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30649
diff
changeset
|
99 | for (cur = buddies; cur != NULL; cur = cur->next) { |
|
1e60e49674dd
Added a way to view the Visible/Invisible lists.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30649
diff
changeset
|
100 | PurpleBuddy *buddy; |
|
1e60e49674dd
Added a way to view the Visible/Invisible lists.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30649
diff
changeset
|
101 | const gchar *bname; |
|
1e60e49674dd
Added a way to view the Visible/Invisible lists.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30649
diff
changeset
|
102 | |
|
1e60e49674dd
Added a way to view the Visible/Invisible lists.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30649
diff
changeset
|
103 | buddy = cur->data; |
|
1e60e49674dd
Added a way to view the Visible/Invisible lists.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30649
diff
changeset
|
104 | bname = purple_buddy_get_name(buddy); |
|
31592
2b3dd7cca164
Add two hash tables to the oscar code that deals with your server stored
Mark Doliner <markdoliner@pidgin.im>
parents:
31140
diff
changeset
|
105 | if (aim_ssi_itemlist_finditem(&od->ssi.local, NULL, bname, list_type)) { |
|
30671
ed42e76a1377
disapproval of revision '0a1eea4ffff925d345bc2a05627ab89c932efe0e'
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30670
diff
changeset
|
106 | filtered_buddies = g_slist_prepend(filtered_buddies, buddy); |
|
30650
1e60e49674dd
Added a way to view the Visible/Invisible lists.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30649
diff
changeset
|
107 | } |
|
1e60e49674dd
Added a way to view the Visible/Invisible lists.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30649
diff
changeset
|
108 | } |
|
1e60e49674dd
Added a way to view the Visible/Invisible lists.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30649
diff
changeset
|
109 | |
|
1e60e49674dd
Added a way to view the Visible/Invisible lists.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30649
diff
changeset
|
110 | g_slist_free(buddies); |
|
1e60e49674dd
Added a way to view the Visible/Invisible lists.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30649
diff
changeset
|
111 | |
|
30671
ed42e76a1377
disapproval of revision '0a1eea4ffff925d345bc2a05627ab89c932efe0e'
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30670
diff
changeset
|
112 | filtered_buddies = g_slist_reverse(filtered_buddies); |
|
ed42e76a1377
disapproval of revision '0a1eea4ffff925d345bc2a05627ab89c932efe0e'
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30670
diff
changeset
|
113 | text = oscar_format_buddies(filtered_buddies, _("you have no buddies on this list")); |
|
ed42e76a1377
disapproval of revision '0a1eea4ffff925d345bc2a05627ab89c932efe0e'
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30670
diff
changeset
|
114 | g_slist_free(filtered_buddies); |
|
30650
1e60e49674dd
Added a way to view the Visible/Invisible lists.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30649
diff
changeset
|
115 | |
|
30671
ed42e76a1377
disapproval of revision '0a1eea4ffff925d345bc2a05627ab89c932efe0e'
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30670
diff
changeset
|
116 | secondary = g_strdup_printf(_("You can add a buddy to this list " |
|
ed42e76a1377
disapproval of revision '0a1eea4ffff925d345bc2a05627ab89c932efe0e'
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30670
diff
changeset
|
117 | "by right-clicking on them and " |
|
ed42e76a1377
disapproval of revision '0a1eea4ffff925d345bc2a05627ab89c932efe0e'
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30670
diff
changeset
|
118 | "selecting \"%s\""), menu_action_name); |
|
ed42e76a1377
disapproval of revision '0a1eea4ffff925d345bc2a05627ab89c932efe0e'
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30670
diff
changeset
|
119 | purple_notify_formatted(gc, title, list_description, secondary, text, NULL, NULL); |
|
ed42e76a1377
disapproval of revision '0a1eea4ffff925d345bc2a05627ab89c932efe0e'
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30670
diff
changeset
|
120 | g_free(secondary); |
|
ed42e76a1377
disapproval of revision '0a1eea4ffff925d345bc2a05627ab89c932efe0e'
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30670
diff
changeset
|
121 | g_free(text); |
|
30650
1e60e49674dd
Added a way to view the Visible/Invisible lists.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30649
diff
changeset
|
122 | } |
|
1e60e49674dd
Added a way to view the Visible/Invisible lists.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30649
diff
changeset
|
123 | |
|
1e60e49674dd
Added a way to view the Visible/Invisible lists.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30649
diff
changeset
|
124 | void |
|
1e60e49674dd
Added a way to view the Visible/Invisible lists.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30649
diff
changeset
|
125 | oscar_show_visible_list(PurplePluginAction *action) |
|
1e60e49674dd
Added a way to view the Visible/Invisible lists.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30649
diff
changeset
|
126 | { |
|
30671
ed42e76a1377
disapproval of revision '0a1eea4ffff925d345bc2a05627ab89c932efe0e'
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30670
diff
changeset
|
127 | show_private_list(action, AIM_SSI_TYPE_PERMIT, _("Visible List"), |
|
ed42e76a1377
disapproval of revision '0a1eea4ffff925d345bc2a05627ab89c932efe0e'
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30670
diff
changeset
|
128 | _("These buddies will see " |
|
ed42e76a1377
disapproval of revision '0a1eea4ffff925d345bc2a05627ab89c932efe0e'
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30670
diff
changeset
|
129 | "your status when you switch " |
|
ed42e76a1377
disapproval of revision '0a1eea4ffff925d345bc2a05627ab89c932efe0e'
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30670
diff
changeset
|
130 | "to \"Invisible\""), |
|
ed42e76a1377
disapproval of revision '0a1eea4ffff925d345bc2a05627ab89c932efe0e'
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30670
diff
changeset
|
131 | _(APPEAR_ONLINE)); |
|
30650
1e60e49674dd
Added a way to view the Visible/Invisible lists.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30649
diff
changeset
|
132 | } |
|
1e60e49674dd
Added a way to view the Visible/Invisible lists.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30649
diff
changeset
|
133 | |
|
1e60e49674dd
Added a way to view the Visible/Invisible lists.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30649
diff
changeset
|
134 | void |
|
1e60e49674dd
Added a way to view the Visible/Invisible lists.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30649
diff
changeset
|
135 | oscar_show_invisible_list(PurplePluginAction *action) |
|
1e60e49674dd
Added a way to view the Visible/Invisible lists.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30649
diff
changeset
|
136 | { |
|
30671
ed42e76a1377
disapproval of revision '0a1eea4ffff925d345bc2a05627ab89c932efe0e'
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30670
diff
changeset
|
137 | show_private_list(action, AIM_SSI_TYPE_DENY, _("Invisible List"), |
|
ed42e76a1377
disapproval of revision '0a1eea4ffff925d345bc2a05627ab89c932efe0e'
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30670
diff
changeset
|
138 | _("These buddies will always see you as offline"), |
|
ed42e76a1377
disapproval of revision '0a1eea4ffff925d345bc2a05627ab89c932efe0e'
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30670
diff
changeset
|
139 | _(APPEAR_OFFLINE)); |
|
30670
0a1eea4ffff9
Applied and slightly modified Sadrul's patch (http://pidgin.im/~sadrul/pp/icq-list.patch.txt)
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30654
diff
changeset
|
140 | } |