Added standard path about usbinstall icons
This commit is contained in:
parent
3c274117c5
commit
2834485f12
8
Makefile
8
Makefile
@ -4,11 +4,11 @@
|
||||
|
||||
PACKAGE := usbinstall
|
||||
|
||||
include VERSION
|
||||
|
||||
distdir := $(PACKAGE)-$(VERSION)
|
||||
dist_archive := $(distdir).tar.bz2
|
||||
|
||||
include VERSION
|
||||
|
||||
# Directory
|
||||
bindir := /usr/bin
|
||||
datadir := /usr/share
|
||||
@ -53,10 +53,10 @@ install: install-dirs install-locales
|
||||
$(INSTALL_SCRIPT) src/usbinstall.sh $(DESTDIR)$(mambadir)/usbinstall/usbinstall.sh
|
||||
$(INSTALL_PROGRAM) src/gui.py $(DESTDIR)$(mambadir)/usbinstall/gui.py
|
||||
$(INSTALL_DATA) src/fdisk_template $(DESTDIR)$(mambadir)/usbinstall/fdisk_template
|
||||
$(INSTALL_DATA) src/img/* $(DESTDIR)$(mambadir)/usbinstall/img/
|
||||
$(INSTALL_DATA) src/img/*.png $(DESTDIR)$(mambadir)/usbinstall/img/
|
||||
# Crea un link in /usr/bin agli eseguibili in $(mambadir)/usbinstall
|
||||
ln -s $(DESTDIR)$(mambadir)/usbinstall/usbinstall.py $(DESTDIR)$(bindir)/usbinstall.py
|
||||
|
||||
ln -s $(DESTDIR)$(mambadir)/usbinstall/usbinstall.sh $(DESTDIR)$(bindir)/usbinstall.sh
|
||||
|
||||
|
||||
clean:
|
||||
|
28
src/gui.py
28
src/gui.py
@ -16,9 +16,25 @@ except AttributeError:
|
||||
|
||||
class Ui_MainWindow(object):
|
||||
def setupUi(self, MainWindow):
|
||||
|
||||
|
||||
# Percorsi delle immagini del form (da scommentare le vars. delle icone che si voglono usare)
|
||||
#---GNOME---
|
||||
img_help = "/usr/share/icons/gnome/24x24/status/dialog-question.png"
|
||||
img_fOpen = "/usr/share/icons/gnome/32x32/actions/document-open.png"
|
||||
img_refresh = "/usr/share/icons/gnome/24x24/actions/view-refresh.png"
|
||||
window_icon = "/usr/share/icons/hicolor/32x32/apps/mamba.png"
|
||||
|
||||
#---KDE--- (***Da testare***)
|
||||
#img_help = "/opt/kde/share/icons/oxygen/22x22/status/dialog-information.png"
|
||||
#img_fOpen = "/opt/kde/share/icons/oxygen/32x32/actions/document-open-folder.png"
|
||||
#img_refresh = "/opt/kde/share/icons/oxygen/22x22/actions/view-refresh.png"
|
||||
#window_icon = "/usr/share/icons/hicolor/32x32/apps/mamba.png"
|
||||
|
||||
# Codice per la finestra
|
||||
MainWindow.setObjectName(_fromUtf8("MainWindow"))
|
||||
MainWindow.resize(500, 405)
|
||||
MainWindow.setWindowIcon(QtGui.QIcon(_fromUtf8(window_icon)))
|
||||
MainWindow.setWindowTitle(_fromUtf8(""))
|
||||
self.centralwidget = QtGui.QWidget(MainWindow)
|
||||
self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
|
||||
@ -58,7 +74,7 @@ class Ui_MainWindow(object):
|
||||
self.b_help.setGeometry(QtCore.QRect(464, 320, 26, 26))
|
||||
self.b_help.setText(_fromUtf8(""))
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(_fromUtf8("img/dialog-question.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon.addPixmap(QtGui.QPixmap(_fromUtf8(img_help)), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.b_help.setIcon(icon)
|
||||
self.b_help.setIconSize(QtCore.QSize(24, 24))
|
||||
self.b_help.setFlat(True)
|
||||
@ -73,7 +89,7 @@ class Ui_MainWindow(object):
|
||||
self.pach1 = QtGui.QLabel(self.centralwidget)
|
||||
self.pach1.setGeometry(QtCore.QRect(430, 320, 32, 27))
|
||||
self.pach1.setText(_fromUtf8(""))
|
||||
self.pach1.setPixmap(QtGui.QPixmap(_fromUtf8("img/pach1.png")))
|
||||
self.pach1.setPixmap(QtGui.QPixmap(_fromUtf8("/usr/share/openmamba/usbinstall/img/pach1.png")))
|
||||
self.pach1.setObjectName(_fromUtf8("pach1"))
|
||||
|
||||
# Bottone sopra la parte della finta casella di testo
|
||||
@ -81,7 +97,7 @@ class Ui_MainWindow(object):
|
||||
self.b_apri_file.setGeometry(QtCore.QRect(431, 320, 31, 27))
|
||||
self.b_apri_file.setText(_fromUtf8(""))
|
||||
icon1 = QtGui.QIcon()
|
||||
icon1.addPixmap(QtGui.QPixmap(_fromUtf8("img/document-open.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon1.addPixmap(QtGui.QPixmap(_fromUtf8(img_fOpen)), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.b_apri_file.setIcon(icon1)
|
||||
self.b_apri_file.setFlat(True)
|
||||
self.b_apri_file.setObjectName(_fromUtf8("b_apri_file"))
|
||||
@ -90,7 +106,7 @@ class Ui_MainWindow(object):
|
||||
self.n_img = QtGui.QLabel(self.centralwidget)
|
||||
self.n_img.setGeometry(QtCore.QRect(289, 200, 211, 121))
|
||||
self.n_img.setText(_fromUtf8(""))
|
||||
self.n_img.setPixmap(QtGui.QPixmap(_fromUtf8("img/nuvola.png")))
|
||||
self.n_img.setPixmap(QtGui.QPixmap(_fromUtf8("/usr/share/openmamba/usbinstall/img/nuvola.png")))
|
||||
self.n_img.setObjectName(_fromUtf8("n_img"))
|
||||
self.n_img.hide()
|
||||
|
||||
@ -108,7 +124,7 @@ class Ui_MainWindow(object):
|
||||
self.n_chiudi.setGeometry(QtCore.QRect(471, 202, 14, 14))
|
||||
self.n_chiudi.setText(_fromUtf8(""))
|
||||
icon1 = QtGui.QIcon()
|
||||
icon1.addPixmap(QtGui.QPixmap(_fromUtf8("img/exit.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon1.addPixmap(QtGui.QPixmap(_fromUtf8("/usr/share/openmamba/usbinstall/img/exit.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.n_chiudi.setIcon(icon1)
|
||||
self.n_chiudi.setFlat(True)
|
||||
self.n_chiudi.hide()
|
||||
@ -118,7 +134,7 @@ class Ui_MainWindow(object):
|
||||
self.b_refresh.setGeometry(QtCore.QRect(435, 320, 26, 26))
|
||||
self.b_refresh.setText(_fromUtf8(""))
|
||||
icon2 = QtGui.QIcon()
|
||||
icon2.addPixmap(QtGui.QPixmap(_fromUtf8("img/view-refresh.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon2.addPixmap(QtGui.QPixmap(_fromUtf8(img_refresh)), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.b_refresh.setIcon(icon2)
|
||||
self.b_refresh.setIconSize(QtCore.QSize(24, 24))
|
||||
self.b_refresh.setFlat(True)
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 869 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: 1.1 KiB |
@ -234,10 +234,11 @@ def seleziona_usb(i):
|
||||
|
||||
|
||||
def passo1():
|
||||
aggiorna_oggetti("/usr/share/openmamba/usbinstall/img/back1.png", _("Step 1/4 - choice the boot file"), _("Choose the .cpio file"))
|
||||
ui.b_avanti.setText(QtGui.QApplication.translate("Dialog", _("Go on"), None, QtGui.QApplication.UnicodeUTF8))
|
||||
aggiorna_oggetti("/usr/share/openmamba/usbinstall/img/back1.png", _("Step 1/4 - choice of boot file"), _("Choose the .cpio file"))
|
||||
|
||||
def passo2():
|
||||
aggiorna_oggetti("/usr/share/openmamba/usbinstall/img/back2.png", _("Step 2/4 - choice the iso file"), _("Choose the openmamba .iso file"))
|
||||
aggiorna_oggetti("/usr/share/openmamba/usbinstall/img/back2.png", _("Step 2/4 - choice of iso file"), _("Choose the openmamba .iso file"))
|
||||
|
||||
def passo3():
|
||||
aggiorna_oggetti("/usr/share/openmamba/usbinstall/img/back3.png", _("Step 3/4 - choice of usb key"), _("Choose the usb key"))
|
||||
@ -311,9 +312,7 @@ mainloop = gobject.MainLoop()
|
||||
def run():
|
||||
assegna_eventi()
|
||||
passo1()
|
||||
ui.b_avanti.setText(QtGui.QApplication.translate("Dialog", _("Go on"), None, QtGui.QApplication.UnicodeUTF8))
|
||||
Dialog.show() # Mostra il dialog precedentemente creato
|
||||
|
||||
return app.exec_()
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
Loading…
Reference in New Issue
Block a user