From 37dc3b72be9f2a024c0aa720886d0b58b2e092ef Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 12 Jul 2009 16:24:02 -0600 Subject: [PATCH] Add support for Android+WordPlayer to welcome wizard --- src/calibre/gui2/wizard/__init__.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/calibre/gui2/wizard/__init__.py b/src/calibre/gui2/wizard/__init__.py index 29ceda68fd..d73c245288 100644 --- a/src/calibre/gui2/wizard/__init__.py +++ b/src/calibre/gui2/wizard/__init__.py @@ -113,6 +113,13 @@ class iPhone(Device): manufacturer = 'Apple' id = 'iphone' +class Android(Device): + + name = 'Adroid phone + WordPlayer' + output_format = 'EPUB' + manufacturer = 'Google/HTC' + id = 'android' + class Hanlin(Device): name = 'Hanlin V3' @@ -263,7 +270,21 @@ class StanzaPage(QWizardPage, StanzaUI): except: continue +class WordPlayerPage(StanzaPage): + ID = 6 + + def __init__(self): + StanzaPage.__init__(self) + self.label.setText('

'+_('If you use the WordPlayer e-book app on ' + 'your Android phone, you can access your calibre book collection ' + 'directly on the device. To do this you have to turn on the ' + 'content server.')) + self.instructions.setText('

'+_('Remember to leave calibre running ' + 'as the server only runs as long as calibre is running.')+'

' + + _('You have to add the URL http://myhostname:8080 as your ' + 'calibre library in WordPlayer. Here myhostname should be the fully ' + 'qualified hostname or the IP address of the computer calibre is running on.')) class DevicePage(QWizardPage, DeviceUI): @@ -324,6 +345,8 @@ class DevicePage(QWizardPage, DeviceUI): return KindlePage.ID if dev is iPhone: return StanzaPage.ID + if dev is Android: + return WordPlayerPage.ID return FinishPage.ID class MoveMonitor(QObject): @@ -493,11 +516,13 @@ class Wizard(QWizard): self.finish_page.finish_text.setText(t%bt) self.kindle_page = KindlePage() self.stanza_page = StanzaPage() + self.word_player_page = WordPlayerPage() self.setPage(self.library_page.ID, self.library_page) self.setPage(self.device_page.ID, self.device_page) self.setPage(self.finish_page.ID, self.finish_page) self.setPage(self.kindle_page.ID, self.kindle_page) self.setPage(self.stanza_page.ID, self.stanza_page) + self.setPage(self.word_player_page.ID, self.word_player_page) self.device_extra_page = None nh, nw = min_available_height()-75, available_width()-30