Skip to content

Commit

Permalink
fix(multi_export; submodules: base16): allow to use the same plugin m…
Browse files Browse the repository at this point in the history
…ultiple times in multi-export
  • Loading branch information
actionless committed Jun 13, 2024
1 parent 446357f commit 998dace
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
14 changes: 10 additions & 4 deletions oomox_gui/multi_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,11 @@ def __init__( # pylint: disable=too-many-locals
config_name="multi_export",
force_reload=True,
)
for plugin_name, plugin_config in self.config.config.items():
self.add_export_target(plugin_name, plugin_config)
for _idx, data in self.config.config.items():
plugin_name = data.get("name")
plugin_config = data.get("config")
if plugin_name and plugin_config:
self.add_export_target(plugin_name, plugin_config)

def _on_remove_export_target(self, export: ExportWrapper) -> None:
self.added_plugins.remove(export)
Expand Down Expand Up @@ -212,7 +215,10 @@ def _on_add_export_target(self, action: Gio.SimpleAction, _param: "Any" = None)

def _on_export_all(self, _button: Gtk.Button) -> None:
self.config.config = {}
for export in self.added_plugins:
for idx, export in enumerate(self.added_plugins):
export.export_dialog.do_export()
self.config.config[export.name] = export.export_dialog.export_config.config
self.config.config[str(idx)] = {
"name": export.name,
"config": export.export_dialog.export_config.config,
}
self.config.save()
2 changes: 1 addition & 1 deletion plugins/base16
Submodule base16 updated 1 files
+11 −3 oomox_plugin.py

0 comments on commit 998dace

Please sign in to comment.