fix swallows to happen after u added hint change cb

SVN revision: 44245
This commit is contained in:
Carsten Haitzler 2009-12-07 14:19:20 +00:00
parent edf7f2e22e
commit 958aad8241
14 changed files with 25 additions and 22 deletions

View File

@ -185,10 +185,10 @@ elm_bubble_content_set(Evas_Object *obj, Evas_Object *content)
if (content)
{
elm_widget_sub_object_add(obj, content);
edje_object_part_swallow(wd->bbl, "elm.swallow.content", content);
evas_object_event_callback_add(content,
EVAS_CALLBACK_CHANGED_SIZE_HINTS,
_changed_size_hints, obj);
edje_object_part_swallow(wd->bbl, "elm.swallow.content", content);
}
_sizing_eval(obj);
}

View File

@ -207,10 +207,10 @@ elm_button_icon_set(Evas_Object *obj, Evas_Object *icon)
{
wd->icon = icon;
elm_widget_sub_object_add(obj, icon);
edje_object_part_swallow(wd->btn, "elm.swallow.content", icon);
edje_object_signal_emit(wd->btn, "elm,state,icon,visible", "elm");
evas_object_event_callback_add(icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
_changed_size_hints, obj);
edje_object_part_swallow(wd->btn, "elm.swallow.content", icon);
edje_object_signal_emit(wd->btn, "elm,state,icon,visible", "elm");
edje_object_message_signal_process(wd->btn);
_sizing_eval(obj);
}

View File

@ -261,10 +261,10 @@ elm_check_icon_set(Evas_Object *obj, Evas_Object *icon)
if (icon)
{
elm_widget_sub_object_add(obj, icon);
edje_object_part_swallow(wd->chk, "elm.swallow.content", icon);
edje_object_signal_emit(wd->chk, "elm,state,icon,visible", "elm");
evas_object_event_callback_add(icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
_changed_size_hints, obj);
edje_object_part_swallow(wd->chk, "elm.swallow.content", icon);
edje_object_signal_emit(wd->chk, "elm,state,icon,visible", "elm");
_sizing_eval(obj);
}
}

View File

@ -257,7 +257,10 @@ _resize(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
Widget_Data *wd = elm_widget_data_get(data);
if (wd->linewrap || wd->char_linewrap) _sizing_eval(data);
if (wd->linewrap || wd->char_linewrap)
{
_sizing_eval(data);
}
if (wd->hoversel) _hoversel_position(data);
// Evas_Coord ww, hh;
// evas_object_geometry_get(wd->ent, NULL, NULL, &ww, &hh);

View File

@ -164,10 +164,10 @@ elm_frame_content_set(Evas_Object *obj, Evas_Object *content)
if (content)
{
elm_widget_sub_object_add(obj, content);
edje_object_part_swallow(wd->frm, "elm.swallow.content", content);
evas_object_event_callback_add(content,
EVAS_CALLBACK_CHANGED_SIZE_HINTS,
_changed_size_hints, obj);
edje_object_part_swallow(wd->frm, "elm.swallow.content", content);
_sizing_eval(obj);
}
}

View File

@ -200,10 +200,10 @@ elm_layout_content_set(Evas_Object *obj, const char *swallow, Evas_Object *conte
if (content)
{
elm_widget_sub_object_add(obj, content);
edje_object_part_swallow(wd->lay, swallow, content);
evas_object_event_callback_add(content,
EVAS_CALLBACK_CHANGED_SIZE_HINTS,
_changed_size_hints, obj);
edje_object_part_swallow(wd->lay, swallow, content);
si = ELM_NEW(Subinfo);
si->swallow = eina_stringshare_add(swallow);
si->obj = content;

View File

@ -614,10 +614,10 @@ elm_menu_item_icon_set(Elm_Menu_Item *item, Evas_Object *icon)
{
item->icon = icon;
elm_widget_sub_object_add(item->menu, icon);
edje_object_part_swallow(item->o, "elm.swallow.content", icon);
edje_object_signal_emit(item->o, "elm,state,icon,visible", "elm");
evas_object_event_callback_add(icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
_changed_size_hints, item->menu);
edje_object_part_swallow(item->o, "elm.swallow.content", icon);
edje_object_signal_emit(item->o, "elm,state,icon,visible", "elm");
edje_object_message_signal_process(item->o);
_sizing_eval(item->menu);
}

View File

@ -294,12 +294,12 @@ elm_notify_content_set(Evas_Object *obj, Evas_Object *content)
wd->content = content;
elm_widget_sub_object_add(obj, content);
edje_object_part_swallow(wd->notify, "elm.swallow.content", content);
evas_object_event_callback_add(content,
EVAS_CALLBACK_CHANGED_SIZE_HINTS,
_changed_size_hints, obj);
evas_object_event_callback_add(content, EVAS_CALLBACK_RESIZE,
_content_resize, obj);
edje_object_part_swallow(wd->notify, "elm.swallow.content", content);
_sizing_eval(obj);
}
_calc(obj);
@ -337,7 +337,6 @@ elm_notify_parent_set(Evas_Object *obj, Evas_Object *parent)
if (parent)
{
wd->parent = parent;
edje_object_part_swallow(wd->notify, "elm.swallow.parent", parent);
evas_object_event_callback_add(parent,
EVAS_CALLBACK_CHANGED_SIZE_HINTS,
_changed_size_hints, obj);
@ -349,6 +348,7 @@ elm_notify_parent_set(Evas_Object *obj, Evas_Object *parent)
_parent_del, obj);
evas_object_event_callback_add(parent, EVAS_CALLBACK_HIDE,
_parent_hide, obj);
edje_object_part_swallow(wd->notify, "elm.swallow.parent", parent);
_sizing_eval(obj);
}
_calc(obj);

View File

@ -269,10 +269,10 @@ elm_pager_content_push(Evas_Object *obj, Evas_Object *content)
_elm_theme_set(it->base, "pager", "base", elm_widget_style_get(obj));
edje_object_signal_callback_add(it->base, "elm,action,hide,finished", "",
_signal_hide_finished, it);
edje_object_part_swallow(it->base, "elm.swallow.content", it->content);
evas_object_event_callback_add(it->content,
EVAS_CALLBACK_CHANGED_SIZE_HINTS,
_changed_size_hints, it);
edje_object_part_swallow(it->base, "elm.swallow.content", it->content);
edje_object_size_min_calc(it->base, &it->minw, &it->minh);
evas_object_show(it->content);
wd->stack = eina_list_append(wd->stack, it);

View File

@ -363,10 +363,10 @@ elm_progressbar_icon_set(Evas_Object *obj, Evas_Object *icon)
if (icon)
{
elm_widget_sub_object_add(obj, icon);
edje_object_part_swallow(wd->progressbar, "elm.swallow.content", icon);
edje_object_signal_emit(wd->progressbar, "elm,state,icon,visible", "elm");
evas_object_event_callback_add(icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
_changed_size_hints, obj);
edje_object_part_swallow(wd->progressbar, "elm.swallow.content", icon);
edje_object_signal_emit(wd->progressbar, "elm,state,icon,visible", "elm");
_sizing_eval(obj);
}
}

View File

@ -302,10 +302,10 @@ elm_radio_icon_set(Evas_Object *obj, Evas_Object *icon)
if (icon)
{
elm_widget_sub_object_add(obj, icon);
edje_object_part_swallow(wd->chk, "elm.swallow.content", icon);
edje_object_signal_emit(wd->chk, "elm,state,icon,visible", "elm");
evas_object_event_callback_add(icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
_changed_size_hints, obj);
edje_object_part_swallow(wd->chk, "elm.swallow.content", icon);
edje_object_signal_emit(wd->chk, "elm,state,icon,visible", "elm");
_sizing_eval(obj);
}
}

View File

@ -363,10 +363,10 @@ elm_slider_icon_set(Evas_Object *obj, Evas_Object *icon)
if (icon)
{
elm_widget_sub_object_add(obj, icon);
edje_object_part_swallow(wd->slider, "elm.swallow.content", icon);
edje_object_signal_emit(wd->slider, "elm,state,icon,visible", "elm");
evas_object_event_callback_add(icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
_changed_size_hints, obj);
edje_object_part_swallow(wd->slider, "elm.swallow.content", icon);
edje_object_signal_emit(wd->slider, "elm,state,icon,visible", "elm");
_sizing_eval(obj);
}
}

View File

@ -199,10 +199,10 @@ elm_toggle_icon_set(Evas_Object *obj, Evas_Object *icon)
wd->icon = icon;
if (!icon) return;
elm_widget_sub_object_add(obj, icon);
edje_object_part_swallow(wd->tgl, "elm.swallow.content", icon);
edje_object_signal_emit(wd->tgl, "elm,state,icon,visible", "elm");
evas_object_event_callback_add(icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
_changed_size_hints, obj);
edje_object_part_swallow(wd->tgl, "elm.swallow.content", icon);
edje_object_signal_emit(wd->tgl, "elm,state,icon,visible", "elm");
_sizing_eval(obj);
}

View File

@ -947,9 +947,9 @@ elm_win_inwin_content_set(Evas_Object *obj, Evas_Object *content)
if (content)
{
elm_widget_sub_object_add(obj, content);
edje_object_part_swallow(wd->frm, "elm.swallow.content", content);
evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
_changed_size_hints, obj);
edje_object_part_swallow(wd->frm, "elm.swallow.content", content);
_sizing_eval(obj);
}
}