From a5712acdcaf97a8a7577a242189b544c8e783ee0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 16 Oct 2014 18:19:52 +0530 Subject: [PATCH] Add output profile and welcome wizard entries for upcoming Kindle Voyage --- src/calibre/customize/profiles.py | 21 +++++++++++++++++---- src/calibre/gui2/wizard/__init__.py | 7 ++++++- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/src/calibre/customize/profiles.py b/src/calibre/customize/profiles.py index 2726cc3a72..f917c80717 100644 --- a/src/calibre/customize/profiles.py +++ b/src/calibre/customize/profiles.py @@ -426,7 +426,7 @@ class iPadOutput(OutputProfile): } ''' - # }}} + # }}} class iPad3Output(iPadOutput): @@ -473,7 +473,7 @@ class SonyReaderOutput(OutputProfile): unsupported_unicode_chars = [u'\u201f', u'\u201b'] epub_periodical_format = 'sony' - #periodical_date_in_title = False + # periodical_date_in_title = False class KoboReaderOutput(OutputProfile): @@ -660,7 +660,7 @@ class KindleDXOutput(OutputProfile): screen_size = (744, 1022) dpi = 150.0 comic_screen_size = (771, 1116) - #comic_screen_size = (741, 1022) + # comic_screen_size = (741, 1022) supports_mobi_indexing = True periodical_date_in_title = False empty_ratings_char = u'\u2606' @@ -683,6 +683,19 @@ class KindlePaperWhiteOutput(KindleOutput): dpi = 212.0 comic_screen_size = screen_size +class KindleVoyageOutput(KindleOutput): + + name = 'Kindle Voyage' + short_name = 'kindle_voyage' + description = _('This profile is intended for the Amazon Kindle Voyage') + + # Screen size is currently just the spec size, actual renderable area will + # depend on someone with the device doing tests. + screen_size = (1080, 1430) + dpi = 300.0 + comic_screen_size = screen_size + + class KindleFireOutput(KindleDXOutput): name = 'Kindle Fire' @@ -807,6 +820,6 @@ output_profiles = [OutputProfile, SonyReaderOutput, SonyReader300Output, SonyReaderLandscapeOutput, KindleDXOutput, IlliadOutput, NookHD, IRexDR1000Output, IRexDR800Output, JetBook5Output, NookOutput, BambookOutput, NookColorOutput, PocketBook900Output, PocketBookPro912Output, - GenericEink, GenericEinkLarge, KindleFireOutput, KindlePaperWhiteOutput] + GenericEink, GenericEinkLarge, KindleFireOutput, KindlePaperWhiteOutput, KindleVoyageOutput] output_profiles.sort(cmp=lambda x,y:cmp(x.name.lower(), y.name.lower())) diff --git a/src/calibre/gui2/wizard/__init__.py b/src/calibre/gui2/wizard/__init__.py index 81733e9fb7..aa43fa1555 100644 --- a/src/calibre/gui2/wizard/__init__.py +++ b/src/calibre/gui2/wizard/__init__.py @@ -121,6 +121,11 @@ class KindlePW(Kindle): id = 'kindle_pw' output_profile = 'kindle_pw' +class KindleVoyage(Kindle): + name = 'Kindle Voyage' + id = 'kindle_voyage' + output_profile = 'kindle_voyage' + class Sony505(Device): output_profile = 'sony' @@ -567,7 +572,7 @@ class DevicePage(QWizardPage, DeviceUI): def nextId(self): idx = list(self.device_view.selectionModel().selectedIndexes())[0] dev = self.dev_model.data(idx, Qt.UserRole) - if dev in (Kindle, KindleDX, KindleFire, KindlePW): + if dev in (Kindle, KindleDX, KindleFire, KindlePW, KindleVoyage): return KindlePage.ID if dev is iPhone: return StanzaPage.ID