| 73 | } |
| 74 | |
| 75 | void AccountLayout::optsRename_DefaultKey() { |
| 76 | const auto name = ShowKeyboard(cfg::Strings.GetString(213), this->cur_prof_base.nickname, 10, sizeof(this->cur_prof_base.nickname) - 1); |
| 77 | if(!name.empty()) { |
| 78 | strcpy(this->cur_prof_base.nickname, name.c_str()); |
| 79 | const auto rc = acc::EditUser([&](AccountProfileBase *prof_base, AccountUserData *_user_data) { |
| 80 | memcpy(prof_base, &this->cur_prof_base, sizeof(this->cur_prof_base)); |
| 81 | }); |
| 82 | if(R_SUCCEEDED(rc)) { |
| 83 | g_MainApplication->LoadMenuHead(cfg::Strings.GetString(212) + " " + name); |
| 84 | g_MainApplication->ShowNotification(cfg::Strings.GetString(214) + " \'" + name + "\'."); |
| 85 | } |
| 86 | else { |
| 87 | HandleResult(rc, cfg::Strings.GetString(215)); |
| 88 | } |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | void AccountLayout::optsIcon_DefaultKey() { |
| 93 | const auto base_icon_path = GLEAF_PATH_USER_DATA_DIR "/" + util::FormatHex128(acc::GetSelectedUser()) + ".jpg"; |
nothing calls this directly
no test coverage detected