This commit is contained in:
0xMRTT 2022-10-11 19:13:53 +02:00
parent 9b6b87b326
commit 0b19a9e5a7
No known key found for this signature in database
2 changed files with 3 additions and 2 deletions

View file

@ -87,7 +87,7 @@ class GradienceApplication(Adw.Application):
self.style_manager = Adw.StyleManager.get_default()
self.preset = None
self.preset: Preset = None
def do_activate(self):
"""Called when the application is activated.
@ -781,7 +781,7 @@ class GradienceApplication(Adw.Application):
dialog.present()
def save_preset(self, _unused, response, entry):
def save_preset(self, _unused, response, preset_entry):
if response == "save":
self.preset.save_preset(to_slug_case(preset_entry.get_text()), self.plugins_list)
self.clear_dirty()

View file

@ -88,6 +88,7 @@ class Preset:
buglog(error, " -> preset : ", self.preset_path)
def save_preset(self, name=None, plugins_list=None, to=None):
self.name = name if name else self.name
if to is None:
self.preset_path = os.path.join(
presets_dir, self.repo, self.name + ".json")