Commit d1b8b4c2 authored by Tomaz  Canabrava's avatar Tomaz Canabrava

Move the actions to open_with to the top

parent 63898981
......@@ -614,6 +614,16 @@ void FileFilter::HotSpot::setupMenu(QMenu *menu)
_menuActions.setParent(this);
_menuActions.setItemListProperties(itemProperties);
_menuActions.addOpenWithActionsTo(menu);
// Here we added the actions to the last part of the menu, but we need to move them up.
// TODO: As soon as addOpenWithActionsTo accepts a index, change this.
QAction *firstAction = menu->actions().at(0);
for (auto *action : menu->actions()) {
if (action->text().toLower().remove(QLatin1Char('&')).contains(i18n("open with"))) {
menu->removeAction(action);
menu->insertAction(firstAction, action);
}
}
}
// Static variables for the HotSpot
......
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