Support for activity icons inside the bundle.

Patch by Gonzalo Odiard <godiard@gmail.com>
Modified by me to allow icon theme to override the bundle one.
This commit is contained in:
Marco Pesenti Gritti
2007-01-12 21:35:53 +01:00
parent 55339d4bea
commit 6971ddb9a4
8 changed files with 31 additions and 16 deletions
+8 -1
View File
@@ -52,7 +52,14 @@ class _IconCache:
return rsvg.Handle(data=data)
def get_handle(self, name, color, size):
info = self._theme.lookup_icon(name, int(size), 0)
if name[0:6] == "theme:":
icon = self._read_icon_from_name(name[6:], color, size)
else:
icon = self._read_icon(name, color)
return icon
def _read_icon_from_name(self, name, color, size):
info = self._theme.lookup_icon(name, size, 0)
if not info:
raise "Icon '" + name + "' not found."