From 09008fd9fafb3d47aba58196d5bdfcfa25b05543 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Tue, 23 Dec 2008 14:05:56 +0000 Subject: [PATCH] clear up some shutdown/deletion bugs SVN revision: 38291 --- src/lib/Elementary.h.in | 1 + src/lib/elm_toolbar.c | 2 +- src/lib/els_box.c | 5 +++-- src/lib/els_scroller.c | 1 + src/lib/els_table.c | 1 + 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/lib/Elementary.h.in b/src/lib/Elementary.h.in index 8d12a46..b0601ae 100644 --- a/src/lib/Elementary.h.in +++ b/src/lib/Elementary.h.in @@ -425,6 +425,7 @@ extern "C" { // * page widget (for pushing/popping pages and going back and forward and flipping) // * slider widget // +// * carousel selector widget // * in-window dialog container widget // * separator widget (h/v) // * slide-open "panel" that can hold stuff and optionally scroll diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c index 0332377..0b68e7b 100644 --- a/src/lib/elm_toolbar.c +++ b/src/lib/elm_toolbar.c @@ -214,6 +214,7 @@ elm_toolbar_item_add(Evas_Object *obj, Evas_Object *icon, const char *label, voi _elm_theme_set(it->base, "toolbar", "item", "default"); edje_object_signal_callback_add(it->base, "elm,action,click", "elm", _select, it); + elm_widget_sub_object_add(obj, it->base); if (it->icon) { edje_extern_object_min_size_set(it->icon, @@ -231,7 +232,6 @@ elm_toolbar_item_add(Evas_Object *obj, Evas_Object *icon, const char *label, voi evas_object_size_hint_max_set(it->base, 9999, mh); _els_smart_box_pack_end(wd->bx, it->base); evas_object_show(it->base); - elm_widget_sub_object_add(obj, it->base); _sizing_eval(obj); return (Elm_Toolbar_Item *)it; } diff --git a/src/lib/els_box.c b/src/lib/els_box.c index 2de9903..a0a7746 100644 --- a/src/lib/els_box.c +++ b/src/lib/els_box.c @@ -488,6 +488,7 @@ _smart_del(Evas_Object *obj) } evas_object_del(sd->clip); free(sd); + evas_object_smart_data_set(obj, NULL); } static void @@ -501,6 +502,8 @@ _smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y) if (!sd) return; dx = x - sd->x; dy = y - sd->y; + sd->x = x; + sd->y = y; for (l = sd->items; l; l = l->next) { Evas_Coord ox, oy; @@ -508,8 +511,6 @@ _smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y) evas_object_geometry_get(l->data, &ox, &oy, NULL, NULL); evas_object_move(l->data, ox + dx, oy + dy); } - sd->x = x; - sd->y = y; } static void diff --git a/src/lib/els_scroller.c b/src/lib/els_scroller.c index a3f8fd1..2fb7071 100644 --- a/src/lib/els_scroller.c +++ b/src/lib/els_scroller.c @@ -977,6 +977,7 @@ _smart_del(Evas_Object *obj) evas_object_del(sd->event_obj); if (sd->down.momentum_animator) ecore_animator_del(sd->down.momentum_animator); free(sd); + evas_object_smart_data_set(obj, NULL); } static void diff --git a/src/lib/els_table.c b/src/lib/els_table.c index 3e5e4ee..127cdba 100644 --- a/src/lib/els_table.c +++ b/src/lib/els_table.c @@ -823,6 +823,7 @@ _smart_del(Evas_Object *obj) } evas_object_del(sd->clip); free(sd); + evas_object_smart_data_set(obj, NULL); } static void -- 2.7.4