forked from enlightenment/efl
elm list: Applied recent list changes.
SVN revision: 66823
This commit is contained in:
parent
650c34d713
commit
4a50aafa60
|
@ -763,7 +763,7 @@ _font_overlay_set_all(void *data,
|
|||
fclasses = evas_object_data_get(win, "font_classes_list");
|
||||
it = elm_list_selected_item_get(fclasses);
|
||||
if (!it) return;
|
||||
tc_data = elm_list_item_data_get(it);
|
||||
tc_data = elm_object_item_data_get(it);
|
||||
|
||||
fnames = evas_object_data_get(win, "font_names_list");
|
||||
fstyles = evas_object_data_get(win, "font_styles_list");
|
||||
|
@ -793,7 +793,7 @@ _font_overlay_reset(void *data,
|
|||
fclasses = evas_object_data_get(win, "font_classes_list");
|
||||
it = elm_list_selected_item_get(fclasses);
|
||||
if (!it) return;
|
||||
tc_data = elm_list_item_data_get(it);
|
||||
tc_data = elm_object_item_data_get(it);
|
||||
|
||||
fnames = evas_object_data_get(win, "font_names_list");
|
||||
fstyles = evas_object_data_get(win, "font_styles_list");
|
||||
|
@ -993,7 +993,7 @@ _config_display_update(Evas_Object *win)
|
|||
l_items = elm_list_items_get(evas_object_data_get(win, "engines_list"));
|
||||
EINA_LIST_FOREACH(l_items, l, it)
|
||||
{
|
||||
if (!strcmp(elm_list_item_data_get(it), curr_engine))
|
||||
if (!strcmp(elm_object_item_data_get(it), curr_engine))
|
||||
{
|
||||
elm_list_item_selected_set(it, EINA_TRUE);
|
||||
break;
|
||||
|
@ -1028,7 +1028,7 @@ _engine_use(void *data,
|
|||
const char *selection;
|
||||
|
||||
li = data;
|
||||
selection = elm_list_item_data_get(elm_list_selected_item_get(li));
|
||||
selection = elm_object_item_data_get(elm_list_selected_item_get(li));
|
||||
|
||||
if (!strcmp(elm_engine_current_get(), selection))
|
||||
return;
|
||||
|
@ -1047,7 +1047,7 @@ _profile_use(void *data,
|
|||
const char *profile;
|
||||
|
||||
li = data;
|
||||
selection = elm_list_item_data_get(elm_list_selected_item_get(li));
|
||||
selection = elm_object_item_data_get(elm_list_selected_item_get(li));
|
||||
profile = elm_profile_current_get();
|
||||
|
||||
if (!profile)
|
||||
|
@ -1083,7 +1083,7 @@ _profile_reset(void *data,
|
|||
Evas_Object *li;
|
||||
|
||||
li = data;
|
||||
selection = elm_list_item_data_get(elm_list_selected_item_get(li));
|
||||
selection = elm_object_item_data_get(elm_list_selected_item_get(li));
|
||||
curr = elm_profile_current_get();
|
||||
|
||||
elm_config_save(); /* dump config into old profile's data dir */
|
||||
|
@ -1144,7 +1144,7 @@ _theme_sel(void *data __UNUSED__,
|
|||
}
|
||||
EINA_LIST_REVERSE_FOREACH((Eina_List*)tsel, l, it)
|
||||
{
|
||||
Theme *t = elm_list_item_data_get(it);
|
||||
Theme *t = elm_object_item_data_get(it);
|
||||
eina_strbuf_append_printf(newth, "%s:", t->name);
|
||||
if ((!l->prev) && strcmp(t->name, "default"))
|
||||
/* ensure default theme is always there for fallback */
|
||||
|
@ -1517,7 +1517,7 @@ _font_classes_list_sel(void *data __UNUSED__,
|
|||
Evas_Object *f_names_list;
|
||||
Elm_List_Item *it;
|
||||
|
||||
tc_data = elm_list_item_data_get(event_info);
|
||||
tc_data = elm_object_item_data_get(event_info);
|
||||
|
||||
f_names_list = evas_object_data_get(elm_object_top_widget_get(obj),
|
||||
"font_names_list");
|
||||
|
@ -1529,7 +1529,7 @@ _font_classes_list_sel(void *data __UNUSED__,
|
|||
{
|
||||
const char *l;
|
||||
|
||||
l = elm_list_item_label_get(it);
|
||||
l = elm_object_item_text_get(it);
|
||||
|
||||
if (tc_data->font && !strcmp(l, tc_data->font))
|
||||
{
|
||||
|
@ -1553,7 +1553,7 @@ _font_names_list_sel(void *data __UNUSED__,
|
|||
const Eina_List *l;
|
||||
|
||||
it = event_info;
|
||||
sel_font = elm_list_item_label_get(it);
|
||||
sel_font = elm_object_item_text_get(it);
|
||||
|
||||
win = elm_object_top_widget_get(obj);
|
||||
style_list = evas_object_data_get(win, "font_styles_list");
|
||||
|
@ -1566,7 +1566,7 @@ _font_names_list_sel(void *data __UNUSED__,
|
|||
|
||||
eina_stringshare_replace(&fdata.cur_font, sel_font);
|
||||
|
||||
tc_data = elm_list_item_data_get(fc_it);
|
||||
tc_data = elm_object_item_data_get(fc_it);
|
||||
if (tc_data->font) eina_stringshare_del(tc_data->font);
|
||||
if (fdata.cur_font) tc_data->font = eina_stringshare_ref(fdata.cur_font);
|
||||
|
||||
|
@ -1621,10 +1621,10 @@ _font_styles_list_sel(void *data __UNUSED__,
|
|||
if (!it) return; /* should not happen */
|
||||
|
||||
eina_stringshare_replace(&fdata.cur_style,
|
||||
elm_list_item_label_get(event_info));
|
||||
elm_object_item_text_get(event_info));
|
||||
ELM_LIST_ENABLE(fs_list);
|
||||
|
||||
tc_data = elm_list_item_data_get(it);
|
||||
tc_data = elm_object_item_data_get(it);
|
||||
eina_stringshare_del(tc_data->style);
|
||||
tc_data->style = eina_stringshare_ref(fdata.cur_style);
|
||||
|
||||
|
@ -1635,7 +1635,7 @@ _font_styles_list_sel(void *data __UNUSED__,
|
|||
{
|
||||
Elm_Font_Size_Data *sdata;
|
||||
|
||||
sdata = elm_list_item_data_get(it);
|
||||
sdata = elm_object_item_data_get(it);
|
||||
elm_list_item_selected_set(l->data, EINA_FALSE);
|
||||
|
||||
if (tc_data->size == sdata->size)
|
||||
|
@ -1668,10 +1668,10 @@ _font_sizes_list_sel(void *data __UNUSED__,
|
|||
it = elm_list_selected_item_get(fc_list);
|
||||
if (!it) return; /* should not happen */
|
||||
|
||||
sd = elm_list_item_data_get(event_info);
|
||||
sd = elm_object_item_data_get(event_info);
|
||||
fdata.cur_size = sd->size;
|
||||
|
||||
tc_data = elm_list_item_data_get(it);
|
||||
tc_data = elm_object_item_data_get(it);
|
||||
tc_data->size = fdata.cur_size;
|
||||
|
||||
_font_preview_update(win);
|
||||
|
|
|
@ -113,11 +113,11 @@ int
|
|||
test_index2_cmp(const void *data1, const void *data2)
|
||||
{
|
||||
const char *label1, *label2;
|
||||
const Elm_List_Item *it1 = data1;
|
||||
const Elm_List_Item *it2 = data2;
|
||||
const Elm_Object_Item *li_it1 = data1;
|
||||
const Elm_Object_Item *li_it2 = data2;
|
||||
|
||||
label1 = elm_list_item_label_get(it1);
|
||||
label2 = elm_list_item_label_get(it2);
|
||||
label1 = elm_object_item_text_get(li_it1);
|
||||
label2 = elm_object_item_text_get(li_it2);
|
||||
|
||||
return strcasecmp(label1, label2);
|
||||
}
|
||||
|
@ -173,8 +173,8 @@ test_index2_it_del(void *data, Evas_Object *obj, void *event_info __UNUSED__)
|
|||
return;
|
||||
}
|
||||
|
||||
label = elm_list_item_label_get(it);
|
||||
label_next = elm_list_item_label_get(it_next);
|
||||
label = elm_object_item_text_get(it);
|
||||
label_next = elm_object_item_text_get(it_next);
|
||||
|
||||
iit = elm_index_item_find(gui->id, it);
|
||||
if (label[0] == label_next[0])
|
||||
|
|
|
@ -601,7 +601,7 @@ test_list4_swipe(void *data,
|
|||
char *item_data;
|
||||
if ((!event_info) || (!data)) return;
|
||||
|
||||
item_data = elm_list_item_data_get(event_info);
|
||||
item_data = elm_object_item_data_get(event_info);
|
||||
|
||||
box = elm_box_add(info->win);
|
||||
elm_box_horizontal_set(box, EINA_FALSE);
|
||||
|
@ -750,16 +750,16 @@ test_list5_swipe(void *data __UNUSED__,
|
|||
void *event_info)
|
||||
{
|
||||
Evas_Object *button;
|
||||
struct list5_data_cb *info = elm_list_item_data_get(event_info);
|
||||
struct list5_data_cb *info = elm_object_item_data_get(event_info);
|
||||
|
||||
if (elm_list_item_end_get(event_info)) return;
|
||||
if (elm_object_item_part_content_get(event_info, "end")) return;
|
||||
|
||||
button = elm_button_add(info->win);
|
||||
elm_object_text_set(button, "delete");
|
||||
evas_object_propagate_events_set(button, 0);
|
||||
evas_object_smart_callback_add(button, "clicked", test_list5_item_del,
|
||||
event_info);
|
||||
elm_list_item_end_set(event_info, button);
|
||||
elm_object_item_part_content_set(event_info, "end", button);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -36,7 +36,7 @@ _index_item_del(void *data,
|
|||
fprintf(stdout, "Deleting associated list node (%s). Comparing index "
|
||||
"item data reported via callback with the one returned by "
|
||||
"index's API on items: %s.\n",
|
||||
elm_list_item_label_get(data),
|
||||
elm_object_item_text_get(data),
|
||||
data == elm_index_item_data_get(event_info) ? "OK" :
|
||||
"FAIL, something went wrong");
|
||||
|
||||
|
@ -58,7 +58,7 @@ _item_del(void *data __UNUSED__,
|
|||
|
||||
fprintf(stdout, "Deleting last selected index item, which had letter"
|
||||
" %s (pointing to %s)\n", elm_index_item_letter_get(iit),
|
||||
elm_list_item_label_get(lit));
|
||||
elm_object_item_text_get(lit));
|
||||
|
||||
elm_index_item_del(d.index, lit);
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ static void
|
|||
_sel_cb(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
|
||||
{
|
||||
Elm_List_Item *it = event_info;
|
||||
printf("Selected label: %s\n", elm_list_item_label_get(it));
|
||||
printf("Selected label: %s\n", elm_object_item_text_get(it));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -95,7 +95,7 @@ _sel_data_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info)
|
|||
char *content = data;
|
||||
Elm_List_Item *it = event_info;
|
||||
printf("Selected label: %s with data: %s\n",
|
||||
elm_list_item_label_get(it), content);
|
||||
elm_object_item_text_get(it), content);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -151,7 +151,7 @@ _print_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
|||
|
||||
items = elm_list_items_get(li);
|
||||
EINA_LIST_FOREACH(items, l, it)
|
||||
printf("%s\n", elm_list_item_label_get(it));
|
||||
printf("%s\n", elm_object_item_text_get(it));
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue