diff --git a/resources/images/devices/italica.png b/resources/images/devices/italica.png new file mode 100644 index 0000000000..83852d9ffa Binary files /dev/null and b/resources/images/devices/italica.png differ diff --git a/resources/images/devices/kindle.jpg b/resources/images/devices/kindle.jpg new file mode 100644 index 0000000000..7641d88ed2 Binary files /dev/null and b/resources/images/devices/kindle.jpg differ diff --git a/src/calibre/devices/eb600/driver.py b/src/calibre/devices/eb600/driver.py index f7ea9e0c24..738fcdf375 100644 --- a/src/calibre/devices/eb600/driver.py +++ b/src/calibre/devices/eb600/driver.py @@ -116,6 +116,7 @@ class ITALICA(EB600): name = 'Italica Device Interface' gui_name = 'Italica' + icon = I('devices/italica.png') FORMATS = ['epub', 'rtf', 'fb2', 'html', 'prc', 'mobi', 'pdf', 'txt'] diff --git a/src/calibre/devices/interface.py b/src/calibre/devices/interface.py index c9309a72fe..21aa3f5e5b 100644 --- a/src/calibre/devices/interface.py +++ b/src/calibre/devices/interface.py @@ -40,6 +40,8 @@ class DevicePlugin(Plugin): CAN_SET_METADATA = True #: Path separator for paths to books on device path_sep = os.sep + #: Icon for this device + icon = I('reader.svg') @classmethod def test_bcd_windows(cls, device_id, bcd): diff --git a/src/calibre/devices/kindle/driver.py b/src/calibre/devices/kindle/driver.py index de4ff19733..96aa296b5d 100644 --- a/src/calibre/devices/kindle/driver.py +++ b/src/calibre/devices/kindle/driver.py @@ -18,6 +18,7 @@ class KINDLE(USBMS): name = 'Kindle Device Interface' gui_name = 'Amazon Kindle' + icon = I('devices/kindle.jpg') description = _('Communicate with the Kindle eBook reader.') author = 'John Schember' supported_platforms = ['windows', 'osx', 'linux'] diff --git a/src/calibre/devices/usbms/device.py b/src/calibre/devices/usbms/device.py index 33ba104e38..c34157e878 100644 --- a/src/calibre/devices/usbms/device.py +++ b/src/calibre/devices/usbms/device.py @@ -295,7 +295,7 @@ class Device(DeviceConfig, DevicePlugin): # This is typically needed when the device has the same # WINDOWS_MAIN_MEM and WINDOWS_CARD_A_MEM in which case - # if the devices is connected without a card, the above + # if the device is connected without a card, the above # will incorrectly identify the main mem as carda # See for example the driver for the Nook if 'main' not in drives and 'carda' in drives: diff --git a/src/calibre/gui2/ui.py b/src/calibre/gui2/ui.py index d8ab5fb7a1..0fafb572c1 100644 --- a/src/calibre/gui2/ui.py +++ b/src/calibre/gui2/ui.py @@ -775,6 +775,7 @@ class Main(MainWindow, Ui_MainWindow, DeviceGUI): _(' detected.'), 3000) self.device_connected = True self._sync_menu.enable_device_actions(True, self.device_manager.device.card_prefix()) + self.location_view.model().device_connected(self.device_manager.device) else: self.save_device_view_settings() self.device_connected = False diff --git a/src/calibre/gui2/widgets.py b/src/calibre/gui2/widgets.py index 9bf904da71..cce594d557 100644 --- a/src/calibre/gui2/widgets.py +++ b/src/calibre/gui2/widgets.py @@ -242,6 +242,10 @@ class LocationModel(QAbstractListModel): return data + def device_connected(self, dev): + self.icons[1] = QIcon(dev.icon) + self.dataChanged.emit(self.index(1), self.index(1)) + def headerData(self, section, orientation, role): return NONE