Skip to content

Commit

Permalink
UI: only let the drive letters appear in This PC
Browse files Browse the repository at this point in the history
requested in #515 to be more consistent with windows explorer

the search paths were moved to Quick Access for this

this will also basically remove the This PC section from linux and mac for now (maybe the root and home should be there?)
  • Loading branch information
mgerhardy committed Sep 15, 2024
1 parent 351a1b8 commit 0114a2a
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/modules/ui/FileDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,10 +340,6 @@ void FileDialog::quickAccessPanel(video::OpenFileMode type, const core::String &
}
quickAccessEntry(index++, type, dir, contentRegionWidth, folderNames[n], folderIcons[n]);
}
ImGui::TreePop();
}

if (ImGui::TreeNode(_("This PC"))) {
const io::Paths& paths = _app->filesystem()->paths();
for (const core::String& path : paths) {
const core::String& absPath = _app->filesystem()->absolutePath(path);
Expand All @@ -352,12 +348,18 @@ void FileDialog::quickAccessPanel(video::OpenFileMode type, const core::String &
}
quickAccessEntry(index++, type, absPath, contentRegionWidth, nullptr, ICON_LC_FOLDER);
}
for (const core::String &path : _app->filesystem()->otherPaths()) {
quickAccessEntry(index++, type, path, contentRegionWidth);
}
ImGui::TreePop();
}

if (!_app->filesystem()->otherPaths().empty()) {
if (ImGui::TreeNode(_("This PC"))) {
for (const core::String &path : _app->filesystem()->otherPaths()) {
quickAccessEntry(index++, type, path, contentRegionWidth);
}
ImGui::TreePop();
}
}

if (ImGui::TreeNode(_("Bookmarks"))) {
if (ImGui::BeginDragDropTarget()) {
if (const ImGuiPayload * payload = ImGui::AcceptDragDropPayload(FILEDIALOGBOOKMARKDND)) {
Expand Down

0 comments on commit 0114a2a

Please sign in to comment.