| 166 | } |
| 167 | |
| 168 | bool ProfilesWindow::RenameProfileObject(FileObject* fo, const TCHAR* newName) |
| 169 | { |
| 170 | ProfileObject* profileObject = dynamic_cast<ProfileObject*>(fo); |
| 171 | if (profileObject == nullptr) return false; |
| 172 | |
| 173 | char* lastPath = SU::strdup(profileObject->GetPath()); |
| 174 | if (profileObject->SetName(SU::TCharToUtf8(newName)) < 0) |
| 175 | return true; |
| 176 | if(strcmp(lastPath,profileObject->GetPath()) == 0) |
| 177 | m_lastUsedProfile = profileObject->GetPath(); |
| 178 | |
| 179 | return true; |
| 180 | |
| 181 | } |
| 182 | |
| 183 | bool ProfilesWindow::OnProfileitemActivation(FileObject* item) |
| 184 | { |