eric7/UI/UserInterface.py

branch
eric7
changeset 9016
6f079c524e99
parent 9015
dfeefad914ed
child 9020
3d87cd80cd45
equal deleted inserted replaced
9015:dfeefad914ed 9016:6f079c524e99
4400 True 4400 True
4401 ) 4401 )
4402 4402
4403 if res and self.__shutdown(): 4403 if res and self.__shutdown():
4404 ericApp().closeAllWindows() 4404 ericApp().closeAllWindows()
4405 program = sys.executable 4405 program = Globals.getPythonExecutable()
4406 args = ["-m", "eric7", "--start-session"] 4406 args = ["-m", "eric7", "--start-session"]
4407 args.extend(self.__restartArgs) 4407 args.extend(self.__restartArgs)
4408 QProcess.startDetached(program, args) 4408 QProcess.startDetached(program, args)
4409 4409
4410 @pyqtSlot() 4410 @pyqtSlot()
4488 @param upgradeType upgrade operation (one of 'eric', 'ericpyqt', 4488 @param upgradeType upgrade operation (one of 'eric', 'ericpyqt',
4489 'pyqt') 4489 'pyqt')
4490 @type str 4490 @type str
4491 """ 4491 """
4492 ericApp().closeAllWindows() 4492 ericApp().closeAllWindows()
4493 program = sys.executable.replace("w.exe", ".exe") 4493 program = Globals.getPythonExecutable()
4494 ericStartArgs = ["-m", "eric7", "--start-session"] 4494 ericStartArgs = ["-m", "eric7", "--start-session"]
4495 ericStartArgs.extend(self.__restartArgs) 4495 ericStartArgs.extend(self.__restartArgs)
4496 4496
4497 upgrader = os.path.join( 4497 upgrader = os.path.join(
4498 os.path.dirname(__file__), "upgrader.py" 4498 os.path.dirname(__file__), "upgrader.py"
4509 """ 4509 """
4510 Private slot to start a new instance of eric. 4510 Private slot to start a new instance of eric.
4511 """ 4511 """
4512 if not Preferences.getUI("SingleApplicationMode"): 4512 if not Preferences.getUI("SingleApplicationMode"):
4513 # start eric without any arguments 4513 # start eric without any arguments
4514 program = sys.executable 4514 program = Globals.getPythonExecutable()
4515 eric7 = os.path.join(getConfig("ericDir"), "eric7.py") 4515 eric7 = os.path.join(getConfig("ericDir"), "eric7.py")
4516 args = [eric7] 4516 args = [eric7]
4517 QProcess.startDetached(program, args) 4517 QProcess.startDetached(program, args)
4518 4518
4519 def __initToolsMenus(self, menu): 4519 def __initToolsMenus(self, menu):
5675 .format(fn)) 5675 .format(fn))
5676 return 5676 return
5677 5677
5678 if ( 5678 if (
5679 not os.path.isfile(viewer) or 5679 not os.path.isfile(viewer) or
5680 not proc.startDetached(sys.executable, args) 5680 not proc.startDetached(Globals.getPythonExecutable(), args)
5681 ): 5681 ):
5682 EricMessageBox.critical( 5682 EricMessageBox.critical(
5683 self, 5683 self,
5684 self.tr('Process Generation Error'), 5684 self.tr('Process Generation Error'),
5685 self.tr( 5685 self.tr(
5732 .format(fn)) 5732 .format(fn))
5733 return 5733 return
5734 5734
5735 if ( 5735 if (
5736 not os.path.isfile(viewer) or 5736 not os.path.isfile(viewer) or
5737 not proc.startDetached(sys.executable, args) 5737 not proc.startDetached(Globals.getPythonExecutable(), args)
5738 ): 5738 ):
5739 EricMessageBox.critical( 5739 EricMessageBox.critical(
5740 self, 5740 self,
5741 self.tr('Process Generation Error'), 5741 self.tr('Process Generation Error'),
5742 self.tr( 5742 self.tr(
5755 args = [] 5755 args = []
5756 args.append(browser) 5756 args.append(browser)
5757 5757
5758 if ( 5758 if (
5759 not os.path.isfile(browser) or 5759 not os.path.isfile(browser) or
5760 not proc.startDetached(sys.executable, args) 5760 not proc.startDetached(Globals.getPythonExecutable(), args)
5761 ): 5761 ):
5762 EricMessageBox.critical( 5762 EricMessageBox.critical(
5763 self, 5763 self,
5764 self.tr('Process Generation Error'), 5764 self.tr('Process Generation Error'),
5765 self.tr( 5765 self.tr(
5840 args = [] 5840 args = []
5841 args.append(snap) 5841 args.append(snap)
5842 5842
5843 if ( 5843 if (
5844 not os.path.isfile(snap) or 5844 not os.path.isfile(snap) or
5845 not proc.startDetached(sys.executable, args) 5845 not proc.startDetached(Globals.getPythonExecutable(), args)
5846 ): 5846 ):
5847 EricMessageBox.critical( 5847 EricMessageBox.critical(
5848 self, 5848 self,
5849 self.tr('Process Generation Error'), 5849 self.tr('Process Generation Error'),
5850 self.tr( 5850 self.tr(
6373 "--qthelp", 6373 "--qthelp",
6374 "--single", 6374 "--single",
6375 "--name={0}".format(self.__webBrowserSAName), 6375 "--name={0}".format(self.__webBrowserSAName),
6376 home 6376 home
6377 ] 6377 ]
6378 process.start(sys.executable, args) 6378 process.start(Globals.getPythonExecutable(), args)
6379 if not process.waitForStarted(): 6379 if not process.waitForStarted():
6380 EricMessageBox.warning( 6380 EricMessageBox.warning(
6381 self, 6381 self,
6382 self.tr("Start Web Browser"), 6382 self.tr("Start Web Browser"),
6383 self.tr("""The eric web browser could not be""" 6383 self.tr("""The eric web browser could not be"""

eric ide

mercurial