From 6afb683626584b02a4cd6f582d3fd69265b50f9f Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Tue, 18 Dec 2012 22:14:27 +0000 Subject: [PATCH] elm_plug: fixed signal name. SVN revision: 81313 --- legacy/elementary/ChangeLog | 5 +++++ legacy/elementary/NEWS | 2 ++ legacy/elementary/src/bin/test_win_plug.c | 2 +- legacy/elementary/src/lib/elm_plug.c | 11 +++++------ legacy/elementary/src/lib/elm_plug.h | 2 +- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/legacy/elementary/ChangeLog b/legacy/elementary/ChangeLog index 9767a37da0..68c9bad0d2 100644 --- a/legacy/elementary/ChangeLog +++ b/legacy/elementary/ChangeLog @@ -834,3 +834,8 @@ 2012-12-18 Chueon Park (Hermet) * Let image update right now if the image preloading is disabled. + +2012-12-18 Gustavo Sverzut Barbieri (k-s) + + * elm_plug now emits "image,resized" on server-side changes. + * elm_plug typo fixed "image.deleted" to "image,deleted" ('.' -> ',') diff --git a/legacy/elementary/NEWS b/legacy/elementary/NEWS index 250968713a..56c9638f87 100644 --- a/legacy/elementary/NEWS +++ b/legacy/elementary/NEWS @@ -22,6 +22,7 @@ Additions: * Add window profile set/get API in elm_win * Add elm_sys_notify.[ch] * Add elm_need_elocation() and Elocation.h support with ELM_ELOCATION macro to integrate elocation. + * Add elm_plug signals "image,deleted" (fixed typo) and "image,resized". Improvements: @@ -98,6 +99,7 @@ Fixes: * Fix the naviframe to not have crash even if user deletes the naviframe in the transition finished cb. * Fix Don't elm_transit image animation use the image preloading to avoid image flickering. * Fix the image to show the image right now if the image preloading is disabled. + * Fix typo from elm_plug signal "image.deleted", should be "image,deleted". Removals: diff --git a/legacy/elementary/src/bin/test_win_plug.c b/legacy/elementary/src/bin/test_win_plug.c index ee3e3e0f34..1df7f2ac98 100644 --- a/legacy/elementary/src/bin/test_win_plug.c +++ b/legacy/elementary/src/bin/test_win_plug.c @@ -169,7 +169,7 @@ test_win_plug(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in return; } - evas_object_smart_callback_add(plug, "image.deleted", cb_plug_disconnected, NULL); + evas_object_smart_callback_add(plug, "image,deleted", cb_plug_disconnected, NULL); evas_object_smart_callback_add(plug, "image,resized", cb_plug_resized, NULL); evas_object_resize(plug, 380, 500); diff --git a/legacy/elementary/src/lib/elm_plug.c b/legacy/elementary/src/lib/elm_plug.c index 7be9a73462..8474258540 100644 --- a/legacy/elementary/src/lib/elm_plug.c +++ b/legacy/elementary/src/lib/elm_plug.c @@ -11,7 +11,7 @@ EAPI Eo_Op ELM_OBJ_PLUG_BASE_ID = EO_NOOP; static const char PLUG_KEY[] = "__Plug_Ecore_Evas"; static const char SIG_CLICKED[] = "clicked"; -static const char SIG_IMAGE_DELETED[] = "image.deleted"; +static const char SIG_IMAGE_DELETED[] = "image,deleted"; static const char SIG_IMAGE_RESIZED[] = "image,resized"; static const Evas_Smart_Cb_Description _smart_callbacks[] = { {SIG_CLICKED, ""}, @@ -34,12 +34,11 @@ _sizing_eval(Evas_Object *obj __UNUSED__) static void _elm_plug_disconnected(Ecore_Evas *ee) { - Evas_Object *plug = NULL; - - if (!ee) return; - plug = ecore_evas_data_get(ee, PLUG_KEY); - if (!plug) return; + Evas_Object *plug = ecore_evas_data_get(ee, PLUG_KEY); + EINA_SAFETY_ON_NULL_RETURN(plug); evas_object_smart_callback_call(plug, SIG_IMAGE_DELETED, NULL); + /* TODO: was a typo. Deprecated, remove in future releases: */ + evas_object_smart_callback_call(plug, "image.deleted", NULL); } static void diff --git a/legacy/elementary/src/lib/elm_plug.h b/legacy/elementary/src/lib/elm_plug.h index 3d01496f84..72a78595a7 100644 --- a/legacy/elementary/src/lib/elm_plug.h +++ b/legacy/elementary/src/lib/elm_plug.h @@ -11,7 +11,7 @@ * This widget emits the following signals: * @li "clicked": the user clicked the image (press/release). The @c * event parameter of the callback will be @c NULL. - * @li "image.deleted": the server side was deleted. The @c event + * @li "image,deleted": the server side was deleted. The @c event * parameter of the callback will be @c NULL. * @li "image,resized": the server side was resized. The @c event parameter of * the callback will be @c Evas_Coord_Size (two integers).