| 1 /* |
1 /* |
| 2 * gaim - Gadu-Gadu Protocol Plugin |
2 * gaim - Gadu-Gadu Protocol Plugin |
| 3 * $Id: gg.c 3046 2002-03-12 17:21:46Z seanegan $ |
3 * $Id: gg.c 3114 2002-03-28 18:22:49Z seanegan $ |
| 4 * |
4 * |
| 5 * Copyright (C) 2001 Arkadiusz Mi¶kiewicz <misiek@pld.ORG.PL> |
5 * Copyright (C) 2001 Arkadiusz Mi¶kiewicz <misiek@pld.ORG.PL> |
| 6 * |
6 * |
| 7 * This program is free software; you can redistribute it and/or modify |
7 * This program is free software; you can redistribute it and/or modify |
| 8 * it under the terms of the GNU General Public License as published by |
8 * it under the terms of the GNU General Public License as published by |
| 189 break; |
189 break; |
| 190 case GG_FAILURE_READING: |
190 case GG_FAILURE_READING: |
| 191 g_snprintf(msg, sizeof(msg), _("Error while reading from socket.")); |
191 g_snprintf(msg, sizeof(msg), _("Error while reading from socket.")); |
| 192 break; |
192 break; |
| 193 case GG_FAILURE_WRITING: |
193 case GG_FAILURE_WRITING: |
| 194 g_snprintf(msg, sizeof(msg), _("Error while writting to socket.")); |
194 g_snprintf(msg, sizeof(msg), _("Error while writing to socket.")); |
| 195 break; |
195 break; |
| 196 case GG_FAILURE_PASSWORD: |
196 case GG_FAILURE_PASSWORD: |
| 197 g_snprintf(msg, sizeof(msg), _("Authentification failed.")); |
197 g_snprintf(msg, sizeof(msg), _("Authentication failed.")); |
| 198 break; |
198 break; |
| 199 default: |
199 default: |
| 200 g_snprintf(msg, sizeof(msg), _("Unknown Error Code.")); |
200 g_snprintf(msg, sizeof(msg), _("Unknown Error Code.")); |
| 201 break; |
201 break; |
| 202 } |
202 } |
| 589 { |
589 { |
| 590 struct agg_data *gd = (struct agg_data *)gc->proto_data; |
590 struct agg_data *gd = (struct agg_data *)gc->proto_data; |
| 591 gchar *imsg; |
591 gchar *imsg; |
| 592 |
592 |
| 593 if (invalid_uin(who)) { |
593 if (invalid_uin(who)) { |
| 594 do_error_dialog(_("You are trying to send message to invalid Gadu-Gadu UIN!"), |
594 do_error_dialog(_("You are trying to send a message to an invalid Gadu-Gadu UIN."), |
| 595 _("Gadu-Gadu Error")); |
595 _("Gadu-Gadu Error")); |
| 596 return -1; |
596 return -1; |
| 597 } |
597 } |
| 598 |
598 |
| 599 if (strlen(msg) > 0) { |
599 if (strlen(msg) > 0) { |
| 810 } |
810 } |
| 811 |
811 |
| 812 static void export_buddies_server_results(struct gaim_connection *gc, gchar *webdata) |
812 static void export_buddies_server_results(struct gaim_connection *gc, gchar *webdata) |
| 813 { |
813 { |
| 814 if (strstr(webdata, "put_success:")) { |
814 if (strstr(webdata, "put_success:")) { |
| 815 do_error_dialog(_("Buddies List sucessfully transfered into Server"), |
815 do_error_dialog(_("Buddy List successfully transferred to server"), |
| 816 _("Gadu-Gadu Information")); |
816 _("Gadu-Gadu Information")); |
| 817 return; |
817 return; |
| 818 } |
818 } |
| 819 |
819 |
| 820 debug_printf("export_buddies_server_results: webdata [%s]\n", webdata); |
820 debug_printf("export_buddies_server_results: webdata [%s]\n", webdata); |
| 821 do_error_dialog(_("Couldn't transfer Buddies List into Server"), _("Gadu-Gadu Error")); |
821 do_error_dialog(_("Couldn't transfer Buddy List to server"), _("Gadu-Gadu Error")); |
| 822 } |
822 } |
| 823 |
823 |
| 824 static void delete_buddies_server_results(struct gaim_connection *gc, gchar *webdata) |
824 static void delete_buddies_server_results(struct gaim_connection *gc, gchar *webdata) |
| 825 { |
825 { |
| 826 if (strstr(webdata, "put_success:")) { |
826 if (strstr(webdata, "put_success:")) { |
| 827 do_error_dialog(_("Buddies List sucessfully deleted from Server"), |
827 do_error_dialog(_("Buddy List sucessfully deleted from server"), |
| 828 _("Gadu-Gadu Information")); |
828 _("Gadu-Gadu Information")); |
| 829 return; |
829 return; |
| 830 } |
830 } |
| 831 |
831 |
| 832 debug_printf("delete_buddies_server_results: webdata [%s]\n", webdata); |
832 debug_printf("delete_buddies_server_results: webdata [%s]\n", webdata); |
| 833 do_error_dialog(_("Couldn't delete Buddies List from Server"), _("Gadu-Gadu Error")); |
833 do_error_dialog(_("Couldn't delete Buddy List from server"), _("Gadu-Gadu Error")); |
| 834 } |
834 } |
| 835 |
835 |
| 836 static void password_change_server_results(struct gaim_connection *gc, gchar *webdata) |
836 static void password_change_server_results(struct gaim_connection *gc, gchar *webdata) |
| 837 { |
837 { |
| 838 if (strstr(webdata, "reg_success:")) { |
838 if (strstr(webdata, "reg_success:")) { |
| 839 do_error_dialog(_("Password changed sucessfully"), |
839 do_error_dialog(_("Password changed successfully"), |
| 840 _("Gadu-Gadu Information")); |
840 _("Gadu-Gadu Information")); |
| 841 return; |
841 return; |
| 842 } |
842 } |
| 843 |
843 |
| 844 debug_printf("delete_buddies_server_results: webdata [%s]\n", webdata); |
844 debug_printf("delete_buddies_server_results: webdata [%s]\n", webdata); |