action in containment as well
This commit is contained in:
parent
2642fc3329
commit
52bc83a65a
@ -122,7 +122,7 @@ void AssociatedApplicationManager::setUrls(Plasma::Applet *applet, const QList<Q
|
||||
KService::List apps = KFileItemActions::associatedApplications(mimeDb.mimeTypeForUrl(urls.first()).aliases(), QString());
|
||||
if (!apps.isEmpty()) {
|
||||
a->setIcon(QIcon::fromTheme(apps.first()->icon()));
|
||||
a->setText(i18n("Open in %1", apps.first()->genericName()));
|
||||
a->setText(i18n("Open in %1", apps.first()->genericName().isEmpty() ? apps.first()->genericName() : apps.first()->name()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -750,6 +750,11 @@ void ContainmentInterface::addAppletActions(QMenu &desktopMenu, Plasma::Applet *
|
||||
}
|
||||
|
||||
if (!applet->failedToLaunch()) {
|
||||
QAction *runAssociatedApplication = applet->actions()->action("run associated application");
|
||||
if (runAssociatedApplication && runAssociatedApplication->isEnabled()) {
|
||||
desktopMenu.addAction(runAssociatedApplication);
|
||||
}
|
||||
|
||||
QAction *configureApplet = applet->actions()->action("configure");
|
||||
if (configureApplet && configureApplet->isEnabled()) {
|
||||
desktopMenu.addAction(configureApplet);
|
||||
@ -758,11 +763,6 @@ void ContainmentInterface::addAppletActions(QMenu &desktopMenu, Plasma::Applet *
|
||||
if (appletAlternatives && appletAlternatives->isEnabled()) {
|
||||
desktopMenu.addAction(appletAlternatives);
|
||||
}
|
||||
|
||||
QAction *runAssociatedApplication = applet->actions()->action("run associated application");
|
||||
if (runAssociatedApplication && runAssociatedApplication->isEnabled()) {
|
||||
desktopMenu.addAction(runAssociatedApplication);
|
||||
}
|
||||
}
|
||||
|
||||
QMenu *containmentMenu = new QMenu(i18nc("%1 is the name of the containment", "%1 Options", m_containment->title()), &desktopMenu);
|
||||
@ -845,6 +845,10 @@ void ContainmentInterface::addContainmentActions(QMenu &desktopMenu, QEvent *eve
|
||||
desktopMenu.addAction(m_containment->actions()->action("configure"));
|
||||
}
|
||||
} else {
|
||||
QAction *runAssociatedApplication = m_containment->actions()->action("run associated application");
|
||||
if (runAssociatedApplication && runAssociatedApplication->isEnabled()) {
|
||||
desktopMenu.addAction(runAssociatedApplication);
|
||||
}
|
||||
desktopMenu.addActions(actions);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user