Mercurial > pidgin
comparison libpurple/protocols/myspace/myspace.c @ 19630:39d620a93907
Use purple_connection_set_display_name() to set the display name to the
username, instead of setting a local alias if one isn't set. This allows
the user to set a local alias if they want, and if it is unset, the
displayed name will revert back to the username instead of email address.
Closes #2793.
author | Jeffrey Connelly <jaconnel@calpoly.edu> |
---|---|
date | Tue, 11 Sep 2007 23:50:37 +0000 |
parents | 9968fff36e20 |
children | 0c83ec8cf17c |
comparison
equal
deleted
inserted
replaced
19629:9968fff36e20 | 19630:39d620a93907 |
---|---|
1525 /* We now know are our own username, only after we're logged in.. | 1525 /* We now know are our own username, only after we're logged in.. |
1526 * which is weird, but happens because you login with your email | 1526 * which is weird, but happens because you login with your email |
1527 * address and not username. Will be freed in msim_session_destroy(). */ | 1527 * address and not username. Will be freed in msim_session_destroy(). */ |
1528 session->username = msim_msg_get_string(msg, "uniquenick"); | 1528 session->username = msim_msg_get_string(msg, "uniquenick"); |
1529 | 1529 |
1530 /* If a local alias wasn't set, set it to user's username. */ | 1530 /* Set display name to username (otherwise will show email address) */ |
1531 if (!session->account->alias || !strlen(session->account->alias)) | 1531 purple_connection_set_display_name(session->gc, session->username); |
1532 purple_account_set_alias(session->account, session->username); | |
1533 | 1532 |
1534 /* The session is now set up, ready to be connected. This emits the | 1533 /* The session is now set up, ready to be connected. This emits the |
1535 * signedOn signal, so clients can now do anything with msimprpl, and | 1534 * signedOn signal, so clients can now do anything with msimprpl, and |
1536 * we're ready for it (session key, userid, username all setup). */ | 1535 * we're ready for it (session key, userid, username all setup). */ |
1537 purple_connection_update_progress(session->gc, _("Connected"), 3, 4); | 1536 purple_connection_update_progress(session->gc, _("Connected"), 3, 4); |