From ed9e6d534a21dfcf30f885a94f5f86f89812cf42 Mon Sep 17 00:00:00 2001 From: Florian Bach Date: Sat, 20 Nov 2021 07:25:49 +0100 Subject: [PATCH] beta2, stupid bug --- calibre-plugin/config.py | 7 ++++--- calibre-plugin/libadobeAccount.py | 8 ++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/calibre-plugin/config.py b/calibre-plugin/config.py index 0848d45..588e163 100644 --- a/calibre-plugin/config.py +++ b/calibre-plugin/config.py @@ -279,9 +279,10 @@ class ConfigWidget(QWidget): self.button_link_account.setEnabled(not activated) self.button_import_activation.setEnabled(not activated) + self.button_import_WinADE.setEnabled(not activated) self.button_export_key.setEnabled(activated) self.button_export_activation.setEnabled(activated) - self.button_import_WinADE.setEnabled(activated) + self.resize(self.sizeHint()) @@ -315,9 +316,9 @@ class ConfigWidget(QWidget): self.button_link_account.setEnabled(not activated) self.button_import_activation.setEnabled(not activated) + self.button_import_MacADE.setEnabled(not activated) self.button_export_key.setEnabled(activated) self.button_export_activation.setEnabled(activated) - self.button_import_MacADE.setEnabled(activated) self.resize(self.sizeHint()) @@ -478,7 +479,7 @@ class ConfigWidget(QWidget): msg += "Select ADE 2.0.1 if you are unsure\n\n" msg += "Which ADE version do you want to emulate?" - item, ok = QInputDialog.getItem(self, "Change ADE version", msg, VAR_VER_SUPP_CONFIG_NAMES, 1, False) + item, ok = QInputDialog.getItem(self, "Change ADE version", msg, allowed_strings, 1, False) if (not ok): return diff --git a/calibre-plugin/libadobeAccount.py b/calibre-plugin/libadobeAccount.py index 5808c91..d435301 100644 --- a/calibre-plugin/libadobeAccount.py +++ b/calibre-plugin/libadobeAccount.py @@ -37,7 +37,7 @@ def createDeviceFile(randomSerial: bool, useVersionIndex: int = 0): return False try: - build_id = VAR_VER_BUILD_IDS.index(useVersionIndex) + build_id = VAR_VER_BUILD_IDS[useVersionIndex] except: return False @@ -314,7 +314,7 @@ def buildActivateReq(useVersionIndex: int = 0): return False try: - build_id = VAR_VER_BUILD_IDS.index(useVersionIndex) + build_id = VAR_VER_BUILD_IDS[useVersionIndex] except: return False @@ -384,7 +384,7 @@ def changeDeviceVersion(useVersionIndex: int = 0): return False, "Invalid Version index" try: - build_id = VAR_VER_BUILD_IDS.index(useVersionIndex) + build_id = VAR_VER_BUILD_IDS[useVersionIndex] except: return False, "Unknown build ID" @@ -429,7 +429,7 @@ def activateDevice(useVersionIndex: int = 0): return False, "Invalid Version index" try: - build_id = VAR_VER_BUILD_IDS.index(useVersionIndex) + build_id = VAR_VER_BUILD_IDS[useVersionIndex] except: return False, "error checking build ID"