MCPcopy Create free account
hub / github.com/ashkulz/NppFTP / RenameProfileObject

Method RenameProfileObject

src/Windows/ProfilesWindow.cpp:168–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166}
167
168bool 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
183bool ProfilesWindow::OnProfileitemActivation(FileObject* item)
184{

Callers

nothing calls this directly

Calls 2

GetPathMethod · 0.45
SetNameMethod · 0.45

Tested by

no test coverage detected