summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2014-05-11 21:20:04 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2014-05-11 21:21:51 +0900
commit30cada36967a49da784d8f2bb2b1bffc911d64b6 (patch)
treeadfb4503d4fbc2c5cbb0baa725c0aba1811beebf
parent842b9e3cc4da3977c1ef05c8498dd5573d0cc917 (diff)
gengrid/genlist/list/toolbar: Do not set the focus to the item on widget's first focus.
This was introduced during 1.10 development phase but this changed the default focus behavior and got a lot of complaints. (especially from discomfitor) So I would like to comment this out now and make it optional on 1.11 by keeping the default behavior.
-rw-r--r--src/lib/elm_gengrid.c2
-rw-r--r--src/lib/elm_genlist.c2
-rw-r--r--src/lib/elm_list.c2
-rw-r--r--src/lib/elm_toolbar.c2
4 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c
index 2ca5ad1cd..ab7a57455 100644
--- a/src/lib/elm_gengrid.c
+++ b/src/lib/elm_gengrid.c
@@ -2570,11 +2570,13 @@ _elm_gengrid_elm_widget_on_focus(Eo *obj, Elm_Gengrid_Data *sd)
2570 it = sd->last_focused_item; 2570 it = sd->last_focused_item;
2571 else if (sd->last_selected_item) 2571 else if (sd->last_selected_item)
2572 it = sd->last_selected_item; 2572 it = sd->last_selected_item;
2573 /* TODO: make it optional on 1.11. Disable this until then
2573 else if (elm_widget_focus_highlight_enabled_get(obj)) 2574 else if (elm_widget_focus_highlight_enabled_get(obj))
2574 { 2575 {
2575 it = elm_gengrid_first_item_get(obj); 2576 it = elm_gengrid_first_item_get(obj);
2576 is_sel = EINA_TRUE; 2577 is_sel = EINA_TRUE;
2577 } 2578 }
2579 */
2578 2580
2579 if (it) 2581 if (it)
2580 { 2582 {
diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c
index 2761a3503..0e5caba70 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -2907,11 +2907,13 @@ _elm_genlist_elm_widget_on_focus(Eo *obj, Elm_Genlist_Data *sd)
2907 it = sd->last_focused_item; 2907 it = sd->last_focused_item;
2908 else if (sd->last_selected_item) 2908 else if (sd->last_selected_item)
2909 it = sd->last_selected_item; 2909 it = sd->last_selected_item;
2910 /* TODO: make it optional on 1.11. Disable this until then
2910 else if (elm_widget_focus_highlight_enabled_get(obj)) 2911 else if (elm_widget_focus_highlight_enabled_get(obj))
2911 { 2912 {
2912 it = elm_genlist_first_item_get(obj); 2913 it = elm_genlist_first_item_get(obj);
2913 is_sel = EINA_TRUE; 2914 is_sel = EINA_TRUE;
2914 } 2915 }
2916 */
2915 2917
2916 if (it) 2918 if (it)
2917 { 2919 {
diff --git a/src/lib/elm_list.c b/src/lib/elm_list.c
index 0098d1cb3..7b0cc06a9 100644
--- a/src/lib/elm_list.c
+++ b/src/lib/elm_list.c
@@ -1206,11 +1206,13 @@ _elm_list_elm_widget_on_focus(Eo *obj, Elm_List_Data *sd)
1206 it = sd->last_focused_item; 1206 it = sd->last_focused_item;
1207 else if (sd->last_selected_item) 1207 else if (sd->last_selected_item)
1208 it = sd->last_selected_item; 1208 it = sd->last_selected_item;
1209 /* TODO: make it optional on 1.11
1209 else if (elm_widget_focus_highlight_enabled_get(obj)) 1210 else if (elm_widget_focus_highlight_enabled_get(obj))
1210 { 1211 {
1211 it = eina_list_data_get(sd->items); 1212 it = eina_list_data_get(sd->items);
1212 is_sel = EINA_TRUE; 1213 is_sel = EINA_TRUE;
1213 } 1214 }
1215 */
1214 1216
1215 if (it) 1217 if (it)
1216 { 1218 {
diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c
index 0a62fe1f6..32b08f115 100644
--- a/src/lib/elm_toolbar.c
+++ b/src/lib/elm_toolbar.c
@@ -722,8 +722,10 @@ _elm_toolbar_elm_widget_on_focus(Eo *obj, Elm_Toolbar_Data *sd)
722 { 722 {
723 if (sd->last_focused_item) 723 if (sd->last_focused_item)
724 it = (Elm_Object_Item *)sd->last_focused_item; 724 it = (Elm_Object_Item *)sd->last_focused_item;
725 /* TODO: make it optional on 1.11. Disable this until then
725 else 726 else
726 it = (Elm_Object_Item *)ELM_TOOLBAR_ITEM_FROM_INLIST(sd->items); 727 it = (Elm_Object_Item *)ELM_TOOLBAR_ITEM_FROM_INLIST(sd->items);
728 */
727 if (it) 729 if (it)
728 { 730 {
729 it = _elm_toolbar_nearest_visible_item_get(obj, it); 731 it = _elm_toolbar_nearest_visible_item_get(obj, it);