On Wed, Jan 22, 2014 at 10:17 PM, Gustavo Lima Chaves
<[email protected]>wrote:

> * Jaehyun Cho <[email protected]> [2014-01-22 05:14:53 -0800]:
>
> > hermet pushed a commit to branch master.
> >
> >
> http://git.enlightenment.org/core/elementary.git/commit/?id=bb39f8616f682af873ccf407086f8ce092369a11
> >
> > commit bb39f8616f682af873ccf407086f8ce092369a11
> > Author: Jaehyun Cho <[email protected]>
> > Date:   Wed Jan 22 22:13:51 2014 +0900
> >
> >     [naviframe] Fix to enable item deletion in pop_cb
> >
> >     Summary: Fix to enable item deletion in the registered pop_cb
> function
> >
> >     Reviewers: Hermet
> >
> >     Reviewed By: Hermet
> >
> >     CC: seoz
> >
> >     Differential Revision: https://phab.enlightenment.org/D487
> > ---
> >  src/lib/elc_naviframe.c        | 15 +++++++++++++++
> >  src/lib/elm_widget_naviframe.h |  2 ++
> >  2 files changed, 17 insertions(+)
> >
> > diff --git a/src/lib/elc_naviframe.c b/src/lib/elc_naviframe.c
> > index a2a1f85..c89fd0a 100644
> > --- a/src/lib/elc_naviframe.c
> > +++ b/src/lib/elc_naviframe.c
> > @@ -504,6 +504,9 @@ _item_del_pre_hook(Elm_Object_Item *it)
> >     nit = (Elm_Naviframe_Item *)it;
> >     ELM_NAVIFRAME_DATA_GET(WIDGET(nit), sd);
> >
> > +   nit->delete_me = EINA_TRUE;
> > +   if (nit->ref > 0) return EINA_FALSE;
> > +
> >     ecore_animator_del(nit->animator);
> >
> >     top = (it == elm_naviframe_top_item_get(WIDGET(nit)));
> > @@ -1696,14 +1699,26 @@ _item_pop(Eo *obj, void *_pd, va_list *list)
> >     if (it->popping) return;
> >     it->popping = EINA_TRUE;
> >
> > +   evas_object_ref(obj);
> >     if (it->pop_cb)
> >       {
> > +        it->ref++;
> >          if (!it->pop_cb(it->pop_data, (Elm_Object_Item *)it))
> >            {
> > +             it->ref--;
> > +             if (it->delete_me)
> > +               {
> > +                  _item_del_pre_hook(it);
> > +                  _elm_widget_item_free(it);
>
> Would you please exchange all calls to this couple of functions by the
> equally working elm_widget_item_del()?
>
>
I just fixed it.
Jaehyun, please refer
https://git.enlightenment.org/core/elementary.git/commit/?id=c38ba2ee7c4bf30395fb3f67ea9cc8d3f06c1d45

Thanks.

Daniel Juyung Seo (SeoZ)



> > +               }
> >               it->popping = EINA_FALSE;
> > +             evas_object_unref(obj);
> > +
> >               return;
> >            }
> > +        it->ref--;
> >       }
> > +   evas_object_unref(obj);
> >
> >     if (sd->preserve)
> >       content = it->content;
> > diff --git a/src/lib/elm_widget_naviframe.h
> b/src/lib/elm_widget_naviframe.h
> > index 83809f9..1b4d3fc 100644
> > --- a/src/lib/elm_widget_naviframe.h
> > +++ b/src/lib/elm_widget_naviframe.h
> > @@ -57,6 +57,8 @@ struct _Elm_Naviframe_Item
> >     Eina_Bool    title_enabled : 1;
> >     Eina_Bool    unfocusable : 1;
> >     Eina_Bool    popping : 1;
> > +   Eina_Bool    delete_me : 1;
> > +   int          ref;
> >  };
> >
> >  typedef struct _Elm_Naviframe_Content_Item_Pair
> Elm_Naviframe_Content_Item_Pair;
> >
> > --
> >
> >
>
> --
> Gustavo Lima Chaves
> Senior Developer @ Intel - Open Source Technology Center
>
>
> ------------------------------------------------------------------------------
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> _______________________________________________
> enlightenment-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to