[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdebase/kwin
From:       Luboš Luňák <l.lunak () kde ! org>
Date:       2005-01-04 14:27:15
Message-ID: 20050104142715.E9D701CB12 () office ! kde ! org
[Download RAW message or body]

CVS commit by lunakl: 

Save window shortcut also in session.


  M +4 -0      manage.cpp   2.65
  M +2 -0      sm.cpp   2.7
  M +2 -0      sm.h   2.6


--- kdebase/kwin/manage.cpp  #2.64:2.65
@@ -133,4 +133,8 @@ bool Client::manage( Window w, bool isMa
         }
 
+    if( session && !session->shortcut.isNull())
+        setShortcut( session->shortcut );
+    // TODO use also rules for shortcut
+
     init_minimize = rules()->checkMinimize( init_minimize, !isMapped );
     if( rules()->checkNoBorder( false, !isMapped ))

--- kdebase/kwin/sm.cpp  #2.6:2.7
@@ -114,4 +114,5 @@ void Workspace::storeSession( KConfig* c
             config->writeEntry( QString("userNoBorder")+n, c->isUserNoBorder() );
             config->writeEntry( QString("windowType")+n, windowTypeToTxt( c->windowType()));
+            config->writeEntry( QString("shortcut")+n, c->shortcut().toStringInternal());
             }
         }
@@ -178,4 +179,5 @@ void Workspace::loadSessionInfo()
         info->userNoBorder = config->readBoolEntry( QString("userNoBorder")+n, FALSE  );
         info->windowType = txtToWindowType( config->readEntry( QString("windowType")+n ).latin1());
+        info->shortcut = KShortcut( config->readEntry( QString("shortcut")+n ));
         info->active = ( active_client == i );
         }

--- kdebase/kwin/sm.h  #2.5:2.6
@@ -16,4 +16,5 @@ License. See the file "COPYING" for the 
 #include <kapplication.h>
 #include <netwm_def.h>
+#include <kshortcut.h>
 
 class QSocketNotifier;
@@ -46,4 +47,5 @@ struct SessionInfo
     bool userNoBorder;
     NET::WindowType windowType;
+    KShortcut shortcut;
     bool active; // means 'was active in the saved session'
     };


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic