Репозиторий ALT Linux backports/2.4
Последнее обновление: 9 июля 2008 | Пакетов: 497 | Посещений: 1633564
 поиск   регистрация   авторизация 
 
Группа :: Графические оболочки/KDE
Пакет: kdebase

 Главная   Изменения   Спек   Патчи   Загрузить   Bugs and FR 

Патч: kdebase-3.2-kdesktop_open_terminal.patch


--- kdebase-3.2/kdesktop/krootwm.cc.orig	2004-04-02 20:43:25 +0400
+++ kdebase-3.2/kdesktop/krootwm.cc	2004-04-02 21:26:06 +0400
@@ -128,6 +128,9 @@ KRootWm::KRootWm(KDesktop* _desktop) : Q
   {
      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() ),
@@ -286,6 +289,10 @@ void KRootWm::buildMenus()
             file->insertSeparator();
         }
 
+        action = m_actionCollection->action("open_terminal");
+        if (action)
+            action->plug( file );
+  
         action = m_actionCollection->action("newsession");
         if (action)
             action->plug( file );
@@ -362,6 +369,10 @@ void KRootWm::buildMenus()
        needSeparator = true;
     }
 
+    action = m_actionCollection->action("open_terminal");
+    if (action)
+	action->plug( desktopMenu );
+
     if (needSeparator)
     {
         desktopMenu->insertSeparator();
@@ -412,6 +423,7 @@ void KRootWm::buildMenus()
     }
     int lastSep = desktopMenu->insertSeparator();
 
+ 
     action = m_actionCollection->action("newsession");
     if (action)
     {
@@ -627,6 +639,19 @@ QStringList KRootWm::configModules() {
   return args;
 }
 
+void KRootWm::slotOpenTerminal()
+{
+    // kdDebug() << "KRootWm::slotOpenTerminal" << endl;
+    KProcess* p = new KProcess;
+    Q_CHECK_PTR(p);
+
+    *p << "xvt";
+
+    p->start(KProcess::DontCare);
+
+    delete p;
+}
+
 void KRootWm::slotConfigureDesktop() {
   QStringList args = configModules();
   args.prepend(i18n("Desktop"));
--- kdebase-3.2/kdesktop/krootwm.h.orig	2003-07-09 15:59:27.000000000 +0200
+++ kdebase-3.2/kdesktop/krootwm.h	2003-07-09 15:59:17.000000000 +0200
@@ -105,6 +105,7 @@
   void slotLock();
   void slotLogout();
   void slotNewSession();
+  void slotOpenTerminal();
 
 private:
   KDesktop* m_pDesktop;
 
design & coding: Vladimir Lettiev aka crux © 2004-2005