IGN:Put recipes into their own namespace

This commit is contained in:
Kovid Goyal 2008-12-31 10:35:50 -08:00
parent e3b148e84a
commit 16ac51a652
85 changed files with 5 additions and 4 deletions

View File

@ -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

View File

@ -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