From 04908934e6a8a8b76360a4c5116175dec54acd61 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 27 Nov 2010 12:52:13 -0700 Subject: [PATCH 1/4] IGN:Tag release --- ...kingham_times.png => the_workingham_times.png} | Bin resources/recipes/the_workingham_times.recipe | 14 +++++++------- src/calibre/gui2/book_details.py | 4 ++-- src/calibre/translations/calibre.pot | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) rename resources/images/news/{the_wokingham_times.png => the_workingham_times.png} (100%) diff --git a/resources/images/news/the_wokingham_times.png b/resources/images/news/the_workingham_times.png similarity index 100% rename from resources/images/news/the_wokingham_times.png rename to resources/images/news/the_workingham_times.png diff --git a/resources/recipes/the_workingham_times.recipe b/resources/recipes/the_workingham_times.recipe index 2c4f33261a..8d18fb42a0 100644 --- a/resources/recipes/the_workingham_times.recipe +++ b/resources/recipes/the_workingham_times.recipe @@ -19,11 +19,11 @@ class TheWokinghamTimes(BasicNewsRecipe): category = 'news, UK, world' language = 'en_GB' publication_type = 'newsportal' - extra_css = """ + extra_css = """ body{ font-family: Arial,sans-serif } - img{display: block; margin-bottom: 0.4em} + img{display: block; margin-bottom: 0.4em} """ - + conversion_options = { 'comments' : description ,'tags' : category @@ -32,10 +32,10 @@ class TheWokinghamTimes(BasicNewsRecipe): } keep_only_tags = [dict(name='div', attrs={'id':'article-body'})] - remove_tags = [ + remove_tags = [ dict(name='div' , attrs={'class':['ad']}) ,dict(name=['meta','base','iframe','embed','object']) - ,dict(name='span' , attrs={'class':'caption small'}) + ,dict(name='span' , attrs={'class':'caption small'}) ] remove_attributes = ['width','height','lang'] @@ -55,5 +55,5 @@ class TheWokinghamTimes(BasicNewsRecipe): item.replaceWith(str) else: item.name = 'span' - del item['href'] - return soup \ No newline at end of file + del item['href'] + return soup diff --git a/src/calibre/gui2/book_details.py b/src/calibre/gui2/book_details.py index e193fe10b2..c6fa4ddc27 100644 --- a/src/calibre/gui2/book_details.py +++ b/src/calibre/gui2/book_details.py @@ -219,7 +219,7 @@ class BookInfo(QWebView): @@ -227,7 +227,7 @@ class BookInfo(QWebView): %%s - '''%(p, f, c) + '''%(f, c) if self.vertical: if comments: rows += u'%s'%comments diff --git a/src/calibre/translations/calibre.pot b/src/calibre/translations/calibre.pot index 262d5915ec..c513e267e3 100644 --- a/src/calibre/translations/calibre.pot +++ b/src/calibre/translations/calibre.pot @@ -4,9 +4,9 @@ # msgid "" msgstr "" -"Project-Id-Version: calibre 0.7.30\n" -"POT-Creation-Date: 2010-11-26 10:43+MST\n" -"PO-Revision-Date: 2010-11-26 10:43+MST\n" +"Project-Id-Version: calibre 0.7.31\n" +"POT-Creation-Date: 2010-11-27 11:31+MST\n" +"PO-Revision-Date: 2010-11-27 11:31+MST\n" "Last-Translator: Automatically generated\n" "Language-Team: LANGUAGE\n" "MIME-Version: 1.0\n" From 664266577d2c29e0622037f25c53c6615778ceaf Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 27 Nov 2010 13:00:00 -0700 Subject: [PATCH 2/4] ... --- src/calibre/gui2/book_details.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/book_details.py b/src/calibre/gui2/book_details.py index c6fa4ddc27..7e9d048e66 100644 --- a/src/calibre/gui2/book_details.py +++ b/src/calibre/gui2/book_details.py @@ -219,7 +219,7 @@ class BookInfo(QWebView): @@ -227,7 +227,7 @@ class BookInfo(QWebView): %%s - '''%(f, c) + '''%(p, f, c) if self.vertical: if comments: rows += u'%s'%comments From f1b2a23dac1bad4173448873c1d67a4fd16e4dda Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 27 Nov 2010 13:21:07 -0700 Subject: [PATCH 3/4] More robust technique to make the background of the details panel transparent --- src/calibre/gui2/book_details.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/calibre/gui2/book_details.py b/src/calibre/gui2/book_details.py index 7e9d048e66..28ca06b352 100644 --- a/src/calibre/gui2/book_details.py +++ b/src/calibre/gui2/book_details.py @@ -190,6 +190,10 @@ class BookInfo(QWebView): self.page().setLinkDelegationPolicy(self.page().DelegateAllLinks) self.linkClicked.connect(self.link_activated) self._link_clicked = False + self.setAttribute(Qt.WA_OpaquePaintEvent, False) + palette = self.palette() + palette.setBrush(QPalette.Base, Qt.transparent) + self.page().setPalette(palette) def link_activated(self, link): self._link_clicked = True @@ -211,8 +215,6 @@ class BookInfo(QWebView): def _show_data(self, rows, comments): f = QFontInfo(QApplication.font(self.parent())).pixelSize() - p = unicode(QApplication.palette().color(QPalette.Normal, - QPalette.Window).name()) c = unicode(QApplication.palette().color(QPalette.Normal, QPalette.WindowText).name()) templ = u'''\ @@ -227,7 +229,7 @@ class BookInfo(QWebView): %%s - '''%(p, f, c) + '''%(f, c) if self.vertical: if comments: rows += u'%s'%comments From 711112d1a492cbcacf4610dd07d38b7c1f8052b8 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 27 Nov 2010 13:59:25 -0700 Subject: [PATCH 4/4] Enable SQLite C extension to speed up large library initialization --- src/calibre/library/sqlite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/library/sqlite.py b/src/calibre/library/sqlite.py index 94338433a5..8aa76b2643 100644 --- a/src/calibre/library/sqlite.py +++ b/src/calibre/library/sqlite.py @@ -150,7 +150,7 @@ class DBThread(Thread): detect_types=sqlite.PARSE_DECLTYPES|sqlite.PARSE_COLNAMES) self.conn.execute('pragma cache_size=5000') encoding = self.conn.execute('pragma encoding').fetchone()[0] - c_ext_loaded = False #load_c_extensions(self.conn) + c_ext_loaded = load_c_extensions(self.conn) self.conn.row_factory = sqlite.Row if self.row_factory else lambda cursor, row : list(row) self.conn.create_aggregate('concat', 1, Concatenate) if not c_ext_loaded: