summaryrefslogtreecommitdiffstats
path: root/kdesktop
diff options
context:
space:
mode:
Diffstat (limited to 'kdesktop')
-rw-r--r--kdesktop/krootwm.cc29
-rw-r--r--kdesktop/krootwm.h1
2 files changed, 30 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)
{
diff --git a/kdesktop/krootwm.h b/kdesktop/krootwm.h
index 960d0e53c..007da9bf3 100644
--- a/kdesktop/krootwm.h
+++ b/kdesktop/krootwm.h
@@ -119,6 +119,7 @@ public slots:
void slotPopulateSessions();
void slotSessionActivated( int );
void slotNewSession();
+ void slotOpenTerminal();
void slotLockNNewSession();
private: