diff --git a/resources/images/devices/tablet.png b/resources/images/devices/tablet.png new file mode 100644 index 0000000000..2084ccc954 Binary files /dev/null and b/resources/images/devices/tablet.png differ diff --git a/src/calibre/devices/mtp/base.py b/src/calibre/devices/mtp/base.py index 4ada58ecef..893ceebf04 100644 --- a/src/calibre/devices/mtp/base.py +++ b/src/calibre/devices/mtp/base.py @@ -27,7 +27,7 @@ def synchronous(func): class MTPDeviceBase(DevicePlugin): name = 'MTP Device Interface' gui_name = _('MTP Device') - icon = I('devices/galaxy_s3.png') + icon = I('devices/tablet.png') description = _('Communicate with MTP devices') author = 'Kovid Goyal' version = (1, 0, 0) diff --git a/src/calibre/gui2/device.py b/src/calibre/gui2/device.py index be66595105..d2f5704c6d 100644 --- a/src/calibre/gui2/device.py +++ b/src/calibre/gui2/device.py @@ -201,7 +201,7 @@ class DeviceManager(Thread): # {{{ uid = None asked = gprefs.get('ask_to_manage_device', []) if (dev.ASK_TO_ALLOW_CONNECT and uid and uid not in asked): - if not self.allow_connect_slot(dev.get_gui_name()): + if not self.allow_connect_slot(dev.get_gui_name(), dev.icon): allow_connect = False asked.append(uid) gprefs.set('ask_to_manage_device', asked) @@ -852,11 +852,11 @@ class DeviceMixin(object): # {{{ if tweaks['auto_connect_to_folder']: self.connect_to_folder_named(tweaks['auto_connect_to_folder']) - def allow_connect(self, name): + def allow_connect(self, name, icon): return question_dialog(self, _('Mange the %s?')%name, _('Detected the %s. Do you want calibre to manage it?')% name, show_copy_button=False, - override_icon=QIcon(I('reader.png'))) + override_icon=QIcon(icon)) def debug_detection(self, done): self.debug_detection_callback = weakref.ref(done) diff --git a/src/calibre/gui2/device_drivers/mtp_config.py b/src/calibre/gui2/device_drivers/mtp_config.py index cd7e495225..9fd59ab124 100644 --- a/src/calibre/gui2/device_drivers/mtp_config.py +++ b/src/calibre/gui2/device_drivers/mtp_config.py @@ -415,6 +415,7 @@ class MTPConfig(QTabWidget): return True def commit(self): + self.device.prefs['blacklist'] = self.igntab.blacklist p = self.device.prefs.get(self.current_device_key, {}) if hasattr(self, 'formats'): @@ -440,7 +441,6 @@ class MTPConfig(QTabWidget): self.device.prefs[self.current_device_key] = p - self.device.prefs['blacklist'] = self.igntab.blacklist if __name__ == '__main__': from calibre.gui2 import Application