Tolino Shine driver: Fix option to swap main memory and SD card not working on OS X. Fixes #1404793 [Tolino Shine (Device Settings not recognized)](https://bugs.launchpad.net/calibre/+bug/1404793)

This commit is contained in:
Kovid Goyal 2014-12-22 12:46:25 +05:30
parent 83caa9d866
commit cd333e17dd

View File

@ -96,6 +96,19 @@ class TOLINO(EB600):
drives['carda'] = main drives['carda'] = main
return drives return drives
def osx_sort_names(self, names):
e = self.settings().extra_customization
if len(names) < 2 or not e[self.OPT_SWAP_MEMORY]:
return names
main = names.get('main', None)
card = names.get('carda', None)
if main is not None and card is not None:
names['main'] = card
names['carda'] = main
return names
def post_open_callback(self): def post_open_callback(self):
# The Tolino Vision only handles books inside the Books folder # The Tolino Vision only handles books inside the Books folder
product_id, bcd = self.device_being_opened[1], self.device_being_opened[2] product_id, bcd = self.device_being_opened[1], self.device_being_opened[2]