From 72089a1844b6b6e820601d00c028b774dc0cbf75 Mon Sep 17 00:00:00 2001 From: Felix Domke Date: Sat, 15 Mar 2008 10:50:29 +0000 Subject: optional pixmap caching --- skin.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'skin.py') diff --git a/skin.py b/skin.py index 21ec62ae..26c08207 100644 --- a/skin.py +++ b/skin.py @@ -106,7 +106,13 @@ def collectAttributes(skinAttributes, node, skin_path_prefix=None, ignore=[]): skinAttributes.append((attrib, value)) def loadPixmap(path, desktop): - ptr = LoadPixmap(path, desktop) + cached = False + option = path.find("#") + if option != -1: + options = path[option+1:].split(',') + path = path[:option] + cached = "cached" in options + ptr = LoadPixmap(path, desktop, cached) if ptr is None: raise SkinError("pixmap file %s not found!" % (path)) return ptr -- cgit v1.2.3