MCPcopy Create free account
hub / github.com/XorTroll/Goldleaf / CheckWriteAccess

Method CheckWriteAccess

Goldleaf/source/ui/ui_BrowserLayout.cpp:789–801  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

787 }
788
789 bool BrowserLayout::CheckWriteAccess() {
790 if(this->cur_exp->IsWriteAccessBlocked()) {
791 g_MainApplication->ShowNotification(cfg::Strings.GetString(476));
792 return false;
793 }
794 else if(this->cur_exp->ShouldWarnOnWriteAccess()) {
795 const auto option = g_MainApplication->DisplayDialog(cfg::Strings.GetString(50), cfg::Strings.GetString(51), { cfg::Strings.GetString(111), cfg::Strings.GetString(18) }, true);
796 return option == 0;
797 }
798 else {
799 return true;
800 }
801 }
802
803 void BrowserLayout::fsItems_DefaultKey(const std::string &item) {
804 const auto full_item = this->cur_exp->FullPathFor(item);

Callers 3

OnFileSelectedMethod · 0.95
OnDirectorySelectedMethod · 0.95
PromptDeleteFileMethod · 0.95

Calls 4

IsWriteAccessBlockedMethod · 0.80
ShowNotificationMethod · 0.80
DisplayDialogMethod · 0.80

Tested by

no test coverage detected