kuuko pushed a commit to branch master. http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=9f4eab83b7f789c2237ac02e9f33352499712314
commit 9f4eab83b7f789c2237ac02e9f33352499712314 Author: Kai Huuhko <kai.huu...@gmail.com> Date: Tue Mar 24 14:48:05 2015 +0200 Elm.Naviframe: Fix item_pop_cb call --- efl/elementary/naviframe.pyx | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/efl/elementary/naviframe.pyx b/efl/elementary/naviframe.pyx index 4053adf..394dad5 100644 --- a/efl/elementary/naviframe.pyx +++ b/efl/elementary/naviframe.pyx @@ -128,7 +128,7 @@ cdef object _cb_object_item_conv(void *addr): cdef Eina_Bool py_elm_naviframe_item_pop_cb(void *data, Elm_Object_Item *it): cdef: - ObjectItem item = _object_item_to_python(it) + NaviframeItem item = _object_item_to_python(it) object func tuple args dict kwargs @@ -136,7 +136,7 @@ cdef Eina_Bool py_elm_naviframe_item_pop_cb(void *data, Elm_Object_Item *it): try: func, args, kwargs = item.pop_cb_spec - ret = func(*args, **kwargs) + ret = func(item, *args, **kwargs) except Exception: traceback.print_exc() @@ -192,12 +192,9 @@ cdef class NaviframeItem(ObjectItem): if isinstance(title_label, unicode): title_label = PyUnicode_AsUTF8String(title_label) self.label = title_label - if prev_btn is not None: - self.prev_btn = prev_btn.obj - if next_btn is not None: - self.next_btn = next_btn.obj - if content is not None: - self.item_content = content.obj + self.prev_btn = prev_btn.obj if prev_btn is not None else NULL + self.next_btn = next_btn.obj if next_btn is not None else NULL + self.item_content = content.obj if content is not None else NULL self.args = args self.kwargs = kwargs --