Exemple #1
0
    def __init__(self):

        self.list = [
            ("PIL", None, ["Legion"], "https://pypi.python.org/pypi/Pillow"),
            #("wx", None, ["Settings Window"], "http://www.wxpython.org"),
            ("win32ui", "pywin32", ["very many essential"],
             "http://sourceforge.net/projects/pywin32")
        ]
        warnings = 0
        for dep in self.list:
            is_win32ui = dep[0] == "win32ui"
            try:
                exec("import " + dep[0])
            except ImportError:
                if not dep[0] in settings.SETTINGS["one time warnings"]:
                    warnings += 1
                    settings.SETTINGS["one time warnings"][dep[0]] = True
                    urgency = "You can get it at " if is_win32ui else "If you wish to use those features, you can get it at "
                    print("\n" + dep[0] + " is required for ", dep[2],
                          " features. " + urgency + dep[3] + "\n")
            else:
                name = dep[0] if not is_win32ui else dep[1]
                exec("self." + name.upper() + "=True")
        if warnings > 0:
            settings.save_config()
Exemple #2
0
    def __init__(self):

        self.list = [
            ("PIL", None, ["Legion"], "https://pypi.python.org/pypi/Pillow"),
            #("wx", None, ["Settings Window"], "http://www.wxpython.org"),
            ("win32ui", "pywin32", ["very many essential"],
             "http://sourceforge.net/projects/pywin32")
        ]
        warnings = 0
        for dep in self.list:
            is_win32ui = dep[0] == "win32ui"
            try:
                exec ("import " + dep[0])
            except ImportError:
                if not dep[0] in settings.SETTINGS["one time warnings"]:
                    warnings += 1
                    settings.SETTINGS["one time warnings"][dep[0]] = True
                    urgency = "You can get it at " if is_win32ui else "If you wish to use those features, you can get it at "
                    print("\n" + dep[0] + " is required for ", dep[2],
                          " features. " + urgency + dep[3] + "\n")
            else:
                name = dep[0] if not is_win32ui else dep[1]
                exec ("self." + name.upper() + "=True")
        if warnings > 0:
            settings.save_config()
Exemple #3
0
 def node_rule_active(self, name, value):
     print self.get_node_rule(name).node, value
     
     self.get_node_rule(name).node.active = value
     
     print 5
     settings.SETTINGS["nodes"][name] = value
     settings.save_config()
Exemple #4
0
def toggle_status(nexus):
    enabled = settings.SETTINGS["miscellaneous"]["status_window_enabled"]
    if enabled:
        nexus.intermediary.kill()
    else:
        utilities.launch_status()
    settings.SETTINGS["miscellaneous"]["status_window_enabled"] = not enabled
    settings.save_config()
Exemple #5
0
def toggle_status():
    enabled = settings.SETTINGS["miscellaneous"]["status_window_enabled"]
    if enabled:
        control.nexus().intermediary.kill()
    else:
        launch_status()
    settings.SETTINGS["miscellaneous"]["status_window_enabled"] = not enabled
    settings.save_config()
Exemple #6
0
def toggle_status():
    enabled = settings.SETTINGS["miscellaneous"]["status_window_enabled"]
    if enabled:
        control.nexus().intermediary.kill()
    else:
        launch_status()
    settings.SETTINGS["miscellaneous"]["status_window_enabled"] = not enabled
    settings.save_config()
Exemple #7
0
def set_active_command(enable_disable, ccr_mode):
    ccr_mode = str(ccr_mode)
    if int(enable_disable) == 1:
        set_active(ccr_mode)
    else:
        settings.SETTINGS["ccr"]["modes"][ccr_mode] = False
        set_active()

    # activate and save
    settings.save_config()
    refresh()
Exemple #8
0
def set_active_command(enable_disable, ccr_mode):
    ccr_mode = str(ccr_mode)
    if int(enable_disable) == 1:
        set_active(ccr_mode)
    else:
        settings.SETTINGS["ccr"]["modes"][ccr_mode] = False
        set_active()
        
    # activate and save
    settings.save_config()
    refresh()
Exemple #9
0
 def node_rule_active(self, name, value):        
     self.get_node_rule(name).master_node.active = value
     
     settings.SETTINGS["nodes"][name] = value
     settings.save_config()
Exemple #10
0
def receive_settings(data):
    settings.SETTINGS = data
    settings.save_config()
Exemple #11
0
 def save_it(self, e):
     settings.SETTINGS = self.tree_to_dictionary()
     settings.save_config()
Exemple #12
0
def receive_settings(data):
    settings.SETTINGS = data
    settings.save_config()
Exemple #13
0
def get_settings_from_settings_window(data):
    settings.SETTINGS = data
    settings.save_config()
Exemple #14
0
    def node_rule_active(self, name, value):
        self.get_node_rule(name).master_node.active = value

        settings.SETTINGS["nodes"][name] = value
        settings.save_config()
Exemple #15
0
def get_settings_from_settings_window(data):
    settings.SETTINGS = data
    settings.save_config()