Skip to content

Commit

Permalink
Remove path information in context menu
Browse files Browse the repository at this point in the history
  • Loading branch information
sakertooth committed Mar 2, 2025
1 parent 0369726 commit 98b73e9
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/gui/FileBrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -575,10 +575,6 @@ void FileBrowserTreeWidget::contextMenuEvent(QContextMenuEvent* e)
case TypeFileItem: {
auto file = dynamic_cast<FileItem*>(item);

auto pathHeader = new QAction(file->fullName());
pathHeader->setDisabled(true);
contextMenu.addAction(pathHeader);

if (file->isTrack())
{
contextMenu.addAction(
Expand All @@ -587,7 +583,7 @@ void FileBrowserTreeWidget::contextMenuEvent(QContextMenuEvent* e)
}

contextMenu.addAction(QIcon(embed::getIconPixmap("folder")), tr("Show in %1").arg(fileManager),
[=] { FileRevealer::reveal(file->fullName()); });
[file] { FileRevealer::reveal(file->fullName()); });

auto songEditorHeader = new QAction(tr("Song Editor"), nullptr);
songEditorHeader->setDisabled(true);
Expand All @@ -602,14 +598,8 @@ void FileBrowserTreeWidget::contextMenuEvent(QContextMenuEvent* e)
}
case TypeDirectoryItem: {
auto dir = dynamic_cast<Directory*>(item);

auto pathHeader = new QAction(dir->fullName());
pathHeader->setDisabled(true);

contextMenu.addAction(pathHeader);

contextMenu.addAction(QIcon(embed::getIconPixmap("folder")), tr("Open in %1").arg(fileManager),
[=] { FileRevealer::openDir(dir->fullName()); });
[dir] { FileRevealer::openDir(dir->fullName()); });
break;
}
}
Expand Down

0 comments on commit 98b73e9

Please sign in to comment.