Репозитории ALT
5.1: | 3.5.10-alt20.M51.2 |
4.1: | 3.5.10-alt16.M41.1 |
4.0: | 3.5.9-alt1.M40.1 |
3.0: | 3.4.1-alt12 |
+updates: | 3.4.1-alt12.1.M30 |
+backports: | 3.5.6-alt7.0.M30 |
Группа :: Графические оболочки/KDE
Пакет: kdebase
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: kdebase-3.5.8-kdesktop_open_terminal-ALT.patch
Скачать
Скачать
--- kdebase-3.5.8/kdesktop/krootwm.cc~ 2006-10-01 21:32:02 +0400
+++ kdebase-3.5.8/kdesktop/krootwm.cc 2007-10-18 19:29:17 +0400
@@ -131,7 +131,10 @@ KRootWm::KRootWm(KDesktop* _desktop) : Q
if (kapp->authorize("run_command"))
{
new KAction(i18n("Run Command..."), "run", 0, m_pDesktop, SLOT( slotExecuteCommand() ), m_actionCollection, "exec" );
+ new KAction(i18n("Open &Terminal" ), "openterm", CTRL+Key_T, this, SLOT( slotOpenTerminal() ),
+ m_actionCollection, "open_terminal" );
}
+
if (!KGlobal::config()->isImmutable())
{
new KAction(i18n("Configure Desktop..."), "configure", 0, this, 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();
@@ -715,6 +728,22 @@ QStringList KRootWm::configModules() {
return args;
}
+void KRootWm::slotOpenTerminal()
+{
+ // kdDebug() << "KRootWm::slotOpenTerminal" << endl;
+ KProcess* p = new KProcess;
+ Q_CHECK_PTR(p);
+
+ KConfigGroupSaver gs(KGlobal::config(), "General");
+ QString terminal = KGlobal::config()->readPathEntry("TerminalApplication", "konsole");
+
+ *p << terminal;
+
+ p->start(KProcess::DontCare);
+
+ delete p;
+}
+
void KRootWm::slotConfigureDesktop() {
if (!m_configDialog)
{
--- kdebase-3.4/kdesktop/krootwm.h.orig 2004-08-27 00:23:03 +0400
+++ kdebase-3.4/kdesktop/krootwm.h 2005-03-22 21:40:59 +0300
@@ -116,6 +116,7 @@ public slots:
void slotPopulateSessions();
void slotSessionActivated( int );
void slotNewSession();
+ void slotOpenTerminal();
void slotLockNNewSession();
private: