def plugins_dict(self): from class_plugins import Plugins import localization, collections lang = localization.get_lang() data = collections.OrderedDict() data["all"] = lang.get("log_all_messages", "All messages") for plugin in Plugins.get_all(): data["p" + plugin.guid] = plugin.name for macros in plugin.get_macros(): data["m" + macros.guid] = "--" + macros.name return data
def main(): from class_plugins import Plugins from widget_plugins import WidgetPlugins from VEE_resources import delete_plugin_dir if "plugin_id" in session and session["plugin_id"]: plugin = Plugins.get_by_id(session.get("plugin_id")) delete_plugin_dir(plugin.guid) plugin.delete() widget_plugins = WidgetPlugins() plugins_obj = Plugins.get_all() widget_plugins.set_data(plugins_obj) widget_plugins.render(self.datatable_plugin) self.dialog_uninstall.action("hide", [])
if child.name: DatabaseManager(new_plugin.guid).import_db( child.name, base64.b64decode(child.db_source)) elif child.tag == "resource": child = XMLResource(child) if child.name: ResourceFolderManager(new_plugin.guid).import_res( child.name, base64.b64decode(child.res_source)) else: self.growl.title = lang["error"] self.growl.text = lang["xml_not_correctr_error"] self.growl.visible = "1" widget_plugins = WidgetPlugins() plugins_obj = Plugins.get_all() widget_plugins.set_data(plugins_obj) widget_plugins.render(self.datatable_plugin) # localization_wdgt = LocalizationWidget() # # localization_wdgt.add_controls( "dialog_uninstall_plugin_title", self.dialog_uninstall ) # localization_wdgt.add_controls( "btn_upload_files", self.dialog_uninstall.button_apply ) # localization_wdgt.add_controls( "btn_new_folder", self.dialog_uninstall.button_cancel ) # localization_wdgt.add_controls( "dialog_uninstall_plugin_text", self.dialog_uninstall.text_uninstall ) # # localization_wdgt.render() main()