def PromptContinue(self): #returns False if user quits return not askYes(self.parent, _(u'You did not create a backup of the Bash settings.')+u'\n' + _(u'If you continue, your current settings may be overwritten.')+u'\n' + _(u'Do you want to quit Wrye Bash now?'), _(u'No backup created!'))
def PromptQuit(self): #returns True if user quits return askYes(self.parent, _(u'There was an error while trying to backup the Bash settings!')+u'\n' + _(u'If you continue, your current settings may be overwritten.')+u'\n' + _(u'Do you want to quit Wrye Bash now?'), _(u'Unable to create backup!'))
def _rightWxVersion(): run = True import wx wxver = wx.version() if not u'unicode' in wxver.lower() and not u'2.9' in wxver: # Can't use translatable strings, because they'd most likely end up # being in unicode! run = balt.askYes(None, 'Warning: you appear to be using a non-unicode ' 'version of wxPython (%s). This will cause ' 'problems! It is highly recommended you use a ' 'unicode version of wxPython instead. Do you ' 'still want to run Wrye Bash?' % wxver, 'Warning: Non-Unicode wxPython detected', ) return run
def PromptConfirm(self,msg=None): # returns False if user cancels msg = msg or _(u'Do you want to restore your Bash settings from a backup?') msg += u'\n\n' + _(u'This will force a restart of Wrye Bash once your settings are restored.') return askYes(self.parent,msg,_(u'Restore Bash Settings?'))
def PromptConfirm(self,msg=None): msg = msg or _(u'Do you want to backup your Bash settings now?') return askYes(self.parent,msg,_(u'Backup Bash Settings?'))
basher.InitLinks() basher.InitImages() #--Start application if opts.debug: if hasattr(sys, 'frozen'): # Special case for py2exe version app = basher.BashApp() else: app = basher.BashApp(False) else: app = basher.BashApp() if sys.version[0:3] < '2.6': #nasty, may cause failure in oneInstanceChecker but better than bash failing to open things for no (user) apparent reason such as in 2.5.2 and under. bolt.close_fds = False if sys.version[0:3] == 2.5: run = balt.askYes(None,"Warning: You are using a python version prior to 2.6 and there may be some instances that failures will occur. Updating is recommended but not imperative. Do you still want to run Wrye Bash right now?","Warning OLD Python version detected") else: run = balt.askYes(None,"Warning: You are using a Python version prior to 2.5x which is totally out of date and ancient and Bash will likely not like it and may totally refuse to work. Please update to a more recent version of Python(2.6x or 2.7x is preferred). Do you still want to run Wrye Bash?", "Warning OLD Python version detected") if not run: return # process backup/restore options quit = False # quit if either is true, but only after calling both quit = quit or not cmdBackup() quit = quit or not cmdRestore() if quit: return app.Init() # Testing code to see if a spawned process is blocking the one instance checker from working ## try: app.MainLoop()
def PromptConfirm(msg=None): msg = msg or _(u'Do you want to backup your Bash settings now?') return askYes(Link.Frame, msg, _(u'Backup Bash Settings?'))
app = basher.BashApp() # Regain control of stdout/stderr from wxPython sys.stdout = old_stderr sys.stderr = old_stderr else: app = basher.BashApp(False) else: app = basher.BashApp() import wx wxver = wx.version() if not u'unicode' in wxver.lower() and not u'2.9' in wxver: # Can't use translatable strings, because they'd most likely end up being in unicode! if not balt.askYes(None, 'Warning: you appear to be using a non-unicode version of wxPython (%s). This will cause problems! It is highly recommended you use a unicode version of wxPython instead. Do you still want to run Wrye Bash?' % wxver, 'Warning: Non-Unicode wxPython detected', ): return sysVersion = (sys.version_info[0],sys.version_info[1],sys.version_info[2]) if sysVersion < (2,6): #nasty, may cause failure in oneInstanceChecker but better than bash failing to open things for no (user) apparent reason such as in 2.5.2 and under. bolt.close_fds = False if sysVersion[:2] == (2,5): run = balt.askYes(None, _(u"Warning: You are using a python version prior to 2.6 and there may be some instances that failures will occur. Updating to Python 2.7x is recommended but not imperative. Do you still want to run Wrye Bash right now?"), _(u"Warning OLD Python version detected") ) else: run = balt.askYes(None, _(u"Warning: You are using a Python version prior to 2.5x which is totally out of date and ancient and Bash will likely not like it and may totally refuse to work. Please update to a more recent version of Python(2.7x is preferred). Do you still want to run Wrye Bash?"), _(u"Warning OLD Python version detected")
def PromptConfirm(self,msg=None): # returns False if user cancels msg = msg or _('Do you want to restore your Bash settings from a backup?') return askYes(self.parent,msg,_('Restore Bash Settings?'))
title=title, expander=[_(u'How to avoid this message in the future'), _(u'Less information'),( _(u'Use one of the following command line switches:') + u'\n\n' + _(u'--no-uac: always run normally') + u'\n' + _(u'--uac: always run with Admin Privileges') + u'\n\n' + _( u'See the <A href="%(readmePath)s">readme</A> ' u'for more information.') % { 'readmePath':readme})], ) else: uacRestart = balt.askYes(None,message + u'\n\n' + _( u'Start Wrye Bash with Administrator Privileges?'), title) elif opts.uac: uacRestart = True if uacRestart: basher.appRestart = True basher.uacRestart = True return frame = app.Init() # Link.Frame is set here ! frame.booting = False app.MainLoop() # Show error in gui ----------------------------------------------------------- def _showErrorInGui(e): """Try really hard to be able to show the error in the GUI."""