pidgin/pidgin

Rename PURPLE_REASON_INVALID_USERNAME to PURPLE_REASON_INVALID_SETTINGS, so it
cpw.resiak.disconnectreason
2007-10-02, Will Thompson
77550b97ebf2
Parents 058f341481a5
Children 9953aab20656
Rename PURPLE_REASON_INVALID_USERNAME to PURPLE_REASON_INVALID_SETTINGS, so it
can be used when a server parameter is required but not supplied (for example).
--- a/libpurple/connection.h Tue Oct 02 15:57:32 2007 +0000
+++ b/libpurple/connection.h Tue Oct 02 17:16:16 2007 +0000
@@ -79,12 +79,16 @@
*/
PURPLE_REASON_NAME_IN_USE,
- /** The username for the account isn't valid.
+ /** The username/server/other preference for the account isn't valid.
+ * For instance, on IRC the screen name cannot contain white space.
+ * This reason should not be used for incorrect passwords etc: use
+ * #PURPLE_REASON_AUTHENTICATION_FAILED for that.
+ *
* @todo This reason really shouldn't be necessary. Usernames and
* other account preferences should be validated when the
* account is created.
*/
- PURPLE_REASON_INVALID_USERNAME,
+ PURPLE_REASON_INVALID_SETTINGS,
/** The server did not provide a SSL certificate. */
PURPLE_REASON_CERT_NOT_PROVIDED,
--- a/libpurple/protocols/irc/irc.c Tue Oct 02 15:57:32 2007 +0000
+++ b/libpurple/protocols/irc/irc.c Tue Oct 02 17:16:16 2007 +0000
@@ -297,7 +297,7 @@
gc->flags |= PURPLE_CONNECTION_NO_NEWLINES;
if (strpbrk(username, " \t\v\r\n") != NULL) {
- purple_connection_error_reason (gc, PURPLE_REASON_INVALID_USERNAME,
+ purple_connection_error_reason (gc, PURPLE_REASON_INVALID_SETTINGS,
_("IRC nicks may not contain whitespace"));
return;
}
--- a/libpurple/protocols/irc/msgs.c Tue Oct 02 15:57:32 2007 +0000
+++ b/libpurple/protocols/irc/msgs.c Tue Oct 02 17:16:16 2007 +0000
@@ -911,7 +911,7 @@
} else {
gc->wants_to_die = TRUE;
- purple_connection_error_reason (gc, PURPLE_REASON_INVALID_USERNAME,
+ purple_connection_error_reason (gc, PURPLE_REASON_INVALID_SETTINGS,
_("Your selected account name was rejected by the server. It probably contains invalid characters."));
}
}
--- a/libpurple/protocols/jabber/jabber.c Tue Oct 02 15:57:32 2007 +0000
+++ b/libpurple/protocols/jabber/jabber.c Tue Oct 02 17:16:16 2007 +0000
@@ -588,13 +588,13 @@
js->old_length = -1;
if(!js->user) {
- purple_connection_error_reason (gc, PURPLE_REASON_INVALID_USERNAME,
+ purple_connection_error_reason (gc, PURPLE_REASON_INVALID_SETTINGS,
_("Invalid XMPP ID"));
return;
}
if (!js->user->domain || *(js->user->domain) == '\0') {
- purple_connection_error_reason (gc, PURPLE_REASON_INVALID_USERNAME,
+ purple_connection_error_reason (gc, PURPLE_REASON_INVALID_SETTINGS,
_("Invalid XMPP ID. Domain must be set."));
return;
}
@@ -1079,7 +1079,7 @@
js->old_length = -1;
if(!js->user) {
- purple_connection_error_reason (gc, PURPLE_REASON_INVALID_USERNAME,
+ purple_connection_error_reason (gc, PURPLE_REASON_INVALID_SETTINGS,
_("Invalid XMPP ID"));
return;
}
--- a/libpurple/protocols/sametime/sametime.c Tue Oct 02 15:57:32 2007 +0000
+++ b/libpurple/protocols/sametime/sametime.c Tue Oct 02 17:16:16 2007 +0000
@@ -3646,7 +3646,7 @@
static void prompt_host_cancel_cb(PurpleConnection *gc) {
const char *msg = _("No Sametime Community Server specified");
- purple_connection_error_reason(gc, PURPLE_REASON_INVALID_USERNAME, msg);
+ purple_connection_error_reason(gc, PURPLE_REASON_INVALID_SETTINGS, msg);
}