| 748 | } |
| 749 | |
| 750 | void BrowserLayout::HandleFileDirectly(const std::string &path) { |
| 751 | const auto dir = fs::GetBaseDirectory(path); |
| 752 | const auto file_name = fs::GetBaseName(path); |
| 753 | this->ChangePartitionRemotePcDrive(dir); |
| 754 | |
| 755 | auto &items = this->browse_menu->GetItems(); |
| 756 | const auto it = std::find_if(items.begin(), items.end(), [&](pu::ui::elm::MenuItem::Ref &item) -> bool { |
| 757 | return item->GetName() == file_name; |
| 758 | }); |
| 759 | if(it == items.end()) { |
| 760 | return; |
| 761 | } |
| 762 | |
| 763 | const auto idx = std::distance(items.begin(), it); |
| 764 | this->browse_menu->SetSelectedIndex(idx); |
| 765 | this->fsItems_DefaultKey(file_name); |
| 766 | } |
| 767 | |
| 768 | void BrowserLayout::PromptDeleteFile(const std::string &path) { |
| 769 | if(this->CheckWriteAccess()) { |
no test coverage detected