From f8656b66bdc08a86023d4be76eea1c0f374be5f0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 8 Apr 2010 09:33:49 +0530 Subject: [PATCH] Add iPad to Welcome Wizard --- src/calibre/gui2/update.py | 2 ++ src/calibre/gui2/wizard/__init__.py | 2 +- src/calibre/utils/config.py | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/update.py b/src/calibre/gui2/update.py index 2023da1854..69337bb494 100644 --- a/src/calibre/gui2/update.py +++ b/src/calibre/gui2/update.py @@ -8,6 +8,7 @@ import mechanize from calibre.constants import __version__, iswindows, isosx from calibre import browser +from calibre.utils.config import prefs URL = 'http://status.calibre-ebook.com/latest' @@ -32,6 +33,7 @@ class CheckForUpdates(QObject): req.add_header('CALIBRE_VERSION', __version__) req.add_header('CALIBRE_OS', 'win' if iswindows else 'osx' if isosx else 'oth') + req.add_header('CALIBRE_INSTALL_UUID', prefs['installation_uuid']) version = br.open(req).read().strip() if version and version != __version__: self.emit(SIGNAL('update_found(PyQt_PyObject)'), version) diff --git a/src/calibre/gui2/wizard/__init__.py b/src/calibre/gui2/wizard/__init__.py index d24d3bb6c1..6141494bbf 100644 --- a/src/calibre/gui2/wizard/__init__.py +++ b/src/calibre/gui2/wizard/__init__.py @@ -127,7 +127,7 @@ class CybookOpus(CybookG3): class iPhone(Device): - name = 'iPhone/iTouch + Stanza' + name = 'iPad or iPhone/iTouch + Stanza' output_format = 'EPUB' manufacturer = 'Apple' id = 'iphone' diff --git a/src/calibre/utils/config.py b/src/calibre/utils/config.py index 20dddd8061..cb17085071 100644 --- a/src/calibre/utils/config.py +++ b/src/calibre/utils/config.py @@ -672,6 +672,7 @@ def _prefs(): help=_('Swap author first and last names when reading metadata')) c.add_opt('add_formats_to_existing', default=False, 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 c.add_opt('saved_searches', default={}, help=_('List of named saved searches')) @@ -680,6 +681,9 @@ def _prefs(): return c prefs = ConfigProxy(_prefs()) +if prefs['installation_uuid'] is None: + import uuid + prefs['installation_uuid'] = str(uuid.uuid4()) # Read tweaks def read_tweaks():