mambabase: remove final page and other fixes/improvements

This commit is contained in:
Silvan Calarco 2019-10-24 18:41:14 +02:00
parent 2ee7762745
commit deba5ae309
3 changed files with 27 additions and 21 deletions

View File

@ -47,12 +47,12 @@ background-color: rgb(255, 255, 255);</string>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<widget class="QLabel" name="label_4">
<widget class="QLabel" name="installPageTitle">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>531</width>
<width>521</width>
<height>31</height>
</rect>
</property>
@ -67,7 +67,7 @@ background-color: rgb(255, 255, 255);</string>
<property name="geometry">
<rect>
<x>20</x>
<y>70</y>
<y>50</y>
<width>511</width>
<height>41</height>
</rect>
@ -80,7 +80,7 @@ background-color: rgb(255, 255, 255);</string>
<property name="geometry">
<rect>
<x>20</x>
<y>120</y>
<y>90</y>
<width>511</width>
<height>21</height>
</rect>
@ -93,9 +93,9 @@ background-color: rgb(255, 255, 255);</string>
<property name="geometry">
<rect>
<x>20</x>
<y>170</y>
<y>130</y>
<width>511</width>
<height>201</height>
<height>241</height>
</rect>
</property>
<property name="frameShape">
@ -110,9 +110,12 @@ background-color: rgb(255, 255, 255);</string>
<x>10</x>
<y>10</y>
<width>491</width>
<height>181</height>
<height>211</height>
</rect>
</property>
<property name="acceptRichText">
<bool>false</bool>
</property>
</widget>
</widget>
</widget>

View File

@ -138,7 +138,7 @@
</rect>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This program will complete the installation by adding the minimum recommended set of packages to the system. Additionally it will let you install, upon selection, macro-group of packages and proprietary software components.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;TIP&lt;/span&gt;: you may run this program later from the &lt;span style=&quot; font-style:italic;&quot;&gt;openmamba control center&lt;/span&gt; on the tray icon bar.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This program will complete the installation by adding the minimum recommended set of packages to the system. Additionally it will let you install, upon selection, macro-group of packages and proprietary software components.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;TIP&lt;/span&gt;: you may run this program at any time from the &lt;span style=&quot; font-style:italic;&quot;&gt;openmamba control center&lt;/span&gt; on the tray icon bar.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="wordWrap">
<bool>true</bool>

View File

@ -30,8 +30,6 @@ class MambabaseWizard(QtWidgets.QWizard):
self.addPage(self.selectExtraPage)
self.installationPage = InstallationPage(self)
self.addPage(self.installationPage)
self.finishPage = FinishPage(self)
self.addPage(self.finishPage)
self.setWindowTitle(_("openmamba base network installations") +
" - openmamba.org")
self.setFixedSize(571,465)
@ -146,18 +144,23 @@ class InstallThread(QtCore.QThread):
for inst in install:
if install[inst]:
self.updateProgressSignal.emit({
'label': _("Installing %s packages..." % inst)})
'label': _("Installing %s packages..." % inst),
'details': _("Installing %s packages..." % inst)})
for pkg in self.pkggroups[inst].split():
result =client.resolve(0, (pkg,), None,
self.packagekit_progress_cb, None)
pkgs = result.get_package_array()
for p in pkgs:
if 'installed' in p.get_data().split(':'):
self.updateProgressSignal.emit({
'details': _("Package %s is already installed" % pkg)})
break
if p.get_arch() != arch:
continue
packageid = p.get_name() + ';' + p.get_version() + ';' \
+ p.get_arch() + ';' + p.get_data()
self.updateProgressSignal.emit({
'details': _("Installing package %s" % pkg)})
client.install_packages(False, (packageid, ), None,
self.packagekit_progress_cb, p.get_name())
@ -170,7 +173,8 @@ class InstallThread(QtCore.QThread):
for extra in install_extras:
if install_extras[extra]:
self.updateProgressSignal.emit({
'label': _("Installing %s extra component..." % extra)})
'label': _("Installing %s extra component..." % extra),
'details': _("Installing %s extra component..." % extra)})
result = subprocess.run(['/usr/bin/openmamba-netsrpms', extra],
stdout=subprocess.PIPE)
if result.returncode == 0:
@ -185,7 +189,8 @@ class InstallThread(QtCore.QThread):
# Finished
self.updateProgressSignal.emit({ 'value': 100,
'label': _("Installation finished!")})
'label': _("Installation finished!"),
'details': _("Installation finished!")})
# Enable back and next buttons
parent.installationPage.done = True
@ -320,6 +325,11 @@ class InstallationPage(QtWidgets.QWizardPage):
self.show()
def isComplete(self):
if self.done:
self.installPageTitle.setText(
_('<html><head/><body><p align="center">' +
'<span style="font-size:14pt; font-weight:600;">' +
'All done!</span></p></body></html>'))
return self.done
@QtCore.pyqtSlot(dict)
@ -329,14 +339,7 @@ class InstallationPage(QtWidgets.QWizardPage):
if 'label' in dict:
self.progressLabel.setText(dict['label'])
if 'details' in dict:
self.progressDetails.setText(dict['details'])
class FinishPage(QtWidgets.QWizardPage):
def __init__(self, parent=None):
super(FinishPage, self).__init__(parent)
uic.loadUi(DATADIR + "FinishPage.ui", self)
self.show()
self.progressDetails.append("<br/>" + dict['details'])
if __name__ == '__main__':