support repositories to manage backends (closes #747)

This commit is contained in:
Romain Bignon 2012-01-03 12:10:21 +01:00
commit 14a7a1d362
410 changed files with 1079 additions and 297 deletions

View file

@ -138,6 +138,10 @@ class BaseBackend(object):
STORAGE = {}
# Browser class
BROWSER = None
# URL to an optional icon.
# If you want to create your own icon, create a 'favicon.ico' ico in
# the module's directory, and keep the ICON value to None.
ICON = None
# Supported objects to fill
# The key is the class and the value the method to call to fill
# Method prototype: method(object, fields)
@ -186,15 +190,6 @@ class BaseBackend(object):
else:
return self.fget(objtype)
@classprop
def ICON(klass):
try:
import xdg.IconTheme
except ImportError:
getLogger(klass.NAME).debug(u'Python xdg module was not found. Please install it to read icon files.')
else:
return xdg.IconTheme.getIconPath(klass.NAME)
_browser = None
@property