712 if not self.__initShortcutsOnly: |
712 if not self.__initShortcutsOnly: |
713 self.exportBookmarksAct.triggered.connect( |
713 self.exportBookmarksAct.triggered.connect( |
714 bookmarksManager.exportBookmarks) |
714 bookmarksManager.exportBookmarks) |
715 self.__actions.append(self.exportBookmarksAct) |
715 self.__actions.append(self.exportBookmarksAct) |
716 |
716 |
717 if qVersion() >= "5.8.0" or ( |
717 # TODO: re-check this once printing on Windows is reliable |
718 not Globals.isWindowsPlatform() or qVersion() >= "5.7.0"): |
718 ## if qVersion() >= "5.8.0" or ( |
|
719 ## not Globals.isWindowsPlatform() or qVersion() >= "5.7.0"): |
|
720 if not Globals.isWindowsPlatform() and qVersion() >= "5.7.0": |
719 self.printAct = E5Action( |
721 self.printAct = E5Action( |
720 self.tr('Print'), |
722 self.tr('Print'), |
721 UI.PixmapCache.getIcon("print.png"), |
723 UI.PixmapCache.getIcon("print.png"), |
722 self.tr('&Print'), |
724 self.tr('&Print'), |
723 QKeySequence(self.tr("Ctrl+P", "File|Print")), |
725 QKeySequence(self.tr("Ctrl+P", "File|Print")), |
731 self.printAct.triggered.connect(self.__tabWidget.printBrowser) |
733 self.printAct.triggered.connect(self.__tabWidget.printBrowser) |
732 self.__actions.append(self.printAct) |
734 self.__actions.append(self.printAct) |
733 else: |
735 else: |
734 self.printAct = None |
736 self.printAct = None |
735 |
737 |
|
738 # TODO: check this on macOS |
736 if Globals.isLinuxPlatform() or qVersion() >= "5.7.0": |
739 if Globals.isLinuxPlatform() or qVersion() >= "5.7.0": |
737 self.printPdfAct = E5Action( |
740 self.printPdfAct = E5Action( |
738 self.tr('Print as PDF'), |
741 self.tr('Print as PDF'), |
739 UI.PixmapCache.getIcon("printPdf.png"), |
742 UI.PixmapCache.getIcon("printPdf.png"), |
740 self.tr('Print as PDF'), |
743 self.tr('Print as PDF'), |
750 self.__tabWidget.printBrowserPdf) |
753 self.__tabWidget.printBrowserPdf) |
751 self.__actions.append(self.printPdfAct) |
754 self.__actions.append(self.printPdfAct) |
752 else: |
755 else: |
753 self.printPdfAct = None |
756 self.printPdfAct = None |
754 |
757 |
755 if qVersion() >= "5.8.0" or ( |
758 # TODO: re-check this once printing on Windows is reliable |
756 not Globals.isWindowsPlatform() and qVersion() < "5.7.0"): |
759 ## if qVersion() >= "5.8.0" or ( |
|
760 ## not Globals.isWindowsPlatform() and qVersion() < "5.7.0"): |
|
761 if not Globals.isWindowsPlatform() and ( |
|
762 qVersion() < "5.7.0" or qVersion() >= "5.8.0"): |
757 self.printPreviewAct = E5Action( |
763 self.printPreviewAct = E5Action( |
758 self.tr('Print Preview'), |
764 self.tr('Print Preview'), |
759 UI.PixmapCache.getIcon("printPreview.png"), |
765 UI.PixmapCache.getIcon("printPreview.png"), |
760 self.tr('Print Preview'), |
766 self.tr('Print Preview'), |
761 0, 0, self, 'webbrowser_file_print_preview') |
767 0, 0, self, 'webbrowser_file_print_preview') |