diff options
author | Papoteur <papoteur@mageia.org> | 2018-12-08 12:06:29 +0100 |
---|---|---|
committer | Papoteur <papoteur@mageia.org> | 2018-12-17 10:19:29 +0100 |
commit | f7364e1ca95fa207acaee989b9645538f806f87b (patch) | |
tree | 807c34e2a395ce406824092cbad331cad43fc747 /qml/mw.py | |
parent | b5e6ee8f6b8b91fc2aef2f75f6c48932ef7b6165 (diff) | |
download | mageiawelcome-f7364e1ca95fa207acaee989b9645538f806f87b.tar mageiawelcome-f7364e1ca95fa207acaee989b9645538f806f87b.tar.gz mageiawelcome-f7364e1ca95fa207acaee989b9645538f806f87b.tar.bz2 mageiawelcome-f7364e1ca95fa207acaee989b9645538f806f87b.tar.xz mageiawelcome-f7364e1ca95fa207acaee989b9645538f806f87b.zip |
Prepare management of automatic launch at start
Diffstat (limited to 'qml/mw.py')
-rw-r--r-- | qml/mw.py | 26 |
1 files changed, 21 insertions, 5 deletions
@@ -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) |