On Fri, Feb 22, 2013 at 6:27 PM, ChunEon Park - Enlightenment Git <
no-re...@enlightenment.org> wrote:

> asdfuser pushed a commit to branch master.
>
> commit 5c8d362725051fe8703b06ca57d1b554ee460c69
> Author: ChunEon Park <her...@hermet.pe.kr>
> Date:   Thu Feb 21 05:57:05 2013 +0000
>
>
Hello


>     elementary/button,label,bg - i have no idea but elm_layout_theme_set()
> should be called in smart_add().
>
>     this fixes the hoversel.
>


I am curious what kind of problem was there?

Daniel Juyung Seo (SeoZ)


>
>
>
>     SVN revision: 84275
> ---
>  src/lib/elm_bg.c     | 10 ++++------
>  src/lib/elm_button.c | 12 ++++++------
>  src/lib/elm_label.c  | 16 ++++++++--------
>  3 files changed, 18 insertions(+), 20 deletions(-)
>
> diff --git a/src/lib/elm_bg.c b/src/lib/elm_bg.c
> index 712f8db..db355b8 100644
> --- a/src/lib/elm_bg.c
> +++ b/src/lib/elm_bg.c
> @@ -100,20 +100,19 @@ static void
>  _elm_bg_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
>  {
>     Elm_Bg_Smart_Data *priv = _pd;
> -   Evas_Object *parent;
>
>     eo_do_super(obj, evas_obj_smart_add());
>
> +   Evas_Object *parent = eo_parent_get(obj);
> +   if (!elm_widget_sub_object_add(parent, obj))
> +     ERR("could not add %p as sub object of %p", obj, parent);
> +
>     elm_widget_can_focus_set(obj, EINA_FALSE);
>
>     priv->option = ELM_BG_OPTION_SCALE;
>
>     evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, _on_resize,
> obj);
>
> -   parent = eo_parent_get(obj);
> -   if (!elm_widget_sub_object_add(parent, obj))
> -     ERR("could not add %p as sub object of %p", obj, parent);
> -
>     elm_layout_theme_set(obj, "bg", "base", elm_widget_style_get(obj));
>  }
>
> @@ -138,7 +137,6 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list
> *list EINA_UNUSED)
>  {
>     eo_do_super(obj, eo_constructor());
>     eo_do(obj, evas_obj_type_set(MY_CLASS_NAME));
> -
>  }
>
>  static void
> diff --git a/src/lib/elm_button.c b/src/lib/elm_button.c
> index ffe06b7..c4ea81f 100644
> --- a/src/lib/elm_button.c
> +++ b/src/lib/elm_button.c
> @@ -117,6 +117,7 @@ _elm_button_smart_theme(Eo *obj, void *_pd
> EINA_UNUSED, va_list *list)
>     Eina_Bool *ret = va_arg(*list, Eina_Bool *);
>     if (ret) *ret = EINA_FALSE;
>     Eina_Bool int_ret = EINA_FALSE;
> +
>     eo_do_super(obj, elm_wdg_theme(&int_ret));
>     if (!int_ret) return;
>     _icon_signal_emit(obj);
> @@ -293,6 +294,10 @@ _elm_button_smart_add(Eo *obj, void *_pd, va_list
> *list EINA_UNUSED)
>
>     eo_do_super(obj, evas_obj_smart_add());
>
> +   Evas_Object *parent = eo_parent_get(obj);
> +   if (!elm_widget_sub_object_add(parent, obj))
> +     ERR("could not add %p as sub object of %p", obj, parent);
> +
>     edje_object_signal_callback_add
>       (wd->resize_obj, "elm,action,click", "",
>       _on_clicked_signal, obj);
> @@ -312,6 +317,7 @@ _elm_button_smart_add(Eo *obj, void *_pd, va_list
> *list EINA_UNUSED)
>       (_elm_access_object_get(obj), ELM_ACCESS_STATE, _access_state_cb,
> priv);
>
>     elm_widget_can_focus_set(obj, EINA_TRUE);
> +   elm_layout_theme_set(obj, "button", "base", elm_widget_style_get(obj));
>  }
>
>  static void
> @@ -344,12 +350,6 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list
> *list EINA_UNUSED)
>     eo_do(obj,
>           evas_obj_type_set(MY_CLASS_NAME),
>           evas_obj_smart_callbacks_descriptions_set(_smart_callbacks,
> NULL));
> -
> -   Evas_Object *parent = eo_parent_get(obj);
> -   if (!elm_widget_sub_object_add(parent, obj))
> -     ERR("could not add %p as sub object of %p", obj, parent);
> -
> -   elm_layout_theme_set(obj, "button", "base", elm_widget_style_get(obj));
>  }
>
>  EAPI void
> diff --git a/src/lib/elm_label.c b/src/lib/elm_label.c
> index 0af94c0..36ac627 100644
> --- a/src/lib/elm_label.c
> +++ b/src/lib/elm_label.c
> @@ -378,6 +378,10 @@ _elm_label_smart_add(Eo *obj, void *_pd, va_list
> *list EINA_UNUSED)
>
>     eo_do_super(obj, evas_obj_smart_add());
>
> +   Evas_Object *parent = eo_parent_get(obj);
> +   if (!elm_widget_sub_object_add(parent, obj))
> +     ERR("could not add %p as sub object of %p", obj, parent);
> +
>     priv->linewrap = ELM_WRAP_NONE;
>     priv->wrap_w = -1;
>     priv->slide_duration = 10;
> @@ -400,6 +404,10 @@ _elm_label_smart_add(Eo *obj, void *_pd, va_list
> *list EINA_UNUSED)
>       (_elm_access_object_get(obj), ELM_ACCESS_TYPE, E_("Label"));
>     _elm_access_callback_set
>       (_elm_access_object_get(obj), ELM_ACCESS_INFO, _access_info_cb,
> NULL);
> +
> +   elm_layout_theme_set(obj, "label", "base", elm_widget_style_get(obj));
> +   elm_layout_text_set(obj, NULL, "<br>");
> +   elm_layout_sizing_eval(obj);
>  }
>
>  EAPI Evas_Object *
> @@ -418,14 +426,6 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list
> *list EINA_UNUSED)
>     eo_do(obj,
>           evas_obj_type_set(MY_CLASS_NAME),
>           evas_obj_smart_callbacks_descriptions_set(_smart_callbacks,
> NULL));
> -
> -   Evas_Object *parent = eo_parent_get(obj);
> -   if (!elm_widget_sub_object_add(parent, obj))
> -     ERR("could not add %p as sub object of %p", obj, parent);
> -
> -   elm_layout_theme_set(obj, "label", "base", elm_widget_style_get(obj));
> -   elm_layout_text_set(obj, NULL, "<br>");
> -   elm_layout_sizing_eval(obj);
>  }
>
>  EAPI void
>
> --
> To stop receiving notification emails like this one, please contact
> the administrator of this repository.
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
>
------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to