rpms/sugar-presence-service/F-11 non-ascii.patch, NONE, 1.1 sugar-presence-service.spec, 1.19, 1.20

Simon Schampijer erikos at fedoraproject.org
Tue Jun 2 17:25:26 UTC 2009


Author: erikos

Update of /cvs/pkgs/rpms/sugar-presence-service/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25272

Modified Files:
	sugar-presence-service.spec 
Added Files:
	non-ascii.patch 
Log Message:
* Tue Jun 2 2009 Simpon Schampijer <simon at schampijer.de> - 0.84.0-2
- fix for non-ascii characters in nick names #889



non-ascii.patch:

--- NEW FILE non-ascii.patch ---
diff --git a/src/buddy.py b/src/buddy.py
index 68061c6..be90f02 100644
--- a/src/buddy.py
+++ b/src/buddy.py
@@ -956,6 +956,10 @@ class ShellOwner(GenericOwner):
         key = profile.pubkey
 
         nick = client.get_string("/desktop/sugar/user/nick")
+        if not isinstance(nick, unicode):
+            # GConf let you only store utf-8 encded strings, why we can expect 
+            # an utf-8 string here 
+            nick = unicode(nick, 'utf-8')
         color = client.get_string("/desktop/sugar/user/color")
 
         icon_file = os.path.join(env.get_profile_path(), "buddy-icon.jpg")


Index: sugar-presence-service.spec
===================================================================
RCS file: /cvs/pkgs/rpms/sugar-presence-service/F-11/sugar-presence-service.spec,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -p -r1.19 -r1.20
--- sugar-presence-service.spec	4 Mar 2009 08:20:04 -0000	1.19
+++ sugar-presence-service.spec	2 Jun 2009 17:24:55 -0000	1.20
@@ -1,6 +1,6 @@
 Name: sugar-presence-service
 Version: 0.84.0
-Release: 1%{?dist}
+Release: 2%{?dist}
 Summary: The Sugar presence service
 
 Group: System Environment/Libraries
@@ -10,6 +10,8 @@ Source0: http://download.sugarlabs.org/s
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch: noarch
 
+Patch1: non-ascii.patch
+
 BuildRequires: python
 
 Requires: python-telepathy >= 0.14.0
@@ -23,6 +25,8 @@ The Sugar presence service.
 %prep
 %setup -q
 
+%patch1 -p1 -b .non-ascii
+
 %build
 %configure --disable-static
 make %{?_smp_mflags}
@@ -42,6 +46,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/dbus-1/services/org.laptop.Sugar.Presence.service
 
 %changelog
+* Tue Jun 2 2009 Simpon Schampijer <simon at schampijer.de> - 0.84.0-2
+- fix for non-ascii characters in nick names #889
+
 * Wed Mar 4 2009 Morgan Collett <morgan.collett at gmail.com> - 0.84.0-1
 - Update to final 0.84.0 release - no changes from 0.83.3
 




More information about the fedora-extras-commits mailing list