use "open in"

This commit is contained in:
Marco Martin 2014-08-10 16:34:19 +02:00
parent 6a19de43fa
commit 7f383b968b

View File

@ -122,12 +122,12 @@ void AssociatedApplicationManager::setUrls(Plasma::Applet *applet, const QList<Q
KService::List apps = KFileItemActions::associatedApplications(mimeDb.mimeTypeForUrl(urls.first()).aliases(), QString()); KService::List apps = KFileItemActions::associatedApplications(mimeDb.mimeTypeForUrl(urls.first()).aliases(), QString());
if (!apps.isEmpty()) { if (!apps.isEmpty()) {
a->setIcon(QIcon::fromTheme(apps.first()->icon())); a->setIcon(QIcon::fromTheme(apps.first()->icon()));
a->setText(i18n("Open in %1", apps.first()->genericName().isEmpty() ? apps.first()->genericName() : apps.first()->name())); a->setText(i18n("Open with %1", apps.first()->genericName().isEmpty() ? apps.first()->genericName() : apps.first()->name()));
} }
} }
} }
} }
TODO: updateAction slot, called on setting of url or app, and on sycoca change
QList<QUrl> AssociatedApplicationManager::urls(const Plasma::Applet *applet) const QList<QUrl> AssociatedApplicationManager::urls(const Plasma::Applet *applet) const
{ {
return d->urlLists.value(applet); return d->urlLists.value(applet);