diff --git a/recipes/birmingham_post.recipe b/recipes/birmingham_post.recipe index 0d04667782..ae5d2c9ce9 100644 --- a/recipes/birmingham_post.recipe +++ b/recipes/birmingham_post.recipe @@ -5,11 +5,11 @@ class AdvancedUserRecipe1306097511(BasicNewsRecipe): timefmt = '' __author__ = 'Dave Asbury' cover_url = 'http://1.bp.blogspot.com/_GwWyq5eGw9M/S9BHPHxW55I/AAAAAAAAB6Q/iGCWl0egGzg/s320/Birmingham+post+Lite+front.JPG' - oldest_article = 1 - max_articles_per_feed = 20 + oldest_article = 2 + max_articles_per_feed = 12 remove_empty_feeds = True remove_javascript = True - auto_cleanup = True + #auto_cleanup = True language = 'en_GB' @@ -17,9 +17,12 @@ class AdvancedUserRecipe1306097511(BasicNewsRecipe): keep_only_tags = [ - #dict(name='h1',attrs={'id' : 'article-headline'}), - #dict(attrs={'class':['article-meta-author','article-meta-date','article main','art-o art-align-center otm-1 ']}), - #dict(name='p') + dict(name='h1',attrs={'id' : 'article-headline'}), + dict(attrs={'class':['article-meta-author','article-meta-date','article main','art-o art-align-center otm-1 ']}), + dict(name='div',attrs={'class' : 'article-image full'}), + dict(attrs={'clas' : 'art-o art-align-center otm-1 '}), + dict(name='div',attrs={'class' : 'article main'}), +#dict(name='p') #dict(attrs={'id' : 'three-col'}) ] remove_tags = [ @@ -28,7 +31,7 @@ class AdvancedUserRecipe1306097511(BasicNewsRecipe): ] feeds = [ #(u'News',u'http://www.birminghampost.net/news/rss.xml'), - (u'Local News', u'http://www.birminghampost.net/news/west-midlands-news/rss.xml'), + (u'West Mids. News', u'http://www.birminghampost.net/news/west-midlands-news/rss.xml'), (u'UK News', u'http://www.birminghampost.net/news/uk-news/rss.xml'), (u'Sports',u'http://www.birminghampost.net/midlands-birmingham-sport/rss.xml'), (u'Bloggs & Comments',u'http://www.birminghampost.net/comment/rss.xml') diff --git a/recipes/nzz_ger.recipe b/recipes/nzz_ger.recipe index 09e011a1dc..001c8075da 100644 --- a/recipes/nzz_ger.recipe +++ b/recipes/nzz_ger.recipe @@ -1,6 +1,6 @@ __license__ = 'GPL v3' -__copyright__ = '2009-2010, Darko Miletic ' +__copyright__ = '2009-2010, Darko Miletic , 2012 Bernd Leinfelder ' ''' www.nzz.ch @@ -10,7 +10,7 @@ from calibre.web.feeds.recipes import BasicNewsRecipe class Nzz(BasicNewsRecipe): title = 'NZZ Online' - __author__ = 'Darko Miletic' + __author__ = 'Darko Miletic, Bernd Leinfelder' description = 'Laufend aktualisierte Nachrichten, Analysen und Hintergruende zu Politik, Wirtschaft, Kultur und Sport' publisher = 'NZZ AG' category = 'news, politics, nachrichten, Switzerland' @@ -41,31 +41,31 @@ class Nzz(BasicNewsRecipe): ,'publisher' : publisher } - keep_only_tags = [dict(name='div', attrs={'class':'zone'})] - remove_tags_before = dict(name='p', attrs={'class':'dachzeile'}) - remove_tags_after=dict(name='p', attrs={'class':'fussnote'}) + remove_attributes=['width','height','lang'] + remove_tags_before = dict(id='main') + remove_tags_after = dict(id='articleBodyText') remove_tags = [ dict(name=['object','link','base','meta','iframe']) - ,dict(attrs={'id':'content_rectangle_1'}) - ,dict(attrs={'class':['weiterfuehrendeLinks','fussnote','video']}) + ,dict(id='social-media-floater') + ,dict(name='div',attrs={'class':['box']}) + ] feeds = [ - (u'International' , u'http://www.nzz.ch/nachrichten/international?rss=true') - ,(u'Schweiz' , u'http://www.nzz.ch/nachrichten/schweiz?rss=true') - ,(u'Wirtschaft' , u'http://www.nzz.ch/nachrichten/wirtschaft/aktuell?rss=true') - ,(u'Finanzmaerkte' , u'http://www.nzz.ch/finanzen/nachrichten?rss=true') - ,(u'Zuerich' , u'http://www.nzz.ch/nachrichten/zuerich?rss=true') - ,(u'Sport' , u'http://www.nzz.ch/nachrichten/sport?rss=true') - ,(u'Panorama' , u'http://www.nzz.ch/nachrichten/panorama?rss=true') - ,(u'Kultur' , u'http://www.nzz.ch/nachrichten/kultur/aktuell?rss=true') - ,(u'Wissenschaft' , u'http://www.nzz.ch/nachrichten/wissenschaft?rss=true') - ,(u'Medien' , u'http://www.nzz.ch/nachrichten/medien?rss=true') - ,(u'Reisen' , u'http://www.nzz.ch/magazin/reisen?rss=true') + (u'International' , u'http://www.nzz.ch/aktuell/international.rss') + ,(u'Schweiz' , u'http://www.nzz.ch/aktuell/schweiz.rss') + ,(u'Wirtschaft' , u'http://www.nzz.ch/aktuell/wirtschaft/uebersicht.rss') + ,(u'Finanzmaerkte' , u'http://www.nzz.ch/finanzen/uebersicht/finanznachrichten.rss') + ,(u'Zuerich' , u'http://www.nzz.ch/aktuell/zuerich/uebersicht.rss') + ,(u'Sport' , u'http://www.nzz.ch/aktuell/sport/uebersicht.rss') + ,(u'Panorama' , u'http://www.nzz.ch/aktuell/panorama.rss') + ,(u'Kultur' , u'http://www.nzz.ch/aktuell/feuilleton/uebersicht.rss') + ,(u'Wissenschaft' , u'http://www.nzz.ch/wissen/uebersicht.rss') + ,(u'Reisen' , u'http://www.nzz.ch/lebensart/reisen-freizeit.rss') + ,(u'Auto Mobil' , u'http://www.nzz.ch/lebensart/auto-mobil.rss') + ,(u'Digital' , u'http://www.nzz.ch/lebensart/digital.rss') + ,(u'Stil' , u'http://www.nzz.ch/lebensart/stil.rss') + ,(u'Wein-Keller' , u'http://www.nzz.ch/lebensart/wein-keller.rss') ] - def preprocess_html(self, soup): - for item in soup.findAll(style=True): - del item['style'] - return self.adeify_images(soup) diff --git a/resources/default_tweaks.py b/resources/default_tweaks.py index 92323d0f0f..9f848dc5ce 100644 --- a/resources/default_tweaks.py +++ b/resources/default_tweaks.py @@ -442,12 +442,6 @@ metadata_edit_custom_column_order = [] # calibre. public_smtp_relay_delay = 301 -#: Remove the bright yellow lines at the edges of the book list -# Control whether the bright yellow lines at the edges of book list are drawn -# when a section of the user interface is hidden. Changes will take effect -# after a restart of calibre. -draw_hidden_section_indicators = True - #: The maximum width and height for covers saved in the calibre library # All covers in the calibre library will be resized, preserving aspect ratio, # to fit within this size. This is to prevent slowdowns caused by extremely diff --git a/src/calibre/gui2/init.py b/src/calibre/gui2/init.py index 95e8c79382..d6332d71ac 100644 --- a/src/calibre/gui2/init.py +++ b/src/calibre/gui2/init.py @@ -238,10 +238,11 @@ class LayoutMixin(object): # {{{ # }}} self.status_bar = StatusBar(self) + stylename = unicode(self.style().objectName()) for x in button_order: button = getattr(self, x+'_splitter').button button.setIconSize(QSize(24, 24)) - if isosx: + if isosx and stylename != u'Calibre': button.setStyleSheet(''' QToolButton { background: none; border:none; padding: 0px; } QToolButton:checked { background: rgba(0, 0, 0, 25%); } diff --git a/src/calibre/gui2/preferences/adding.ui b/src/calibre/gui2/preferences/adding.ui index f04d55ff28..0ce78447e0 100644 --- a/src/calibre/gui2/preferences/adding.ui +++ b/src/calibre/gui2/preferences/adding.ui @@ -183,10 +183,17 @@ Author matching is exact. - - Ignore files with the following extensions when automatically adding - - + + + + + Ignore files with the following extensions when automatically adding + + + true + + + diff --git a/src/calibre/gui2/preferences/search.ui b/src/calibre/gui2/preferences/search.ui index 527cf8ab85..afe212d661 100644 --- a/src/calibre/gui2/preferences/search.ui +++ b/src/calibre/gui2/preferences/search.ui @@ -210,7 +210,7 @@ to be shown as user categories - <p>When you search for similar books by author, series, etc, + <p>When you search for similar books by right clicking the book and selecting "Similar books...", calibre constructs a search using the column lookup names defined below. By changing the lookup name to a grouped search term you can search multiple columns.</p> diff --git a/src/calibre/gui2/tag_browser/view.py b/src/calibre/gui2/tag_browser/view.py index edf62be7df..9331194328 100644 --- a/src/calibre/gui2/tag_browser/view.py +++ b/src/calibre/gui2/tag_browser/view.py @@ -25,13 +25,19 @@ class TagDelegate(QStyledItemDelegate): # {{{ def paint(self, painter, option, index): item = index.data(Qt.UserRole).toPyObject() QStyledItemDelegate.paint(self, painter, option, index) + widget = self.parent() + style = QApplication.style() if widget is None else widget.style() + self.initStyleOption(option, index) + if item.boxed: + r = style.subElementRect(style.SE_ItemViewItemFocusRect, option, + widget) + painter.save() + painter.drawLine(r.bottomLeft(), r.bottomRight()) + painter.restore() if item.type != TagTreeItem.TAG: return if (item.tag.state == 0 and config['show_avg_rating'] and item.tag.avg_rating is not None): - self.initStyleOption(option, index) - widget = self.parent() - style = QApplication.style() if widget is None else widget.style() r = style.subElementRect(style.SE_ItemViewItemDecoration, option, widget) icon = option.icon @@ -48,6 +54,7 @@ class TagDelegate(QStyledItemDelegate): # {{{ icon.On) painter.restore() + # }}} class TagsView(QTreeView): # {{{ diff --git a/src/calibre/gui2/widgets.py b/src/calibre/gui2/widgets.py index c9a3061295..4332bb651b 100644 --- a/src/calibre/gui2/widgets.py +++ b/src/calibre/gui2/widgets.py @@ -21,7 +21,7 @@ from calibre.gui2 import (NONE, error_dialog, pixmap_to_data, gprefs, from calibre.gui2.filename_pattern_ui import Ui_Form from calibre import fit_image from calibre.ebooks import BOOK_EXTENSIONS -from calibre.utils.config import prefs, XMLConfig, tweaks +from calibre.utils.config import prefs, XMLConfig from calibre.gui2.progress_indicator import ProgressIndicator as _ProgressIndicator from calibre.gui2.dnd import (dnd_has_image, dnd_get_image, dnd_get_files, IMAGE_EXTENSIONS, dnd_has_extension, DownloadDialog) @@ -1000,13 +1000,6 @@ class SplitterHandle(QSplitterHandle): if oh != self.highlight: self.update() - def paintEvent(self, ev): - QSplitterHandle.paintEvent(self, ev) - if self.highlight and tweaks['draw_hidden_section_indicators']: - painter = QPainter(self) - painter.setClipRect(ev.rect()) - painter.fillRect(self.rect(), Qt.yellow) - def mouseDoubleClickEvent(self, ev): self.double_clicked.emit(self)