mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
IGN:Put recipes into their own namespace
This commit is contained in:
parent
e3b148e84a
commit
16ac51a652
@ -155,10 +155,11 @@ class RecipeModel(QAbstractListModel, SearchQueryParser):
|
||||
return recipe
|
||||
elif role == Qt.DecorationRole:
|
||||
icon = self.default_icon
|
||||
icon_path = (':/images/news/%s.png'%recipe.id).replace('recipe_', '')
|
||||
if not recipe.builtin:
|
||||
icon = self.custom_icon
|
||||
elif QFile(':/images/news/%s.png'%recipe.id).exists():
|
||||
icon = QIcon(':/images/news/%s.png'%recipe.id)
|
||||
elif QFile().exists(icon_path):
|
||||
icon = QIcon(icon_path)
|
||||
return QVariant(icon)
|
||||
|
||||
return NONE
|
||||
|
@ -4,7 +4,7 @@ __copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
'''
|
||||
Builtin recipes.
|
||||
'''
|
||||
recipe_modules = [
|
||||
recipe_modules = ['recipe_' + r for r in (
|
||||
'newsweek', 'atlantic', 'economist', 'portfolio',
|
||||
'nytimes', 'usatoday', 'outlook_india', 'bbc', 'greader', 'wsj',
|
||||
'wired', 'globe_and_mail', 'smh', 'espn', 'business_week',
|
||||
@ -21,7 +21,7 @@ recipe_modules = [
|
||||
'linux_magazine', 'telegraph_uk', 'utne', 'sciencedaily', 'forbes',
|
||||
'time_magazine', 'endgadget', 'fudzilla', 'nspm_int', 'nspm', 'pescanik',
|
||||
'spiegel_int', 'themarketticker', 'tomshardware',
|
||||
]
|
||||
)]
|
||||
|
||||
import re, imp, inspect, time, os
|
||||
from calibre.web.feeds.news import BasicNewsRecipe, CustomIndexRecipe, AutomaticNewsRecipe
|
||||
|
Loading…
x
Reference in New Issue
Block a user