From bb506c2161efc0dbe8182871e3d2f60920c2274a Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Wed, 23 Nov 2011 16:01:23 +0900 Subject: [PATCH] Fix use of deprecated APIs --- src/lib/elm_controlbar.c | 32 ++++++++++++++++---------------- src/lib/elm_imageslider.c | 24 ++++++++++++------------ src/lib/elm_popup.c | 26 +++++++++++++------------- 3 files changed, 41 insertions(+), 41 deletions(-) diff --git a/src/lib/elm_controlbar.c b/src/lib/elm_controlbar.c index 9148924..3d14a3f 100644 --- a/src/lib/elm_controlbar.c +++ b/src/lib/elm_controlbar.c @@ -125,7 +125,7 @@ _controlbar_move(void *data, Evas_Object * obj __UNUSED__) wd->x = x; wd->y = y; evas_object_move(wd->edje, x, y); - evas_object_geometry_get(elm_object_content_part_get(wd->edje, "bg_image"), NULL, NULL, &width, NULL); + evas_object_geometry_get(elm_object_part_content_get(wd->edje, "bg_image"), NULL, NULL, &width, NULL); evas_object_geometry_get(wd->edje, &x_, &y_, NULL, NULL); } @@ -141,7 +141,7 @@ _controlbar_resize(void *data, Evas_Object * obj __UNUSED__) wd->w = w; wd->h = h; evas_object_resize(wd->edje, w, h); - evas_object_geometry_get(elm_object_content_part_get(wd->edje, "bg_image"), NULL, NULL, &width, &height); + evas_object_geometry_get(elm_object_part_content_get(wd->edje, "bg_image"), NULL, NULL, &width, &height); evas_object_geometry_get(wd->edje, &x_, &y_, NULL, NULL); } @@ -725,7 +725,7 @@ _select_box(Elm_Controlbar_Item * it) if (it->style == TABBAR) { - content = elm_object_content_part_unset(wd->edje, "elm.swallow.view"); + content = elm_object_part_content_unset(wd->edje, "elm.swallow.view"); if (content) evas_object_hide(content); EINA_LIST_FOREACH(wd->items, l, item){ @@ -752,7 +752,7 @@ _select_box(Elm_Controlbar_Item * it) evas_object_smart_callback_call(it->obj, "view,change,before", it); } - elm_object_content_part_set(wd->edje, "elm.swallow.view", it->view); + elm_object_part_content_set(wd->edje, "elm.swallow.view", it->view); } else if (it->style == TOOLBAR) { @@ -882,7 +882,7 @@ _create_item_layout(Evas_Object * parent, Elm_Controlbar_Item * it, Evas_Object *item = elm_button_add(parent); if (*item == NULL) return NULL; elm_object_style_set(*item, "controlbar/vertical"); - elm_object_content_part_set(obj, "item", *item); + elm_object_part_content_set(obj, "item", *item); if (it->text) elm_object_text_set(*item, it->text); @@ -1015,7 +1015,7 @@ _create_object_item(Evas_Object * obj, Evas_Object * obj_item, const int sel) evas_object_size_hint_weight_set(it->base, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(it->base, EVAS_HINT_FILL, EVAS_HINT_FILL); it->base_item = obj_item; - elm_object_content_part_set(it->base, "item", it->base_item); + elm_object_part_content_set(it->base, "item", it->base_item); evas_object_show(it->base); return it; } @@ -1127,11 +1127,11 @@ _list_clicked(void *data, Evas_Object *obj, void *event_info __UNUSED__) if (item->style == TABBAR) { - content = elm_object_content_part_unset(wd->edje, "elm.swallow.view"); + content = elm_object_part_content_unset(wd->edje, "elm.swallow.view"); evas_object_hide(content); item->selected = EINA_TRUE; evas_object_smart_callback_call(item->obj, "view,change,before", item); - elm_object_content_part_set(wd->edje, "elm.swallow.view", item->view); + elm_object_part_content_set(wd->edje, "elm.swallow.view", item->view); } if ((item->style == TOOLBAR) && (item->func)) @@ -1330,7 +1330,7 @@ EAPI Evas_Object * elm_controlbar_add(Evas_Object * parent) printf("Cannot load bg edj\n"); return NULL; } - elm_object_content_part_set(wd->edje, "bg_image", wd->bg); + elm_object_part_content_set(wd->edje, "bg_image", wd->bg); // initialization evas_object_event_callback_add(wd->edje, EVAS_CALLBACK_RESIZE, @@ -1342,7 +1342,7 @@ EAPI Evas_Object * elm_controlbar_add(Evas_Object * parent) evas_object_event_callback_add(wd->edje, EVAS_CALLBACK_HIDE, _controlbar_object_hide, obj); - bg = elm_object_content_part_get(wd->edje, "bg_image"); + bg = elm_object_part_content_get(wd->edje, "bg_image"); evas_object_event_callback_add(bg, EVAS_CALLBACK_MOVE, _controlbar_object_move, obj); evas_object_event_callback_add(bg, EVAS_CALLBACK_RESIZE, _controlbar_object_resize, obj); @@ -1352,7 +1352,7 @@ EAPI Evas_Object * elm_controlbar_add(Evas_Object * parent) evas_object_size_hint_weight_set(wd->box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(wd->box, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_object_content_part_set(wd->edje, "elm.swallow.items", wd->box); + elm_object_part_content_set(wd->edje, "elm.swallow.items", wd->box); evas_object_show(wd->box); evas_object_smart_callback_add(obj, "sub-object-del", _sub_del, obj); @@ -2388,9 +2388,9 @@ elm_controlbar_item_view_unset(Elm_Controlbar_Item *it) if (!wd) return NULL; Evas_Object *content; - if (it->view == elm_object_content_part_get(wd->edje, "elm.swallow.view")) + if (it->view == elm_object_part_content_get(wd->edje, "elm.swallow.view")) { - content = elm_object_content_part_unset(wd->edje, "elm.swallow.view"); + content = elm_object_part_content_unset(wd->edje, "elm.swallow.view"); if (content) evas_object_hide(content); } else @@ -2441,7 +2441,7 @@ elm_controlbar_mode_set(Evas_Object *obj, int mode) edje_object_signal_emit(_EDJ(wd->edje), "elm,state,small", "elm"); break; case ELM_CONTROLBAR_MODE_LEFT: - selected_box = elm_object_content_part_get(wd->edje, "elm.dragable.box"); + selected_box = elm_object_part_content_get(wd->edje, "elm.dragable.box"); if (selected_box) edje_object_signal_emit(_EDJ(selected_box), "elm,state,left", "elm"); wd->selected_signal = eina_stringshare_add("elm,state,selected_left"); wd->pressed_signal = eina_stringshare_add("elm,state,pressed_left"); @@ -2450,7 +2450,7 @@ elm_controlbar_mode_set(Evas_Object *obj, int mode) _sizing_eval(obj); return; case ELM_CONTROLBAR_MODE_RIGHT: - selected_box = elm_object_content_part_get(wd->edje, "elm.dragable.box"); + selected_box = elm_object_part_content_get(wd->edje, "elm.dragable.box"); if (selected_box) edje_object_signal_emit(_EDJ(selected_box), "elm,state,right", "elm"); wd->selected_signal = eina_stringshare_add("elm,state,selected_right"); wd->pressed_signal = eina_stringshare_add("elm,state,pressed_right"); @@ -2461,7 +2461,7 @@ elm_controlbar_mode_set(Evas_Object *obj, int mode) default: break; } - selected_box = elm_object_content_part_get(wd->edje, "elm.dragable.box"); + selected_box = elm_object_part_content_get(wd->edje, "elm.dragable.box"); if (selected_box) edje_object_signal_emit(_EDJ(selected_box), "elm,state,default", "elm"); wd->selected_signal = eina_stringshare_add("elm,state,selected"); wd->pressed_signal = eina_stringshare_add("elm,state,pressed"); diff --git a/src/lib/elm_imageslider.c b/src/lib/elm_imageslider.c index 4104bb5..43a5120 100644 --- a/src/lib/elm_imageslider.c +++ b/src/lib/elm_imageslider.c @@ -285,7 +285,7 @@ _imageslider_obj_shift(Widget_Data * wd, Eina_Bool left) wd->ly[BLOCK_LEFT] = wd->ly[BLOCK_CENTER]; wd->ly[BLOCK_CENTER] = wd->ly[BLOCK_RIGHT]; wd->ly[BLOCK_RIGHT] = ly_temp; - elm_object_content_part_set(wd->ly[BLOCK_RIGHT], "swl.photo", NULL); + elm_object_part_content_set(wd->ly[BLOCK_RIGHT], "swl.photo", NULL); } else { @@ -294,7 +294,7 @@ _imageslider_obj_shift(Widget_Data * wd, Eina_Bool left) wd->ly[BLOCK_RIGHT] = wd->ly[BLOCK_CENTER]; wd->ly[BLOCK_CENTER] = wd->ly[BLOCK_LEFT]; wd->ly[BLOCK_LEFT] = ly_temp; - elm_object_content_part_set(wd->ly[BLOCK_LEFT], "swl.photo", NULL); + elm_object_part_content_set(wd->ly[BLOCK_LEFT], "swl.photo", NULL); } } @@ -504,14 +504,14 @@ _check_drag(int state, void *data) it = eina_list_data_get(l[state]); - eo = (Evas_Object*)elm_object_content_part_get(wd->ly[state], "swl.photo"); + eo = elm_object_part_content_get(wd->ly[state], "swl.photo"); if (eo) evas_object_geometry_get(eo, &ix, &iy, &iw, &ih); edje_object_part_drag_value_get(elm_layout_edje_get(wd->ly[state]), "swl.photo", &dx, &dy); if ((iw != wd->w) || ((dx != 0) || (dy != 0))) { - elm_object_content_part_set(wd->ly[state], "swl.photo", NULL); + elm_object_part_content_set(wd->ly[state], "swl.photo", NULL); } else return 1; @@ -630,10 +630,10 @@ _imageslider_update(Widget_Data * wd) for (i = 0; i < BLOCK_MAX; i++) { - eo = (Evas_Object*)elm_object_content_part_get((const Evas_Object*)wd->ly[i], "swl.photo"); + eo = elm_object_part_content_get((const Evas_Object*)wd->ly[i], "swl.photo"); if (!l[i]) { - elm_object_content_part_set(wd->ly[i], "swl.photo", NULL); + elm_object_part_content_set(wd->ly[i], "swl.photo", NULL); } else { @@ -646,7 +646,7 @@ _imageslider_update(Widget_Data * wd) eo = elm_image_add(wd->obj); //elm_image_prescale_set(eo, wd->w); elm_image_file_set(eo, it->photo_file, NULL); - elm_object_content_part_set(wd->ly[i], "swl.photo", eo); + elm_object_part_content_set(wd->ly[i], "swl.photo", eo); } } } @@ -934,9 +934,9 @@ elm_imageslider_item_selected_set(Elm_Imageslider_Item * it) for (i = 0; i < BLOCK_MAX; i++) { - eo = (Evas_Object*)elm_object_content_part_get(wd->ly[i], "swl.photo"); + eo = elm_object_part_content_get(wd->ly[i], "swl.photo"); if (eo) - elm_object_content_part_set(wd->ly[i], "swl.photo", NULL); + elm_object_part_content_set(wd->ly[i], "swl.photo", NULL); } _imageslider_update(wd); } @@ -1101,10 +1101,10 @@ elm_imageslider_item_update(Elm_Imageslider_Item *it) if (wd->ani_lock) return; if (it == eina_list_data_get(eina_list_prev(wd->cur))) - elm_object_content_part_set(wd->ly[BLOCK_LEFT], "swl.photo", NULL); + elm_object_part_content_set(wd->ly[BLOCK_LEFT], "swl.photo", NULL); else if (it == eina_list_data_get(wd->cur)) - elm_object_content_part_set(wd->ly[BLOCK_CENTER], "swl.photo", NULL); + elm_object_part_content_set(wd->ly[BLOCK_CENTER], "swl.photo", NULL); else if (it == eina_list_data_get(eina_list_next(wd->cur))) - elm_object_content_part_set(wd->ly[BLOCK_RIGHT], "swl.photo", NULL); + elm_object_part_content_set(wd->ly[BLOCK_RIGHT], "swl.photo", NULL); _imageslider_update(wd); } diff --git a/src/lib/elm_popup.c b/src/lib/elm_popup.c index abc43c6..219ed30 100644 --- a/src/lib/elm_popup.c +++ b/src/lib/elm_popup.c @@ -103,9 +103,9 @@ _theme_hook(Evas_Object *obj) elm_object_style_set(action_data->btn, buf); ++index; snprintf(buf, sizeof(buf), "actionbtn%d", index); - elm_object_content_part_set(wd->action_area, buf, action_data->btn); + elm_object_part_content_set(wd->action_area, buf, action_data->btn); } - elm_object_content_part_set(wd->layout, "elm.swallow.buttonArea", wd->action_area); + elm_object_part_content_set(wd->layout, "elm.swallow.buttonArea", wd->action_area); } if (wd->content_area) { @@ -114,13 +114,13 @@ _theme_hook(Evas_Object *obj) { snprintf(buf, sizeof(buf), "popup_description/%s", elm_widget_style_get(obj)); elm_object_style_set(wd->desc_label, buf); - elm_object_content_part_set(wd->content_area, "elm.swallow.content", wd->desc_label); + elm_object_part_content_set(wd->content_area, "elm.swallow.content", wd->desc_label); } else if (wd->content) { - elm_object_content_part_set(wd->content_area, "elm.swallow.content", wd->content); + elm_object_part_content_set(wd->content_area, "elm.swallow.content", wd->content); } - elm_object_content_part_set(wd->layout, "elm.swallow.content", wd->content_area); + elm_object_part_content_set(wd->layout, "elm.swallow.content", wd->content_area); } if (wd->title_area) { @@ -231,7 +231,7 @@ _elm_popup_buttons_add_valist(Evas_Object *obj, const char *first_button_text, v btn = _elm_popup_add_button(obj, text, response); ++index; snprintf(buf, sizeof(buf), "actionbtn%d", index); - elm_object_content_part_set(wd->action_area, buf, btn); + elm_object_part_content_set(wd->action_area, buf, btn); evas_object_event_callback_add(wd->action_area, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, obj); text = va_arg(args, char*); @@ -384,7 +384,7 @@ elm_popup_with_buttons_add(Evas_Object *parent, const char *title, const char *d va_list args; va_start(args, first_button_text); wd->action_area = elm_layout_add(popup); - elm_object_content_part_set(wd->layout, "elm.swallow.buttonArea", wd->action_area); + elm_object_part_content_set(wd->layout, "elm.swallow.buttonArea", wd->action_area); snprintf(buf,sizeof(buf), "buttons%d", no_of_buttons); wd->no_of_buttons = no_of_buttons; elm_layout_theme_set(wd->action_area, "popup", buf, elm_widget_style_get(popup)); @@ -433,8 +433,8 @@ elm_popup_desc_set(Evas_Object *obj, const char *text) evas_object_size_hint_weight_set(wd->desc_label, EVAS_HINT_EXPAND, 0.0); evas_object_size_hint_align_set(wd->desc_label, EVAS_HINT_FILL, EVAS_HINT_FILL); evas_object_show(wd->desc_label); - elm_object_content_part_set(wd->content_area, "elm.swallow.content", wd->desc_label); - elm_object_content_part_set(wd->layout, "elm.swallow.content", wd->content_area); + elm_object_part_content_set(wd->content_area, "elm.swallow.content", wd->desc_label); + elm_object_part_content_set(wd->layout, "elm.swallow.content", wd->content_area); evas_object_event_callback_add(wd->content_area, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, obj); _sizing_eval(obj); @@ -523,7 +523,7 @@ elm_popup_title_icon_set(Evas_Object *obj, Evas_Object *icon) wd->title_icon = NULL; } wd->title_icon = icon; - elm_object_content_part_set(wd->layout, "elm.swallow.title.icon", wd->title_icon); + elm_object_part_content_set(wd->layout, "elm.swallow.title.icon", wd->title_icon); edje_object_signal_emit(elm_layout_edje_get(wd->layout), "elm,state,title,icon,visible", "elm"); edje_object_message_signal_process(wd->layout); _sizing_eval(obj); @@ -573,8 +573,8 @@ elm_popup_content_set(Evas_Object *obj, Evas_Object *content) { wd->content_area = elm_layout_add(obj); elm_layout_theme_set(wd->content_area, "popup","content", elm_widget_style_get(obj)); - elm_object_content_part_set(wd->content_area, "elm.swallow.content", content); - elm_object_content_part_set(wd->layout, "elm.swallow.content", wd->content_area); + elm_object_part_content_set(wd->content_area, "elm.swallow.content", content); + elm_object_part_content_set(wd->layout, "elm.swallow.content", wd->content_area); evas_object_event_callback_add(wd->content_area, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, obj); } @@ -624,7 +624,7 @@ elm_popup_buttons_add(Evas_Object *obj,int no_of_buttons, const char *first_butt wd->action_area = NULL; } wd->action_area = elm_layout_add(obj); - elm_object_content_part_set(wd->layout, "elm.swallow.buttonArea", wd->action_area); + elm_object_part_content_set(wd->layout, "elm.swallow.buttonArea", wd->action_area); evas_object_size_hint_weight_set(wd->action_area, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(wd->action_area, EVAS_HINT_FILL, EVAS_HINT_FILL); snprintf(buf, sizeof(buf), "buttons%d", no_of_buttons); -- 2.7.4