Add iPad to Welcome Wizard

This commit is contained in:
Kovid Goyal 2010-04-08 09:33:49 +05:30
parent 5dfc08ed4e
commit f8656b66bd
3 changed files with 7 additions and 1 deletions

View File

@ -8,6 +8,7 @@ import mechanize
from calibre.constants import __version__, iswindows, isosx from calibre.constants import __version__, iswindows, isosx
from calibre import browser from calibre import browser
from calibre.utils.config import prefs
URL = 'http://status.calibre-ebook.com/latest' URL = 'http://status.calibre-ebook.com/latest'
@ -32,6 +33,7 @@ class CheckForUpdates(QObject):
req.add_header('CALIBRE_VERSION', __version__) req.add_header('CALIBRE_VERSION', __version__)
req.add_header('CALIBRE_OS', req.add_header('CALIBRE_OS',
'win' if iswindows else 'osx' if isosx else 'oth') 'win' if iswindows else 'osx' if isosx else 'oth')
req.add_header('CALIBRE_INSTALL_UUID', prefs['installation_uuid'])
version = br.open(req).read().strip() version = br.open(req).read().strip()
if version and version != __version__: if version and version != __version__:
self.emit(SIGNAL('update_found(PyQt_PyObject)'), version) self.emit(SIGNAL('update_found(PyQt_PyObject)'), version)

View File

@ -127,7 +127,7 @@ class CybookOpus(CybookG3):
class iPhone(Device): class iPhone(Device):
name = 'iPhone/iTouch + Stanza' name = 'iPad or iPhone/iTouch + Stanza'
output_format = 'EPUB' output_format = 'EPUB'
manufacturer = 'Apple' manufacturer = 'Apple'
id = 'iphone' id = 'iphone'

View File

@ -672,6 +672,7 @@ def _prefs():
help=_('Swap author first and last names when reading metadata')) help=_('Swap author first and last names when reading metadata'))
c.add_opt('add_formats_to_existing', default=False, c.add_opt('add_formats_to_existing', default=False,
help=_('Add new formats to existing book records')) help=_('Add new formats to existing book records'))
c.add_opt('installation_uuid', default=None, help='Installation UUID')
# this is here instead of the gui preferences because calibredb can execute searches # this is here instead of the gui preferences because calibredb can execute searches
c.add_opt('saved_searches', default={}, help=_('List of named saved searches')) c.add_opt('saved_searches', default={}, help=_('List of named saved searches'))
@ -680,6 +681,9 @@ def _prefs():
return c return c
prefs = ConfigProxy(_prefs()) prefs = ConfigProxy(_prefs())
if prefs['installation_uuid'] is None:
import uuid
prefs['installation_uuid'] = str(uuid.uuid4())
# Read tweaks # Read tweaks
def read_tweaks(): def read_tweaks():