From 24f461b5e940b5d06434ee8cc37efc392a792422 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Manuel=20Qui=C3=B1ones?= <manuq@laptop.org>
Date: Wed, 7 Nov 2012 15:32:14 -0300
Subject: [PATCH shell] Buddy color: force bytestring encoding
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Mail-Followup-To: <sugar-devel@lists.sugarlabs.org>
When the color is given by the remote buddy, it comes as unicode, even
when the PropertiesChanged signal is connected with byte_arrays=True
in jarabe/model/neighborhood.py. The Rsvg.Handle.new_from_data method
of toolkit needs a bytestring. So we cast it to str.
Signed-off-by: Manuel Quiñones <manuq@laptop.org>
---
src/jarabe/model/neighborhood.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/jarabe/model/neighborhood.py b/src/jarabe/model/neighborhood.py
index 85c35c9..1267d50 100644
a
|
b
|
class Neighborhood(GObject.GObject): |
924 | 924 | is_new = buddy.props.key is None and 'key' in properties |
925 | 925 | |
926 | 926 | if 'color' in properties: |
927 | | buddy.props.color = XoColor(properties['color']) |
| 927 | buddy.props.color = XoColor(str(properties['color'])) |
928 | 928 | |
929 | 929 | if 'key' in properties: |
930 | 930 | buddy.props.key = properties['key'] |