예제 #1
0
 def run(self):
     prefs = Utility.loadPrefs(Globals.options).get(PLUGIN_NAME)
     if prefs is not None:
         license = prefs.get('license')
         if license:
             setLicense(license)
     return False # no need to run again
예제 #2
0
 def run(self):
     prefs = Utility.loadPrefs(Globals.options).get(PLUGIN_NAME)
     if prefs is not None:
         license = prefs.get('license')
         if license:
             setLicense(license)
     return False  # no need to run again
예제 #3
0
def promptLicense():

    dialog = LicenseDialog(wx.GetApp().mainFrame, -1)
    dialog.CenterOnScreen()

    if dialog.ShowModal() == wx.ID_OK:
        params = dialog.getParameters()
    else:
        params = None

    dialog.Destroy()

    if params is not None:
        license = params['license']
        if license:
            prefs = Utility.loadPrefs(Globals.options)
            pluginPrefs = prefs.setdefault(PLUGIN_NAME, {})
            pluginPrefs['license'] = license
            prefs.write()
            setLicense(license)
            return True

    return False
예제 #4
0
def promptLicense():

    dialog = LicenseDialog(wx.GetApp().mainFrame, -1)
    dialog.CenterOnScreen()

    if dialog.ShowModal() == wx.ID_OK:
        params = dialog.getParameters()
    else:
        params = None

    dialog.Destroy()

    if params is not None:
        license = params['license']
        if license:
            prefs = Utility.loadPrefs(Globals.options)
            pluginPrefs = prefs.setdefault(PLUGIN_NAME, {})
            pluginPrefs['license'] = license
            prefs.write()
            setLicense(license)
            return True

    return False