Commit e633a8c2 authored by Nate Graham's avatar Nate Graham
Browse files

[Notifications] Move "Open With" items into the top group of the menu

Summary:
Move the {nav Open With} items into the top group of the context menu for notifications with images or files that you can open and see in the filesystem. This makes it consistent with Dolphin, which now has all the Open in/with items grouped together at the top of the menu.

I didn't move the {nav Open With} items all the way to the top because my sense is that {nav Open containing folder} is the more common action and deserves to be the top item. Also, putting it below the {nav Open With} actions would result in an extra ugly separator.

Test Plan: {F5848641}

Reviewers: broulik

Reviewed By: broulik

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D12882
parent 791a8275
......@@ -139,7 +139,11 @@ void Thumbnailer::showContextMenu(int x, int y, const QString &path, QQuickItem
});
}
menu->addSeparator();
KFileItemActions *actions = new KFileItemActions(menu);
KFileItemListProperties itemProperties(KFileItemList({fileItem}));
actions->setItemListProperties(itemProperties);
actions->addOpenWithActionsTo(menu);
// KStandardAction? But then the Ctrl+C shortcut makes no sense in this context
QAction *copyAction = menu->addAction(QIcon::fromTheme(QStringLiteral("edit-copy")), i18n("&Copy"));
......@@ -150,11 +154,6 @@ void Thumbnailer::showContextMenu(int x, int y, const QString &path, QQuickItem
QApplication::clipboard()->setMimeData(data);
});
KFileItemActions *actions = new KFileItemActions(menu);
KFileItemListProperties itemProperties(KFileItemList({fileItem}));
actions->setItemListProperties(itemProperties);
actions->addOpenWithActionsTo(menu);
actions->addServiceActionsTo(menu);
actions->addPluginActionsTo(menu);
......
Supports Markdown
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