[Atspi][Ctxpopup] support "icon_only" style for atspi 38/85738/1
authorJunsuChoi <jsuya.choi@samsung.com>
Fri, 26 Aug 2016 03:37:36 +0000 (12:37 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Fri, 26 Aug 2016 03:37:36 +0000 (12:37 +0900)
   When the style of the ctxpopup was "icon_only" and the icon was set to name,
   atspi_accessible_name_get returns name of the icon.

Change-Id: If55e042eeed9ef3b685b05fab5fbabcef95d34a7

src/mobile_lib/elc_ctxpopup.c

index 09ce051..ecc4208 100644 (file)
@@ -2328,7 +2328,14 @@ _elm_ctxpopup_elm_interface_atspi_component_highlight_clear(Eo *obj EINA_UNUSED,
 EOLIAN char *
 _elm_ctxpopup_item_elm_interface_atspi_accessible_name_get(Eo *eo_it EINA_UNUSED, Elm_Ctxpopup_Item_Data *item)
 {
-   return item->label ? strdup(item->label) : NULL;
+   if(item->icon && !item->label)
+     {
+        char *icon_name = NULL;
+        eo_do(item->icon, icon_name = elm_interface_atspi_accessible_name_get());
+        return icon_name ? strdup(icon_name): NULL;
+     }
+   else
+     return item->label ? strdup(item->label) : NULL;
 }
 //