[Sugar-devel] [PATCH sugar] Color the favi-icon in the activities list and Journal in owners color SL #3090

Simon Schampijer simon at schampijer.de
Wed Sep 14 09:58:35 EDT 2011


As discussed with Gary C. Martin.

Signed-off-by: Simon Schampijer <simon at laptop.org>
---
 src/jarabe/desktop/activitieslist.py |    6 ++++--
 src/jarabe/journal/keepicon.py       |    6 +++++-
 src/jarabe/journal/listview.py       |    6 ++++--
 3 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/src/jarabe/desktop/activitieslist.py b/src/jarabe/desktop/activitieslist.py
index 05d760e..b3b1f9d 100644
--- a/src/jarabe/desktop/activitieslist.py
+++ b/src/jarabe/desktop/activitieslist.py
@@ -249,8 +249,10 @@ class CellRendererFavorite(CellRendererIcon):
         self.props.size = style.SMALL_ICON_SIZE
         self.props.icon_name = 'emblem-favorite'
         self.props.mode = gtk.CELL_RENDERER_MODE_ACTIVATABLE
-        self.props.prelit_stroke_color = style.COLOR_BUTTON_GREY.get_svg()
-        self.props.prelit_fill_color = style.COLOR_BUTTON_GREY.get_svg()
+        client = gconf.client_get_default()
+        prelit_color = XoColor(client.get_string('/desktop/sugar/user/color'))
+        self.props.prelit_stroke_color = prelit_color.get_stroke_color()
+        self.props.prelit_fill_color = prelit_color.get_fill_color()
 
 
 class CellRendererActivityIcon(CellRendererIcon):
diff --git a/src/jarabe/journal/keepicon.py b/src/jarabe/journal/keepicon.py
index 1253afc..5bc299b 100644
--- a/src/jarabe/journal/keepicon.py
+++ b/src/jarabe/journal/keepicon.py
@@ -55,6 +55,10 @@ class KeepIcon(CanvasIcon):
     def __motion_notify_event_cb(self, icon, event):
         if not self._keep:
             if event.detail == hippo.MOTION_DETAIL_ENTER:
-                icon.props.fill_color = style.COLOR_BUTTON_GREY.get_svg()
+                client = gconf.client_get_default()
+                prelit_color = XoColor(client.get_string('/desktop/sugar/user/color'))
+                icon.props.stroke_color = prelit_color.get_stroke_color()
+                icon.props.fill_color = prelit_color.get_fill_color()
             elif event.detail == hippo.MOTION_DETAIL_LEAVE:
+                icon.props.stroke_color = style.COLOR_BUTTON_GREY.get_svg()
                 icon.props.fill_color = style.COLOR_TRANSPARENT.get_svg()
diff --git a/src/jarabe/journal/listview.py b/src/jarabe/journal/listview.py
index 0d7e112..a0ceccc 100644
--- a/src/jarabe/journal/listview.py
+++ b/src/jarabe/journal/listview.py
@@ -562,8 +562,10 @@ class CellRendererFavorite(CellRendererIcon):
         self.props.size = style.SMALL_ICON_SIZE
         self.props.icon_name = 'emblem-favorite'
         self.props.mode = gtk.CELL_RENDERER_MODE_ACTIVATABLE
-        self.props.prelit_stroke_color = style.COLOR_BUTTON_GREY.get_svg()
-        self.props.prelit_fill_color = style.COLOR_BUTTON_GREY.get_svg()
+        client = gconf.client_get_default()
+        prelit_color = XoColor(client.get_string('/desktop/sugar/user/color'))
+        self.props.prelit_stroke_color = prelit_color.get_stroke_color()
+        self.props.prelit_fill_color = prelit_color.get_fill_color()
 
 
 class CellRendererDetail(CellRendererIcon):
-- 
1.7.4.4



More information about the Sugar-devel mailing list