summaryrefslogtreecommitdiffstats
path: root/kicker/kicker/ui/k_new_mnu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kicker/kicker/ui/k_new_mnu.cpp')
-rw-r--r--kicker/kicker/ui/k_new_mnu.cpp26
1 files changed, 23 insertions, 3 deletions
diff --git a/kicker/kicker/ui/k_new_mnu.cpp b/kicker/kicker/ui/k_new_mnu.cpp
index 4e61f8eca..1c9c0f9e2 100644
--- a/kicker/kicker/ui/k_new_mnu.cpp
+++ b/kicker/kicker/ui/k_new_mnu.cpp
@@ -1342,11 +1342,15 @@ void KMenu::insertStaticItems()
m_systemView->insertSeparator( nId++, i18n("Applications"), index++);
- KService::Ptr p = KService::serviceByStorageId("/usr/share/applications/YaST.desktop");
+ KService::Ptr p = KService::serviceByStorageId("KControl.desktop");
m_systemView->insertMenuItem(p, nId++, index++);
- m_systemView->insertItem( "info", i18n( "System Information" ),
- "sysinfo:/", "sysinfo:/", nId++, index++ );
+ // run command
+ if (kapp->authorize("run_command"))
+ {
+ m_systemView->insertItem( "run", i18n("Run Command..."),
+ "", "kicker:/runusercommand", nId++, index++ );
+ }
m_systemView->insertSeparator( nId++, i18n("System Folders"), index++ );
@@ -2600,6 +2604,10 @@ void KMenu::slotStartURL(const TQString& u)
{
runCommand();
}
+ else if ( u == "kicker:/runusercommand" )
+ {
+ runUserCommand();
+ }
else if ( u == "kicker:/shutdown" ) {
#ifdef KDELIBS_SUSE
TQByteArray params;
@@ -3796,4 +3804,16 @@ void KMenu::slotSuspend(int id)
}
+void KMenu::runUserCommand()
+{
+ TQByteArray data;
+ TQCString appname( "kdesktop" );
+ if ( kicker_screen_number )
+ appname.sprintf("kdesktop-screen-%d", kicker_screen_number);
+
+ kapp->updateRemoteUserTimestamp( appname );
+ kapp->dcopClient()->send( appname, "KDesktopIface",
+ "popupExecuteCommand()", data );
+}
+
// vim:cindent:sw=4: