diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-07 19:42:15 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-07 19:42:15 +0000 |
commit | 9cc1e2c1aa2629d499e7555acd4906d6cc989cf9 (patch) | |
tree | 2a737f47bb029688c2f5ebef76869903cf4b4eec /kdesktop/krootwm.cc | |
parent | eaa51fec106463800192924168eaf9f03f188655 (diff) | |
download | tdebase-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/krootwm.cc')
-rw-r--r-- | kdesktop/krootwm.cc | 29 |
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) { |