forked from enlightenment/efl
Elementary: fix deprecated functions on elm examples
It seems that the elementary examples still use some deprecated functions, most notably elm_icon_* that has been replaced by elm_image_*. This patch fixes that. Patch by: Daniel Willmann <d.willmann@samsung.com> SVN revision: 72958
This commit is contained in:
parent
cfddde926a
commit
1ce5d19b0d
|
@ -39,7 +39,7 @@ elm_main(int argc, char **argv)
|
|||
cal = elm_calendar_add(win);
|
||||
evas_object_size_hint_weight_set(cal, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(cal, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
elm_calendar_day_selection_disabled_set(cal, EINA_TRUE);
|
||||
elm_calendar_select_mode_set(cal, ELM_CALENDAR_SELECT_MODE_NONE);
|
||||
evas_object_show(cal);
|
||||
elm_box_pack_end(bx, cal);
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ _print_cal_info_cb(void *data, Evas_Object *obj, void *event_info)
|
|||
|
||||
interval = elm_calendar_interval_get(obj);
|
||||
elm_calendar_min_max_year_get(obj, &year_min, &year_max);
|
||||
sel_enabled = !elm_calendar_day_selection_disabled_get(obj);
|
||||
sel_enabled = (elm_calendar_select_mode_get(obj) != ELM_CALENDAR_SELECT_MODE_NONE);
|
||||
wds = elm_calendar_weekdays_names_get(obj);
|
||||
|
||||
printf("Day: %i, Mon: %i, Year %i, WeekDay: %i<br>\n"
|
||||
|
|
|
@ -27,13 +27,13 @@ elm_main(int argc, char **argv)
|
|||
path = NULL;
|
||||
group = NULL;
|
||||
name = NULL;
|
||||
elm_icon_file_get(icon, &path, &group);
|
||||
elm_image_file_get(icon, &path, &group);
|
||||
name = elm_icon_standard_get(icon);
|
||||
printf("path = %s, group = %s, name = %s\n", path, group, name);
|
||||
|
||||
elm_icon_no_scale_set(icon, EINA_TRUE);
|
||||
elm_image_no_scale_set(icon, EINA_TRUE);
|
||||
elm_image_resizable_set(icon, EINA_FALSE, EINA_TRUE);
|
||||
elm_icon_smooth_set(icon, EINA_FALSE);
|
||||
elm_image_smooth_set(icon, EINA_FALSE);
|
||||
elm_icon_fill_outside_set(icon, EINA_TRUE);
|
||||
|
||||
evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
|
|
|
@ -30,7 +30,7 @@ static Evas_Object *
|
|||
_icon_get(Evas_Object *obj, const char *file)
|
||||
{
|
||||
Evas_Object *icon = elm_icon_add(obj);
|
||||
elm_icon_file_set(icon, file, NULL);
|
||||
elm_image_file_set(icon, file, NULL);
|
||||
evas_object_show(icon);
|
||||
return icon;
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ elm_main(int argc, char **argv)
|
|||
|
||||
icon1 = elm_icon_add(popup);
|
||||
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
|
||||
elm_icon_file_set(icon1, buf, NULL);
|
||||
elm_image_file_set(icon1, buf, NULL);
|
||||
//Setting popup title-icon
|
||||
elm_object_part_content_set(popup, "title,icon", icon1);
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ elm_main(int argc, char **argv)
|
|||
|
||||
icon1 = elm_icon_add(popup);
|
||||
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
|
||||
elm_icon_file_set(icon1, buf, NULL);
|
||||
elm_image_file_set(icon1, buf, NULL);
|
||||
|
||||
//Seting popup title-text
|
||||
elm_object_part_text_set(popup, "title,text", "Title");
|
||||
|
|
|
@ -149,7 +149,7 @@ elm_main(int argc,
|
|||
|
||||
ic1 = elm_icon_add(win);
|
||||
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
|
||||
elm_icon_file_set(ic1, buf, NULL);
|
||||
elm_image_file_set(ic1, buf, NULL);
|
||||
evas_object_size_hint_aspect_set(ic1, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
|
||||
|
||||
/* pb with label, icon, custom unit label function and span size set */
|
||||
|
@ -198,7 +198,7 @@ elm_main(int argc,
|
|||
example_data.pb5 = pb;
|
||||
|
||||
ic2 = elm_icon_add(win);
|
||||
elm_icon_file_set(ic2, buf, NULL);
|
||||
elm_image_file_set(ic2, buf, NULL);
|
||||
evas_object_size_hint_aspect_set(ic2, EVAS_ASPECT_CONTROL_HORIZONTAL, 1, 1);
|
||||
|
||||
/* vertical pb, inverted, with custom unit format and icon*/
|
||||
|
|
|
@ -222,7 +222,7 @@ elm_main(int argc, char **argv)
|
|||
elm_object_text_set(obj, "Transformed object!");
|
||||
icon = elm_icon_add(win);
|
||||
snprintf(buf, sizeof(buf), "%s/images/icon_07.png", elm_app_data_dir_get());
|
||||
elm_icon_file_set(icon, buf, NULL);
|
||||
elm_image_file_set(icon, buf, NULL);
|
||||
elm_object_part_content_set(obj, "icon", icon);
|
||||
evas_object_move(obj, 160, 60);
|
||||
evas_object_resize(obj, 250, 100);
|
||||
|
|
|
@ -125,7 +125,7 @@ elm_main(int argc, char **argv)
|
|||
elm_object_text_set(obj, "Transformed object!");
|
||||
icon = elm_icon_add(win);
|
||||
snprintf(buf, sizeof(buf), "%s/images/icon_07.png", elm_app_data_dir_get());
|
||||
elm_icon_file_set(icon, buf, NULL);
|
||||
elm_image_file_set(icon, buf, NULL);
|
||||
elm_object_part_content_set(obj, "icon", icon);
|
||||
evas_object_move(obj, 160, 60);
|
||||
evas_object_resize(obj, 250, 100);
|
||||
|
@ -138,7 +138,7 @@ elm_main(int argc, char **argv)
|
|||
elm_object_text_set(obj, "Another object!");
|
||||
icon = elm_icon_add(win);
|
||||
snprintf(buf, sizeof(buf), "%s/images/icon_08.png", elm_app_data_dir_get());
|
||||
elm_icon_file_set(icon, buf, NULL);
|
||||
elm_image_file_set(icon, buf, NULL);
|
||||
elm_object_part_content_set(obj, "icon", icon);
|
||||
evas_object_move(obj, 160, 60);
|
||||
evas_object_resize(obj, 250, 100);
|
||||
|
|
|
@ -212,9 +212,9 @@ elm_main(int argc, char *argv[])
|
|||
|
||||
o = elm_icon_add(win2);
|
||||
sprintf(buf, "%s/images/logo.png", elm_app_data_dir_get());
|
||||
elm_icon_file_set(o, buf, NULL);
|
||||
elm_image_file_set(o, buf, NULL);
|
||||
elm_image_resizable_set(o, 0, 0);
|
||||
elm_icon_no_scale_set(o, EINA_TRUE);
|
||||
elm_image_no_scale_set(o, EINA_TRUE);
|
||||
elm_win_resize_object_add(win2, o);
|
||||
evas_object_show(o);
|
||||
|
||||
|
|
Loading…
Reference in New Issue