ViewManager/ViewManager.py

changeset 128
13e96bd0f5a5
parent 97
c4086afea02b
child 155
375e3c884874
diff -r 003f568ac4a0 -r 13e96bd0f5a5 ViewManager/ViewManager.py
--- a/ViewManager/ViewManager.py	Sun Feb 28 10:36:13 2010 +0000
+++ b/ViewManager/ViewManager.py	Sun Feb 28 13:58:38 2010 +0000
@@ -29,6 +29,8 @@
 from QScintilla.SpellChecker import SpellChecker
 import QScintilla.Lexers
 import QScintilla.Exporters
+from QScintilla.Shell import Shell
+from QScintilla.Terminal import Terminal
 
 import Utilities
 
@@ -3738,6 +3740,19 @@
         self.ui.findFileNameDialog.raise_()
         self.ui.findFileNameDialog.activateWindow()
     
+    def appFocusChanged(self, old, now):
+        """
+        Public method to handle the global change of focus.
+        
+        @param old reference to the widget loosing focus (QWidget)
+        @param now reference to the widget gaining focus (QWidget)
+        """
+        if not isinstance(now, (Editor, Shell, Terminal)):
+            self.editActGrp.setEnabled(False)
+            self.copyActGrp.setEnabled(False)
+            self.viewActGrp.setEnabled(False)
+            self.searchActGrp.setEnabled(False)
+    
     ##################################################################
     ## Below are the action methods for the edit menu
     ##################################################################

eric ide

mercurial