elm genlist: Set long_timer to NULL after it's deleted.
authorseoz <seoz@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 30 Mar 2012 09:25:58 +0000 (09:25 +0000)
committerseoz <seoz@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 30 Mar 2012 09:25:58 +0000 (09:25 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@69789 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/elm_genlist.c

index 988c30d..5f19be0 100644 (file)
@@ -1322,9 +1322,9 @@ _mouse_down(void        *data,
           evas_object_smart_callback_call(WIDGET(it), SIG_CLICKED_DOUBLE, it);
           evas_object_smart_callback_call(WIDGET(it), SIG_ACTIVATED, it);
        }
-   if (it->long_timer) ecore_timer_del(it->long_timer);
    if (it->item->swipe_timer) ecore_timer_del(it->item->swipe_timer);
    it->item->swipe_timer = ecore_timer_add(0.4, _swipe_cancel, it);
+   if (it->long_timer) ecore_timer_del(it->long_timer);
    if (it->realized)
      it->long_timer = ecore_timer_add(it->wd->longpress_timeout, _long_press,
                                       it);
@@ -5827,7 +5827,11 @@ _elm_genlist_item_del_serious(Elm_Gen_Item *it)
    if (it->tooltip.del_cb)
      it->tooltip.del_cb((void *)it->tooltip.data, WIDGET(it), it);
    it->wd->walking -= it->walking;
-   if (it->long_timer) ecore_timer_del(it->long_timer);
+   if (it->long_timer)
+     {
+        ecore_timer_del(it->long_timer);
+        it->long_timer = NULL;
+     }
    if (it->group)
      it->wd->group_items = eina_list_remove(it->wd->group_items, it);