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

Method OnUsbDriveSelectedX

Goldleaf/source/ui/ui_ExploreMenuLayout.cpp:127–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125 }
126
127 void ExploreMenuLayout::OnUsbDriveSelectedX(const UsbHsFsDevice drv) {
128 std::string info;
129 info += cfg::Strings.GetString(517) + " " + drive::FormatDriveFileSystemType(drv);
130
131 const auto option = g_MainApplication->DisplayDialog(drive::FormatDriveName(drv), info, { cfg::Strings.GetString(234), cfg::Strings.GetString(518) }, false);
132 if(option == 1) {
133 if(drive::UnmountDrive(drv)) {
134 this->ReloadMenu();
135 g_MainApplication->ShowNotification(cfg::Strings.GetString(519));
136 }
137 else {
138 g_MainApplication->ShowNotification(cfg::Strings.GetString(520));
139 }
140 }
141 }
142
143 void ExploreMenuLayout::OnRemotePcExploreSelected() {
144 if(usb::IsStateOk()) {

Callers

nothing calls this directly

Calls 5

ReloadMenuMethod · 0.95
UnmountDriveFunction · 0.85
DisplayDialogMethod · 0.80
ShowNotificationMethod · 0.80

Tested by

no test coverage detected