ViewManager/ViewManager.py

branch
maintenance
changeset 6050
25a4ddb25ca4
parent 6004
548a9ba8c970
parent 6048
82ad8ec9548c
child 6054
3397c9428731
diff -r 6914826302ae -r 25a4ddb25ca4 ViewManager/ViewManager.py
--- a/ViewManager/ViewManager.py	Sat Dec 02 12:40:52 2017 +0100
+++ b/ViewManager/ViewManager.py	Sun Dec 31 18:27:40 2017 +0100
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 
-# Copyright (c) 2002 - 2017 Detlev Offenbach <detlev@die-offenbachs.de>
+# Copyright (c) 2002 - 2018 Detlev Offenbach <detlev@die-offenbachs.de>
 #
 
 """
@@ -3491,7 +3491,7 @@
         
         self.toggleAllAct = E5Action(
             QCoreApplication.translate('ViewManager', 'Toggle all folds'),
-            QCoreApplication.translate('ViewManager', 'Toggle &all folds'),
+            QCoreApplication.translate('ViewManager', '&Toggle all folds'),
             0, 0, self.viewFoldActGrp, 'vm_view_toggle_all_folds')
         self.toggleAllAct.setStatusTip(QCoreApplication.translate(
             'ViewManager', 'Toggle all folds'))
@@ -3536,6 +3536,21 @@
         self.toggleCurrentAct.triggered.connect(self.__toggleCurrent)
         self.viewActions.append(self.toggleCurrentAct)
         
+        self.clearAllFoldsAct = E5Action(
+            QCoreApplication.translate('ViewManager', 'Clear all folds'),
+            QCoreApplication.translate('ViewManager', 'Clear &all folds'),
+            0, 0, self.viewFoldActGrp, 'vm_view_clear_all_folds')
+        self.clearAllFoldsAct.setStatusTip(QCoreApplication.translate(
+            'ViewManager', 'Clear all folds'))
+        self.clearAllFoldsAct.setWhatsThis(QCoreApplication.translate(
+            'ViewManager',
+            """<b>Clear all folds</b>"""
+            """<p>Clear all folds of the current editor, i.e. ensure that"""
+            """ all lines are displayed unfolded.</p>"""
+        ))
+        self.clearAllFoldsAct.triggered.connect(self.__clearAllFolds)
+        self.viewActions.append(self.clearAllFoldsAct)
+        
         self.unhighlightAct = E5Action(
             QCoreApplication.translate('ViewManager', 'Remove all highlights'),
             UI.PixmapCache.getIcon("unhighlight.png"),
@@ -5900,6 +5915,14 @@
             aw = self.activeWindow()
         if aw and aw == self.sender():
             self.sbZoom.setValue(value)
+    
+    def __clearAllFolds(self):
+        """
+        Private method to handle the clear all folds action.
+        """
+        aw = self.activeWindow()
+        if aw:
+            aw.clearFolds()
         
     def __toggleAll(self):
         """

eric ide

mercurial