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