diff options
| author | James Cook <james@lindenlab.com> | 2010-05-24 16:58:49 -0700 |
|---|---|---|
| committer | James Cook <james@lindenlab.com> | 2010-05-24 16:58:49 -0700 |
| commit | 3b0bb8159605685befd79784ddcf6feadee36b67 (patch) | |
| tree | a0c7ad659f0def0de6d1043542f56ecc25af3c19 /indra/newview/llpanelme.cpp | |
| parent | 01fa1379931ea41813e33a4228dcb8a156f609e7 (diff) | |
DEV-50013 Add "Reset" button to Set Name dialog
Reviewed with Richard
Diffstat (limited to 'indra/newview/llpanelme.cpp')
| -rw-r--r-- | indra/newview/llpanelme.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/newview/llpanelme.cpp b/indra/newview/llpanelme.cpp index c1d02fae39..544ca47da4 100644 --- a/indra/newview/llpanelme.cpp +++ b/indra/newview/llpanelme.cpp @@ -347,12 +347,22 @@ void LLPanelMyProfileEdit::onCacheSetName(bool success, void LLPanelMyProfileEdit::onDialogSetName(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - if (option == 0) + if (option == 0 || option == 1) { LLUUID agent_id = notification["payload"]["agent_id"]; if (agent_id.isNull()) return; - std::string display_name_utf8 = response["display_name"].asString(); + std::string display_name_utf8; + if (option == 0) + { + // user gave us a name + display_name_utf8 = response["display_name"].asString(); + } + else + { + // reset back to People API default + display_name_utf8 = ""; + } const U32 DISPLAY_NAME_MAX_LENGTH = 31; // characters, not bytes LLWString display_name_wstr = utf8string_to_wstring(display_name_utf8); |
