Enlightenment SVN <[email protected]> wrote: Log: elementary: on focus loss actually hide the entry and show label.
Author: cedric Date: 2012-08-03 00:27:02 -0700 (Fri, 03 Aug 2012) New Revision: 74819 Trac: http://trac.enlightenment.org/e/changeset/74819 Modified: trunk/elementary/ChangeLog trunk/elementary/NEWS trunk/elementary/src/lib/elm_spinner.c trunk/elementary/src/lib/elm_widget_spinner.h Modified: trunk/elementary/ChangeLog _____________________________________________ --- trunk/elementary/ChangeLog 2012-08-03 07:00:26 UTC (rev 74818) +++ trunk/elementary/ChangeLog 2012-08-03 07:27:02 UTC (rev 74819) @@ -370,3 +370,4 @@ 2012-08-03 Cedric Bail * Add smart callback "focus-in" and "focus-out". + * On focus loss, Elm_Spinner hide entry and display label properly. Modified: trunk/elementary/NEWS _____________________________________________ --- trunk/elementary/NEWS 2012-08-03 07:00:26 UTC (rev 74818) +++ trunk/elementary/NEWS 2012-08-03 07:27:02 UTC (rev 74819) @@ -20,6 +20,7 @@ * Elm_Win_Trap and elm_win_trap_set() to allow e17 integration. * elm_flip_go_to() * Add smart callback "focus-in" and "focus-out" when an Elementary object gain or loose focus. + * On focus loss, Elm_Spinner properly hide Elm_Entry and display label properly. Fixes: Modified: trunk/elementary/src/lib/elm_spinner.c _____________________________________________ --- trunk/elementary/src/lib/elm_spinner.c 2012-08-03 07:00:26 UTC (rev 74818) +++ trunk/elementary/src/lib/elm_spinner.c 2012-08-03 07:27:02 UTC (rev 74819) @@ -466,6 +466,16 @@ } static void +_on_focus_out(void *data, + Evas_Object *obj __UNUSED__, + void *event_info __UNUSED__) +{ + Evas_Object *spinner = data; + + _entry_value_apply(spinner); +} + +static void _elm_spinner_smart_add(Evas_Object *obj) { EVAS_SMART_DATA_ALLOC(obj, Elm_Spinner_Smart_Data); @@ -502,6 +512,7 @@ priv->ent = elm_entry_add(obj); elm_entry_single_line_set(priv->ent, EINA_TRUE); + evas_object_smart_callback_add(priv->ent, "focus-out", _on_focus_out, obj); evas_object_smart_callback_add (priv->ent, "activated", _entry_activated_cb, obj); Modified: trunk/elementary/src/lib/elm_widget_spinner.h _____________________________________________ --- trunk/elementary/src/lib/elm_widget_spinner.h 2012-08-03 07:00:26 UTC (rev 74818) +++ trunk/elementary/src/lib/elm_widget_spinner.h 2012-08-03 07:27:02 UTC (rev 74819) @@ -135,6 +135,8 @@ Ecore_Timer *delay, *spin; Eina_List *special_values; + void (*entry_focus_hook)(void *data, Evas_Object *obj); + Eina_Bool entry_visible : 1; Eina_Bool dragging : 1; Eina_Bool editable : 1; _____________________________________________ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _____________________________________________ enlightenment-svn mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-svn Hahahha :-) Its my fav ;-) -- Sent from my Samsung phone. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
