Add output profile and welcome wizard entries for upcoming Kindle Voyage

This commit is contained in:
Kovid Goyal 2014-10-16 18:19:52 +05:30
parent 01f0c98607
commit a5712acdca
2 changed files with 23 additions and 5 deletions

View File

@ -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()))

View File

@ -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