elementary: add implementation for elm_multibuttonentry_item_selected_get API
authorShilpa Singh <shilpa.singh@samsung.com>
Wed, 8 Jun 2016 20:48:07 +0000 (13:48 -0700)
committerCedric BAIL <cedric@osg.samsung.com>
Wed, 8 Jun 2016 20:48:24 +0000 (13:48 -0700)
Summary:
Added definition for item_selected_get API
Signed-off-by: Shilpa Singh <shilpa.singh@samsung.com>
@fix

Test Plan: select an item, call item_selected_get API to check status of the item

Reviewers: cedric, CHAN

Reviewed By: CHAN

Subscribers: CHAN, rajeshps, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3999

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
src/lib/elementary/elc_multibuttonentry.c

index a154571..df01d4f 100644 (file)
@@ -1841,12 +1841,14 @@ _elm_multibuttonentry_item_selected_set(Eo *eo_item EINA_UNUSED,
 
 EOLIAN static Eina_Bool
 _elm_multibuttonentry_item_selected_get(Eo *eo_item,
-                                        Elm_Multibuttonentry_Item_Data *item EINA_UNUSED)
+                                        Elm_Multibuttonentry_Item_Data *item)
 {
-   //TODO : To be implemented.
+   ELM_MULTIBUTTONENTRY_DATA_GET_OR_RETURN_VAL(WIDGET(item), sd, EINA_FALSE);
    if (!eo_item) return EINA_FALSE;
+   if (EO_OBJ(sd->selected_it) == eo_item)
+      return EINA_TRUE;
 
-   return EINA_TRUE;
+   return EINA_FALSE;
 }
 
 EOLIAN static void