Commit 4573303a authored by Eric Armbruster's avatar Eric Armbruster Committed by Christoph Cullmann
Browse files

Set system-run as open with icon

As is done in kio
parent 7fa9fb9f
......@@ -248,6 +248,7 @@ void KateFileBrowser::contextMenuAboutToShow(const KFileItem &item, QMenu *menu)
{
if (m_openWithMenu == nullptr) {
m_openWithMenu = new KateFileBrowserOpenWithMenu(i18nc("@action:inmenu", "Open With"), this);
m_openWithMenu->setIcon(QIcon::fromTheme(QStringLiteral("system-run")));
menu->insertMenu(menu->actions().at(1), m_openWithMenu);
menu->insertSeparator(menu->actions().at(2));
connect(m_openWithMenu, &QMenu::aboutToShow, this, &KateFileBrowser::fixOpenWithMenu);
......
......@@ -344,6 +344,7 @@ void KateFileTree::contextMenuEvent(QContextMenuEvent *event)
QMenu menu;
if (isFile) {
QMenu *openWithMenu = menu.addMenu(i18nc("@action:inmenu", "Open With"));
openWithMenu->setIcon(QIcon::fromTheme(QStringLiteral("system-run")));
connect(openWithMenu, &QMenu::aboutToShow, this, [this, openWithMenu]() {
slotFixOpenWithMenu(openWithMenu);
});
......
......@@ -90,6 +90,7 @@ void KateProjectTreeViewContextMenu::exec(const QString &filename, const QModelI
*/
menu.addSeparator();
QMenu *openWithMenu = menu.addMenu(i18n("Open With"));
openWithMenu->setIcon(QIcon::fromTheme(QStringLiteral("system-run")));
QMimeType mimeType = QMimeDatabase().mimeTypeForFile(filename);
const KService::List offers = KApplicationTrader::queryByMimeType(mimeType.name());
// For each one, insert a menu item...
......
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