diff --git a/src/calibre/devices/apple/driver.py b/src/calibre/devices/apple/driver.py index 7a9562f136..2dc095507c 100644 --- a/src/calibre/devices/apple/driver.py +++ b/src/calibre/devices/apple/driver.py @@ -38,9 +38,9 @@ class AppleOpenFeedback(OpenFeedback): class Dialog(QDialog): - def __init__(self, p, pixmap='dialog_information.png'): + def __init__(self, p, cd, pixmap='dialog_information.png'): QDialog.__init__(self, p) - + self.cd = cd self.setWindowTitle("Apple iDevice detected") self.l = l = QVBoxLayout() self.setLayout(l) @@ -80,14 +80,14 @@ class AppleOpenFeedback(OpenFeedback): def do_it(self, return_code): if return_code == self.Accepted: - self.log.info(" Apple driver ENABLED") - dynamic[config_name(self.plugin.DISPLAY_DISABLE_DIALOG)] = False + self.cd.log.info(" Apple driver ENABLED") + dynamic[config_name(self.cd.plugin.DISPLAY_DISABLE_DIALOG)] = False else: from calibre.customize.ui import disable_plugin - self.log.info(" Apple driver DISABLED") - disable_plugin(self.plugin) + self.cd.log.info(" Apple driver DISABLED") + disable_plugin(self.cd.plugin) - return Dialog(parent) + return Dialog(parent, self) from PIL import Image as PILImage diff --git a/src/calibre/devices/errors.py b/src/calibre/devices/errors.py index 7b11b6933f..ecd61a1169 100644 --- a/src/calibre/devices/errors.py +++ b/src/calibre/devices/errors.py @@ -43,7 +43,7 @@ class OpenFeedback(DeviceError): def custom_dialog(self, parent): ''' - If you need to show the user a custom dialog, instead if just + If you need to show the user a custom dialog, instead of just displaying the feedback_msg, create and return it here. ''' raise NotImplementedError