Commit 97801e2c authored by Nerdopolis Turfwalker's avatar Nerdopolis Turfwalker Committed by Elvis Angelaccio

Add 'Sort By' and 'View Mode' into Dolphin file context menus

Summary: This adds the 'Sort By' and 'View Mode'  options into the context menu of Dolphin within the file browser. I keep looking for these option (especially sort by) in the Context Menu, and keep forgetting to go to the menu. It also makes the order of "View Mode" and "Sort By" options consistent in the control menu

Test Plan: Made sure that the options appeared when right clicking on an empty space.

Reviewers: #dolphin, ngraham, elvisangelaccio

Reviewed By: #dolphin, ngraham, elvisangelaccio

Subscribers: question, markg, elvisangelaccio, mmustac, rkflx, ngraham, kfm-devel, #dolphin

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D12911
parent 621cd24a
......@@ -363,6 +363,12 @@ void DolphinContextMenu::openViewportContextMenu()
addAction(pasteAction);
addSeparator();
// Insert 'Sort By' and 'View Mode'
addAction(m_mainWindow->actionCollection()->action(QStringLiteral("sort")));
addAction(m_mainWindow->actionCollection()->action(QStringLiteral("view_mode")));
addSeparator();
// Insert service actions
fileItemActions.addServiceActionsTo(this);
fileItemActions.addPluginActionsTo(this);
......
......@@ -877,8 +877,8 @@ void DolphinMainWindow::updateControlMenu()
menu->addSeparator();
}
added = addActionToMenu(ac->action(QStringLiteral("view_mode")), menu) |
addActionToMenu(ac->action(QStringLiteral("sort")), menu) |
added = addActionToMenu(ac->action(QStringLiteral("sort")), menu) |
addActionToMenu(ac->action(QStringLiteral("view_mode")), menu) |
addActionToMenu(ac->action(QStringLiteral("additional_info")), menu) |
addActionToMenu(ac->action(QStringLiteral("show_preview")), menu) |
addActionToMenu(ac->action(QStringLiteral("show_in_groups")), menu) |
......
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
<kpartgui name="dolphin" version="20">
<kpartgui name="dolphin" version="21">
<MenuBar>
<Menu name="file">
<Action name="new_menu" />
......@@ -21,8 +21,8 @@
<Action name="invert_selection" />
</Menu>
<Menu name="view">
<Action name="view_mode" />
<Action name="sort" />
<Action name="view_mode" />
<Action name="additional_info" />
<Action name="show_preview" />
<Action name="show_in_groups" />
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment