ViewManager/ViewManager.py

changeset 6032
5f80be18bcd7
parent 5956
7276a19ca07a
child 6048
82ad8ec9548c
diff -r ccab25598d90 -r 5f80be18bcd7 ViewManager/ViewManager.py
--- a/ViewManager/ViewManager.py	Fri Dec 22 16:07:49 2017 +0100
+++ b/ViewManager/ViewManager.py	Fri Dec 22 16:21:40 2017 +0100
@@ -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