feat: add apply for presets

This commit is contained in:
0xMRTT 2022-09-10 10:38:16 +02:00
parent 8992b7af93
commit d8746ddfd5
No known key found for this signature in database
GPG key ID: AC9E06BF3DECB6FB
2 changed files with 7 additions and 0 deletions

View file

@ -601,6 +601,9 @@ class GradienceApplication(Adw.Application):
os.path.join(gtk3_dir, "gtk.css"), "w", encoding="utf-8"
) as file:
file.write(gtk3_css)
self.plugins_list.apply()
self.win.toast_overlay.add_toast(
Adw.Toast(title=_("Preset set sucessfully"))
)

View file

@ -92,3 +92,7 @@ class GradiencePluginsList:
if error:
errors.append(detail)
return errors
def apply(self):
for pluginInfo in self.pm.getAllPlugins():
pluginInfo.plugin_object.apply()