elementary/naviframe - don't try to pop the naviframe item multiple times.
authorChunEon Park <chuneon.park@samsung.com>
Wed, 17 Apr 2013 13:11:38 +0000 (22:11 +0900)
committerSungho Kwak <sungho1.kwak@samsung.com>
Wed, 12 Jun 2013 04:18:43 +0000 (13:18 +0900)
commit 5500f9f740d27d9d202ae1c591cf8078d9b28358
Author: ChunEon Park <hermet>@hermet.pe.kr>
Date: Wed Apr 17 22:08:41 2013 +0900

src/lib/elc_naviframe.c
src/lib/elm_widget_naviframe.h

index b4e6f61..c855e24 100644 (file)
@@ -1504,9 +1504,7 @@ _elm_naviframe_smart_event(Evas_Object *obj,
    if (type != EVAS_CALLBACK_KEY_DOWN) return EINA_FALSE;
 
    it = (Elm_Naviframe_Item *) elm_naviframe_top_item_get(obj);
-
-   //Prevent the event handling if the popping is going on.
-   if (!it || it->animator) return EINA_FALSE;
+   if (!it) return EINA_FALSE;
 
    elm_naviframe_item_pop(obj);
 
@@ -1765,9 +1763,17 @@ elm_naviframe_item_pop(Evas_Object *obj)
    it = (Elm_Naviframe_Item *)elm_naviframe_top_item_get(obj);
    if (!it) return NULL;
 
+   if (it->animator || it->popping) return NULL;
+
+   it->popping = EINA_TRUE;
+
    if (it->pop_cb)
      {
-        if (!it->pop_cb(it->pop_data, (Elm_Object_Item *)it)) return NULL;
+        if (!it->pop_cb(it->pop_data, (Elm_Object_Item *)it))
+          {
+             it->popping = EINA_FALSE;
+             return NULL;
+          }
      }
 
    if (sd->preserve)
index b9da63f..12731a8 100644 (file)
@@ -158,6 +158,7 @@ struct _Elm_Naviframe_Item
 
    Eina_Bool    title_visible : 1;
    Eina_Bool    unfocusable : 1;
+   Eina_Bool    popping : 1;
 };
 
 typedef struct _Elm_Naviframe_Content_Item_Pair Elm_Naviframe_Content_Item_Pair;