Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2006-09-22 12:32:07 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2006-09-22 12:32:07 (GMT)
commitd8c61d271ad12225b2e08cf23a8b60feccb07bd1 (patch)
tree1b7eee368827d514ae8ab2e3b2be6fb87a5a66fd
parent092ded9e5384e4506e1cfc527c4041e416371f23 (diff)
Convert to the new icon format
-rw-r--r--shell/view/frame/BottomPanel.py6
-rw-r--r--shell/view/frame/RightPanel.py4
-rw-r--r--shell/view/frame/TopPanel.py2
-rw-r--r--sugar/canvas/IconColor.py2
-rw-r--r--sugar/canvas/IconItem.py13
-rw-r--r--sugar/canvas/Menu.py4
6 files changed, 14 insertions, 17 deletions
diff --git a/shell/view/frame/BottomPanel.py b/shell/view/frame/BottomPanel.py
index 5f98f01..7509576 100644
--- a/shell/view/frame/BottomPanel.py
+++ b/shell/view/frame/BottomPanel.py
@@ -34,7 +34,7 @@ class InviteItem(IconItem):
class BottomPanel(CanvasBox):
def __init__(self, shell):
- CanvasBox.__init__(self, shell.get_grid(), CanvasBox.HORIZONTAL, 1)
+ CanvasBox.__init__(self, shell.get_grid(), CanvasBox.HORIZONTAL)
self._shell = shell
self._invite_to_item = {}
@@ -67,13 +67,13 @@ class BottomPanel(CanvasBox):
def add_activity(self, activity):
item = ActivityItem(activity)
item.connect('clicked', self.__activity_clicked_cb)
- self.set_constraints(item, 3, 3)
+ self.set_constraints(item, 5, 5)
self.add_child(item)
def add_invite(self, invite):
item = InviteItem(invite)
item.connect('clicked', self.__invite_clicked_cb)
- self.set_constraints(item, 3, 3)
+ self.set_constraints(item, 5, 5)
self.add_child(item, 0)
self._invite_to_item[invite] = item
diff --git a/shell/view/frame/RightPanel.py b/shell/view/frame/RightPanel.py
index d74d6ab..04f9478 100644
--- a/shell/view/frame/RightPanel.py
+++ b/shell/view/frame/RightPanel.py
@@ -10,7 +10,7 @@ from view.frame.MenuStrategy import MenuStrategy
class RightPanel(CanvasBox):
def __init__(self, shell, menu_shell):
- CanvasBox.__init__(self, shell.get_grid(), CanvasBox.VERTICAL, 1)
+ CanvasBox.__init__(self, shell.get_grid(), CanvasBox.VERTICAL)
self._shell = shell
self._menu_shell = menu_shell
self._activity_ps = None
@@ -27,7 +27,7 @@ class RightPanel(CanvasBox):
def add(self, buddy):
icon = BuddyIcon(self._shell, self._menu_shell, BuddyModel(buddy))
icon.set_menu_strategy(MenuStrategy())
- self.set_constraints(icon, 3, 3)
+ self.set_constraints(icon, 5, 5)
self.add_child(icon)
self._buddies[buddy.get_name()] = icon
diff --git a/shell/view/frame/TopPanel.py b/shell/view/frame/TopPanel.py
index e8dc5c4..5516bb5 100644
--- a/shell/view/frame/TopPanel.py
+++ b/shell/view/frame/TopPanel.py
@@ -96,7 +96,7 @@ class TopPanel(goocanvas.Group):
if activity:
icon = ActivityIcon(self._shell, self._menu_shell, activity)
- self._box.set_constraints(icon, 3, 3)
+ self._box.set_constraints(icon, 5, 5)
self._box.add_child(icon)
self._activity_icon = icon
else:
diff --git a/sugar/canvas/IconColor.py b/sugar/canvas/IconColor.py
index 84ca409..77e67ef 100644
--- a/sugar/canvas/IconColor.py
+++ b/sugar/canvas/IconColor.py
@@ -4,7 +4,7 @@ from sugar.canvas import Colors
def _parse_string(color_string):
if color_string == 'white':
- return ['white', '#4f4f4f']
+ return ['#ffffff', '#4f4f4f']
splitted = color_string.split(',')
if len(splitted) == 2:
diff --git a/sugar/canvas/IconItem.py b/sugar/canvas/IconItem.py
index c40fb44..69b3555 100644
--- a/sugar/canvas/IconItem.py
+++ b/sugar/canvas/IconItem.py
@@ -25,15 +25,12 @@ class _IconCache:
fill = color.get_fill_color()
stroke = color.get_stroke_color()
+
+ entity = '<!ENTITY fill_color "%s">' % fill
+ data = re.sub('<!ENTITY fill_color .*>', entity, data)
- style = '.fill {fill:%s;stroke:%s;}' % (fill, fill)
- data = re.sub('\.fill \{.*\}', style, data)
-
- style = '.shape {stroke:%s;fill:%s;}' % (stroke, stroke)
- data = re.sub('\.shape \{.*\}', style, data)
-
- style = '.shape-and-fill {fill:%s; stroke:%s;}' % (fill, stroke)
- data = re.sub('\.shape-and-fill \{.*\}', style, data)
+ entity = '<!ENTITY stroke_color "%s">' % stroke
+ data = re.sub('<!ENTITY stroke_color .*>', entity, data)
return rsvg.Handle(data=data)
diff --git a/sugar/canvas/Menu.py b/sugar/canvas/Menu.py
index 4b53b55..2283f15 100644
--- a/sugar/canvas/Menu.py
+++ b/sugar/canvas/Menu.py
@@ -45,7 +45,7 @@ class Menu(gtk.Window):
self._grid.set_constraints(separator, 0, 4)
self._root.add_child(separator)
- box = CanvasBox(self._grid, CanvasBox.HORIZONTAL, 1)
+ box = CanvasBox(self._grid, CanvasBox.HORIZONTAL)
self._grid.set_constraints(box, 0, 5)
return box
@@ -62,7 +62,7 @@ class Menu(gtk.Window):
self._update_constraints()
icon.connect('clicked', self._action_clicked_cb, action_id)
- self._action_box.set_constraints(icon, 3, 3)
+ self._action_box.set_constraints(icon, 5, 5)
self._action_box.add_child(icon)
def _action_clicked_cb(self, icon, action):