Use python-distro to retrieve distribution information

This commit is contained in:
Silvan Calarco 2022-06-19 11:50:01 +02:00
parent 91dd46e2a6
commit 38f5e7f875
2 changed files with 7 additions and 15 deletions

View File

@ -88,22 +88,12 @@
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label_2">
<widget class="QLabel" name="distroInfoLabel">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;mambabase - Copyright (c) 2007-2021 by Silvan Calarco&lt;br/&gt;Released under the terms of the GNU GPL v3 license&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;a href=&quot;https://openmamba.org&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#2980b9;&quot;&gt;openmamba.org&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python3
# Copyright (c) 2019-2021 by Silvan Calarco <silvan.calarco@mambasoft.it>
# Copyright (c) 2019-2022 by Silvan Calarco <silvan.calarco@mambasoft.it>
# Release under the terms of the GPL version 3 license
from PyQt5 import QtGui, QtCore, QtWidgets, uic
@ -9,6 +9,7 @@ from pathlib import Path
import gettext
import subprocess
import os
import distro
import gi
gi.require_version('PackageKitGlib', '1.0')
@ -21,6 +22,7 @@ class MambabaseWizard(QtWidgets.QWizard):
def __init__(self, parent=None):
super(MambabaseWizard, self).__init__(parent)
self.welcomePage = WelcomePage(self)
self.welcomePage.distroInfoLabel.setText(distro.name(pretty=True))
self.addPage(self.welcomePage)
self.selectGroupsPage = SelectGroupsPage(self)
self.addPage(self.selectGroupsPage)
@ -29,7 +31,7 @@ class MambabaseWizard(QtWidgets.QWizard):
self.installationPage = InstallationPage(self)
self.addPage(self.installationPage)
self.setWindowTitle(_("openmamba base network installations") +
" - openmamba.org")
" - " + distro.name())
self.setFixedSize(571,465)
self.currentIdChanged.connect(self.currentIdChangedSlot)
self.prepareThread = PrepareThread(self)