From f7364e1ca95fa207acaee989b9645538f806f87b Mon Sep 17 00:00:00 2001 From: Papoteur Date: Sat, 8 Dec 2018 12:06:29 +0100 Subject: Prepare management of automatic launch at start --- qml/mw.py | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'qml') diff --git a/qml/mw.py b/qml/mw.py index 51fc544..e5be88d 100644 --- a/qml/mw.py +++ b/qml/mw.py @@ -115,11 +115,11 @@ class ConfList(QAbstractListModel): desktop = os.getenv("XDG_CURRENT_DESKTOP") self.configuration = [ - {'name': release}, - {'name': _("kernel: {}").format(kernel)}, - {'name': _("arch: {}").format(arch)}, - {'name': _("Desktop: {}").format(desktop)}, - {'name': _("Your user's id: {}").format(os.getuid())}, + {'name': _("Congratulations! You have completed the installation of {}").format(release)}, + {'name': _("You are using linux kernel: {}").format(kernel)}, + {'name': _("Your system architecture is: {}").format(arch)}, + {'name': _("You are now using the Desktop: {}").format(desktop)}, + {'name': _("Your user's id is: {}").format(os.getuid())}, ] def data(self, index, role=Qt.DisplayRole): @@ -155,6 +155,22 @@ class Launcher(QObject): cmd.append(app.property(i).toString()) subprocess.Popen(cmd) +class Norun(QObject): + def __init__(self): + QObject.__init__(self) + self.home = os.getenv("HOME") + self.conffile = self.home + "/.config/mageiawelcome/norun.flag" + + @pyqtSlot() + def setRunAtLaunch(self): + 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 + class Installable(QObject): def __init__(self): QObject.__init__(self) -- cgit v1.2.1