UI/UserInterface.py

branch
6_1_x
changeset 5249
a114f080572f
parent 5093
7adeb9ded17d
equal deleted inserted replaced
5237:56761e8a4d95 5249:a114f080572f
4770 os.path.join(os.path.dirname(sys.executable), "doc")) 4770 os.path.join(os.path.dirname(sys.executable), "doc"))
4771 else: 4771 else:
4772 pythonDocDir = Utilities.getEnvironmentEntry( 4772 pythonDocDir = Utilities.getEnvironmentEntry(
4773 "PYTHON3DOCDIR", 4773 "PYTHON3DOCDIR",
4774 '/usr/share/doc/packages/python3/html') 4774 '/usr/share/doc/packages/python3/html')
4775 if not pythonDocDir.startswith("http://") and \ 4775 if not pythonDocDir.startswith(("http://", "https://", "qthelp://")):
4776 not pythonDocDir.startswith("https://"):
4777 if pythonDocDir.startswith("file://"): 4776 if pythonDocDir.startswith("file://"):
4778 pythonDocDir = pythonDocDir[7:] 4777 pythonDocDir = pythonDocDir[7:]
4779 if not os.path.splitext(pythonDocDir)[1]: 4778 if not os.path.splitext(pythonDocDir)[1]:
4780 home = Utilities.normjoinpath(pythonDocDir, 'index.html') 4779 home = Utilities.normjoinpath(pythonDocDir, 'index.html')
4781 4780
4834 Utilities.getEnvironmentEntry("PYTHON2DOCDIR", default) 4833 Utilities.getEnvironmentEntry("PYTHON2DOCDIR", default)
4835 else: 4834 else:
4836 pythonDocDir = Utilities.getEnvironmentEntry( 4835 pythonDocDir = Utilities.getEnvironmentEntry(
4837 "PYTHON2DOCDIR", 4836 "PYTHON2DOCDIR",
4838 '/usr/share/doc/packages/python/html') 4837 '/usr/share/doc/packages/python/html')
4839 if not pythonDocDir.startswith("http://") and \ 4838 if not pythonDocDir.startswith(("http://", "https://", "qthelp://")):
4840 not pythonDocDir.startswith("https://"):
4841 if pythonDocDir.startswith("file://"): 4839 if pythonDocDir.startswith("file://"):
4842 pythonDocDir = pythonDocDir[7:] 4840 pythonDocDir = pythonDocDir[7:]
4843 if not os.path.splitext(pythonDocDir)[1]: 4841 if not os.path.splitext(pythonDocDir)[1]:
4844 home = Utilities.normjoinpath(pythonDocDir, 'index.html') 4842 home = Utilities.normjoinpath(pythonDocDir, 'index.html')
4845 else: 4843 else:
4952 self.tr("Documentation"), 4950 self.tr("Documentation"),
4953 self.tr("""<p>The PyQt4 documentation starting point""" 4951 self.tr("""<p>The PyQt4 documentation starting point"""
4954 """ has not been configured.</p>""")) 4952 """ has not been configured.</p>"""))
4955 return 4953 return
4956 4954
4957 if not pyqt4DocDir.startswith("http://") and \ 4955 if not pyqt4DocDir.startswith(("http://", "https://", "qthelp://")):
4958 not pyqt4DocDir.startswith("https://"):
4959 home = "" 4956 home = ""
4960 if pyqt4DocDir: 4957 if pyqt4DocDir:
4961 if pyqt4DocDir.startswith("file://"): 4958 if pyqt4DocDir.startswith("file://"):
4962 pyqt4DocDir = pyqt4DocDir[7:] 4959 pyqt4DocDir = pyqt4DocDir[7:]
4963 if not os.path.splitext(pyqt4DocDir)[1]: 4960 if not os.path.splitext(pyqt4DocDir)[1]:
5012 self.tr("Documentation"), 5009 self.tr("Documentation"),
5013 self.tr("""<p>The PyQt5 documentation starting point""" 5010 self.tr("""<p>The PyQt5 documentation starting point"""
5014 """ has not been configured.</p>""")) 5011 """ has not been configured.</p>"""))
5015 return 5012 return
5016 5013
5017 if not pyqt5DocDir.startswith("http://") and \ 5014 if not pyqt5DocDir.startswith(("http://", "https://", "qthelp://")):
5018 not pyqt5DocDir.startswith("https://"):
5019 home = "" 5015 home = ""
5020 if pyqt5DocDir: 5016 if pyqt5DocDir:
5021 if pyqt5DocDir.startswith("file://"): 5017 if pyqt5DocDir.startswith("file://"):
5022 pyqt5DocDir = pyqt5DocDir[7:] 5018 pyqt5DocDir = pyqt5DocDir[7:]
5023 if not os.path.splitext(pyqt5DocDir)[1]: 5019 if not os.path.splitext(pyqt5DocDir)[1]:
5065 Private slot to show the Eric documentation. 5061 Private slot to show the Eric documentation.
5066 """ 5062 """
5067 home = Utilities.normjoinpath( 5063 home = Utilities.normjoinpath(
5068 getConfig('ericDocDir'), "Source", "index.html") 5064 getConfig('ericDocDir'), "Source", "index.html")
5069 5065
5070 if not home.startswith("http://") and \ 5066 if not home.startswith(("http://", "https://", "qthelp://")):
5071 not home.startswith("https://") and \
5072 not home.startswith("qthelp://"):
5073 if not os.path.exists(home): 5067 if not os.path.exists(home):
5074 E5MessageBox.warning( 5068 E5MessageBox.warning(
5075 self, 5069 self,
5076 self.tr("Documentation Missing"), 5070 self.tr("Documentation Missing"),
5077 self.tr("""<p>The documentation starting point""" 5071 self.tr("""<p>The documentation starting point"""
5108 self.tr("Documentation"), 5102 self.tr("Documentation"),
5109 self.tr("""<p>The PySide documentation starting point""" 5103 self.tr("""<p>The PySide documentation starting point"""
5110 """ has not been configured.</p>""")) 5104 """ has not been configured.</p>"""))
5111 return 5105 return
5112 5106
5113 if not pysideDocDir.startswith("http://") and \ 5107 if not pysideDocDir.startswith(("http://", "https://", "qthelp://")):
5114 not pysideDocDir.startswith("https://"):
5115 if pysideDocDir.startswith("file://"): 5108 if pysideDocDir.startswith("file://"):
5116 pysideDocDir = pysideDocDir[7:] 5109 pysideDocDir = pysideDocDir[7:]
5117 if not os.path.splitext(pysideDocDir)[1]: 5110 if not os.path.splitext(pysideDocDir)[1]:
5118 home = Utilities.normjoinpath(pysideDocDir, 'index.html') 5111 home = Utilities.normjoinpath(pysideDocDir, 'index.html')
5119 else: 5112 else:

eric ide

mercurial