コード例 #1
0
ファイル: art.py プロジェクト: xguse/outspline
 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()
コード例 #2
0
ファイル: art.py プロジェクト: xguse/outspline
 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()
コード例 #3
0
ファイル: art.py プロジェクト: xguse/outspline
    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()
コード例 #4
0
ファイル: art.py プロジェクト: xguse/outspline
    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()