Ejemplo n.º 1
0
    def apply_rules(self):
        Logger.debug("Writing rules dict: {0}".format(self.rules_dict))
        with open(self.USER_RULES, "w") as json_file:
            json.dump(self.rules_dict, json_file, indent=4)

        try:
            syntax.HighlightManager.remove_connection()
            syntax.HighlightManager.create_connection()
        except BaseException:
            Logger.exception("Failed to apply new rules")
Ejemplo n.º 2
0
 def create(cls):
     cls.delete_old()
     try:
         pm.menuItem(cls.ITEM_OBJECT,
                     l=cls.ITEM_LABEL,
                     parent=cls.WINDOW_MENU,
                     i="colorProfile.svg",
                     ia="wmNodeEditor",
                     c=settingsDialog.Dialog.display)
         Logger.info("Created menuItem: Windows>ColorOut")
     except Exception:
         Logger.exception("Error when creating menu item")