1143 if self.passiveMode: |
1143 if self.passiveMode: |
1144 if not self.capProject and not self.capEditor: |
1144 if not self.capProject and not self.capEditor: |
1145 self.setWindowTitle( |
1145 self.setWindowTitle( |
1146 self.trUtf8("{0} - Passive Mode").format(Program)) |
1146 self.trUtf8("{0} - Passive Mode").format(Program)) |
1147 elif self.capProject and not self.capEditor: |
1147 elif self.capProject and not self.capEditor: |
1148 self.setWindowTitle(self.trUtf8("{0} - {1} - Passive Mode")\ |
1148 self.setWindowTitle(self.trUtf8("{0} - {1} - Passive Mode") |
1149 .format(self.capProject, Program)) |
1149 .format(self.capProject, Program)) |
1150 elif not self.capProject and self.capEditor: |
1150 elif not self.capProject and self.capEditor: |
1151 self.setWindowTitle(self.trUtf8("{0} - {1} - Passive Mode")\ |
1151 self.setWindowTitle(self.trUtf8("{0} - {1} - Passive Mode") |
1152 .format(self.capEditor, Program)) |
1152 .format(self.capEditor, Program)) |
1153 else: |
1153 else: |
1154 self.setWindowTitle( |
1154 self.setWindowTitle( |
1155 self.trUtf8("{0} - {1} - {2} - Passive Mode")\ |
1155 self.trUtf8("{0} - {1} - {2} - Passive Mode") |
1156 .format(self.capProject, self.capEditor, Program)) |
1156 .format(self.capProject, self.capEditor, Program)) |
1157 else: |
1157 else: |
1158 if not self.capProject and not self.capEditor: |
1158 if not self.capProject and not self.capEditor: |
1159 self.setWindowTitle(Program) |
1159 self.setWindowTitle(Program) |
1160 elif self.capProject and not self.capEditor: |
1160 elif self.capProject and not self.capEditor: |
4506 E5MessageBox.critical( |
4506 E5MessageBox.critical( |
4507 self, |
4507 self, |
4508 self.trUtf8('Process Generation Error'), |
4508 self.trUtf8('Process Generation Error'), |
4509 self.trUtf8( |
4509 self.trUtf8( |
4510 '<p>Could not start the tool entry <b>{0}</b>.<br>' |
4510 '<p>Could not start the tool entry <b>{0}</b>.<br>' |
4511 'Ensure that it is available as <b>{1}</b>.</p>')\ |
4511 'Ensure that it is available as <b>{1}</b>.</p>') |
4512 .format(tool['menutext'], tool['executable'])) |
4512 .format(tool['menutext'], tool['executable'])) |
4513 else: |
4513 else: |
4514 self.toolProcs.append((program, proc, procData)) |
4514 self.toolProcs.append((program, proc, procData)) |
4515 if tool['redirect'] == 'no': |
4515 if tool['redirect'] == 'no': |
4516 proc.closeReadChannel(QProcess.StandardOutput) |
4516 proc.closeReadChannel(QProcess.StandardOutput) |
4615 if not os.path.exists(home): |
4615 if not os.path.exists(home): |
4616 E5MessageBox.warning( |
4616 E5MessageBox.warning( |
4617 self, |
4617 self, |
4618 self.trUtf8("Documentation Missing"), |
4618 self.trUtf8("Documentation Missing"), |
4619 self.trUtf8("""<p>The documentation starting point""" |
4619 self.trUtf8("""<p>The documentation starting point""" |
4620 """ "<b>{0}</b>" could not be found.</p>""")\ |
4620 """ "<b>{0}</b>" could not be found.</p>""") |
4621 .format(home)) |
4621 .format(home)) |
4622 return |
4622 return |
4623 |
4623 |
4624 if not home.endswith(".chm"): |
4624 if not home.endswith(".chm"): |
4625 if Utilities.isWindowsPlatform(): |
4625 if Utilities.isWindowsPlatform(): |
4672 if not os.path.exists(home): |
4672 if not os.path.exists(home): |
4673 E5MessageBox.warning( |
4673 E5MessageBox.warning( |
4674 self, |
4674 self, |
4675 self.trUtf8("Documentation Missing"), |
4675 self.trUtf8("Documentation Missing"), |
4676 self.trUtf8("""<p>The documentation starting point""" |
4676 self.trUtf8("""<p>The documentation starting point""" |
4677 """ "<b>{0}</b>" could not be found.</p>""")\ |
4677 """ "<b>{0}</b>" could not be found.</p>""") |
4678 .format(home)) |
4678 .format(home)) |
4679 return |
4679 return |
4680 |
4680 |
4681 if not home.endswith(".chm"): |
4681 if not home.endswith(".chm"): |
4682 if Utilities.isWindowsPlatform(): |
4682 if Utilities.isWindowsPlatform(): |
4741 if not os.path.exists(home): |
4741 if not os.path.exists(home): |
4742 E5MessageBox.warning( |
4742 E5MessageBox.warning( |
4743 self, |
4743 self, |
4744 self.trUtf8("Documentation Missing"), |
4744 self.trUtf8("Documentation Missing"), |
4745 self.trUtf8("""<p>The documentation starting point""" |
4745 self.trUtf8("""<p>The documentation starting point""" |
4746 """ "<b>{0}</b>" could not be found.</p>""")\ |
4746 """ "<b>{0}</b>" could not be found.</p>""") |
4747 .format(home)) |
4747 .format(home)) |
4748 return |
4748 return |
4749 |
4749 |
4750 if Utilities.isWindowsPlatform(): |
4750 if Utilities.isWindowsPlatform(): |
4751 home = "file:///" + Utilities.fromNativeSeparators(home) |
4751 home = "file:///" + Utilities.fromNativeSeparators(home) |
4783 home = "" |
4783 home = "" |
4784 if pyqt4DocDir: |
4784 if pyqt4DocDir: |
4785 if pyqt4DocDir.startswith("file://"): |
4785 if pyqt4DocDir.startswith("file://"): |
4786 pyqt4DocDir = pyqt4DocDir[7:] |
4786 pyqt4DocDir = pyqt4DocDir[7:] |
4787 if not os.path.splitext(pyqt4DocDir)[1]: |
4787 if not os.path.splitext(pyqt4DocDir)[1]: |
4788 possibleHomes = [\ |
4788 possibleHomes = [ |
4789 Utilities.normjoinpath(pyqt4DocDir, 'index.html'), |
4789 Utilities.normjoinpath(pyqt4DocDir, 'index.html'), |
4790 Utilities.normjoinpath(pyqt4DocDir, 'classes.html'), |
4790 Utilities.normjoinpath(pyqt4DocDir, 'classes.html'), |
4791 ] |
4791 ] |
4792 for possibleHome in possibleHomes: |
4792 for possibleHome in possibleHomes: |
4793 if os.path.exists(possibleHome): |
4793 if os.path.exists(possibleHome): |
4799 if not home or not os.path.exists(home): |
4799 if not home or not os.path.exists(home): |
4800 E5MessageBox.warning( |
4800 E5MessageBox.warning( |
4801 self, |
4801 self, |
4802 self.trUtf8("Documentation Missing"), |
4802 self.trUtf8("Documentation Missing"), |
4803 self.trUtf8("""<p>The documentation starting point""" |
4803 self.trUtf8("""<p>The documentation starting point""" |
4804 """ "<b>{0}</b>" could not be found.</p>""")\ |
4804 """ "<b>{0}</b>" could not be found.</p>""") |
4805 .format(home)) |
4805 .format(home)) |
4806 return |
4806 return |
4807 |
4807 |
4808 if Utilities.isWindowsPlatform(): |
4808 if Utilities.isWindowsPlatform(): |
4809 home = "file:///" + Utilities.fromNativeSeparators(home) |
4809 home = "file:///" + Utilities.fromNativeSeparators(home) |
4861 if not home or not os.path.exists(home): |
4861 if not home or not os.path.exists(home): |
4862 E5MessageBox.warning( |
4862 E5MessageBox.warning( |
4863 self, |
4863 self, |
4864 self.trUtf8("Documentation Missing"), |
4864 self.trUtf8("Documentation Missing"), |
4865 self.trUtf8("""<p>The documentation starting point""" |
4865 self.trUtf8("""<p>The documentation starting point""" |
4866 """ "<b>{0}</b>" could not be found.</p>""")\ |
4866 """ "<b>{0}</b>" could not be found.</p>""") |
4867 .format(home)) |
4867 .format(home)) |
4868 return |
4868 return |
4869 |
4869 |
4870 if Utilities.isWindowsPlatform(): |
4870 if Utilities.isWindowsPlatform(): |
4871 home = "file:///" + Utilities.fromNativeSeparators(home) |
4871 home = "file:///" + Utilities.fromNativeSeparators(home) |
4897 if not os.path.exists(home): |
4897 if not os.path.exists(home): |
4898 E5MessageBox.warning( |
4898 E5MessageBox.warning( |
4899 self, |
4899 self, |
4900 self.trUtf8("Documentation Missing"), |
4900 self.trUtf8("Documentation Missing"), |
4901 self.trUtf8("""<p>The documentation starting point""" |
4901 self.trUtf8("""<p>The documentation starting point""" |
4902 """ "<b>{0}</b>" could not be found.</p>""")\ |
4902 """ "<b>{0}</b>" could not be found.</p>""") |
4903 .format(home)) |
4903 .format(home)) |
4904 return |
4904 return |
4905 |
4905 |
4906 if Utilities.isWindowsPlatform(): |
4906 if Utilities.isWindowsPlatform(): |
4907 home = "file:///" + Utilities.fromNativeSeparators(home) |
4907 home = "file:///" + Utilities.fromNativeSeparators(home) |
4945 if not os.path.exists(home): |
4945 if not os.path.exists(home): |
4946 E5MessageBox.warning( |
4946 E5MessageBox.warning( |
4947 self, |
4947 self, |
4948 self.trUtf8("Documentation Missing"), |
4948 self.trUtf8("Documentation Missing"), |
4949 self.trUtf8("""<p>The documentation starting point""" |
4949 self.trUtf8("""<p>The documentation starting point""" |
4950 """ "<b>{0}</b>" could not be found.</p>""")\ |
4950 """ "<b>{0}</b>" could not be found.</p>""") |
4951 .format(home)) |
4951 .format(home)) |
4952 return |
4952 return |
4953 |
4953 |
4954 if Utilities.isWindowsPlatform(): |
4954 if Utilities.isWindowsPlatform(): |
4955 home = "file:///" + Utilities.fromNativeSeparators(home) |
4955 home = "file:///" + Utilities.fromNativeSeparators(home) |
5428 if not os.path.exists(fn): |
5428 if not os.path.exists(fn): |
5429 E5MessageBox.critical( |
5429 E5MessageBox.critical( |
5430 self, |
5430 self, |
5431 self.trUtf8("Read session"), |
5431 self.trUtf8("Read session"), |
5432 self.trUtf8( |
5432 self.trUtf8( |
5433 "<p>The session file <b>{0}</b> could not be read.</p>")\ |
5433 "<p>The session file <b>{0}</b> could not be read.</p>") |
5434 .format(fn)) |
5434 .format(fn)) |
5435 return |
5435 return |
5436 |
5436 |
5437 f = QFile(fn) |
5437 f = QFile(fn) |
5438 if f.open(QIODevice.ReadOnly): |
5438 if f.open(QIODevice.ReadOnly): |
5443 else: |
5443 else: |
5444 E5MessageBox.critical( |
5444 E5MessageBox.critical( |
5445 self, |
5445 self, |
5446 self.trUtf8("Read session"), |
5446 self.trUtf8("Read session"), |
5447 self.trUtf8( |
5447 self.trUtf8( |
5448 "<p>The session file <b>{0}</b> could not be read.</p>")\ |
5448 "<p>The session file <b>{0}</b> could not be read.</p>") |
5449 .format(fn)) |
5449 .format(fn)) |
5450 |
5450 |
5451 def showFindFileByNameDialog(self): |
5451 def showFindFileByNameDialog(self): |
5452 """ |
5452 """ |
5453 Public slot to show the Find File by Name dialog. |
5453 Public slot to show the Find File by Name dialog. |
5881 self, |
5881 self, |
5882 self.trUtf8("Update available"), |
5882 self.trUtf8("Update available"), |
5883 self.trUtf8( |
5883 self.trUtf8( |
5884 """The update to <b>{0}</b> of eric5 is""" |
5884 """The update to <b>{0}</b> of eric5 is""" |
5885 """ available at <b>{1}</b>. Would you like to""" |
5885 """ available at <b>{1}</b>. Would you like to""" |
5886 """ get it?""")\ |
5886 """ get it?""") |
5887 .format(versions[2], versions[3]), |
5887 .format(versions[2], versions[3]), |
5888 yesDefault=True) |
5888 yesDefault=True) |
5889 url = res and versions[3] or '' |
5889 url = res and versions[3] or '' |
5890 elif versions[0] > Version: |
5890 elif versions[0] > Version: |
5891 res = E5MessageBox.yesNo( |
5891 res = E5MessageBox.yesNo( |
5892 self, |
5892 self, |
5893 self.trUtf8("Update available"), |
5893 self.trUtf8("Update available"), |
5894 self.trUtf8( |
5894 self.trUtf8( |
5895 """The update to <b>{0}</b> of eric5 is""" |
5895 """The update to <b>{0}</b> of eric5 is""" |
5896 """ available at <b>{1}</b>. Would you like to""" |
5896 """ available at <b>{1}</b>. Would you like to""" |
5897 """ get it?""")\ |
5897 """ get it?""") |
5898 .format(versions[0], versions[1]), |
5898 .format(versions[0], versions[1]), |
5899 yesDefault=True) |
5899 yesDefault=True) |
5900 url = res and versions[1] or '' |
5900 url = res and versions[1] or '' |
5901 else: |
5901 else: |
5902 if self.manualUpdatesCheck: |
5902 if self.manualUpdatesCheck: |
5913 self, |
5913 self, |
5914 self.trUtf8("Update available"), |
5914 self.trUtf8("Update available"), |
5915 self.trUtf8( |
5915 self.trUtf8( |
5916 """The update to <b>{0}</b> of eric5 is""" |
5916 """The update to <b>{0}</b> of eric5 is""" |
5917 """ available at <b>{1}</b>. Would you like""" |
5917 """ available at <b>{1}</b>. Would you like""" |
5918 """ to get it?""")\ |
5918 """ to get it?""") |
5919 .format(versions[0], versions[1]), |
5919 .format(versions[0], versions[1]), |
5920 yesDefault=True) |
5920 yesDefault=True) |
5921 url = res and versions[1] or '' |
5921 url = res and versions[1] or '' |
5922 else: |
5922 else: |
5923 if self.manualUpdatesCheck: |
5923 if self.manualUpdatesCheck: |
5960 break |
5960 break |
5961 |
5961 |
5962 versionText += """<tr><td>{0}</td><td><a href="{1}">{2}</a>""" \ |
5962 versionText += """<tr><td>{0}</td><td><a href="{1}">{2}</a>""" \ |
5963 """</td></tr>""".format( |
5963 """</td></tr>""".format( |
5964 versions[line], versions[line + 1], |
5964 versions[line], versions[line + 1], |
5965 'sourceforge' in versions[line + 1] and \ |
5965 'sourceforge' in versions[line + 1] and |
5966 "SourceForge" or versions[line + 1]) |
5966 "SourceForge" or versions[line + 1]) |
5967 line += 2 |
5967 line += 2 |
5968 versionText += self.trUtf8("""</table>""") |
5968 versionText += self.trUtf8("""</table>""") |
5969 |
5969 |
5970 E5MessageBox.about(self, Program, versionText) |
5970 E5MessageBox.about(self, Program, versionText) |