diff options
Diffstat (limited to 'qml/mw.py')
-rw-r--r-- | qml/mw.py | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -91,15 +91,16 @@ class Norun(QObject): self.conffile = self.home + "/.config/mageiawelcome/norun.flag" print(self.conffile, os.path.exists(self.conffile)) - @pyqtSlot() - def setRunAtLaunch(self): - if os.path.exists(self.conffile): + @pyqtSlot(bool) + def setRunAtLaunch(self, checked): + print("Setting",checked) + if checked: + if os.path.exists(self.conffile): os.remove( self.conffile) - @pyqtSlot() - def setNoRunAtLaunch(self): - os.makedirs(self.home + "/.config/mageiawelcome", exist_ok=True) - with open( self.conffile, w) as f: - pass + else: + os.makedirs(self.home + "/.config/mageiawelcome", exist_ok=True) + with open( self.conffile, 'w') as f: + pass @pyqtSlot(result=bool) def startupcheck(self): |