summaryrefslogtreecommitdiffstats
path: root/kicker
diff options
context:
space:
mode:
Diffstat (limited to 'kicker')
-rw-r--r--kicker/kicker/ui/k_new_mnu.cpp26
-rw-r--r--kicker/kicker/ui/k_new_mnu.h1
2 files changed, 24 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:
diff --git a/kicker/kicker/ui/k_new_mnu.h b/kicker/kicker/ui/k_new_mnu.h
index 6dff75feb..6bd969f99 100644
--- a/kicker/kicker/ui/k_new_mnu.h
+++ b/kicker/kicker/ui/k_new_mnu.h
@@ -181,6 +181,7 @@ protected:
// void raiseStackWidget(TQWidget *view);
bool runCommand();
+ void runUserCommand();
void setupUi();