efl/legacy
RAJEEV RANJAN 46acbce93e From: RAJEEV RANJAN <rajeev.r@samsung.com>
Subject: Patch to address some focus and disabling issue in elementary
widgets

We have observed some generic issues in Elementary widgets.

1. Widgets not getting disabled if we call elm_object_disabled_set(ob,
EINA_TRUE) followed by elm_object_style_set(obj, <style_name>);

This works fine if we disable the widget after changing the style(call
to theme_hook happens here).


It happens because we are not sending the edje signal in theme_hook of
the widgets, if the widget is already in disabled state.

I have added this code in theme_hook of elm_button as an example and
we will need to apply the similar stuff in all other widgets if needed.

 
 
 2. The widget gets focused in a particular scenario even though we
call elm_object_focus_allow_set(obj, EINA_FALSE).

The code snippet to explain the scenario which we observed was like
this:

Evas_Object *button = NULL, *icon = NULL;

button = elm_button_add(parent);

elm_object_focus_allow_set(button, EINA_FALSE);

icon = elm_icon_add(button);

elm_icon_file_set(icon, EDJE_PATH, "test.icon");

elm_button_icon_set(button, icon);

 
  
  An icon object does not take focus by default. But still whenever
the focus returned to the parent(layout in this case) after closing
some popup, the button gets focused though we had disabled it
explicitly.
 
 The reason is in this case, when we call elm_icon_add(button), icon
gets added to button as a sub-object and in this call, we set
sd->child_can_focus for button(the parent) as true because till now,
the focus property for icon has not been set to false which by default
is true. 
 
 This was set later in the function elm_icon_add() as follows:
 elm_widget_can_focus_set(obj, EINA_FALSE);
  
  Actually this should be set before adding icon as sub-object of the
parent which in this case is a button.
 
 I have done the required modification in the function elm_icon_add().
  
  Attached to this mail is the patch file for these two issues.The
revision from which I have created this patch file is 53129.
We may need to do similar changes in other widgets if required.



SVN revision: 53137
2010-10-07 07:31:24 +00:00
..
elementary From: RAJEEV RANJAN <rajeev.r@samsung.com> 2010-10-07 07:31:24 +00:00