X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/b8a4e0fac2820ec8fc442c2abeea700ae4947e01..7de3ccbf54ee3a2f7c751a2ba5352d3122d5126e:/src/dolphincontextmenu.cpp diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp index 1af74b2e3..7edfdb285 100644 --- a/src/dolphincontextmenu.cpp +++ b/src/dolphincontextmenu.cpp @@ -264,8 +264,12 @@ void DolphinContextMenu::openViewportContextMenu() QAction* action = popup->exec(QCursor::pos()); if (action == propertiesAction) { const KUrl& url = m_mainWindow->activeViewContainer()->url(); - KPropertiesDialog dialog(url, m_mainWindow); - dialog.exec(); + + KPropertiesDialog* dialog = new KPropertiesDialog(url, m_mainWindow); + dialog->setAttribute(Qt::WA_DeleteOnClose); + dialog->show(); + dialog->raise(); + dialog->activateWindow(); } else if (action == addToPlacesAction) { const KUrl& url = m_mainWindow->activeViewContainer()->url(); if (url.isValid()) { @@ -296,8 +300,10 @@ void DolphinContextMenu::insertDefaultItemActions(KMenu* popup) popup->addAction(renameAction); // insert 'Move to Trash' and (optionally) 'Delete' - KConfigGroup kdeConfig(KGlobal::config(), "KDE"); - bool showDeleteCommand = kdeConfig.readEntry("ShowDeleteCommand", false); + KSharedConfig::Ptr globalConfig = KSharedConfig::openConfig("kdeglobals", KConfig::IncludeGlobals); + KConfigGroup configGroup(globalConfig, "KDE"); + bool showDeleteCommand = configGroup.readEntry("ShowDeleteCommand", false); + const KUrl& url = m_mainWindow->activeViewContainer()->url(); if (url.isLocalFile()) { QAction* moveToTrashAction = collection->action("move_to_trash"); @@ -316,10 +322,6 @@ void DolphinContextMenu::addShowMenubarAction(KMenu* menu) { KAction* showMenuBar = m_mainWindow->showMenuBarAction(); if (!m_mainWindow->menuBar()->isVisible()) { - // TODO: it should not be necessary to uncheck the menu - // bar action, but currently the action states don't get - // updated if the menu is disabled - showMenuBar->setChecked(false); menu->addAction(showMenuBar); menu->addSeparator(); }