Use icons from distribution icons theme; several UI improvements
26
Makefile
@ -6,16 +6,6 @@ include VERSION
|
||||
ARCH:=`uname -i`
|
||||
|
||||
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 =
|
||||
|
||||
@ -41,10 +31,6 @@ xdg_directorydir = ${datadir}/desktop-directories
|
||||
xdg_menudir = ${sysconfdir}/xdg/menus
|
||||
xdg_mergedmenudir = $(xdg_menudir)/applications-merged
|
||||
|
||||
distrorootdir = ${datadir}/$(DISTROid)
|
||||
distrobindir = ${distrorootdir}/bin
|
||||
distrosrpmsdir = ${distrorootdir}/SRPMS
|
||||
distrodesktopdir = ${distrorootdir}/desktop
|
||||
srcdir = .
|
||||
|
||||
INSTALL = /usr/bin/install
|
||||
@ -76,12 +62,6 @@ install-locales: locales
|
||||
done
|
||||
@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_DIR) $(DESTDIR)$(bindir)
|
||||
@$(INSTALL_DIR) $(DESTDIR)$(mambareportdatadir)
|
||||
@ -89,14 +69,11 @@ install-mambareport:
|
||||
$(INSTALL_SCRIPT) mambareport/mambareport $(DESTDIR)$(bindir)/mambareport
|
||||
$(INSTALL_SCRIPT) mambareport/mambareport.py $(DESTDIR)$(mambareportdatadir)
|
||||
$(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)
|
||||
|
||||
install: $(pck_infiles:.in=) \
|
||||
install-mambareport \
|
||||
install-locales \
|
||||
install-icons
|
||||
install-locales
|
||||
|
||||
dist: clean
|
||||
@mkdir /tmp/$(distdir)
|
||||
@ -115,4 +92,3 @@ clean:
|
||||
rm -f $(dist_archive)
|
||||
rm -f $(patsubst %.in,%,$(pck_infiles))
|
||||
rm -f $(pck_catalogs:.po=.mo)
|
||||
rm -f $(pck_catalogs1:.po=.mo)
|
||||
|
@ -108,9 +108,9 @@ background-color: rgb(255, 255, 255);</string>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>20</y>
|
||||
<y>30</y>
|
||||
<width>491</width>
|
||||
<height>201</height>
|
||||
<height>191</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="documentTitle">
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>552</width>
|
||||
<height>380</height>
|
||||
<height>385</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@ -16,6 +16,12 @@
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
@ -55,7 +61,7 @@
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<x>30</x>
|
||||
<y>10</y>
|
||||
<width>491</width>
|
||||
<height>61</height>
|
||||
@ -71,7 +77,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap>openmamba.png</pixmap>
|
||||
<pixmap>/usr/share/pixmaps/vendor-logo-large.png</pixmap>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
@ -88,22 +94,12 @@
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<widget class="QLabel" name="distroInfoLabel">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p><span style=" font-style:italic;">mambareport - Copyright (c) 2022 by Silvan Calarco<br/>Released under the terms of the GNU GPL v3 license</span></p></body></html></string>
|
||||
<string><html><head/><body><p><br/></p></body></html></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><html><head/><body><p><a href="https://openmamba.org"><span style=" text-decoration: underline; color:#2980b9;">openmamba.org</span></a></p></body></html></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -120,7 +116,7 @@
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<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 name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
@ -131,14 +127,14 @@
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>511</width>
|
||||
<height>16</height>
|
||||
<x>20</x>
|
||||
<y>60</y>
|
||||
<width>501</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>Please enter a description of the reason why you are generating a diagnostic report:</p></body></html></string>
|
||||
<string><html><head/><body><p>Please enter a description of the problem(s) you are reporting:</p></body></html></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
@ -163,13 +159,32 @@
|
||||
<widget class="QLineEdit" name="reasonLineEdit">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>40</y>
|
||||
<width>531</width>
|
||||
<height>29</height>
|
||||
<x>20</x>
|
||||
<y>80</y>
|
||||
<width>511</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
</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>
|
||||
</item>
|
||||
</layout>
|
||||
|
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 859 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 12 KiB |
@ -9,6 +9,7 @@ from pathlib import Path
|
||||
import gettext
|
||||
import subprocess
|
||||
import os
|
||||
import distro
|
||||
|
||||
import gi
|
||||
gi.require_version('PackageKitGlib', '1.0')
|
||||
@ -20,13 +21,18 @@ DATADIR = os.path.dirname(os.path.realpath((__file__))) + "/"
|
||||
class MambareportWizard(QtWidgets.QWizard):
|
||||
def __init__(self, parent=None):
|
||||
super(MambareportWizard, self).__init__(parent)
|
||||
self.setWindowTitle(_("Diagnostic report tool") +
|
||||
" - {}".format(distro.name()))
|
||||
self.setFixedSize(571,465)
|
||||
|
||||
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.generateReportPage = GenerateReportPage(self)
|
||||
self.addPage(self.generateReportPage)
|
||||
self.setWindowTitle(_("Diagnostic report tool") +
|
||||
" - openmamba.org")
|
||||
self.setFixedSize(571,465)
|
||||
self.currentIdChanged.connect(self.currentIdChangedSlot)
|
||||
self.generateReportThread = GenerateReportThread(self)
|
||||
|
||||
@ -65,7 +71,7 @@ class GenerateReportThread(QtCore.QThread):
|
||||
self.updateProgressSignal.emit({
|
||||
'details': result.stderr.decode('UTF-8').replace('\n', '<br/>')})
|
||||
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
|
||||
self.parent.generateReportPage.done = True
|
||||
self.doneSignal.emit()
|
||||
@ -105,7 +111,7 @@ class GenerateReportPage(QtWidgets.QWizardPage):
|
||||
if __name__ == '__main__':
|
||||
import sys
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
app.setWindowIcon(QtGui.QIcon(DATADIR + "mambareport.png"))
|
||||
app.setWindowIcon(QtGui.QIcon.fromTheme("mambareport"))
|
||||
# UI translations
|
||||
locale = QLocale.system().name()
|
||||
language = locale[0:2]
|
||||
|
@ -5,39 +5,35 @@
|
||||
<name>Form</name>
|
||||
<message>
|
||||
<location filename="GenerateReportPage.ui" line="20"/>
|
||||
<location filename="WelcomePage.ui" line="20"/>
|
||||
<location filename="WelcomePage.ui" line="26"/>
|
||||
<source>Form</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Form</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="GenerateReportPage.ui" line="60"/>
|
||||
<source><html><head/><body><p align="center"><span style=" font-size:14pt; font-weight:600;">Generating report...</span></p></body></html></source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation><html><head/><body><p align="center"><span style=" font-size:14pt; font-weight:600;">Generazione del report...</span></p></body></html></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="GenerateReportPage.ui" line="133"/>
|
||||
<source><html><head/><body><p><span style=" font-weight:600;">Report generation output:</span></p></body></html></source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation><html><head/><body><p><span style=" font-weight:600;">Esito della generazione del report:</span></p></body></html></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="WelcomePage.ui" line="93"/>
|
||||
<source><html><head/><body><p><span style=" font-style:italic;">mambareport - Copyright (c) 2022 by Silvan Calarco<br/>Released under the terms of the GNU GPL v3 license</span></p></body></html></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="WelcomePage.ui" line="103"/>
|
||||
<source><html><head/><body><p><a href="https://openmamba.org"><span style=" text-decoration: underline; color:#2980b9;">openmamba.org</span></a></p></body></html></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="WelcomePage.ui" line="141"/>
|
||||
<source><html><head/><body><p>Please enter a description of the reason why you are generating a diagnostic report:</p></body></html></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="WelcomePage.ui" line="160"/>
|
||||
<location filename="WelcomePage.ui" line="99"/>
|
||||
<location filename="WelcomePage.ui" line="156"/>
|
||||
<source><html><head/><body><p><br/></p></body></html></source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="WelcomePage.ui" line="137"/>
|
||||
<source><html><head/><body><p>Please enter a description of the problem(s) you are reporting:</p></body></html></source>
|
||||
<translation><html><head/><body><p>Inserisci una descrizione del problema che intendi segnalare:</p></body></html></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>
|
||||
</context>
|
||||
</TS>
|
||||
|
Before Width: | Height: | Size: 6.3 KiB |
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\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"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
@ -16,15 +16,14 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: mambareport.py:27
|
||||
#: mambareport.py:24
|
||||
msgid "Diagnostic report tool"
|
||||
msgstr "Generazione di un report diagnostico"
|
||||
|
||||
#: mambareport.py:68
|
||||
msgid "Done. Report saved as {}."
|
||||
msgstr "Fatto. Report salvato in {}."
|
||||
#: mambareport.py:74
|
||||
msgid "Done. Report saved as <b>{}</b>."
|
||||
msgstr "Fatto. Report salvato in <b>{}</b>."
|
||||
|
||||
#: mambareport.py:54
|
||||
#: mambareport.py:60
|
||||
msgid "Generating report..."
|
||||
msgstr "Generazione del report..."
|
||||
|
||||
|
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\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"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -17,14 +17,14 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: mambareport.py:27
|
||||
#: mambareport.py:24
|
||||
msgid "Diagnostic report tool"
|
||||
msgstr ""
|
||||
|
||||
#: mambareport.py:68
|
||||
msgid "Done. Report saved as {}."
|
||||
#: mambareport.py:74
|
||||
msgid "Done. Report saved as <b>{}</b>."
|
||||
msgstr ""
|
||||
|
||||
#: mambareport.py:54
|
||||
#: mambareport.py:60
|
||||
msgid "Generating report..."
|
||||
msgstr ""
|
||||
|