aboutsummaryrefslogtreecommitdiffstats
path: root/efl/elementary/progressbar.pyx
diff options
context:
space:
mode:
authorKai Huuhko <kai.huuhko@gmail.com>2013-04-02 23:24:35 +0000
committerKai Huuhko <kai.huuhko@gmail.com>2013-04-02 23:24:35 +0000
commited1cad63f6577b2018dc5e2cdb5a1c30ae6d61fd (patch)
tree72dc2104a50afbff7f9ff4042340999430120e9a /efl/elementary/progressbar.pyx
parentElm: Fix tests to work in py3 (diff)
downloadpython-efl-ed1cad63f6577b2018dc5e2cdb5a1c30ae6d61fd.tar.gz
Elm: More _cfruni removal.
Diffstat (limited to 'efl/elementary/progressbar.pyx')
-rw-r--r--efl/elementary/progressbar.pyx14
1 files changed, 8 insertions, 6 deletions
diff --git a/efl/elementary/progressbar.pyx b/efl/elementary/progressbar.pyx
index e717980..085b17e 100644
--- a/efl/elementary/progressbar.pyx
+++ b/efl/elementary/progressbar.pyx
@@ -178,14 +178,16 @@ cdef class Progressbar(LayoutClass):
"""
def __get__(self):
- return _ctouni(elm_progressbar_unit_format_get(self.obj))
+ return self.unit_format_get()
- def __set__(self, format):
- elm_progressbar_unit_format_set(self.obj, _cfruni(format) if format is not None else NULL)
+ def __set__(self, unit_format):
+ self.unit_format_set(unit_format)
- def unit_format_set(self, format):
- elm_progressbar_unit_format_set(self.obj, _cfruni(format) if format is not None else NULL)
- def unit_format_get(self):
+ cpdef unit_format_set(self, unit_format):
+ if isinstance(unit_format, unicode): unit_format = unit_format.encode("UTF-8")
+ elm_progressbar_unit_format_set(self.obj,
+ <const_char *>unit_format if unit_format is not None else NULL)
+ cpdef unit_format_get(self):
return _ctouni(elm_progressbar_unit_format_get(self.obj))
property unit_format_function: