diff --git a/src/filewidgets/kfilewidget.cpp b/src/filewidgets/kfilewidget.cpp --- a/src/filewidgets/kfilewidget.cpp +++ b/src/filewidgets/kfilewidget.cpp @@ -2026,11 +2026,8 @@ // Called by KFileDialog void KFileWidget::slotCancel() { -// qDebug(); - - d->ops->close(); - d->writeViewConfig(); + d->ops->close(); } void KFileWidget::setKeepLocation(bool keep) diff --git a/src/widgets/kfileitemactions.cpp b/src/widgets/kfileitemactions.cpp --- a/src/widgets/kfileitemactions.cpp +++ b/src/widgets/kfileitemactions.cpp @@ -650,9 +650,11 @@ if (!offers.isEmpty()) { QMenu *menu = topMenu; - // Always show the top app inline - QAction *act = d->createAppAction(offers.takeFirst(), true); - menu->addAction(act); + // Show the top app inline for files, but not folders + if (!d->m_props.isDirectory()) { + QAction *act = d->createAppAction(offers.takeFirst(), true); + menu->addAction(act); + } // If there are still more apps, show them in a sub-menu if (!offers.isEmpty()) { // submenu 'open with' @@ -664,8 +666,8 @@ KService::List::ConstIterator it = offers.constBegin(); for (; it != offers.constEnd(); it++) { QAction *act = d->createAppAction(*it, - // no submenu -> prefix single offer - menu == topMenu); + // no submenu -> prefix single offer + menu == topMenu); menu->addAction(act); } topMenu->addSeparator();