summaryrefslogtreecommitdiffstats
path: root/qml/mw.py
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageia.org>2018-12-08 12:06:29 +0100
committerPapoteur <papoteur@mageia.org>2018-12-17 10:19:29 +0100
commitf7364e1ca95fa207acaee989b9645538f806f87b (patch)
tree807c34e2a395ce406824092cbad331cad43fc747 /qml/mw.py
parentb5e6ee8f6b8b91fc2aef2f75f6c48932ef7b6165 (diff)
downloadmageiawelcome-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.py26
1 files changed, 21 insertions, 5 deletions
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)