On 20 January 2016 at 23:58, Cedric BAIL <[email protected]> wrote:

> On Jan 20, 2016 00:07, "Minkyu Kang" <[email protected]> wrote:
> >
> > hermet pushed a commit to branch master.
> >
> >
>
> http://git.enlightenment.org/core/elementary.git/commit/?id=2eb95a547736af1445b0a292223ad8973ad24acb
> >
> > commit 2eb95a547736af1445b0a292223ad8973ad24acb
> > Author: Minkyu Kang <[email protected]>
> > Date:   Wed Jan 20 17:06:22 2016 +0900
> >
> >     elm_widget: cleanup _elm_widget_on_focus function
> >
> >     Summary:
> >     This patch will reduce duplicate codes and code depth for readability
> >
> >     Signed-off-by: Minkyu Kang <[email protected]>
> >
> >     Reviewers: seoz, Hermet, cedric
> >
> >     Subscribers: seoz
>
> I will let Stefan have his call here, but this commit doesn't look like a
> fix to me and does change a substantial amount of line we have no automated
> tests for.
>

It looks a lot like a simple cleanup to me. The logic looks unchanged to me.


>
> Cedric
>
> >     Differential Revision: https://phab.enlightenment.org/D3574
> > ---
> >  src/lib/elm_widget.c | 36 ++++++++++++++----------------------
> >  1 file changed, 14 insertions(+), 22 deletions(-)
> >
> > diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c
> > index 97ef045..11d4ee0 100644
> > --- a/src/lib/elm_widget.c
> > +++ b/src/lib/elm_widget.c
> > @@ -5743,30 +5743,22 @@ _elm_widget_eo_base_destructor(Eo *obj,
> Elm_Widget_Smart_Data *sd EINA_UNUSED)
> >  EOLIAN static Eina_Bool
> >  _elm_widget_on_focus(Eo *obj, Elm_Widget_Smart_Data *sd, Elm_Object_Item
> *item EINA_UNUSED)
> >  {
> > -   if (elm_widget_can_focus_get(obj))
> > -     {
> > -        if (elm_widget_focus_get(obj))
> > -          {
> > -             if (!sd->resize_obj)
> > -               evas_object_focus_set(obj, EINA_TRUE);
> > -              eo_do(obj, eo_event_callback_call
> > -               (ELM_WIDGET_EVENT_FOCUSED, NULL));
> > -             if (_elm_config->atspi_mode &&
> !elm_widget_child_can_focus_get(obj))
> > -
>  elm_interface_atspi_accessible_state_changed_signal_emit(obj,
> ELM_ATSPI_STATE_FOCUSED, EINA_TRUE);
> > -          }
> > -        else
> > -          {
> > -             if (!sd->resize_obj)
> > -               evas_object_focus_set(obj, EINA_FALSE);
> > -             eo_do(obj, eo_event_callback_call
> > -               (ELM_WIDGET_EVENT_UNFOCUSED, NULL));
> > -             if (_elm_config->atspi_mode &&
> !elm_widget_child_can_focus_get(obj))
> > -
>  elm_interface_atspi_accessible_state_changed_signal_emit(obj,
> ELM_ATSPI_STATE_FOCUSED, EINA_FALSE);
> > -    }
> > -     }
> > -   else
> > +   Eina_Bool focused;
> > +   const Eo_Event_Description *desc;
> > +
> > +   if (!elm_widget_can_focus_get(obj))
> >       return EINA_FALSE;
> >
> > +   focused = elm_widget_focus_get(obj);
> > +   desc = focused ? ELM_WIDGET_EVENT_FOCUSED :
> ELM_WIDGET_EVENT_UNFOCUSED;
> > +
> > +   if (!sd->resize_obj)
> > +     evas_object_focus_set(obj, focused);
> > +   eo_do(obj, eo_event_callback_call(desc, NULL));
> > +
> > +   if (_elm_config->atspi_mode && !elm_widget_child_can_focus_get(obj))
> > +     elm_interface_atspi_accessible_state_changed_signal_emit(obj,
> ELM_ATSPI_STATE_FOCUSED, focused);
> > +
> >     return EINA_TRUE;
> >  }
> >
> >
> > --
> >
> >
> >
>
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
> _______________________________________________
> enlightenment-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
>


-- 
Jean-Philippe André
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to