discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=6e39997ad123ac00756285f5c62dd3fc13726fde
commit 6e39997ad123ac00756285f5c62dd3fc13726fde Author: Mike Blumenkrantz <[email protected]> Date: Tue Nov 1 13:29:45 2016 -0400 add smart callback for when gadgets get reparented this can be useful for gadgets which (inexplicably) need to set min size hints --- src/bin/e_bryce.c | 1 + src/bin/e_gadget.h | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/bin/e_bryce.c b/src/bin/e_bryce.c index 6137277..7b74ad0 100644 --- a/src/bin/e_bryce.c +++ b/src/bin/e_bryce.c @@ -352,6 +352,7 @@ _bryce_style(Evas_Object *site, Eina_Stringshare *name, Evas_Object *g) e_theme_edje_object_set(ly, NULL, buf); prev = e_gadget_util_layout_style_init(g, ly); elm_object_part_content_set(ly, "e.swallow.content", g); + evas_object_smart_callback_call(g, "gadget_reparent", ly); evas_object_del(prev); } diff --git a/src/bin/e_gadget.h b/src/bin/e_gadget.h index 29be553..94ff5ee 100644 --- a/src/bin/e_gadget.h +++ b/src/bin/e_gadget.h @@ -70,7 +70,12 @@ - called on a gadget object when the "gadget_menu" action has been triggered - event_info is an E_Menu object - if a configure callback has been passed with e_gadget_configure_cb_set(), - a "Settings" item will be automatically added with this callback + a "Settings" item will be automatically added with this callback + "gadget_reparent" + - called on a gadget object when the gadget has been reparented + - parent object is event_info + - indicates that the gadget should watch this new object for EVAS_CALLBACK_RESIZE + - event_info will be NULL in the case that the reparenting removes the parent ------------------------------- ------------------------------- * called externally by gadget on gadget object: --
