annotate libpurple/protocols/msn/error.c @ 32708:10e5000326a5

Convert code to use the purple_account accessor functions.
author andrew.victor@mxit.com
date Sat, 01 Oct 2011 21:04:35 +0000
parents f033f3c49a41
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
1 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
2 * @file error.c Error functions
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
3 *
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15692
diff changeset
4 * purple
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
5 *
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15692
diff changeset
6 * Purple is the legal property of its developers, whose names are too numerous
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
7 * to list here. Please refer to the COPYRIGHT file distributed with this
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
8 * source distribution.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
9 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
10 * This program is free software; you can redistribute it and/or modify
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
11 * it under the terms of the GNU General Public License as published by
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
12 * the Free Software Foundation; either version 2 of the License, or
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
13 * (at your option) any later version.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
14 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
15 * This program is distributed in the hope that it will be useful,
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
18 * GNU General Public License for more details.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
19 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
20 * You should have received a copy of the GNU General Public License
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
21 * along with this program; if not, write to the Free Software
19680
44b4e8bd759b The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 15823
diff changeset
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
23 */
31180
a99b6dcdb60d Remove unnecesary includes from msn.h.
masca@cpw.pidgin.im
parents: 31150
diff changeset
24
31196
230caecf5435 Include internal.h on each c file to avoid windows breakage as recommended by Daniel.
masca@cpw.pidgin.im
parents: 31180
diff changeset
25 #include "internal.h"
31180
a99b6dcdb60d Remove unnecesary includes from msn.h.
masca@cpw.pidgin.im
parents: 31150
diff changeset
26 #include "debug.h"
a99b6dcdb60d Remove unnecesary includes from msn.h.
masca@cpw.pidgin.im
parents: 31150
diff changeset
27 /* Masca: can we get rid of the sync issue dialog? */
a99b6dcdb60d Remove unnecesary includes from msn.h.
masca@cpw.pidgin.im
parents: 31150
diff changeset
28 #include "request.h"
a99b6dcdb60d Remove unnecesary includes from msn.h.
masca@cpw.pidgin.im
parents: 31150
diff changeset
29
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
30 #include "error.h"
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
31
31150
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
32 typedef struct
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
33 {
31574
f033f3c49a41 Requests are closed with the PurpleConnection, so there's no need for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31534
diff changeset
34 MsnSession *session;
31150
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
35 char *who;
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
36 char *group;
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
37 gboolean add;
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
38
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
39 } MsnAddRemData;
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
40
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
41 const char *
15679
5ec709327dc6 Remove a few unneeded strings, per evans's recommendation
Sean Egan <seanegan@gmail.com>
parents: 15383
diff changeset
42 msn_error_get_text(unsigned int type, gboolean *debug)
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
43 {
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
44 static char msg[256];
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
45 const char *result;
15692
acf21858f5e2 I think this is what Sean intended
Mark Doliner <mark@kingant.net>
parents: 15679
diff changeset
46 *debug = FALSE;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
47
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
48 switch (type) {
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
49 case 0:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
50 result = _("Unable to parse message");
15692
acf21858f5e2 I think this is what Sean intended
Mark Doliner <mark@kingant.net>
parents: 15679
diff changeset
51 *debug = TRUE;
15679
5ec709327dc6 Remove a few unneeded strings, per evans's recommendation
Sean Egan <seanegan@gmail.com>
parents: 15383
diff changeset
52 break;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
53 case 200:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
54 result = _("Syntax Error (probably a client bug)");
15692
acf21858f5e2 I think this is what Sean intended
Mark Doliner <mark@kingant.net>
parents: 15679
diff changeset
55 *debug = TRUE;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
56 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
57 case 201:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
58 result = _("Invalid email address");
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
59 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
60 case 205:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
61 result = _("User does not exist");
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
62 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
63 case 206:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
64 result = _("Fully qualified domain name missing");
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
65 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
66 case 207:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
67 result = _("Already logged in");
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
68 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
69 case 208:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
70 result = _("Invalid username");
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
71 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
72 case 209:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
73 result = _("Invalid friendly name");
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
74 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
75 case 210:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
76 result = _("List full");
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
77 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
78 case 215:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
79 result = _("Already there");
15692
acf21858f5e2 I think this is what Sean intended
Mark Doliner <mark@kingant.net>
parents: 15679
diff changeset
80 *debug = TRUE;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
81 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
82 case 216:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
83 result = _("Not on list");
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
84 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
85 case 217:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
86 result = _("User is offline");
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
87 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
88 case 218:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
89 result = _("Already in the mode");
15692
acf21858f5e2 I think this is what Sean intended
Mark Doliner <mark@kingant.net>
parents: 15679
diff changeset
90 *debug = TRUE;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
91 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
92 case 219:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
93 result = _("Already in opposite list");
15692
acf21858f5e2 I think this is what Sean intended
Mark Doliner <mark@kingant.net>
parents: 15679
diff changeset
94 *debug = TRUE;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
95 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
96 case 223:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
97 result = _("Too many groups");
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
98 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
99 case 224:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
100 result = _("Invalid group");
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
101 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
102 case 225:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
103 result = _("User not in group");
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
104 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
105 case 229:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
106 result = _("Group name too long");
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
107 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
108 case 230:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
109 result = _("Cannot remove group zero");
15692
acf21858f5e2 I think this is what Sean intended
Mark Doliner <mark@kingant.net>
parents: 15679
diff changeset
110 *debug = TRUE;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
111 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
112 case 231:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
113 result = _("Tried to add a user to a group that doesn't exist");
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
114 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
115 case 280:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
116 result = _("Switchboard failed");
15692
acf21858f5e2 I think this is what Sean intended
Mark Doliner <mark@kingant.net>
parents: 15679
diff changeset
117 *debug = TRUE;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
118 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
119 case 281:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
120 result = _("Notify transfer failed");
15692
acf21858f5e2 I think this is what Sean intended
Mark Doliner <mark@kingant.net>
parents: 15679
diff changeset
121 *debug = TRUE;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
122 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
123
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
124 case 300:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
125 result = _("Required fields missing");
15692
acf21858f5e2 I think this is what Sean intended
Mark Doliner <mark@kingant.net>
parents: 15679
diff changeset
126 *debug = TRUE;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
127 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
128 case 301:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
129 result = _("Too many hits to a FND");
15692
acf21858f5e2 I think this is what Sean intended
Mark Doliner <mark@kingant.net>
parents: 15679
diff changeset
130 *debug = TRUE;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
131 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
132 case 302:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
133 result = _("Not logged in");
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
134 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
135
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
136 case 500:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
137 result = _("Service temporarily unavailable");
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
138 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
139 case 501:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
140 result = _("Database server error");
15692
acf21858f5e2 I think this is what Sean intended
Mark Doliner <mark@kingant.net>
parents: 15679
diff changeset
141 *debug = TRUE;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
142 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
143 case 502:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
144 result = _("Command disabled");
15692
acf21858f5e2 I think this is what Sean intended
Mark Doliner <mark@kingant.net>
parents: 15679
diff changeset
145 *debug = TRUE;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
146 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
147 case 510:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
148 result = _("File operation error");
15692
acf21858f5e2 I think this is what Sean intended
Mark Doliner <mark@kingant.net>
parents: 15679
diff changeset
149 *debug = TRUE;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
150 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
151 case 520:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
152 result = _("Memory allocation error");
15692
acf21858f5e2 I think this is what Sean intended
Mark Doliner <mark@kingant.net>
parents: 15679
diff changeset
153 *debug = TRUE;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
154 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
155 case 540:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
156 result = _("Wrong CHL value sent to server");
15692
acf21858f5e2 I think this is what Sean intended
Mark Doliner <mark@kingant.net>
parents: 15679
diff changeset
157 *debug = TRUE;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
158 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
159
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
160 case 600:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
161 result = _("Server busy");
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
162 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
163 case 601:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
164 result = _("Server unavailable");
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
165 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
166 case 602:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
167 result = _("Peer notification server down");
15692
acf21858f5e2 I think this is what Sean intended
Mark Doliner <mark@kingant.net>
parents: 15679
diff changeset
168 *debug = TRUE;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
169 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
170 case 603:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
171 result = _("Database connect error");
15692
acf21858f5e2 I think this is what Sean intended
Mark Doliner <mark@kingant.net>
parents: 15679
diff changeset
172 *debug = TRUE;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
173 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
174 case 604:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
175 result = _("Server is going down (abandon ship)");
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
176 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
177 case 605:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
178 result = _("Server unavailable");
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
179 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
180
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
181 case 707:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
182 result = _("Error creating connection");
15692
acf21858f5e2 I think this is what Sean intended
Mark Doliner <mark@kingant.net>
parents: 15679
diff changeset
183 *debug = TRUE;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
184 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
185 case 710:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
186 result = _("CVR parameters are either unknown or not allowed");
15692
acf21858f5e2 I think this is what Sean intended
Mark Doliner <mark@kingant.net>
parents: 15679
diff changeset
187 *debug = TRUE;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
188 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
189 case 711:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
190 result = _("Unable to write");
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
191 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
192 case 712:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
193 result = _("Session overload");
15692
acf21858f5e2 I think this is what Sean intended
Mark Doliner <mark@kingant.net>
parents: 15679
diff changeset
194 *debug = TRUE;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
195 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
196 case 713:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
197 result = _("User is too active");
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
198 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
199 case 714:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
200 result = _("Too many sessions");
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
201 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
202 case 715:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
203 result = _("Passport not verified");
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
204 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
205 case 717:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
206 result = _("Bad friend file");
15692
acf21858f5e2 I think this is what Sean intended
Mark Doliner <mark@kingant.net>
parents: 15679
diff changeset
207 *debug = TRUE;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
208 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
209 case 731:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
210 result = _("Not expected");
15692
acf21858f5e2 I think this is what Sean intended
Mark Doliner <mark@kingant.net>
parents: 15679
diff changeset
211 *debug = TRUE;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
212 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
213
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
214 case 800:
28336
9381188c362b Change the string "Friendly name changes too rapidly" to "Friendly
Mark Doliner <mark@kingant.net>
parents: 24836
diff changeset
215 result = _("Friendly name is changing too rapidly");
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
216 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
217
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
218 case 910:
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
219 case 912:
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
220 case 918:
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
221 case 919:
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
222 case 921:
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
223 case 922:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
224 result = _("Server too busy");
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
225 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
226 case 911:
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
227 case 917:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
228 result = _("Authentication failed");
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
229 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
230 case 913:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
231 result = _("Not allowed when offline");
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
232 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
233 case 914:
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
234 case 915:
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
235 case 916:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
236 result = _("Server unavailable");
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
237 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
238 case 920:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
239 result = _("Not accepting new users");
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
240 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
241 case 923:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
242 result = _("Kids Passport without parental consent");
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
243 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
244 case 924:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
245 result = _("Passport account not yet verified");
23952
dffd9abace4f Add MSN error code 927 for suspended passports, and a little bit of
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23300
diff changeset
246 break;
dffd9abace4f Add MSN error code 927 for suspended passports, and a little bit of
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23300
diff changeset
247 case 927:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
248 result = _("Passport account suspended");
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
249 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
250 case 928:
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
251 result = _("Bad ticket");
15692
acf21858f5e2 I think this is what Sean intended
Mark Doliner <mark@kingant.net>
parents: 15679
diff changeset
252 *debug = TRUE;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
253 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
254
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
255 default:
23952
dffd9abace4f Add MSN error code 927 for suspended passports, and a little bit of
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23300
diff changeset
256 g_snprintf(msg, sizeof(msg),
dffd9abace4f Add MSN error code 927 for suspended passports, and a little bit of
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23300
diff changeset
257 _("Unknown Error Code %d"), type);
15692
acf21858f5e2 I think this is what Sean intended
Mark Doliner <mark@kingant.net>
parents: 15679
diff changeset
258 *debug = TRUE;
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
259 result = msg;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
260 break;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
261 }
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
262
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
263 return result;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
264 }
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
265
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
266 void
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
267 msn_error_handle(MsnSession *session, unsigned int type)
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
268 {
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
269 char *buf;
15679
5ec709327dc6 Remove a few unneeded strings, per evans's recommendation
Sean Egan <seanegan@gmail.com>
parents: 15383
diff changeset
270 gboolean debug;
23300
5cdd93dac7a2 Delete trailing whitespace
Mark Doliner <mark@kingant.net>
parents: 23182
diff changeset
271
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
272 buf = g_strdup_printf(_("MSN Error: %s\n"),
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
273 msn_error_get_text(type, &debug));
15679
5ec709327dc6 Remove a few unneeded strings, per evans's recommendation
Sean Egan <seanegan@gmail.com>
parents: 15383
diff changeset
274 if (debug)
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15692
diff changeset
275 purple_debug_warning("msn", "error %d: %s\n", type, buf);
15679
5ec709327dc6 Remove a few unneeded strings, per evans's recommendation
Sean Egan <seanegan@gmail.com>
parents: 15383
diff changeset
276 else
32708
10e5000326a5 Convert code to use the purple_account accessor functions.
andrew.victor@mxit.com
parents: 31574
diff changeset
277 purple_notify_error(purple_account_get_connection(session->account), NULL, buf, NULL);
24836
bd2f4c6add99 These translated strings don't need to be duplicated with g_snprintf. And
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23956
diff changeset
278 g_free(buf);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
279 }
23952
dffd9abace4f Add MSN error code 927 for suspended passports, and a little bit of
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 23300
diff changeset
280
31150
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
281 /* Remove the buddy referenced by the MsnAddRemData before the serverside list
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
282 * is changed. If the buddy will be added, he'll be added back; if he will be
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
283 * removed, he won't be. */
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
284 /* Actually with our MSNP14 code that isn't true yet, he won't be added back :(
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
285 * */
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
286 static void
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
287 msn_complete_sync_issue(MsnAddRemData *data)
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
288 {
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
289 PurpleBuddy *buddy;
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
290 PurpleGroup *group = NULL;
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
291
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
292 if (data->group != NULL)
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
293 group = purple_find_group(data->group);
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
294
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
295 if (group != NULL)
31574
f033f3c49a41 Requests are closed with the PurpleConnection, so there's no need for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31534
diff changeset
296 buddy = purple_find_buddy_in_group(data->session->account, data->who, group);
31150
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
297 else
31574
f033f3c49a41 Requests are closed with the PurpleConnection, so there's no need for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31534
diff changeset
298 buddy = purple_find_buddy(data->session->account, data->who);
31150
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
299
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
300 if (buddy != NULL)
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
301 purple_blist_remove_buddy(buddy);
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
302 }
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
303
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
304
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
305 static void
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
306 msn_add_cb(MsnAddRemData *data)
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
307 {
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
308 #if 0
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
309 /* this *should* be necessary !! */
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
310 msn_complete_sync_issue(data);
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
311 #endif
31574
f033f3c49a41 Requests are closed with the PurpleConnection, so there's no need for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31534
diff changeset
312 MsnUserList *userlist = data->session->userlist;
31150
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
313
31574
f033f3c49a41 Requests are closed with the PurpleConnection, so there's no need for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31534
diff changeset
314 msn_userlist_add_buddy(userlist, data->who, data->group);
31150
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
315
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
316 g_free(data->group);
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
317 g_free(data->who);
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
318 g_free(data);
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
319 }
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
320
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
321 static void
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
322 msn_rem_cb(MsnAddRemData *data)
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
323 {
31574
f033f3c49a41 Requests are closed with the PurpleConnection, so there's no need for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31534
diff changeset
324 MsnUserList *userlist = data->session->userlist;
31150
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
325 msn_complete_sync_issue(data);
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
326
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
327
31574
f033f3c49a41 Requests are closed with the PurpleConnection, so there's no need for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31534
diff changeset
328 if (data->group == NULL) {
f033f3c49a41 Requests are closed with the PurpleConnection, so there's no need for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31534
diff changeset
329 msn_userlist_rem_buddy_from_list(userlist, data->who, MSN_LIST_FL);
f033f3c49a41 Requests are closed with the PurpleConnection, so there's no need for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31534
diff changeset
330 } else {
f033f3c49a41 Requests are closed with the PurpleConnection, so there's no need for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31534
diff changeset
331 g_free(data->group);
31150
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
332 }
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
333
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
334 g_free(data->who);
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
335 g_free(data);
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
336 }
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
337
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
338 void
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
339 msn_error_sync_issue(MsnSession *session, const char *passport,
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
340 const char *group_name)
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
341 {
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
342 PurpleConnection *gc;
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
343 PurpleAccount *account;
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
344 MsnAddRemData *data;
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
345 char *msg, *reason;
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
346
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
347 account = session->account;
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
348 gc = purple_account_get_connection(account);
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
349
31574
f033f3c49a41 Requests are closed with the PurpleConnection, so there's no need for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31534
diff changeset
350 data = g_new0(MsnAddRemData, 1);
f033f3c49a41 Requests are closed with the PurpleConnection, so there's no need for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31534
diff changeset
351 data->who = g_strdup(passport);
f033f3c49a41 Requests are closed with the PurpleConnection, so there's no need for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31534
diff changeset
352 data->group = g_strdup(group_name);
f033f3c49a41 Requests are closed with the PurpleConnection, so there's no need for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31534
diff changeset
353 data->session = session;
31150
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
354
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
355 msg = g_strdup_printf(_("Buddy list synchronization issue in %s (%s)"),
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
356 purple_account_get_username(account),
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
357 purple_account_get_protocol_name(account));
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
358
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
359 if (group_name != NULL)
31534
a8cc50c2279f Remove trailing whitespace
Richard Laager <rlaager@wiktel.com>
parents: 31196
diff changeset
360 {
31150
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
361 reason = g_strdup_printf(_("%s on the local list is "
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
362 "inside the group \"%s\" but not on "
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
363 "the server list. "
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
364 "Do you want this buddy to be added?"),
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
365 passport, group_name);
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
366 }
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
367 else
31534
a8cc50c2279f Remove trailing whitespace
Richard Laager <rlaager@wiktel.com>
parents: 31196
diff changeset
368 {
31150
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
369 reason = g_strdup_printf(_("%s is on the local list but "
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
370 "not on the server list. "
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
371 "Do you want this buddy to be added?"),
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
372 passport);
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
373 }
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
374
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
375 purple_request_action(gc, NULL, msg, reason, PURPLE_DEFAULT_ACTION_NONE,
31574
f033f3c49a41 Requests are closed with the PurpleConnection, so there's no need for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31534
diff changeset
376 account, data->who, NULL,
31150
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
377 data, 2,
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
378 _("Yes"), G_CALLBACK(msn_add_cb),
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
379 _("No"), G_CALLBACK(msn_rem_cb));
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
380
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
381 g_free(reason);
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
382 g_free(msg);
b3b7b537284f msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents: 28336
diff changeset
383 }
31574
f033f3c49a41 Requests are closed with the PurpleConnection, so there's no need for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31534
diff changeset
384