diff --git a/src/widgets/kfileitemactions.cpp b/src/widgets/kfileitemactions.cpp --- a/src/widgets/kfileitemactions.cpp +++ b/src/widgets/kfileitemactions.cpp @@ -650,10 +650,12 @@ if (!offers.isEmpty()) { QMenu *menu = topMenu; - if (offers.count() > 1) { // submenu 'open with' + if (offers.count() > 4) { // submenu 'open with' menu = new QMenu(i18nc("@title:menu", "&Open With"), topMenu); menu->menuAction()->setObjectName(QStringLiteral("openWith_submenu")); // for the unittest topMenu->addMenu(menu); + } else { + menu ->addSection(i18n("Open With")); } //qDebug() << offers.count() << "offers" << topMenu << menu; @@ -668,18 +670,19 @@ QString openWithActionName; if (menu != topMenu) { // submenu menu->addSeparator(); - openWithActionName = i18nc("@action:inmenu Open With", "&Other..."); + openWithActionName = i18nc("@action:inmenu Open With", "&Other Application..."); } else { - openWithActionName = i18nc("@title:menu", "&Open With..."); + openWithActionName = i18nc("@title:menu", "&Other Application..."); } QAction *openWithAct = new QAction(this); openWithAct->setText(openWithActionName); openWithAct->setObjectName(QStringLiteral("openwith_browse")); // for the unittest QObject::connect(openWithAct, SIGNAL(triggered()), d, SLOT(slotOpenWithDialog())); menu->addAction(openWithAct); + menu->addSeparator(); } else { // no app offers -> Open With... QAction *act = new QAction(this); - act->setText(i18nc("@title:menu", "&Open With...")); + act->setText(i18nc("@title:menu", "&Open With Application...")); act->setObjectName(QStringLiteral("openwith")); // for the unittest QObject::connect(act, SIGNAL(triggered()), d, SLOT(slotOpenWithDialog())); topMenu->addAction(act); @@ -784,7 +787,7 @@ { QString actionName(service->name().replace('&', QLatin1String("&&"))); if (singleOffer) { - actionName = i18n("Open &with %1", actionName); + actionName = actionName; } else { actionName = i18nc("@item:inmenu Open With, %1 is application name", "%1", actionName); }