int chk_status;
} gen_item_data;
+typedef struct _Item_Data
+{
+ int index;
+ Elm_Object_Item *item;
+} Item_Data;
+
class ime_info_compare
{
public:
return NULL;
}
+static void
+im_setting_list_genlist_keyboard_list_item_del(void *data, Evas_Object *obj)
+{
+ Item_Data *id = (Item_Data *)data;
+ if (id) free(id);
+}
+
static char *im_setting_list_genlist_keyboard_list_item_label_get(void *data, Evas_Object *obj, const char *part)
{
- int index = (int)reinterpret_cast<long>(data);
+ Item_Data *id = (Item_Data *)data;
+ int index = id->index;
if (index < 0 || index >= (int)g_ime_info_list.size()) {
LOGW("Wrong value. index : %d, g_ime_info_list.size() : %d\n", index, g_ime_info_list.size());
return NULL;
static Evas_Object *im_setting_list_genlist_keyboard_list_item_icon_get(void *data, Evas_Object *obj, const char *part)
{
- int index = (int)reinterpret_cast<long>(data);
+ Item_Data *id = (Item_Data *)data;
+ int index = id->index;
+
if (index < 0 || index >= (int)g_ime_info_list.size()) {
LOGW("Wrong value. index : %d, g_ime_info_list.size() : %d\n", index, g_ime_info_list.size());
return NULL;
evas_object_pass_events_set(ck, EINA_TRUE);
evas_object_smart_callback_add(ck, "changed", im_setting_list_check_button_change_cb, (void *)(index));
evas_object_show(ck);
+
+ elm_atspi_accessible_relationship_append(ck, ELM_ATSPI_RELATION_CONTROLLED_BY, id->item);
+ elm_atspi_accessible_relationship_append(id->item, ELM_ATSPI_RELATION_CONTROLLER_FOR, ck);
+ elm_atspi_accessible_relationship_append(id->item, ELM_ATSPI_RELATION_DESCRIBED_BY, ck);
+
return ck;
}
return NULL;
itc_im_list_keyboard_list->func.text_get = im_setting_list_genlist_keyboard_list_item_label_get;
itc_im_list_keyboard_list->func.content_get = im_setting_list_genlist_keyboard_list_item_icon_get;
itc_im_list_keyboard_list->func.state_get = NULL;
- itc_im_list_keyboard_list->func.del = NULL;
+ itc_im_list_keyboard_list->func.del = im_setting_list_genlist_keyboard_list_item_del;
}
}
#ifdef _MOBILE
/* Keyboards group */
Elm_Object_Item *group_header_item = NULL;
+ Item_Data *id = NULL;
group_header_item = elm_genlist_item_append(ad->genlist,
itc_im_list_group,
IM_SETTING_LIST_KEYBOARD_HEADER,
NULL,
- ELM_GENLIST_ITEM_NONE,
+ ELM_GENLIST_ITEM_GROUP,
NULL,
NULL);
elm_genlist_item_select_mode_set(group_header_item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
}
g_gen_item_data.push_back(item_data);
- Elm_Object_Item *item = elm_genlist_item_append(ad->genlist,
+ id = (Item_Data *)calloc(sizeof(Item_Data), 1);
+ id->index = i;
+
+ id->item = elm_genlist_item_append(ad->genlist,
itc_im_list_keyboard_list,
- (void *)(i),
+ id,
NULL,
ELM_GENLIST_ITEM_NONE,
im_setting_list_item_sel_cb,
(void *)(i));
if (g_ime_info_list[i].is_preinstalled || (i == g_active_ime_index)) {
- elm_object_item_disabled_set(item, EINA_TRUE);
+ elm_object_item_disabled_set(id->item, EINA_TRUE);
}
- g_gen_item_data[i].gen_item = item;
+ g_gen_item_data[i].gen_item = id->item;
}
#endif