Use icons from distribution icons theme; several UI improvements

This commit is contained in:
Silvan Calarco 2022-06-19 20:12:54 +02:00
parent 41cbb8cb6b
commit 148c6049a6
15 changed files with 83 additions and 91 deletions

View File

@ -6,16 +6,6 @@ include VERSION
ARCH:=`uname -i` ARCH:=`uname -i`
PACKAGE = mambareport PACKAGE = mambareport
DISTROID = openmamba
RPM_VENDOR = openmamba
RPM_DISTRIBUTION = openmamba
RPM_DISTROEXT = mamba
SYSCONFIGFILE = netsrpminstall
DISTROid = $(shell echo $(DISTROID) | tr A-Z a-z)
DISTROICON = $(DISTROid)
DESTDIR = DESTDIR =
@ -41,10 +31,6 @@ xdg_directorydir = ${datadir}/desktop-directories
xdg_menudir = ${sysconfdir}/xdg/menus xdg_menudir = ${sysconfdir}/xdg/menus
xdg_mergedmenudir = $(xdg_menudir)/applications-merged xdg_mergedmenudir = $(xdg_menudir)/applications-merged
distrorootdir = ${datadir}/$(DISTROid)
distrobindir = ${distrorootdir}/bin
distrosrpmsdir = ${distrorootdir}/SRPMS
distrodesktopdir = ${distrorootdir}/desktop
srcdir = . srcdir = .
INSTALL = /usr/bin/install INSTALL = /usr/bin/install
@ -76,12 +62,6 @@ install-locales: locales
done done
@lrelease-qt5 mambareport/mambareport_it.ts -qm $(DESTDIR)$(datadir)/locale/it/LC_MESSAGES/mambareport.qm @lrelease-qt5 mambareport/mambareport_it.ts -qm $(DESTDIR)$(datadir)/locale/it/LC_MESSAGES/mambareport.qm
install-icons:
@for i in 16x16 22x22 32x32 48x48 64x64 128x128; do \
$(INSTALL_DIR) $(DESTDIR)$(iconsdir)/$$i/apps/; \
$(INSTALL_DATA) mambareport/mambareport-$$i.png $(DESTDIR)$(iconsdir)/$$i/apps/mambareport.png; \
done
install-mambareport: install-mambareport:
@$(INSTALL_DIR) $(DESTDIR)$(bindir) @$(INSTALL_DIR) $(DESTDIR)$(bindir)
@$(INSTALL_DIR) $(DESTDIR)$(mambareportdatadir) @$(INSTALL_DIR) $(DESTDIR)$(mambareportdatadir)
@ -89,14 +69,11 @@ install-mambareport:
$(INSTALL_SCRIPT) mambareport/mambareport $(DESTDIR)$(bindir)/mambareport $(INSTALL_SCRIPT) mambareport/mambareport $(DESTDIR)$(bindir)/mambareport
$(INSTALL_SCRIPT) mambareport/mambareport.py $(DESTDIR)$(mambareportdatadir) $(INSTALL_SCRIPT) mambareport/mambareport.py $(DESTDIR)$(mambareportdatadir)
$(INSTALL_DATA) mambareport/mambareport.desktop $(DESTDIR)$(xdg_appsdir) $(INSTALL_DATA) mambareport/mambareport.desktop $(DESTDIR)$(xdg_appsdir)
$(INSTALL_DATA) mambareport/openmamba.png $(DESTDIR)$(mambareportdatadir)
$(INSTALL_DATA) mambareport/mambareport.png $(DESTDIR)$(mambareportdatadir)
cp mambareport/*.ui $(DESTDIR)$(mambareportdatadir) cp mambareport/*.ui $(DESTDIR)$(mambareportdatadir)
install: $(pck_infiles:.in=) \ install: $(pck_infiles:.in=) \
install-mambareport \ install-mambareport \
install-locales \ install-locales
install-icons
dist: clean dist: clean
@mkdir /tmp/$(distdir) @mkdir /tmp/$(distdir)
@ -115,4 +92,3 @@ clean:
rm -f $(dist_archive) rm -f $(dist_archive)
rm -f $(patsubst %.in,%,$(pck_infiles)) rm -f $(patsubst %.in,%,$(pck_infiles))
rm -f $(pck_catalogs:.po=.mo) rm -f $(pck_catalogs:.po=.mo)
rm -f $(pck_catalogs1:.po=.mo)

View File

@ -108,9 +108,9 @@ background-color: rgb(255, 255, 255);</string>
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>10</x> <x>10</x>
<y>20</y> <y>30</y>
<width>491</width> <width>491</width>
<height>201</height> <height>191</height>
</rect> </rect>
</property> </property>
<property name="documentTitle"> <property name="documentTitle">

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>552</width> <width>552</width>
<height>380</height> <height>385</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -16,6 +16,12 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>Form</string> <string>Form</string>
</property> </property>
@ -55,7 +61,7 @@
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>20</x> <x>30</x>
<y>10</y> <y>10</y>
<width>491</width> <width>491</width>
<height>61</height> <height>61</height>
@ -71,7 +77,7 @@
<string/> <string/>
</property> </property>
<property name="pixmap"> <property name="pixmap">
<pixmap>openmamba.png</pixmap> <pixmap>/usr/share/pixmaps/vendor-logo-large.png</pixmap>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignCenter</set> <set>Qt::AlignCenter</set>
@ -88,22 +94,12 @@
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
<widget class="QLabel" name="label_2"> <widget class="QLabel" name="distroInfoLabel">
<property name="text"> <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;mambareport - Copyright (c) 2022 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>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> <set>Qt::AlignCenter</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>
</property> </property>
</widget> </widget>
</item> </item>
@ -120,7 +116,7 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(239, 240, 241);</string> <string notr="true">background-color: rgb(255,255,255);</string>
</property> </property>
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::StyledPanel</enum> <enum>QFrame::StyledPanel</enum>
@ -131,14 +127,14 @@
<widget class="QLabel" name="label_4"> <widget class="QLabel" name="label_4">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>10</x> <x>20</x>
<y>10</y> <y>60</y>
<width>511</width> <width>501</width>
<height>16</height> <height>20</height>
</rect> </rect>
</property> </property>
<property name="text"> <property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Please enter a description of the reason why you are generating a diagnostic report:&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Please enter a description of the problem(s) you are reporting:&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
@ -163,13 +159,32 @@
<widget class="QLineEdit" name="reasonLineEdit"> <widget class="QLineEdit" name="reasonLineEdit">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>10</x> <x>20</x>
<y>40</y> <y>80</y>
<width>531</width> <width>511</width>
<height>29</height> <height>31</height>
</rect> </rect>
</property> </property>
</widget> </widget>
<widget class="QLabel" name="label_2">
<property name="geometry">
<rect>
<x>20</x>
<y>20</y>
<width>521</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Generate a system report to help us diagnose your problem</string>
</property>
</widget>
</widget> </widget>
</item> </item>
</layout> </layout>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 859 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

View File

@ -9,6 +9,7 @@ from pathlib import Path
import gettext import gettext
import subprocess import subprocess
import os import os
import distro
import gi import gi
gi.require_version('PackageKitGlib', '1.0') gi.require_version('PackageKitGlib', '1.0')
@ -20,13 +21,18 @@ DATADIR = os.path.dirname(os.path.realpath((__file__))) + "/"
class MambareportWizard(QtWidgets.QWizard): class MambareportWizard(QtWidgets.QWizard):
def __init__(self, parent=None): def __init__(self, parent=None):
super(MambareportWizard, self).__init__(parent) super(MambareportWizard, self).__init__(parent)
self.setWindowTitle(_("Diagnostic report tool") +
" - {}".format(distro.name()))
self.setFixedSize(571,465)
self.welcomePage = WelcomePage(self) self.welcomePage = WelcomePage(self)
self.welcomePage.distroInfoLabel.setText(distro.name(pretty=True) +
"<br/><br/><a href=\""+distro.os_release_info()['home_url']+
"\">" + distro.os_release_info()['home_url'] + "</a>")
self.addPage(self.welcomePage) self.addPage(self.welcomePage)
self.generateReportPage = GenerateReportPage(self) self.generateReportPage = GenerateReportPage(self)
self.addPage(self.generateReportPage) self.addPage(self.generateReportPage)
self.setWindowTitle(_("Diagnostic report tool") +
" - openmamba.org")
self.setFixedSize(571,465)
self.currentIdChanged.connect(self.currentIdChangedSlot) self.currentIdChanged.connect(self.currentIdChangedSlot)
self.generateReportThread = GenerateReportThread(self) self.generateReportThread = GenerateReportThread(self)
@ -65,7 +71,7 @@ class GenerateReportThread(QtCore.QThread):
self.updateProgressSignal.emit({ self.updateProgressSignal.emit({
'details': result.stderr.decode('UTF-8').replace('\n', '<br/>')}) 'details': result.stderr.decode('UTF-8').replace('\n', '<br/>')})
self.updateProgressSignal.emit({ 'value': 100, self.updateProgressSignal.emit({ 'value': 100,
'label': _("Done. Report saved as {}.").format(reportFile)}) 'label': _("Done. Report saved as <b>{}</b>.").format(reportFile)})
# Enable back and next buttons # Enable back and next buttons
self.parent.generateReportPage.done = True self.parent.generateReportPage.done = True
self.doneSignal.emit() self.doneSignal.emit()
@ -105,7 +111,7 @@ class GenerateReportPage(QtWidgets.QWizardPage):
if __name__ == '__main__': if __name__ == '__main__':
import sys import sys
app = QtWidgets.QApplication(sys.argv) app = QtWidgets.QApplication(sys.argv)
app.setWindowIcon(QtGui.QIcon(DATADIR + "mambareport.png")) app.setWindowIcon(QtGui.QIcon.fromTheme("mambareport"))
# UI translations # UI translations
locale = QLocale.system().name() locale = QLocale.system().name()
language = locale[0:2] language = locale[0:2]

View File

@ -5,39 +5,35 @@
<name>Form</name> <name>Form</name>
<message> <message>
<location filename="GenerateReportPage.ui" line="20"/> <location filename="GenerateReportPage.ui" line="20"/>
<location filename="WelcomePage.ui" line="20"/> <location filename="WelcomePage.ui" line="26"/>
<source>Form</source> <source>Form</source>
<translation type="unfinished"></translation> <translation>Form</translation>
</message> </message>
<message> <message>
<location filename="GenerateReportPage.ui" line="60"/> <location filename="GenerateReportPage.ui" line="60"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:14pt; font-weight:600;&quot;&gt;Generating report...&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:14pt; font-weight:600;&quot;&gt;Generating report...&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:14pt; font-weight:600;&quot;&gt;Generazione del report...&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message> </message>
<message> <message>
<location filename="GenerateReportPage.ui" line="133"/> <location filename="GenerateReportPage.ui" line="133"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Report generation output:&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Report generation output:&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Esito della generazione del report:&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message> </message>
<message> <message>
<location filename="WelcomePage.ui" line="93"/> <location filename="WelcomePage.ui" line="99"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;mambareport - Copyright (c) 2022 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;</source> <location filename="WelcomePage.ui" line="156"/>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="WelcomePage.ui" line="103"/>
<source>&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;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="WelcomePage.ui" line="141"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Please enter a description of the reason why you are generating a diagnostic report:&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="WelcomePage.ui" line="160"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation></translation>
</message>
<message>
<location filename="WelcomePage.ui" line="137"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Please enter a description of the problem(s) you are reporting:&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Inserisci una descrizione del problema che intendi segnalare:&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="WelcomePage.ui" line="185"/>
<source>Generate a system report to help us diagnose your problem</source>
<translation>Genera un report del sistema per aiutare a diagnosticare il tuo problema</translation>
</message> </message>
</context> </context>
</TS> </TS>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-06-18 16:58+0200\n" "POT-Creation-Date: 2022-06-19 20:04+0200\n"
"Last-Translator: Silvan Calarco <silvan.calarco@mambasoft.it>\n" "Last-Translator: Silvan Calarco <silvan.calarco@mambasoft.it>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n" "Language: \n"
@ -16,15 +16,14 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: mambareport.py:27 #: mambareport.py:24
msgid "Diagnostic report tool" msgid "Diagnostic report tool"
msgstr "Generazione di un report diagnostico" msgstr "Generazione di un report diagnostico"
#: mambareport.py:68 #: mambareport.py:74
msgid "Done. Report saved as {}." msgid "Done. Report saved as <b>{}</b>."
msgstr "Fatto. Report salvato in {}." msgstr "Fatto. Report salvato in <b>{}</b>."
#: mambareport.py:54 #: mambareport.py:60
msgid "Generating report..." msgid "Generating report..."
msgstr "Generazione del report..." msgstr "Generazione del report..."

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-06-18 16:58+0200\n" "POT-Creation-Date: 2022-06-19 20:04+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -17,14 +17,14 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n" "Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: mambareport.py:27 #: mambareport.py:24
msgid "Diagnostic report tool" msgid "Diagnostic report tool"
msgstr "" msgstr ""
#: mambareport.py:68 #: mambareport.py:74
msgid "Done. Report saved as {}." msgid "Done. Report saved as <b>{}</b>."
msgstr "" msgstr ""
#: mambareport.py:54 #: mambareport.py:60
msgid "Generating report..." msgid "Generating report..."
msgstr "" msgstr ""