From 6e39997ad123ac00756285f5c62dd3fc13726fde Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 1 Nov 2016 13:29:45 -0400 Subject: [PATCH] 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 613727789..7b74ad09f 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 29be55379..94ff5eeee 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: