Helpviewer/HelpTabWidget.py

changeset 3670
f0cb7579c0b4
parent 3656
441956d8fce5
child 4021
195a471c327b
equal deleted inserted replaced
3669:ac84ac3c0f05 3670:f0cb7579c0b4
26 import UI.PixmapCache 26 import UI.PixmapCache
27 27
28 import Utilities 28 import Utilities
29 import Preferences 29 import Preferences
30 30
31 from eric5config import getConfig 31 from eric6config import getConfig
32 32
33 33
34 class HelpTabWidget(E5TabWidget): 34 class HelpTabWidget(E5TabWidget):
35 """ 35 """
36 Class implementing the central widget showing the web pages. 36 Class implementing the central widget showing the web pages.
247 idx = self.currentIndex() 247 idx = self.currentIndex()
248 if idx < 0 or idx > self.count(): 248 if idx < 0 or idx > self.count():
249 return 249 return
250 250
251 req = QNetworkRequest(self.widget(idx).url()) 251 req = QNetworkRequest(self.widget(idx).url())
252 req.setRawHeader("X-Eric5-UserLoadAction", b"1") 252 req.setRawHeader("X-Eric6-UserLoadAction", b"1")
253 self.newBrowser(None, (req, QNetworkAccessManager.GetOperation, b"")) 253 self.newBrowser(None, (req, QNetworkAccessManager.GetOperation, b""))
254 254
255 def __tabContextMenuClose(self): 255 def __tabContextMenuClose(self):
256 """ 256 """
257 Private method to close the selected tab. 257 Private method to close the selected tab.
541 try: 541 try:
542 frame.print_(printer) 542 frame.print_(printer)
543 except AttributeError: 543 except AttributeError:
544 E5MessageBox.critical( 544 E5MessageBox.critical(
545 self, 545 self,
546 self.tr("eric5 Web Browser"), 546 self.tr("eric6 Web Browser"),
547 self.tr( 547 self.tr(
548 """<p>Printing is not available due to a bug in""" 548 """<p>Printing is not available due to a bug in"""
549 """ PyQt5. Please upgrade.</p>""")) 549 """ PyQt5. Please upgrade.</p>"""))
550 return 550 return
551 551
587 try: 587 try:
588 frame.print_(printer) 588 frame.print_(printer)
589 except AttributeError: 589 except AttributeError:
590 E5MessageBox.critical( 590 E5MessageBox.critical(
591 self, 591 self,
592 self.tr("eric5 Web Browser"), 592 self.tr("eric6 Web Browser"),
593 self.tr( 593 self.tr(
594 """<p>Printing is not available due to a bug in""" 594 """<p>Printing is not available due to a bug in"""
595 """ PyQt5. Please upgrade.</p>""")) 595 """ PyQt5. Please upgrade.</p>"""))
596 return 596 return
597 597
641 try: 641 try:
642 self.__printPreviewBrowser.print_(printer) 642 self.__printPreviewBrowser.print_(printer)
643 except AttributeError: 643 except AttributeError:
644 E5MessageBox.critical( 644 E5MessageBox.critical(
645 self, 645 self,
646 self.tr("eric5 Web Browser"), 646 self.tr("eric6 Web Browser"),
647 self.tr( 647 self.tr(
648 """<p>Printing is not available due to a bug in PyQt5.""" 648 """<p>Printing is not available due to a bug in PyQt5."""
649 """Please upgrade.</p>""")) 649 """Please upgrade.</p>"""))
650 return 650 return
651 651
855 Private slot to handle the entering of an URL. 855 Private slot to handle the entering of an URL.
856 """ 856 """
857 edit = self.sender() 857 edit = self.sender()
858 url = self.__guessUrlFromPath(edit.text()) 858 url = self.__guessUrlFromPath(edit.text())
859 request = QNetworkRequest(url) 859 request = QNetworkRequest(url)
860 request.setRawHeader("X-Eric5-UserLoadAction", b"1") 860 request.setRawHeader("X-Eric6-UserLoadAction", b"1")
861 if e5App().keyboardModifiers() == Qt.AltModifier: 861 if e5App().keyboardModifiers() == Qt.AltModifier:
862 self.newBrowser( 862 self.newBrowser(
863 None, (request, QNetworkAccessManager.GetOperation, b"")) 863 None, (request, QNetworkAccessManager.GetOperation, b""))
864 else: 864 else:
865 self.currentBrowser().setSource( 865 self.currentBrowser().setSource(

eric ide

mercurial