Fri, 11 Apr 2014 20:08:22 +0200
imgstore: unref msn
| 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 | */ |
|
30945
b875cf477e19
Remove unnecesary includes from msn.h.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
30911
diff
changeset
|
24 | |
|
30961
885064b16c54
Include internal.h on each c file to avoid windows breakage as recommended by Daniel.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
30945
diff
changeset
|
25 | #include "internal.h" |
|
30945
b875cf477e19
Remove unnecesary includes from msn.h.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
30911
diff
changeset
|
26 | #include "debug.h" |
|
b875cf477e19
Remove unnecesary includes from msn.h.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
30911
diff
changeset
|
27 | /* Masca: can we get rid of the sync issue dialog? */ |
|
b875cf477e19
Remove unnecesary includes from msn.h.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
30911
diff
changeset
|
28 | #include "request.h" |
|
b875cf477e19
Remove unnecesary includes from msn.h.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
30911
diff
changeset
|
29 | |
|
5436
a0e0bacaa196
[gaim-migrate @ 5818]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
30 | #include "error.h" |
| 5309 | 31 | |
|
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
|
32 | 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
|
33 | { |
|
31351
5e660415a17d
Requests are closed with the PurpleConnection, so there's no need for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31294
diff
changeset
|
34 | MsnSession *session; |
|
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
|
35 | 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
|
36 | 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
|
37 | 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
|
38 | |
|
e0a4f4418d83
msn: Merge dialog and error to get an unified msn_error api.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
28271
diff
changeset
|
39 | } 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
|
40 | |
| 5309 | 41 | const char * |
|
15740
1448fbe9b0d5
Remove a few unneeded strings, per evans's recommendation
Sean Egan <seanegan@pidgin.im>
parents:
15444
diff
changeset
|
42 | msn_error_get_text(unsigned int type, gboolean *debug) |
| 5309 | 43 | { |
|
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
|
44 | 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
|
45 | const char *result; |
|
15753
8a0b761dfd7b
I think this is what Sean intended
Mark Doliner <markdoliner@pidgin.im>
parents:
15740
diff
changeset
|
46 | *debug = FALSE; |
| 5309 | 47 | |
| 48 | switch (type) { | |
| 8569 | 49 | 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
|
50 | result = _("Unable to parse message"); |
|
15753
8a0b761dfd7b
I think this is what Sean intended
Mark Doliner <markdoliner@pidgin.im>
parents:
15740
diff
changeset
|
51 | *debug = TRUE; |
|
15740
1448fbe9b0d5
Remove a few unneeded strings, per evans's recommendation
Sean Egan <seanegan@pidgin.im>
parents:
15444
diff
changeset
|
52 | break; |
| 5309 | 53 | 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
|
54 | 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
|
55 | *debug = TRUE; |
| 5309 | 56 | break; |
| 57 | 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
|
58 | result = _("Invalid email address"); |
| 5309 | 59 | break; |
| 60 | 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
|
61 | result = _("User does not exist"); |
| 5309 | 62 | break; |
| 63 | 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
|
64 | result = _("Fully qualified domain name missing"); |
| 5309 | 65 | break; |
| 66 | 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
|
67 | result = _("Already logged in"); |
| 5309 | 68 | break; |
| 69 | 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
|
70 | result = _("Invalid username"); |
| 5309 | 71 | break; |
| 72 | 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
|
73 | result = _("Invalid friendly name"); |
| 5309 | 74 | break; |
| 75 | 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
|
76 | result = _("List full"); |
| 5309 | 77 | break; |
| 78 | 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
|
79 | result = _("Already there"); |
|
15753
8a0b761dfd7b
I think this is what Sean intended
Mark Doliner <markdoliner@pidgin.im>
parents:
15740
diff
changeset
|
80 | *debug = TRUE; |
| 5309 | 81 | break; |
| 82 | 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
|
83 | result = _("Not on list"); |
| 5309 | 84 | break; |
| 85 | 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
|
86 | result = _("User is offline"); |
| 5309 | 87 | break; |
| 88 | 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
|
89 | result = _("Already in the mode"); |
|
15753
8a0b761dfd7b
I think this is what Sean intended
Mark Doliner <markdoliner@pidgin.im>
parents:
15740
diff
changeset
|
90 | *debug = TRUE; |
| 5309 | 91 | break; |
| 92 | 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
|
93 | result = _("Already in opposite list"); |
|
15753
8a0b761dfd7b
I think this is what Sean intended
Mark Doliner <markdoliner@pidgin.im>
parents:
15740
diff
changeset
|
94 | *debug = TRUE; |
| 5309 | 95 | break; |
|
6887
b41f14f8ad16
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
96 | 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
|
97 | result = _("Too many groups"); |
|
6887
b41f14f8ad16
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
98 | break; |
|
b41f14f8ad16
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
99 | 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
|
100 | result = _("Invalid group"); |
|
6887
b41f14f8ad16
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
101 | break; |
|
b41f14f8ad16
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
102 | 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
|
103 | result = _("User not in group"); |
|
6887
b41f14f8ad16
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
104 | break; |
|
b41f14f8ad16
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
105 | 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
|
106 | result = _("Group name too long"); |
|
6887
b41f14f8ad16
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
107 | break; |
|
b41f14f8ad16
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
108 | 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
|
109 | result = _("Cannot remove group zero"); |
|
15753
8a0b761dfd7b
I think this is what Sean intended
Mark Doliner <markdoliner@pidgin.im>
parents:
15740
diff
changeset
|
110 | *debug = TRUE; |
|
6887
b41f14f8ad16
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
111 | break; |
| 5309 | 112 | 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
|
113 | result = _("Tried to add a user to a group that doesn't exist"); |
| 5309 | 114 | break; |
| 115 | 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
|
116 | result = _("Switchboard failed"); |
|
15753
8a0b761dfd7b
I think this is what Sean intended
Mark Doliner <markdoliner@pidgin.im>
parents:
15740
diff
changeset
|
117 | *debug = TRUE; |
| 5309 | 118 | break; |
| 119 | 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
|
120 | result = _("Notify transfer failed"); |
|
15753
8a0b761dfd7b
I think this is what Sean intended
Mark Doliner <markdoliner@pidgin.im>
parents:
15740
diff
changeset
|
121 | *debug = TRUE; |
| 5309 | 122 | break; |
| 123 | ||
| 124 | 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
|
125 | result = _("Required fields missing"); |
|
15753
8a0b761dfd7b
I think this is what Sean intended
Mark Doliner <markdoliner@pidgin.im>
parents:
15740
diff
changeset
|
126 | *debug = TRUE; |
| 5309 | 127 | break; |
|
6887
b41f14f8ad16
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
128 | 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
|
129 | 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
|
130 | *debug = TRUE; |
|
6887
b41f14f8ad16
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
131 | break; |
| 5309 | 132 | 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
|
133 | result = _("Not logged in"); |
| 5309 | 134 | break; |
| 135 | ||
| 136 | 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
|
137 | result = _("Service temporarily unavailable"); |
| 5309 | 138 | break; |
| 139 | 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
|
140 | result = _("Database server error"); |
|
15753
8a0b761dfd7b
I think this is what Sean intended
Mark Doliner <markdoliner@pidgin.im>
parents:
15740
diff
changeset
|
141 | *debug = TRUE; |
| 5309 | 142 | break; |
| 8255 | 143 | 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
|
144 | result = _("Command disabled"); |
|
15753
8a0b761dfd7b
I think this is what Sean intended
Mark Doliner <markdoliner@pidgin.im>
parents:
15740
diff
changeset
|
145 | *debug = TRUE; |
| 8255 | 146 | break; |
| 5309 | 147 | 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
|
148 | result = _("File operation error"); |
|
15753
8a0b761dfd7b
I think this is what Sean intended
Mark Doliner <markdoliner@pidgin.im>
parents:
15740
diff
changeset
|
149 | *debug = TRUE; |
| 5309 | 150 | break; |
| 151 | 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
|
152 | result = _("Memory allocation error"); |
|
15753
8a0b761dfd7b
I think this is what Sean intended
Mark Doliner <markdoliner@pidgin.im>
parents:
15740
diff
changeset
|
153 | *debug = TRUE; |
| 5309 | 154 | break; |
| 155 | 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
|
156 | 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
|
157 | *debug = TRUE; |
| 5309 | 158 | break; |
| 159 | ||
| 160 | 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
|
161 | result = _("Server busy"); |
| 5309 | 162 | break; |
| 163 | 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
|
164 | result = _("Server unavailable"); |
| 5309 | 165 | break; |
| 166 | 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
|
167 | result = _("Peer notification server down"); |
|
15753
8a0b761dfd7b
I think this is what Sean intended
Mark Doliner <markdoliner@pidgin.im>
parents:
15740
diff
changeset
|
168 | *debug = TRUE; |
| 5309 | 169 | break; |
| 170 | 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
|
171 | result = _("Database connect error"); |
|
15753
8a0b761dfd7b
I think this is what Sean intended
Mark Doliner <markdoliner@pidgin.im>
parents:
15740
diff
changeset
|
172 | *debug = TRUE; |
| 5309 | 173 | break; |
| 174 | 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
|
175 | result = _("Server is going down (abandon ship)"); |
| 5309 | 176 | break; |
|
6887
b41f14f8ad16
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
177 | 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
|
178 | result = _("Server unavailable"); |
|
6887
b41f14f8ad16
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
179 | break; |
| 5309 | 180 | |
| 181 | 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
|
182 | result = _("Error creating connection"); |
|
15753
8a0b761dfd7b
I think this is what Sean intended
Mark Doliner <markdoliner@pidgin.im>
parents:
15740
diff
changeset
|
183 | *debug = TRUE; |
| 5309 | 184 | break; |
| 185 | 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
|
186 | 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
|
187 | *debug = TRUE; |
| 5309 | 188 | break; |
| 189 | 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
|
190 | result = _("Unable to write"); |
| 5309 | 191 | break; |
| 192 | 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
|
193 | result = _("Session overload"); |
|
15753
8a0b761dfd7b
I think this is what Sean intended
Mark Doliner <markdoliner@pidgin.im>
parents:
15740
diff
changeset
|
194 | *debug = TRUE; |
| 5309 | 195 | break; |
| 196 | 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
|
197 | result = _("User is too active"); |
| 5309 | 198 | break; |
| 199 | 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
|
200 | result = _("Too many sessions"); |
| 5309 | 201 | break; |
| 202 | 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
|
203 | result = _("Passport not verified"); |
| 5309 | 204 | break; |
| 205 | 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
|
206 | result = _("Bad friend file"); |
|
15753
8a0b761dfd7b
I think this is what Sean intended
Mark Doliner <markdoliner@pidgin.im>
parents:
15740
diff
changeset
|
207 | *debug = TRUE; |
| 5309 | 208 | break; |
|
6887
b41f14f8ad16
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
209 | 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
|
210 | result = _("Not expected"); |
|
15753
8a0b761dfd7b
I think this is what Sean intended
Mark Doliner <markdoliner@pidgin.im>
parents:
15740
diff
changeset
|
211 | *debug = TRUE; |
|
6887
b41f14f8ad16
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
212 | break; |
| 5309 | 213 | |
|
6887
b41f14f8ad16
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
214 | case 800: |
|
28271
17478fde5be4
Change the string "Friendly name changes too rapidly" to "Friendly
Mark Doliner <markdoliner@pidgin.im>
parents:
25311
diff
changeset
|
215 | result = _("Friendly name is changing too rapidly"); |
|
6887
b41f14f8ad16
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
216 | break; |
|
b41f14f8ad16
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
217 | |
|
b41f14f8ad16
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
218 | case 910: |
|
b41f14f8ad16
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
219 | case 912: |
|
b41f14f8ad16
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
220 | case 918: |
|
b41f14f8ad16
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
221 | case 919: |
|
b41f14f8ad16
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
222 | case 921: |
|
b41f14f8ad16
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
223 | 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
|
224 | result = _("Server too busy"); |
|
6887
b41f14f8ad16
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
225 | break; |
| 5309 | 226 | case 911: |
|
6887
b41f14f8ad16
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
227 | 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
|
228 | result = _("Authentication failed"); |
| 5309 | 229 | break; |
| 230 | 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
|
231 | result = _("Not allowed when offline"); |
| 5309 | 232 | break; |
|
6887
b41f14f8ad16
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
233 | case 914: |
|
b41f14f8ad16
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
234 | case 915: |
|
b41f14f8ad16
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
235 | 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
|
236 | result = _("Server unavailable"); |
|
6887
b41f14f8ad16
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
237 | break; |
| 8255 | 238 | 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
|
239 | result = _("Not accepting new users"); |
| 5309 | 240 | break; |
| 8255 | 241 | 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
|
242 | result = _("Kids Passport without parental consent"); |
|
6887
b41f14f8ad16
[gaim-migrate @ 7433]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
243 | break; |
| 8255 | 244 | 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
|
245 | 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
|
246 | 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
|
247 | 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
|
248 | result = _("Passport account suspended"); |
| 5309 | 249 | break; |
| 8255 | 250 | 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
|
251 | result = _("Bad ticket"); |
|
15753
8a0b761dfd7b
I think this is what Sean intended
Mark Doliner <markdoliner@pidgin.im>
parents:
15740
diff
changeset
|
252 | *debug = TRUE; |
| 8255 | 253 | break; |
| 5309 | 254 | |
| 255 | 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
|
256 | 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
|
257 | _("Unknown Error Code %d"), type); |
|
15753
8a0b761dfd7b
I think this is what Sean intended
Mark Doliner <markdoliner@pidgin.im>
parents:
15740
diff
changeset
|
258 | *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
|
259 | result = msg; |
| 5309 | 260 | break; |
| 261 | } | |
| 262 | ||
|
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
|
263 | return result; |
| 5309 | 264 | } |
| 265 | ||
| 266 | void | |
|
5436
a0e0bacaa196
[gaim-migrate @ 5818]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
267 | msn_error_handle(MsnSession *session, unsigned int type) |
| 5309 | 268 | { |
|
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
|
269 | char *buf; |
|
15740
1448fbe9b0d5
Remove a few unneeded strings, per evans's recommendation
Sean Egan <seanegan@pidgin.im>
parents:
15444
diff
changeset
|
270 | gboolean debug; |
|
23441
fd45c23a3eb2
Delete trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
23325
diff
changeset
|
271 | |
|
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
|
272 | 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
|
273 | 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
|
274 | if (debug) |
| 15884 | 275 | purple_debug_warning("msn", "error %d: %s\n", type, buf); |
|
34449
bbcb198650b7
Notify API: extend purple_notify_message with PurpleRequestCommonParameters
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
34331
diff
changeset
|
276 | else { |
|
bbcb198650b7
Notify API: extend purple_notify_message with PurpleRequestCommonParameters
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
34331
diff
changeset
|
277 | purple_notify_error( |
|
bbcb198650b7
Notify API: extend purple_notify_message with PurpleRequestCommonParameters
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
34331
diff
changeset
|
278 | purple_account_get_connection(session->account), NULL, |
|
bbcb198650b7
Notify API: extend purple_notify_message with PurpleRequestCommonParameters
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
34331
diff
changeset
|
279 | buf, NULL, purple_request_cpar_from_account( |
|
bbcb198650b7
Notify API: extend purple_notify_message with PurpleRequestCommonParameters
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
34331
diff
changeset
|
280 | session->account)); |
|
bbcb198650b7
Notify API: extend purple_notify_message with PurpleRequestCommonParameters
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
34331
diff
changeset
|
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
|
282 | g_free(buf); |
| 5309 | 283 | } |
|
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
|
284 | |
|
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
|
285 | /* 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
|
286 | * 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
|
287 | * 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
|
288 | /* 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
|
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 | 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
|
291 | 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
|
292 | { |
|
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 | 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
|
294 | 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
|
295 | |
|
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 | if (data->group != NULL) |
|
34728
8efd73063ecf
Renamed buddy list functions to more appropriate/simler names.
Ankit Vani <a@nevitus.org>
parents:
32438
diff
changeset
|
297 | group = purple_blist_find_group(data->group); |
|
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
|
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 | if (group != NULL) |
|
34728
8efd73063ecf
Renamed buddy list functions to more appropriate/simler names.
Ankit Vani <a@nevitus.org>
parents:
32438
diff
changeset
|
300 | buddy = purple_blist_find_buddy_in_group(data->session->account, data->who, group); |
|
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
|
301 | else |
|
34728
8efd73063ecf
Renamed buddy list functions to more appropriate/simler names.
Ankit Vani <a@nevitus.org>
parents:
32438
diff
changeset
|
302 | buddy = purple_blist_find_buddy(data->session->account, data->who); |
|
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
|
303 | |
|
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 | 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
|
305 | 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
|
306 | } |
|
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 | |
|
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 | 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
|
310 | 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
|
311 | { |
|
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 | #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
|
313 | /* 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
|
314 | 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
|
315 | #endif |
|
31351
5e660415a17d
Requests are closed with the PurpleConnection, so there's no need for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31294
diff
changeset
|
316 | MsnUserList *userlist = data->session->userlist; |
|
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
|
317 | |
|
31351
5e660415a17d
Requests are closed with the PurpleConnection, so there's no need for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31294
diff
changeset
|
318 | msn_userlist_add_buddy(userlist, data->who, data->group); |
|
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
|
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 | 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
|
321 | 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
|
322 | 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
|
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 | |
|
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 | 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
|
326 | 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
|
327 | { |
|
31351
5e660415a17d
Requests are closed with the PurpleConnection, so there's no need for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31294
diff
changeset
|
328 | MsnUserList *userlist = data->session->userlist; |
|
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
|
329 | 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
|
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 | |
|
31351
5e660415a17d
Requests are closed with the PurpleConnection, so there's no need for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31294
diff
changeset
|
332 | if (data->group == NULL) { |
|
5e660415a17d
Requests are closed with the PurpleConnection, so there's no need for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31294
diff
changeset
|
333 | msn_userlist_rem_buddy_from_list(userlist, data->who, MSN_LIST_FL); |
|
5e660415a17d
Requests are closed with the PurpleConnection, so there's no need for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31294
diff
changeset
|
334 | } else { |
|
5e660415a17d
Requests are closed with the PurpleConnection, so there's no need for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31294
diff
changeset
|
335 | g_free(data->group); |
|
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
|
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 | |
|
31351
5e660415a17d
Requests are closed with the PurpleConnection, so there's no need for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31294
diff
changeset
|
354 | data = g_new0(MsnAddRemData, 1); |
|
5e660415a17d
Requests are closed with the PurpleConnection, so there's no need for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31294
diff
changeset
|
355 | data->who = g_strdup(passport); |
|
5e660415a17d
Requests are closed with the PurpleConnection, so there's no need for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31294
diff
changeset
|
356 | data->group = g_strdup(group_name); |
|
5e660415a17d
Requests are closed with the PurpleConnection, so there's no need for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31294
diff
changeset
|
357 | data->session = session; |
|
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
|
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) |
|
31294
73607ab89c6f
Remove trailing whitespace
Richard Laager <rlaager@pidgin.im>
parents:
30961
diff
changeset
|
364 | { |
|
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
|
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 |
|
31294
73607ab89c6f
Remove trailing whitespace
Richard Laager <rlaager@pidgin.im>
parents:
30961
diff
changeset
|
372 | { |
|
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
|
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, |
|
34331
c8486462bb63
Request API refactoring: switch purple_request_action to PurpleRequestCommonParameters
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
32438
diff
changeset
|
380 | purple_request_cpar_from_account(account), |
|
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
|
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 | } |
|
31351
5e660415a17d
Requests are closed with the PurpleConnection, so there's no need for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31294
diff
changeset
|
388 |