comparison src/protocols/jabber/jabber.c @ 3427:8fa61405af2b

[gaim-migrate @ 3453] Who never commits anything *now*, Etan? I changed most of the error message text around. If you think any of it should be different, just let me know, or send a patch. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Sun, 25 Aug 2002 10:51:24 +0000
parents 000546860da7
children b48065e52337
comparison
equal deleted inserted replaced
3426:ccbcc11a68c2 3427:8fa61405af2b
945 { 945 {
946 gjconn gjc = ((struct jabber_data *)gc->proto_data)->gjc; 946 gjconn gjc = ((struct jabber_data *)gc->proto_data)->gjc;
947 947
948 if(strcmp(old, gjc->pass)) 948 if(strcmp(old, gjc->pass))
949 { 949 {
950 do_error_dialog(_("Incorrect current password! Password NOT Changed!"), 950 do_error_dialog(_("Unable to change password."),
951 _("Password Change Error!")); 951 _("The current password you entered is incorrect. Your password has "
952 "not been changed."), GAIM_ERROR);
952 } 953 }
953 else if(!strcmp(old, new)) 954 else if(!strcmp(old, new))
954 { 955 {
955 do_error_dialog(_("New password same as old password! Password NOT Changed!"), 956 do_error_dialog(_("Unable to change password"),
956 _("Password Change Error!")); 957 _("The new password you entered is the same as your current passord. "
958 "Your password remains the same."), GAIM_ERROR);
957 } 959 }
958 else 960 else
959 { 961 {
960 xmlnode x, y, z; 962 xmlnode x, y, z;
961 char *id; 963 char *id;
1340 type = xmlnode_get_attrib(y, "code"); 1342 type = xmlnode_get_attrib(y, "code");
1341 msg = xmlnode_get_data(y); 1343 msg = xmlnode_get_data(y);
1342 } 1344 }
1343 1345
1344 if (msg) { 1346 if (msg) {
1345 from = g_strdup_printf("Error %s", type ? type : ""); 1347 from = g_strdup_printf(_("Jabber Error %s"), type ? type : "");
1346 do_error_dialog(msg, from); 1348 do_error_dialog(from, msg, GAIM_ERROR);
1347 g_free(from); 1349 g_free(from);
1348 } 1350 }
1349 } else if (!strcasecmp(type, "groupchat")) { 1351 } else if (!strcasecmp(type, "groupchat")) {
1350 struct jabber_chat *jc; 1352 struct jabber_chat *jc;
1351 static int i = 0; 1353 static int i = 0;
1650 if (!strcmp(type, "unsubscribed")) { 1652 if (!strcmp(type, "unsubscribed")) {
1651 xmlnode y; 1653 xmlnode y;
1652 char *status; 1654 char *status;
1653 if((y = xmlnode_get_tag(p->x, "status")) && (status = xmlnode_get_data(y)) && 1655 if((y = xmlnode_get_tag(p->x, "status")) && (status = xmlnode_get_data(y)) &&
1654 !strcmp(status, "Not Found")) { 1656 !strcmp(status, "Not Found")) {
1655 char *msg = g_strdup_printf("%s: \"%s\"", _("No such user"), 1657 char *msg = g_strdup_printf(_("The Jabber user %s does not exist and was therefore "
1656 xmlnode_get_attrib(p->x, "from")); 1658 "not added to your roster."),
1657 do_error_dialog(msg, _("Jabber Error")); 1659 xmlnode_get_attrib(p->x, "from"));
1660 do_error_dialog(_("No such user."), msg, GAIM_ERROR );
1658 g_free(msg); 1661 g_free(msg);
1659 } 1662 }
1660 } 1663 }
1661 1664
1662 xmlnode_free(g); 1665 xmlnode_free(g);
2030 jabber_handlevcard(gjc, NULL, from); 2033 jabber_handlevcard(gjc, NULL, from);
2031 } else if(!strcmp((char *) val, "change_password")) { 2034 } else if(!strcmp((char *) val, "change_password")) {
2032 char buf[BUF_LONG]; 2035 char buf[BUF_LONG];
2033 sprintf(buf, _("Password successfully changed.")); 2036 sprintf(buf, _("Password successfully changed."));
2034 2037
2035 do_error_dialog(buf, _("Password Change")); 2038 do_error_dialog(buf, NULL, GAIM_INFO);
2036 } 2039 }
2037 } 2040 }
2038 } 2041 }
2039 2042
2040 } else if (jpacket_subtype(p) == JPACKET__ERROR) { 2043 } else if (jpacket_subtype(p) == JPACKET__ERROR) {
2048 errmsg = xmlnode_get_data(xerr); 2051 errmsg = xmlnode_get_data(xerr);
2049 if (xmlnode_get_attrib(xerr, "code")) 2052 if (xmlnode_get_attrib(xerr, "code"))
2050 errcode = atoi(xmlnode_get_attrib(xerr, "code")); 2053 errcode = atoi(xmlnode_get_attrib(xerr, "code"));
2051 } 2054 }
2052 2055
2053 from = g_strdup_printf("Error %d (%s)", errcode, from); 2056 from = g_strdup_printf("Jabber Error %d (%s)", errcode, from);
2054 do_error_dialog(errmsg, from); 2057 do_error_dialog(from, errmsg, GAIM_ERROR);
2055 g_free(from); 2058 g_free(from);
2056 2059
2057 } 2060 }
2058 2061
2059 break; 2062 break;
2407 */ 2410 */
2408 if(!name || !strcmp(gc->username, name)) 2411 if(!name || !strcmp(gc->username, name))
2409 return; 2412 return;
2410 2413
2411 if((realwho = get_realwho(gjc, name, FALSE, &gjid)) == NULL) { 2414 if((realwho = get_realwho(gjc, name, FALSE, &gjid)) == NULL) {
2412 char *msg = g_strdup_printf("%s: \"%s\"", _("Invalid Jabber I.D."), name); 2415 char *msg = g_strdup_printf(_("The user %s is an invalid Jabber I.D. and was "
2413 do_error_dialog(msg, _("Jabber Error")); 2416 "therefore not added."), name);
2417 do_error_dialog("Unable to add buddy.", _("Jabber Error"), GAIM_ERROR);
2414 g_free(msg); 2418 g_free(msg);
2415 jabber_remove_gaim_buddy(gc, name); 2419 jabber_remove_gaim_buddy(gc, name);
2416 return; 2420 return;
2417 } 2421 }
2418 2422
2675 2679
2676 realwho = create_valid_jid(data->data, data->next->data, data->next->next->data); 2680 realwho = create_valid_jid(data->data, data->next->data, data->next->next->data);
2677 debug_printf("%s\n", realwho); 2681 debug_printf("%s\n", realwho);
2678 2682
2679 if((gjid = gaim_jid_new(realwho)) == NULL) { 2683 if((gjid = gaim_jid_new(realwho)) == NULL) {
2680 char *msg = g_strdup_printf("%s: \"%s\"", _("Invalid Jabber I.D."), realwho); 2684 char *msg = g_strdup_printf("The Jabber I.D. %s is invalid.", realwho);
2681 do_error_dialog(msg, _("Jabber Error")); 2685 do_error_dialog(_("Unable to join chat"), msg, GAIM_ERROR);
2682 g_free(msg); 2686 g_free(msg);
2683 g_free(realwho); 2687 g_free(realwho);
2684 return; 2688 return;
2685 } 2689 }
2686 2690