renamed BackendsLoader to ModulesLoader

This commit is contained in:
Romain Bignon 2010-08-24 11:03:39 +02:00
commit 9f5c9aeebc
9 changed files with 301 additions and 252 deletions

View file

@ -147,6 +147,24 @@ class BaseBackend(object):
"""
pass
class classprop(object):
def __init__(self, fget):
self.fget = fget
def __get__(self, inst, objtype=None):
if inst:
return self.fget(inst)
else:
return self.fget(objtype)
@classprop
def ICON(self):
try:
import xdg.IconTheme
except ImportError:
debug(u'Python xdg module was not found. Please install it to read icon files.')
else:
return xdg.IconTheme.getIconPath(self.NAME)
@property
def browser(self):
"""