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:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2006-10-01 23:50:43 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2006-10-01 23:50:43 (GMT)
commit0a912e214a815717be270a4ae49becc8721a26dc (patch)
treea4d6813a0709963269f579f7f40bf7971ac0126f /sugar/graphics/style.py
parentd05f1f13d325dc41674ff99020dbcb67ef78dab8 (diff)
Start moving to hippo canvas. (Friends presence in the activity regressed)
Diffstat (limited to 'sugar/graphics/style.py')
-rw-r--r--sugar/graphics/style.py15
1 files changed, 6 insertions, 9 deletions
diff --git a/sugar/graphics/style.py b/sugar/graphics/style.py
index f8a0898..4b1bc53 100644
--- a/sugar/graphics/style.py
+++ b/sugar/graphics/style.py
@@ -1,13 +1,10 @@
_styles = {}
-def register_style(name, style):
+def register_stylesheet(name, style):
_styles[name] = style
-def apply_style(name, item):
- if _styles.has_key(name):
- for name in _styles.keys():
- item.set_property(name, _styles[name]
-
-def Style(dict):
- def set_property(self, name, value):
- self._properties[name] = value
+def apply_stylesheet(item, stylesheet_name):
+ if _styles.has_key(stylesheet_name):
+ style_sheet = _styles[stylesheet_name]
+ for name in style_sheet.keys():
+ item.set_property(name, style_sheet[name])