43 from .OfflineStorage.OfflineStorageConfigDialog import OfflineStorageConfigDialog |
43 from .OfflineStorage.OfflineStorageConfigDialog import OfflineStorageConfigDialog |
44 from .UserAgent.UserAgentMenu import UserAgentMenu |
44 from .UserAgent.UserAgentMenu import UserAgentMenu |
45 |
45 |
46 from E5Gui.E5TabWidget import E5TabWidget |
46 from E5Gui.E5TabWidget import E5TabWidget |
47 from E5Gui.E5Action import E5Action |
47 from E5Gui.E5Action import E5Action |
|
48 from E5Gui import E5MessageBox |
48 |
49 |
49 from E5Network.E5NetworkMonitor import E5NetworkMonitor |
50 from E5Network.E5NetworkMonitor import E5NetworkMonitor |
50 |
51 |
51 import Preferences |
52 import Preferences |
52 from Preferences import Shortcuts |
53 from Preferences import Shortcuts |
1645 printDialog = QPrintDialog(printer, self) |
1646 printDialog = QPrintDialog(printer, self) |
1646 if printDialog.exec_() == QDialog.Accepted: |
1647 if printDialog.exec_() == QDialog.Accepted: |
1647 try: |
1648 try: |
1648 frame.print_(printer) |
1649 frame.print_(printer) |
1649 except AttributeError: |
1650 except AttributeError: |
1650 QMessageBox.critical(self, |
1651 E5MessageBox.critical(self, |
1651 self.trUtf8("Eric Web Browser"), |
1652 self.trUtf8("Eric Web Browser"), |
1652 self.trUtf8("""<p>Printing is not available due to a bug in PyQt4.""" |
1653 self.trUtf8("""<p>Printing is not available due to a bug in PyQt4.""" |
1653 """Please upgrade.</p>""")) |
1654 """Please upgrade.</p>""")) |
1654 return |
1655 return |
1655 |
1656 |
1686 printDialog = QPrintDialog(printer, self) |
1687 printDialog = QPrintDialog(printer, self) |
1687 if printDialog.exec_() == QDialog.Accepted: |
1688 if printDialog.exec_() == QDialog.Accepted: |
1688 try: |
1689 try: |
1689 frame.print_(printer) |
1690 frame.print_(printer) |
1690 except AttributeError: |
1691 except AttributeError: |
1691 QMessageBox.critical(self, |
1692 E5MessageBox.critical(self, |
1692 self.trUtf8("Eric Web Browser"), |
1693 self.trUtf8("Eric Web Browser"), |
1693 self.trUtf8("""<p>Printing is not available due to a bug in PyQt4.""" |
1694 self.trUtf8("""<p>Printing is not available due to a bug in PyQt4.""" |
1694 """Please upgrade.</p>""")) |
1695 """Please upgrade.</p>""")) |
1695 return |
1696 return |
1696 |
1697 |
1728 @param printer reference to the printer object (QPrinter) |
1729 @param printer reference to the printer object (QPrinter) |
1729 """ |
1730 """ |
1730 try: |
1731 try: |
1731 self.__printPreviewBrowser.print_(printer) |
1732 self.__printPreviewBrowser.print_(printer) |
1732 except AttributeError: |
1733 except AttributeError: |
1733 QMessageBox.critical(self, |
1734 E5MessageBox.critical(self, |
1734 self.trUtf8("Eric Web Browser"), |
1735 self.trUtf8("Eric Web Browser"), |
1735 self.trUtf8("""<p>Printing is not available due to a bug in PyQt4.""" |
1736 self.trUtf8("""<p>Printing is not available due to a bug in PyQt4.""" |
1736 """Please upgrade.</p>""")) |
1737 """Please upgrade.</p>""")) |
1737 return |
1738 return |
1738 |
1739 |