Пример #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