From e9f3e9c821b3bfbc19fbbecd0750679daaa230e2 Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Tue, 21 Aug 2012 20:46:05 +0200 Subject: [PATCH] channel/menu-downloader WIP --- ChangeLog | 1 + GUI/Ui_VenPri.py | 9 +++++++-- GUI/VenPri.py | 15 +++++++++++++-- GUI/VenPri.ui | 19 +++++++++++++++++-- TitleIDs.py | 40 ++++++++++++++++++++-------------------- 5 files changed, 58 insertions(+), 26 deletions(-) diff --git a/ChangeLog b/ChangeLog index e4c75f6..79007c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ * logical sorting of IOS in downloader (IOS4 is the first, not after IOS39) taken from: [http://code.activestate.com/recipes/135435/] * ensure Python 2.x is used, Python 3.x is not yet supported +* separate combobox for choosing channels, system-menu in downloader [WIP] -- 0.3 -- * Updated some porject's files which still referenced wii signer diff --git a/GUI/Ui_VenPri.py b/GUI/Ui_VenPri.py index fa5246a..3c9220e 100644 --- a/GUI/Ui_VenPri.py +++ b/GUI/Ui_VenPri.py @@ -173,9 +173,13 @@ class Ui_Qwad(object): self.Title.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.Title.setObjectName("Title") self.comboBox = QtGui.QComboBox(self.NUStab) - self.comboBox.setGeometry(QtCore.QRect(125, 10, 291, 25)) + self.comboBox.setGeometry(QtCore.QRect(125, 10, 150, 25)) self.comboBox.setObjectName("comboBox") self.comboBox.addItem(QtCore.QString()) + self.comboBox2 = QtGui.QComboBox(self.NUStab) + self.comboBox2.setGeometry(QtCore.QRect(280, 10, 170, 25)) + self.comboBox2.setObjectName("comboBox2") + self.comboBox2.addItem(QtCore.QString()) self.decryptCheck = QtGui.QCheckBox(self.NUStab) self.decryptCheck.setEnabled(False) self.decryptCheck.setGeometry(QtCore.QRect(40, 120, 171, 23)) @@ -260,7 +264,8 @@ class Ui_Qwad(object): self.enteredTitleID.setText(QtGui.QApplication.translate("Qwad", "000000000000000000", None, QtGui.QApplication.UnicodeUTF8)) self.TitleIDlabel.setText(QtGui.QApplication.translate("Qwad", "Title ID", None, QtGui.QApplication.UnicodeUTF8)) self.Title.setText(QtGui.QApplication.translate("Qwad", "Choose title:", None, QtGui.QApplication.UnicodeUTF8)) - self.comboBox.setItemText(0, QtGui.QApplication.translate("Qwad", "Custom title ID", None, QtGui.QApplication.UnicodeUTF8)) + self.comboBox.setItemText(0, QtGui.QApplication.translate("Qwad", "Choose IOS", None, QtGui.QApplication.UnicodeUTF8)) + self.comboBox2.setItemText(0, QtGui.QApplication.translate("Qwad", "Choose Channel/Menu", None, QtGui.QApplication.UnicodeUTF8)) self.decryptCheck.setText(QtGui.QApplication.translate("Qwad", "Decrypt", None, QtGui.QApplication.UnicodeUTF8)) self.pack_in_WAD_checkbox.setText(QtGui.QApplication.translate("Qwad", "Pack into WAD", None, QtGui.QApplication.UnicodeUTF8)) self.VersionlineEdit.setText(QtGui.QApplication.translate("Qwad", "unset", None, QtGui.QApplication.UnicodeUTF8)) diff --git a/GUI/VenPri.py b/GUI/VenPri.py index 9170201..cbd6ed4 100644 --- a/GUI/VenPri.py +++ b/GUI/VenPri.py @@ -28,7 +28,9 @@ class MWQwad(QMainWindow, Ui_Qwad): self.VersionlineEdit.setText(self.defaultversion) for key in TitleIDs.sorted_copy(TitleIDs.TitleDict): self.comboBox.addItem(key) - for ios in sorted(TitleIDs.IOSdict): + for key in TitleIDs.sorted_copy(TitleIDs.ChannelDict): + self.comboBox2.addItem(key) + for ios in TitleIDs.sorted_copy(TitleIDs.IOSdict): self.IOSversion.addItem(ios) self.getReady() @@ -43,7 +45,6 @@ class MWQwad(QMainWindow, Ui_Qwad): os.chdir(CWD) print "Done." - def ErrorDiag(self, error = QT_TR_NOOP("Unknown error")): print error QMessageBox.critical(None, @@ -214,6 +215,16 @@ class MWQwad(QMainWindow, Ui_Qwad): self.enteredTitleID.setText(TitleIDs.TitleDict[str(selection)]) self.availableVersions.setText(TitleIDs.IOSdict[str(selection)]) + @pyqtSignature("QString") + def on_comboBox2_currentIndexChanged(self, selection): + """ + Show the title ID of the selected title + """ + if self.comboBox2.findText(selection) != 0: + self.enteredTitleID.enabled = False + self.enteredTitleID.setText(TitleIDs.ChannelDict[str(selection)]) + self.availableVersions.setText(TitleIDs.IOSdict[str(selection)]) + @pyqtSignature("") def on_enteredTitleID_returnPressed(self): """ diff --git a/GUI/VenPri.ui b/GUI/VenPri.ui index 8fdf1fd..92ad9e8 100644 --- a/GUI/VenPri.ui +++ b/GUI/VenPri.ui @@ -509,13 +509,13 @@ 125 10 - 291 + 121 25 - Custom title ID + Choose IOS @@ -606,6 +606,21 @@ unset + + + + 260 + 10 + 121 + 25 + + + + + Choose Channel + + + diff --git a/TitleIDs.py b/TitleIDs.py index 5a20f97..833a5d0 100644 --- a/TitleIDs.py +++ b/TitleIDs.py @@ -44,13 +44,6 @@ def _generate_index(str): return tuple(index) TitleDict = { -"BOOT2":"0000000100000001", -"System Menu [JAP]":"0000000100000002", -"System Menu [PAL]":"0000000100000002", -"System Menu [USA]":"0000000100000002", -"System Menu [KOR]":"0000000100000002", -"BC":"0000000100000100", -"MIOS":"0000000100000101", "IOS4":"0000000100000004", "IOS9":"0000000100000009", "IOS10":"000000010000000a", @@ -92,25 +85,32 @@ TitleDict = { "IOS70":"0000000100000046", "IOS80":"0000000100000050", } -Channeldict = { +ChannelDict = { +"BOOT2":"0000000100000001", +"System Menu [JAP]":"0000000100000002", +"System Menu [PAL]":"0000000100000002", +"System Menu [USA]":"0000000100000002", +"System Menu [KOR]":"0000000100000002", +"BC":"0000000100000100", +"MIOS":"0000000100000101", #TODO: Add remaining Channels + UI #QT_TR_NOOP("Wii Speak Channel"):"00010001484346xx", #QT_TR_NOOP("Photo Channel 1.1 [USA]"):"0001000148415a45", -QT_TR_NOOP("Photo Channel 1.1 [PAL]"):"0001000148415a50", +#QT_TR_NOOP("Photo Channel 1.1 [PAL]"):"0001000148415a50", #QT_TR_NOOP("Photo Channel 1.1 [JAP]"):"0001000148415a4a", #QT_TR_NOOP("Metroid Prime 3 Preview"):"00010001484157xx", -QT_TR_NOOP("Nintendo Channel"):"00010001484154xx", -QT_TR_NOOP("Mii Contest Channel [USA]"):"0001000148415045", -QT_TR_NOOP("Mii Contest Channel [PAL]"):"0001000148415050", -QT_TR_NOOP("Mii Contest Channel [JAP]"):"000100014841504A", -QT_TR_NOOP("Everyone Votes Channel [USA]"):"0001000148414a45", -QT_TR_NOOP("Everyone Votes Channel [PAL]"):"0001000148414a50", -QT_TR_NOOP("Everyone Votes Channel [JAP]"):"0001000148414a4A", +#QT_TR_NOOP("Nintendo Channel"):"00010001484154xx", +#QT_TR_NOOP("Mii Contest Channel [USA]"):"0001000148415045", +#QT_TR_NOOP("Mii Contest Channel [PAL]"):"0001000148415050", +#QT_TR_NOOP("Mii Contest Channel [JAP]"):"000100014841504A", +#QT_TR_NOOP("Everyone Votes Channel [USA]"):"0001000148414a45", +#QT_TR_NOOP("Everyone Votes Channel [PAL]"):"0001000148414a50", +#QT_TR_NOOP("Everyone Votes Channel [JAP]"):"0001000148414a4A", #QT_TR_NOOP("Opera / Internet Channel"):"00010001484144xx", -QT_TR_NOOP("Photo Channel"):"0001000248414141", -QT_TR_NOOP("Shopping Channel"):"0001000248414241", -QT_TR_NOOP("Mii Channel"):"001000248414341", -QT_TR_NOOP("Photo Channel 1.1"):"001000248415941", +#QT_TR_NOOP("Photo Channel"):"0001000248414141", +#QT_TR_NOOP("Shopping Channel"):"0001000248414241", +#QT_TR_NOOP("Mii Channel"):"001000248414341", +#QT_TR_NOOP("Photo Channel 1.1"):"001000248415941", #QT_TR_NOOP("Wii Message Board"):"001000148414541", #QT_TR_NOOP("Weather Channel-HAFx"):"00010002484146xx", #QT_TR_NOOP("Weather Channel-HAFA"):"0001000248414641",