┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinviewactionhandler.cpp
diff options
context:
space:
mode:
authorJonathan Schmidt-Dominé <[email protected]>2009-11-06 14:56:35 +0000
committerJonathan Schmidt-Dominé <[email protected]>2009-11-06 14:56:35 +0000
commit5114ab58bcf9ccc7fed7cfdd057bffeb87a2ad94 (patch)
treeef9437b0ec50188a392f955222d95f69e9e6f851 /src/dolphinviewactionhandler.cpp
parent2d2aea1c5823e648dec6d15c2ebe2f644de65b7c (diff)
Initial ServiceMenu-KHotNewStuff-stuff
TODO: fix the existing servicemenus (some install-scripts are broken, some do not provide a simple CLI-interface) TODO: add support for single-desktop-file-servicemenus (for example the "open as root") svn path=/trunk/KDE/kdebase/apps/; revision=1045663
Diffstat (limited to 'src/dolphinviewactionhandler.cpp')
-rw-r--r--src/dolphinviewactionhandler.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/dolphinviewactionhandler.cpp b/src/dolphinviewactionhandler.cpp
index 3c010f80f..76989aa4d 100644
--- a/src/dolphinviewactionhandler.cpp
+++ b/src/dolphinviewactionhandler.cpp
@@ -31,6 +31,7 @@
#include <ktoggleaction.h>
#include <krun.h>
#include <kpropertiesdialog.h>
+#include <knewstuff2/engine.h>
DolphinViewActionHandler::DolphinViewActionHandler(KActionCollection* collection, QObject* parent)
@@ -180,6 +181,13 @@ void DolphinViewActionHandler::createActions()
findFile->setShortcut(Qt::CTRL | Qt::Key_F);
findFile->setIcon(KIcon("edit-find"));
connect(findFile, SIGNAL(triggered()), this, SLOT(slotFindFile()));
+
+ // Settings menu
+
+ KAction* getServiceMenu = m_actionCollection->addAction("get_servicemenu");
+ getServiceMenu->setText(i18nc("@action:inmenu Settings", "Get Servicemenu..."));
+ getServiceMenu->setIcon(KIcon ("get-hot-new-stuff"));
+ connect(getServiceMenu, SIGNAL(triggered()), this, SLOT(slotGetServiceMenu()));
}
QActionGroup* DolphinViewActionHandler::createAdditionalInformationActionGroup()
@@ -532,3 +540,10 @@ void DolphinViewActionHandler::slotProperties()
dialog->raise();
dialog->activateWindow();
}
+
+void DolphinViewActionHandler::slotGetServiceMenu()
+{
+ KNS::Engine khns(m_currentView);
+ khns.init("servicemenu.knsrc");
+ khns.downloadDialogModal(m_currentView);
+}