def icon_map(): global _icon_map with _icon_map_lock: if _icon_map is None: _icon_map = category_icon_map.copy() custom_icons = JSONConfig('gui').get('tags_browser_category_icons', {}) for k, v in custom_icons.iteritems(): if os.access(os.path.join(config_dir, 'tb_icons', v), os.R_OK): _icon_map[k] = '_' + quote(v) _icon_map['file_type_icons'] = { k:'mimetypes/%s.png' % v for k, v in EXT_MAP.iteritems() } return _icon_map
def icon_map(): global _icon_map with _icon_map_lock: if _icon_map is None: _icon_map = category_icon_map.copy() custom_icons = JSONConfig('gui').get('tags_browser_category_icons', {}) for k, v in custom_icons.iteritems(): if os.access(os.path.join(config_dir, 'tb_icons', v), os.R_OK): _icon_map[k] = '_' + quote(v) _icon_map['file_type_icons'] = { k:'mimetypes/%s.png' % v for k, v in EXT_MAP.iteritems() } return _icon_map
def icon_map(): global _icon_map with _icon_map_lock: if _icon_map is None: from calibre.gui2 import gprefs _icon_map = category_icon_map.copy() custom_icons = gprefs.get('tags_browser_category_icons', {}) for k, v in iteritems(custom_icons): if os.access(os.path.join(config_dir, 'tb_icons', v), os.R_OK): _icon_map[k] = '_' + quote(v) _icon_map['file_type_icons'] = { k:'mimetypes/%s.png' % v for k, v in iteritems(EXT_MAP) } return _icon_map
def icon_map(): global _icon_map with _icon_map_lock: if _icon_map is None: from calibre.gui2 import gprefs _icon_map = category_icon_map.copy() custom_icons = gprefs.get('tags_browser_category_icons', {}) for k, v in iteritems(custom_icons): if os.access(os.path.join(config_dir, 'tb_icons', v), os.R_OK): _icon_map[k] = '_' + quote(v) _icon_map['file_type_icons'] = { k:'mimetypes/%s.png' % v for k, v in iteritems(EXT_MAP) } return _icon_map