MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / OnBrowserRenameMenuItem

Method OnBrowserRenameMenuItem

src/gui/browserpanel.cc:502–517  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

500 }
501
502 void OnBrowserRenameMenuItem(wxCommandEvent& event) override
503 {
504 auto item = browserTree->GetSelection();
505 auto node = _filesystemModel->Find(item);
506
507 FileRenameDialog d(this, wxID_ANY);
508 d.oldNameText->SetValue(node->dirent->path.to_str());
509 d.newNameText->SetValue(node->dirent->path.to_str());
510 d.newNameText->SetFocus();
511 d.buttons_OK->SetDefault();
512 if (d.ShowModal() != wxID_OK)
513 return;
514
515 ActuallyMoveFile(
516 node->dirent->path, Path(d.newNameText->GetValue().ToStdString()));
517 }
518
519 void ActuallyMoveFile(const Path& oldPath, Path newPath)
520 {

Callers

nothing calls this directly

Calls 5

FindMethod · 0.80
SetValueMethod · 0.80
to_strMethod · 0.80
GetValueMethod · 0.80
PathClass · 0.70

Tested by

no test coverage detected