libpurple/protocols/msnp9/dialog.c

Sun, 11 Nov 2007 12:57:52 +0000

author
Stu Tomlinson <nosnilmot@pidgin.im>
date
Sun, 11 Nov 2007 12:57:52 +0000
changeset 21481
d52b697eaae7
permissions
-rw-r--r--

Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
old fools like me who prefer the stability of our MSNP9 code over the
features of MSNP14 can enable this using the --disable-msnp14 ./configure
option.

If we want to release from i.p.p and MSN stability is the only blocker, we
can trivially flick the default to use MSNP9 in configure.ac

21481
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
1 /**
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
2 * @file dialog.c Dialog functions
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
3 *
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
4 * purple
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
5 *
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
6 * Purple is the legal property of its developers, whose names are too numerous
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
7 * to list here. Please refer to the COPYRIGHT file distributed with this
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
8 * source distribution.
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
9 *
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
10 * This program is free software; you can redistribute it and/or modify
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
11 * it under the terms of the GNU General Public License as published by
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
12 * the Free Software Foundation; either version 2 of the License, or
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
13 * (at your option) any later version.
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
14 *
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
15 * This program is distributed in the hope that it will be useful,
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
18 * GNU General Public License for more details.
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
19 *
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
20 * You should have received a copy of the GNU General Public License
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
21 * along with this program; if not, write to the Free Software
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
23 */
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
24
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
25 #include "msn.h"
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
26 #include "dialog.h"
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
27
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
28 typedef struct
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
29 {
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
30 PurpleConnection *gc;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
31 char *who;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
32 char *group;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
33 gboolean add;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
34
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
35 } MsnAddRemData;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
36
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
37 /* Remove the buddy referenced by the MsnAddRemData before the serverside list is changed.
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
38 * If the buddy will be added, he'll be added back; if he will be removed, he won't be. */
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
39 static void
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
40 msn_complete_sync_issue(MsnAddRemData *data)
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
41 {
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
42 PurpleBuddy *buddy;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
43 PurpleGroup *group = NULL;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
44
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
45 if (data->group != NULL)
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
46 group = purple_find_group(data->group);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
47
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
48 if (group != NULL)
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
49 buddy = purple_find_buddy_in_group(purple_connection_get_account(data->gc), data->who, group);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
50 else
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
51 buddy = purple_find_buddy(purple_connection_get_account(data->gc), data->who);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
52
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
53 if (buddy != NULL)
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
54 purple_blist_remove_buddy(buddy);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
55 }
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
56
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
57 static void
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
58 msn_add_cb(MsnAddRemData *data)
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
59 {
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
60 MsnSession *session;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
61 MsnUserList *userlist;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
62
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
63 msn_complete_sync_issue(data);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
64
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
65 session = data->gc->proto_data;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
66 userlist = session->userlist;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
67
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
68 msn_userlist_add_buddy(userlist, data->who, MSN_LIST_FL, data->group);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
69
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
70 g_free(data->group);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
71 g_free(data->who);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
72 g_free(data);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
73 }
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
74
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
75 static void
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
76 msn_rem_cb(MsnAddRemData *data)
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
77 {
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
78 MsnSession *session;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
79 MsnUserList *userlist;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
80
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
81 msn_complete_sync_issue(data);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
82
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
83 session = data->gc->proto_data;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
84 userlist = session->userlist;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
85
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
86 msn_userlist_rem_buddy(userlist, data->who, MSN_LIST_FL, data->group);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
87
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
88 g_free(data->group);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
89 g_free(data->who);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
90 g_free(data);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
91 }
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
92
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
93 void
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
94 msn_show_sync_issue(MsnSession *session, const char *passport,
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
95 const char *group_name)
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
96 {
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
97 PurpleConnection *gc;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
98 PurpleAccount *account;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
99 MsnAddRemData *data;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
100 char *msg, *reason;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
101
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
102 account = session->account;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
103 gc = purple_account_get_connection(account);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
104
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
105 data = g_new0(MsnAddRemData, 1);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
106 data->who = g_strdup(passport);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
107 data->group = g_strdup(group_name);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
108 data->gc = gc;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
109
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
110 msg = g_strdup_printf(_("Buddy list synchronization issue in %s (%s)"),
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
111 purple_account_get_username(account),
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
112 purple_account_get_protocol_name(account));
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
113
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
114 if (group_name != NULL)
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
115 {
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
116 reason = g_strdup_printf(_("%s on the local list is "
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
117 "inside the group \"%s\" but not on "
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
118 "the server list. "
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
119 "Do you want this buddy to be added?"),
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
120 passport, group_name);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
121 }
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
122 else
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
123 {
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
124 reason = g_strdup_printf(_("%s is on the local list but "
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
125 "not on the server list. "
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
126 "Do you want this buddy to be added?"),
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
127 passport);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
128 }
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
129
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
130 purple_request_action(gc, NULL, msg, reason, PURPLE_DEFAULT_ACTION_NONE,
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
131 purple_connection_get_account(gc), data->who, NULL,
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
132 data, 2,
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
133 _("Yes"), G_CALLBACK(msn_add_cb),
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
134 _("No"), G_CALLBACK(msn_rem_cb));
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
135
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
136 g_free(reason);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
137 g_free(msg);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
138 }

mercurial