From f05215d88a8a7b849e4861cb9d26d44ce28edcf0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 1 Jun 2009 21:42:03 -0700 Subject: [PATCH] Add conversion profile for Kindle DX --- src/calibre/customize/profiles.py | 17 ++++++++++++++++- src/calibre/gui2/wizard/__init__.py | 9 ++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/calibre/customize/profiles.py b/src/calibre/customize/profiles.py index 4c184ca36d..3844ab43a5 100644 --- a/src/calibre/customize/profiles.py +++ b/src/calibre/customize/profiles.py @@ -235,7 +235,22 @@ class KindleOutput(OutputProfile): def tags_to_string(cls, tags): return 'ttt '.join(tags)+'ttt ' +class KindleDXOutput(OutputProfile): + + name = 'Kindle DX' + short_name = 'kindle_dx' + description = _('This profile is intended for the Amazon Kindle DX.') + + # Screen size is a best guess + screen_size = (1200, 824) + dpi = 150.0 + comic_screen_size = (1180, 800) + + @classmethod + def tags_to_string(cls, tags): + return 'ttt '.join(tags)+'ttt ' + output_profiles = [OutputProfile, SonyReaderOutput, MSReaderOutput, MobipocketOutput, HanlinV3Output, CybookG3Output, KindleOutput, - SonyReaderLandscapeOutput] + SonyReaderLandscapeOutput, KindleDXOutput] diff --git a/src/calibre/gui2/wizard/__init__.py b/src/calibre/gui2/wizard/__init__.py index 467aecd93f..4ba4abc263 100644 --- a/src/calibre/gui2/wizard/__init__.py +++ b/src/calibre/gui2/wizard/__init__.py @@ -63,6 +63,13 @@ class Kindle(Device): manufacturer = 'Amazon' id = 'kindle' +class KindleDX(Kindle): + + output_profile = 'kindle_dx' + output_format = 'MOBI' + name = 'Kindle DX' + id = 'kindledx' + class Sony500(Device): output_profile = 'sony' @@ -307,7 +314,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 is Kindle: + if dev in (Kindle, KindleDX): return KindlePage.ID if dev is iPhone: return StanzaPage.ID