From 50ca167167182ac6d4e81fade45f910756a587d0 Mon Sep 17 00:00:00 2001 From: Huluti Date: Mon, 5 Dec 2016 21:55:58 +0100 Subject: [PATCH] Simplify autostart state change --- src/manjaro-hello.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/manjaro-hello.py b/src/manjaro-hello.py index 8c79024..0521013 100644 --- a/src/manjaro-hello.py +++ b/src/manjaro-hello.py @@ -72,15 +72,14 @@ class ManjaroHello(Gtk.Window): if state and not os.path.isfile(self.autostart_path): try: os.symlink(self.desktop_path, self.autostart_path) - self.preferences["autostart"] = True except OSError as e: print(e) elif not state and os.path.isfile(self.autostart_path): try: os.unlink(self.autostart_path) - self.preferences["autostart"] = False except OSError as e: print(e) + self.preferences["autostart"] = state self.save_preferences() def save_preferences(self):