From 9cc1e2c1aa2629d499e7555acd4906d6cc989cf9 Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 7 Sep 2010 19:42:15 +0000 Subject: 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 --- kdesktop/krootwm.cc | 29 +++++++++++++++++++++++++++++ kdesktop/krootwm.h | 1 + 2 files changed, 30 insertions(+) (limited to 'kdesktop') 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: -- cgit v1.2.1