summaryrefslogtreecommitdiffstats
path: root/kdesktop
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-07 19:42:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-07 19:42:15 +0000
commit9cc1e2c1aa2629d499e7555acd4906d6cc989cf9 (patch)
tree2a737f47bb029688c2f5ebef76869903cf4b4eec /kdesktop
parenteaa51fec106463800192924168eaf9f03f188655 (diff)
downloadtdebase-9cc1e2c1aa2629d499e7555acd4906d6cc989cf9.tar.gz
tdebase-9cc1e2c1aa2629d499e7555acd4906d6cc989cf9.zip
Merged in remaining kdebase bugfixes from the Chakra project
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1172677 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
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: