diff options
author | Papoteur <papoteur@mageia.org> | 2018-12-08 12:06:29 +0100 |
---|---|---|
committer | Papoteur <papoteur@mageia.org> | 2018-12-15 15:46:34 +0100 |
commit | e0224d6dfdcea8f90ecab1beda041b5da5c46bad (patch) | |
tree | c3262efde5f07ca2122fa85b08da7af6663d35c6 | |
parent | 64d4ec18517c77f61e57bcf26f11cbca1cc297ba (diff) | |
download | mageiawelcome-e0224d6dfdcea8f90ecab1beda041b5da5c46bad.tar mageiawelcome-e0224d6dfdcea8f90ecab1beda041b5da5c46bad.tar.gz mageiawelcome-e0224d6dfdcea8f90ecab1beda041b5da5c46bad.tar.bz2 mageiawelcome-e0224d6dfdcea8f90ecab1beda041b5da5c46bad.tar.xz mageiawelcome-e0224d6dfdcea8f90ecab1beda041b5da5c46bad.zip |
Prepare management of automatic launch at start
-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) |