def install_icon_bundle(self, plugin, bundleid, paths): # Use bundleid prefixed with "&" so that they can't conflict with icon # theme names try: self.bundles[bundleid] except KeyError: self.bundles[bundleid] = (coreaux_api.get_plugin_bundled_data( plugin, path) for path in paths) else: # Just crash if there's a conflict, it should happen only in # development raise exceptions.DuplicatedArtIdError()
def install_bundled_icon(self, plugin, artid, path): # Use artids prefixed with "@" so that they can't conflict with icon # theme names abspath = coreaux_api.get_plugin_bundled_data(plugin, path) if abspath in self.bundled.values(): raise exceptions.DuplicatedIconError() else: try: self.bundled[artid] except KeyError: self.bundled[artid] = abspath else: # Just crash if there's a conflict, it should happen only in # development raise exceptions.DuplicatedArtIdError()