Mercurial > pidgin
comparison src/connection.c @ 6231:1fc158d6ebdb
[gaim-migrate @ 6724]
New accounts added using the login window are now correctly saved.
You can now use gaim -l to sign on accounts on prpls with no passwords
or with optional passwords.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 19 Jul 2003 18:15:06 +0000 |
parents | e391813214a6 |
children | 3ac224953483 |
comparison
equal
deleted
inserted
replaced
6230:0fef71e24ad5 | 6231:1fc158d6ebdb |
---|---|
125 | 125 |
126 if (gaim_connection_get_state(gc) != GAIM_DISCONNECTED) | 126 if (gaim_connection_get_state(gc) != GAIM_DISCONNECTED) |
127 return; | 127 return; |
128 | 128 |
129 if (!(prpl_info->options & OPT_PROTO_NO_PASSWORD) && | 129 if (!(prpl_info->options & OPT_PROTO_NO_PASSWORD) && |
130 !(prpl_info->options & OPT_PROTO_PASSWORD_OPTIONAL) && | 130 !(prpl_info->options & OPT_PROTO_PASSWORD_OPTIONAL) && |
131 gaim_account_get_password(account) == NULL) { | 131 gaim_account_get_password(account) == NULL) { |
132 | |
133 gchar *primary; | 132 gchar *primary; |
133 gchar *escaped; | |
134 const gchar *username = gaim_account_get_username(account); | |
135 | |
134 gaim_debug(GAIM_DEBUG_INFO, "connection", "Requesting password\n"); | 136 gaim_debug(GAIM_DEBUG_INFO, "connection", "Requesting password\n"); |
135 primary = g_strdup_printf(_("Enter password for %s"), | 137 escaped = g_markup_escape_text(username, strlen(username)); |
136 gaim_account_get_username(account)); | 138 primary = g_strdup_printf(_("Enter password for %s"), escaped); |
137 gaim_request_input(gc, NULL, primary, NULL, NULL, FALSE, TRUE, | 139 gaim_request_input(gc, NULL, primary, NULL, NULL, FALSE, TRUE, |
138 _("OK"), G_CALLBACK(request_pass_ok_cb), | 140 _("OK"), G_CALLBACK(request_pass_ok_cb), |
139 _("Cancel"), NULL, account); | 141 _("Cancel"), NULL, account); |
140 g_free(primary); | 142 g_free(primary); |
143 g_free(escaped); | |
141 gaim_connection_destroy(gc); | 144 gaim_connection_destroy(gc); |
142 | 145 |
143 return; | 146 return; |
144 } | 147 } |
145 | 148 |