summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_interface_atspi_accessible.c
diff options
context:
space:
mode:
authorShinwoo Kim <cinoo.kim@samsung.com>2016-11-10 10:58:41 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-11-10 11:11:48 +0900
commite648f1e85e2d1be78bc2cb6a2b2aa87227bcfe89 (patch)
treeae2351dab937b907f0d7ad961213f239149b2b76 /src/lib/elementary/elm_interface_atspi_accessible.c
parent7917fa4ebfad0c02e9b054c3b6f0108fc8ec759f (diff)
[elementary][atspi] change accessible description to char* from const char*
Summary: The accessible name is char*, this could confuse API user. If we provide user callback to get description, an user would return allocated string. The usage of elm_interface_atspi_description_get/set should be same with elm_interface_atspi_name_get/set Reviewers: lukasz.stanislawski, cedric, raster Reviewed By: raster Subscribers: stanluk, jpeg Differential Revision: https://phab.enlightenment.org/D4378
Diffstat (limited to 'src/lib/elementary/elm_interface_atspi_accessible.c')
-rw-r--r--src/lib/elementary/elm_interface_atspi_accessible.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/lib/elementary/elm_interface_atspi_accessible.c b/src/lib/elementary/elm_interface_atspi_accessible.c
index 9f576aa7d7..22afbaabeb 100644
--- a/src/lib/elementary/elm_interface_atspi_accessible.c
+++ b/src/lib/elementary/elm_interface_atspi_accessible.c
@@ -224,26 +224,18 @@ _elm_interface_atspi_accessible_role_name_get(Eo *obj EINA_UNUSED, Elm_Interface
224 return role > ELM_ATSPI_ROLE_LAST_DEFINED ? "" : Atspi_Name[role]; 224 return role > ELM_ATSPI_ROLE_LAST_DEFINED ? "" : Atspi_Name[role];
225} 225}
226 226
227EOLIAN char * 227EOLIAN const char *
228_elm_interface_atspi_accessible_name_get(Eo *obj EINA_UNUSED, Elm_Interface_Atspi_Accessible_Data *pd) 228_elm_interface_atspi_accessible_name_get(Eo *obj EINA_UNUSED, Elm_Interface_Atspi_Accessible_Data *pd)
229{ 229{
230 if (pd->name)
231 {
232#ifdef ENABLE_NLS 230#ifdef ENABLE_NLS
233 if (pd->translation_domain) 231 if (pd->translation_domain)
234 return strdup(dgettext(pd->translation_domain, pd->name)); 232 return dgettext(pd->translation_domain, pd->name);
235 else
236 return strdup(pd->name);
237#else
238 return strdup(pd->name);
239#endif 233#endif
240 } 234 return pd->name;
241
242 return NULL;
243} 235}
244 236
245EOLIAN static void 237EOLIAN static void
246_elm_interface_atspi_accessible_name_set(Eo *obj EINA_UNUSED, Elm_Interface_Atspi_Accessible_Data *pd, char *val) 238_elm_interface_atspi_accessible_name_set(Eo *obj EINA_UNUSED, Elm_Interface_Atspi_Accessible_Data *pd, const char *val)
247{ 239{
248 eina_stringshare_replace(&pd->name, val); 240 eina_stringshare_replace(&pd->name, val);
249} 241}