Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar/graphics/style.py
diff options
context:
space:
mode:
Diffstat (limited to 'sugar/graphics/style.py')
-rw-r--r--sugar/graphics/style.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/sugar/graphics/style.py b/sugar/graphics/style.py
index 4b1bc53..ae1e424 100644
--- a/sugar/graphics/style.py
+++ b/sugar/graphics/style.py
@@ -1,5 +1,12 @@
_styles = {}
+def load_stylesheet(module):
+ for objname in dir(module):
+ if not objname.startswith('_'):
+ obj = getattr(module, objname)
+ if isinstance(obj, dict):
+ register_stylesheet(objname.replace('_', '.'), obj)
+
def register_stylesheet(name, style):
_styles[name] = style