mirror of
https://github.com/GradienceTeam/Gradience.git
synced 2024-08-26 09:22:32 +00:00
fix: delete preset toast
This commit is contained in:
parent
204cd773bd
commit
613ec1ed2b
1 changed files with 19 additions and 0 deletions
|
@ -177,6 +177,25 @@ class GradiencePresetRow(Adw.ActionRow):
|
||||||
)
|
)
|
||||||
finally:
|
finally:
|
||||||
self.win.reload_pref_group()
|
self.win.reload_pref_group()
|
||||||
|
else:
|
||||||
|
try:
|
||||||
|
os.rename(os.path.join(
|
||||||
|
os.environ.get("XDG_CONFIG_HOME",
|
||||||
|
os.environ["HOME"] + "/.config"),
|
||||||
|
"presets",
|
||||||
|
self.prefix,
|
||||||
|
to_slug_case(self.old_name) + ".json.to_delete",
|
||||||
|
), os.path.join(
|
||||||
|
os.environ.get("XDG_CONFIG_HOME",
|
||||||
|
os.environ["HOME"] + "/.config"),
|
||||||
|
"presets",
|
||||||
|
self.prefix,
|
||||||
|
to_slug_case(self.old_name) + ".json",
|
||||||
|
))
|
||||||
|
except Exception as exception:
|
||||||
|
print(exception.with_traceback())
|
||||||
|
finally:
|
||||||
|
self.win.reload_pref_group()
|
||||||
|
|
||||||
self.delete_preset = True
|
self.delete_preset = True
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue