summaryrefslogtreecommitdiffstats
path: root/qml
diff options
context:
space:
mode:
Diffstat (limited to 'qml')
-rw-r--r--qml/mageiawelcome.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/qml/mageiawelcome.py b/qml/mageiawelcome.py
index c21f930..0870f6b 100644
--- a/qml/mageiawelcome.py
+++ b/qml/mageiawelcome.py
@@ -4,6 +4,7 @@ from PyQt5.QtGui import QGuiApplication
from PyQt5.QtQuick import QQuickView
from PyQt5.QtCore import QUrl, QLocale, QTranslator, QLibraryInfo, QVariant, QAbstractListModel, \
QModelIndex, Qt, QObject, pyqtSlot
+from PyQt5.QtNetwork import QNetworkConfigurationManager, QNetworkConfiguration
import sys
import os
import subprocess
@@ -40,6 +41,14 @@ class ConfList(QAbstractListModel):
if desktop == 'unknown':
desktop = os.getenv("XDG_CURRENT_DESKTOP")
+ # Search active network connections
+ net = QNetworkConfigurationManager()
+ netconfs = ""
+ if net.isOnline():
+ confs = net.allConfigurations(QNetworkConfiguration.Active)
+ for conf in confs:
+ netconfs += ", " + conf.name()
+
self.configuration = [
{'name': self.tr("<b>Congratulations!</b><BR />You have completed the installation of {}").format(release)},
{'name': self.tr("You are using linux kernel: {}").format(kernel)},
@@ -47,6 +56,11 @@ class ConfList(QAbstractListModel):
{'name': self.tr("You are now using the Desktop: {}").format(desktop)},
{'name': self.tr("Your user id is: {}").format(os.getuid())},
]
+ if net.isOnline():
+ self.configuration.append({'name': self.tr("You are connected to a network through {}").format(netconfs)})
+ else:
+ self.configuration.append({'name': self.tr("You have no network connection")})
+
def data(self, index, role=Qt.DisplayRole):
row = index.row()