Helpviewer/HelpWindow.py

changeset 4793
085b71f009a1
parent 4784
10e3aa4b62eb
child 4913
e16573640cb8
diff -r 10e3aa4b62eb -r 085b71f009a1 Helpviewer/HelpWindow.py
--- a/Helpviewer/HelpWindow.py	Sun Feb 28 15:42:45 2016 +0100
+++ b/Helpviewer/HelpWindow.py	Thu Mar 03 19:30:50 2016 +0100
@@ -50,6 +50,7 @@
 from Preferences import Shortcuts
 
 import Utilities
+import Globals
 
 import UI.PixmapCache
 import UI.Config
@@ -612,21 +613,24 @@
             self.printAct.triggered.connect(self.tabWidget.printBrowser)
         self.__actions.append(self.printAct)
         
-        self.printPdfAct = E5Action(
-            self.tr('Print as PDF'),
-            UI.PixmapCache.getIcon("printPdf.png"),
-            self.tr('Print as PDF'),
-            0, 0, self, 'help_file_print_pdf')
-        self.printPdfAct.setStatusTip(self.tr(
-            'Print the displayed help as PDF'))
-        self.printPdfAct.setWhatsThis(self.tr(
-            """<b>Print as PDF</b>"""
-            """<p>Print the displayed help text as a PDF file.</p>"""
-        ))
-        if not self.initShortcutsOnly:
-            self.printPdfAct.triggered.connect(
-                self.tabWidget.printBrowserPdf)
-        self.__actions.append(self.printPdfAct)
+        if Globals.isLinuxPlatform():
+            self.printPdfAct = E5Action(
+                self.tr('Print as PDF'),
+                UI.PixmapCache.getIcon("printPdf.png"),
+                self.tr('Print as PDF'),
+                0, 0, self, 'help_file_print_pdf')
+            self.printPdfAct.setStatusTip(self.tr(
+                'Print the displayed help as PDF'))
+            self.printPdfAct.setWhatsThis(self.tr(
+                """<b>Print as PDF</b>"""
+                """<p>Print the displayed help text as a PDF file.</p>"""
+            ))
+            if not self.initShortcutsOnly:
+                self.printPdfAct.triggered.connect(
+                    self.tabWidget.printBrowserPdf)
+            self.__actions.append(self.printPdfAct)
+        else:
+            self.printPdfAct = None
         
         self.printPreviewAct = E5Action(
             self.tr('Print Preview'),
@@ -1612,7 +1616,8 @@
         menu.addSeparator()
         menu.addAction(self.printPreviewAct)
         menu.addAction(self.printAct)
-        menu.addAction(self.printPdfAct)
+        if self.printPdfAct:
+            menu.addAction(self.printPdfAct)
         menu.addSeparator()
         menu.addAction(self.closeAct)
         menu.addAction(self.closeAllAct)
@@ -1770,7 +1775,8 @@
         filetb.addSeparator()
         filetb.addAction(self.printPreviewAct)
         filetb.addAction(self.printAct)
-        filetb.addAction(self.printPdfAct)
+        if self.printPdfAct:
+            filetb.addAction(self.printPdfAct)
         filetb.addSeparator()
         filetb.addAction(self.closeAct)
         filetb.addAction(self.exitAct)

eric ide

mercurial