eric7/Plugins/ViewManagerPlugins/Listspace/Listspace.py

branch
eric7
changeset 8519
fd4722a8f782
parent 8318
962bce857696
child 8532
a392af4b87e8
--- a/eric7/Plugins/ViewManagerPlugins/Listspace/Listspace.py	Thu Aug 19 18:36:06 2021 +0200
+++ b/eric7/Plugins/ViewManagerPlugins/Listspace/Listspace.py	Thu Aug 19 18:37:26 2021 +0200
@@ -280,6 +280,9 @@
             self.__contextMenuOpenRejections)
         self.__menu.addSeparator()
         self.__menu.addAction(
+            UI.PixmapCache.getIcon("printPreview"),
+            self.tr("Print Preview"), self.__contextMenuPrintPreviewFile)
+        self.__menu.addAction(
             UI.PixmapCache.getIcon("print"),
             self.tr('Print'), self.__contextMenuPrintFile)
         self.__menu.addSeparator()
@@ -851,7 +854,14 @@
         """
         if self.contextMenuEditor:
             self.printEditor(self.contextMenuEditor)
-        
+    
+    def __contextMenuPrintPreviewFile(self):
+        """
+        Private method to show a print preview of the selected editor.
+        """
+        if self.contextMenuEditor:
+            self.printPreviewEditor(self.contextMenuEditor)
+    
     def __contextMenuCopyPathToClipboard(self):
         """
         Private method to copy the file name of the selected editor to the

eric ide

mercurial