def checkversion_callback(self): import MMurl import version import windowinterface import settings url = 'http://www.oratrix.com/indir/%s/updatecheck.txt' % version.shortversion try: fp = MMurl.urlopen(url) data = fp.read() fp.close() except: windowinterface.showmessage( 'Unable to check for upgrade. You can try again later, or visit www.oratrix.com with your webbrowser.' ) print "Could not load URL", url return data = data.strip() if not data: windowinterface.showmessage( 'You are running the latest version of the software') return cancel = windowinterface.GetOKCancel( 'There appears to be a newer version!\nDo you want to know more?') if cancel: return # Pass the version and the second item of the license along. id = settings.get('license').split('-')[1] url = '%s?version=%s&id=%s' % (data, version.shortversion, id) windowinterface.htmlwindow(url)
def __init__(self, opts, files): import windowinterface, features if hasattr(features, 'expiry_date') and features.expiry_date: import time import version tm = time.localtime(time.time()) yymmdd = tm[:3] if yymmdd > features.expiry_date: rv = windowinterface.GetOKCancel( "This beta copy of GRiNS has expired.\n\n" "Do you want to check www.oratrix.com for a newer version?" ) if rv == 0: url = 'http://www.oratrix.com/indir/%s/update.html' % version.shortversion windowinterface.htmlwindow(url) sys.exit(0) self.tmpopts = opts self.tmpfiles = files flag = hasattr(windowinterface, 'is_embedded') and windowinterface.is_embedded() if hasattr(features, 'license_features_needed' ) and features.license_features_needed and not flag: import license license_features_needed = list(features.license_features_needed) if 'smil2player' not in license_features_needed: license_features_needed.append('smil2player') self.tmplicensedialog = license.WaitLicense( self.do_init, license_features_needed) else: self.do_init() self.recent_file_list = []
def checkversion_callback(self): import MMurl import windowinterface url = self._get_versiondep_url('updatecheck.txt') try: fp = MMurl.urlopen(url) data = fp.read() fp.close() except: windowinterface.showmessage( 'Unable to check for upgrade. You can try again later, or visit www.oratrix.com with your webbrowser.' ) return data = data.strip() if not data: windowinterface.showmessage( 'You are running the latest version of the software.') return cancel = windowinterface.GetOKCancel( 'There appears to be a newer version!\nDo you want to know more?') if cancel: return url = self._add_license_id(self, data) windowinterface.htmlwindow(url)
def __init__(self, opts, files, splash): import windowinterface import license self.splash = splash if hasattr(features, 'expiry_date') and features.expiry_date: import time import version tm = time.localtime(time.time()) yymmdd = tm[:3] if yymmdd > features.expiry_date: rv = windowinterface.GetOKCancel( "This beta copy of GRiNS has expired.\n\n" "Do you want to check www.oratrix.com for a newer version?" ) if rv == 0: url = self._get_versiondep_url('update.html') windowinterface.htmlwindow(url) sys.exit(0) self.tmpopts = opts self.tmpfiles = files self.tmplicensedialog = license.WaitLicense( self.do_init, features.license_features_needed) self.recent_file_list = [ ] # This is the list of recently opened files.
def __init__(self): import windowinterface if hasattr(features, 'expiry_date') and features.expiry_date: import time import version tm = time.localtime(time.time()) yymmdd = tm[:3] if yymmdd > features.expiry_date: rv = windowinterface.GetOKCancel( "This beta copy of GRiNS has expired.\n\n" "Do you want to check www.oratrix.com for a newer version?" ) if rv == 0: url = 'http://www.oratrix.com/indir/%s/update.html' % version.shortversion windowinterface.htmlwindow(url) sys.exit(0) self.do_init()
def givehelp(topic, web=0): global helpwindow import windowinterface if topic == 'buy' and hasattr(features, 'buyurl'): helpurl = features.buyurl else: fixhelpdir() helpfile = '%s.html'%topic if web: base = helpbase_web else: base = helpbase helpurl = MMurl.basejoin(base, helpfile) if helpwindow is not None and not helpwindow.is_closed(): helpwindow.goto_url(helpurl) else: helpwindow = windowinterface.htmlwindow(helpurl)
def register_callback(self): import windowinterface url = self._get_versiondep_url('register.html') url = self._add_license_id(url, fullkey=1) windowinterface.htmlwindow(url)