diff options
| author | Martin Jansa <Martin.Jansa@gmail.com> | 2011-03-31 09:14:18 +0200 |
|---|---|---|
| committer | Koen Kooi <koen@dominion.thruhere.net> | 2011-03-31 12:56:35 +0200 |
| commit | c5e512ae752cfef92f418c0c787c6371d3fa743c (patch) | |
| tree | d2529324c68bd8e0b9e581f2b8c9b3e9db2462a3 /meta-efl/recipes-devtools/python/python-edje | |
| parent | b6aa2bfbf6fd51ada0fb7d5f44bbafbba796a73c (diff) | |
| download | meta-openembedded-c5e512ae752cfef92f418c0c787c6371d3fa743c.tar.gz | |
python-efl: import from meta-shr
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-efl/recipes-devtools/python/python-edje')
| -rw-r--r-- | meta-efl/recipes-devtools/python/python-edje/0001-fix-unicode-conversion.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/meta-efl/recipes-devtools/python/python-edje/0001-fix-unicode-conversion.patch b/meta-efl/recipes-devtools/python/python-edje/0001-fix-unicode-conversion.patch new file mode 100644 index 0000000000..3b0cdc627c --- /dev/null +++ b/meta-efl/recipes-devtools/python/python-edje/0001-fix-unicode-conversion.patch | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | From fa12a33b5a3c0e86231ca84967d9eff456e5f314 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Jan Luebbe <jluebbe@debian.org> | ||
| 3 | Date: Sat, 9 Aug 2008 18:30:04 +0200 | ||
| 4 | Subject: [PATCH] fix unicode conversion | ||
| 5 | |||
| 6 | --- | ||
| 7 | edje/edje.c_edje_object.pxi | 11 +++++++---- | ||
| 8 | 1 files changed, 7 insertions(+), 4 deletions(-) | ||
| 9 | |||
| 10 | diff --git a/edje/edje.c_edje_object.pxi b/edje/edje.c_edje_object.pxi | ||
| 11 | index 0f4da68..21c237e 100644 | ||
| 12 | --- a/edje/edje.c_edje_object.pxi | ||
| 13 | +++ b/edje/edje.c_edje_object.pxi | ||
| 14 | @@ -415,17 +415,20 @@ | ||
| 15 | else: | ||
| 16 | raise TypeError("func must be callable or None") | ||
| 17 | |||
| 18 | - def part_text_set(self, char *part, char *text): | ||
| 19 | - edje_object_part_text_set(self.obj, part, text) | ||
| 20 | + def part_text_set(self, char *part, text): | ||
| 21 | + cdef char *s | ||
| 22 | + u = text.encode("utf8") | ||
| 23 | + s = u | ||
| 24 | + edje_object_part_text_set(self.obj, part, s) | ||
| 25 | |||
| 26 | def part_text_get(self, char *part): | ||
| 27 | - "@rtype: str" | ||
| 28 | + "@rtype: unicode" | ||
| 29 | cdef const_char_ptr s | ||
| 30 | s = edje_object_part_text_get(self.obj, part) | ||
| 31 | if s == NULL: | ||
| 32 | return None | ||
| 33 | else: | ||
| 34 | - return s | ||
| 35 | + return s.decode("utf8") | ||
| 36 | |||
| 37 | def part_text_select_all(self, char *part): | ||
| 38 | edje_object_part_text_select_all(self.obj, part) | ||
