summaryrefslogtreecommitdiffstats
path: root/kdesktop/krootwm.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kdesktop/krootwm.cc')
-rw-r--r--kdesktop/krootwm.cc29
1 files changed, 29 insertions, 0 deletions
diff --git a/kdesktop/krootwm.cc b/kdesktop/krootwm.cc
index 58eb78a9f..a423471bb 100644
--- a/kdesktop/krootwm.cc
+++ b/kdesktop/krootwm.cc
@@ -131,7 +131,10 @@ KRootWm::KRootWm(KDesktop* _desktop) : TQObject(_desktop)
if (kapp->authorize("run_command"))
{
new KAction(i18n("Run Command..."), "run", 0, m_pDesktop, TQT_SLOT( slotExecuteCommand() ), m_actionCollection, "exec" );
+ new KAction(i18n("Konsole ..." ), "terminal", CTRL+Key_T, this, TQT_SLOT( slotOpenTerminal() ),
+ m_actionCollection, "open_terminal" );
}
+
if (!KGlobal::config()->isImmutable())
{
new KAction(i18n("Configure Desktop..."), "configure", 0, this, TQT_SLOT( slotConfigureDesktop() ),
@@ -322,6 +325,12 @@ void KRootWm::buildMenus()
file->insertSeparator();
}
+ action = m_actionCollection->action("open_terminal");
+ if (action)
+ {
+ action->plug( file );
+ }
+
action = m_actionCollection->action("lock");
if (action)
action->plug( file );
@@ -396,6 +405,10 @@ void KRootWm::buildMenus()
needSeparator = true;
}
+ action = m_actionCollection->action("open_terminal");
+ if (action)
+ action->plug( desktopMenu );
+
if (needSeparator)
{
desktopMenu->insertSeparator();
@@ -723,6 +736,22 @@ TQStringList KRootWm::configModules() {
return args;
}
+void KRootWm::slotOpenTerminal()
+{
+ // kdDebug() << "KRootWm::slotOpenTerminal" << endl;
+ KProcess* p = new KProcess;
+ Q_CHECK_PTR(p);
+
+ KConfigGroupSaver gs(KGlobal::config(), "General");
+ TQString terminal = KGlobal::config()->readPathEntry("TerminalApplication", "konsole");
+
+ *p << terminal;
+
+ p->start(KProcess::DontCare);
+
+ delete p;
+}
+
void KRootWm::slotConfigureDesktop() {
if (!m_configDialog)
{