On Tue,  6 Mar 2012 18:57:36 -0800
"Enlightenment SVN" <no-re...@enlightenment.org> wrote:

> Log:
> Fix elm_multibuttonentry API to have callbacks. For now we only have the API
> format fixed. This code needs lot more refactoring after discussing with the
> widget author. So, we will address the implementation later. Signed-off-by:
> Sanjeev BA <eflel...@gmail.com>
> 
> Author:       sanjeev
> Date:         2012-03-06 18:57:36 -0800 (Tue, 06 Mar 2012)
> New Revision: 68866
> Trac:         http://trac.enlightenment.org/e/changeset/68866
> 
> Modified:
>   trunk/elementary/src/lib/elc_multibuttonentry.c
> trunk/elementary/src/lib/elc_multibuttonentry.h 
> 
> Modified: trunk/elementary/src/lib/elc_multibuttonentry.c
> ===================================================================
> --- trunk/elementary/src/lib/elc_multibuttonentry.c   2012-03-07
> 02:20:58 UTC (rev 68865) +++
> trunk/elementary/src/lib/elc_multibuttonentry.c       2012-03-07 02:57:36
> UTC (rev 68866) @@ -10,16 +10,15 @@ MULTIBUTTONENTRY_POS_END,
>       MULTIBUTTONENTRY_POS_BEFORE,
>       MULTIBUTTONENTRY_POS_AFTER,
> -     MULTIBUTTONENTRY_POS_NUM
>    } Multibuttonentry_Pos;
>  
>  typedef enum _Multibuttonentry_Button_State
>    {
>       MULTIBUTTONENTRY_BUTTON_STATE_DEFAULT,
>       MULTIBUTTONENTRY_BUTTON_STATE_SELECTED,
> -     MULTIBUTTONENTRY_BUTTON_STATE_NUM
>    } Multibuttonentry_Button_State;
>  
> +
>  typedef enum _MultiButtonEntry_Closed_Button_Type
>    {
>       MULTIBUTTONENTRY_CLOSED_IMAGE,
> @@ -43,6 +42,7 @@
>       Evas_Object *button;
>       Evas_Coord vw, rw; // vw: visual width, real width
>       Eina_Bool  visible: 1;
> +     Evas_Smart_Cb func;
>    };
>  
>  typedef struct _Elm_Multibuttonentry_Item_Filter
> @@ -98,7 +98,7 @@
>  static void _del_button_obj(Evas_Object *obj, Evas_Object *btn);
>  static void _del_button_item(Elm_Multibuttonentry_Item *item);
>  static void _select_button(Evas_Object *obj, Evas_Object *btn);
> -static Elm_Object_Item *_add_button_item(Evas_Object *obj, const char *str,
> Multibuttonentry_Pos pos, const void *ref, void *data); +static
> Elm_Object_Item *_add_button_item(Evas_Object *obj, const char *str,
> Multibuttonentry_Pos pos, const void *ref, Evas_Smart_Cb func, void *data);
> static void _evas_mbe_key_up_cb(void *data, Evas *e, Evas_Object *obj, void
> *event_info); static void _entry_changed_cb(void *data, Evas_Object *obj,
> void *event_info); static void _entry_key_up_cb(void *data, Evas *e,
> Evas_Object *obj, void *event_info); @@ -791,7 +791,7 @@ } 
>  static Elm_Object_Item*
> -_add_button_item(Evas_Object *obj, const char *str, Multibuttonentry_Pos
> pos, const void *ref, void *data) +_add_button_item(Evas_Object *obj, const
> char *str, Multibuttonentry_Pos pos, const void *ref, Evas_Smart_Cb func,
> void *data) { Elm_Multibuttonentry_Item *item;
>     Elm_Multibuttonentry_Item_Filter *item_filter;
> @@ -843,6 +843,11 @@
>          item->vw = vw;
>          item->visible = EINA_TRUE;
>  
> +        if (func)
> +          {
> +              item->func = func;
> +          }
> +

not that it needs to be changed, but this if() is unnecessary

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to