diff --git a/src/calibre/devices/bebook/driver.py b/src/calibre/devices/bebook/driver.py index 32d7554c5d..a3e8db917a 100644 --- a/src/calibre/devices/bebook/driver.py +++ b/src/calibre/devices/bebook/driver.py @@ -22,7 +22,7 @@ class BEBOOK(USBMS): VENDOR_NAME = 'LINUX' WINDOWS_MAIN_MEM = 'FILE-STOR_GADGET' - WINDOWS_CARD_MEM = 'FILE-STOR_GADGET' + WINDOWS_CARD_A_MEM = 'FILE-STOR_GADGET' OSX_MAIN_MEM = 'BeBook Internal Memory' OSX_CARD_A_MEM = 'BeBook Storage Card' diff --git a/src/calibre/devices/usbms/device.py b/src/calibre/devices/usbms/device.py index ba2fb1a5e0..4e09dae4da 100644 --- a/src/calibre/devices/usbms/device.py +++ b/src/calibre/devices/usbms/device.py @@ -216,13 +216,12 @@ class Device(DeviceConfig, DevicePlugin): wmi = __import__('wmi', globals(), locals(), [], -1) c = wmi.WMI(find_classes=False) for drive in c.Win32_DiskDrive(): - if self.windows_match_device(str(drive.PNPDeviceID), self.WINDOWS_MAIN_MEM): - drives['main'] = self.windows_get_drive_prefix(drive) - elif self.windows_match_device(str(drive.PNPDeviceID), self.WINDOWS_CARD_A_MEM): + if self.windows_match_device(str(drive.PNPDeviceID), self.WINDOWS_CARD_A_MEM): drives['carda'] = self.windows_get_drive_prefix(drive) elif self.windows_match_device(str(drive.PNPDeviceID), self.WINDOWS_CARD_B_MEM): drives['cardb'] = self.windows_get_drive_prefix(drive) - + elif self.windows_match_device(str(drive.PNPDeviceID), self.WINDOWS_MAIN_MEM): + drives['main'] = self.windows_get_drive_prefix(drive) if 'main' in drives.keys() and 'carda' in drives.keys() and 'cardb' in drives.keys(): break diff --git a/src/calibre/gui2/viewer/main.ui b/src/calibre/gui2/viewer/main.ui index c4a571be00..f94f68b315 100644 --- a/src/calibre/gui2/viewer/main.ui +++ b/src/calibre/gui2/viewer/main.ui @@ -28,11 +28,6 @@ - - - about:blank - - diff --git a/src/calibre/gui2/widgets.py b/src/calibre/gui2/widgets.py index 08422a285b..372c717c14 100644 --- a/src/calibre/gui2/widgets.py +++ b/src/calibre/gui2/widgets.py @@ -171,10 +171,10 @@ class LocationModel(QAbstractListModel): self.count = 0 self.highlight_row = 0 self.tooltips = [ - _('Click to see the list of books available on your computer'), - _('Click to see the list of books in the main memory of your reader'), - _('Click to see the list of books on storage card A in your reader'), - _('Click to see the list of books on storage card B in your reader') + _('Click to see the books available on your computer'), + _('Click to see the books in the main memory of your reader'), + _('Click to see the books on storage card A in your reader'), + _('Click to see the books on storage card B in your reader') ] def rowCount(self, *args): @@ -209,15 +209,15 @@ class LocationModel(QAbstractListModel): def headerData(self, section, orientation, role): return NONE - def update_devices(self, cp=None, fs=[-1, -1, -1]): + def update_devices(self, cp=(None, None), fs=[-1, -1, -1]): self.free[0] = fs[0] self.free[1] = fs[1] self.free[2] = fs[2] - if cp != None: - self.free[1] = fs[1] if fs[1] else -1 - self.free[2] = fs[2] if fs[2] else -1 - else: - self.free[1] = -1 + cpa, cpb = cp + self.free[1] = fs[1] if fs[1] is not None and cpa is not None else -1 + self.free[2] = fs[2] if fs[2] is not None and cpb is not None else -1 + if self.free[1] < 0 and self.free[2] >= 0: + self.free[1] = self.free[2] self.free[2] = -1 self.reset()