Commit Graph

758 Commits

Author SHA1 Message Date
zmike 54eabd94e2 Revert "focus: Removed unused parameter from an internal focus function."
This reverts commit 5832b692aa5f68a2924bd7886390d489eb13aefb.

broke build
2014-05-07 01:08:04 -04:00
zmike be636e58be remove all scrolling changes for focused items.
this.is.BROOOOOOOOOOOOOOOKEEEEEEEEEEEEEEEEEEENNNNNNNNNNNNNNNNNNNNNNNNNNNNN.

SERIOUSLY.

you cannot go scrolling all over the place in every widget that has a scroller just because the widget gets focus. what user wants that? no user anywhere, under any circumstances, ever, in all of history.

if you dare to put this back in, I will continue to remove it for the rest of eternity until it never, ever scrolls in any unwanted case. the focused item doesn't have to always be in the viewport, and should never be moved into the viewport [[[[[[[ except to maintain an already-existing position inside the viewport ]]]]]]]

too much of my time wasted on this stupid "feature" which should have been MUCH more thoroughly tested and reviewed before it was merged.

T1205 STILL NOT FIXED
2014-05-07 01:06:30 -04:00
Daniel Juyung Seo d0380e3342 focus: Removed unused parameter from an internal focus function.
is_next parameter is not used for
elm_widget_focus_highlight_geometry_get() function.
But this parameter was not cleaned up in the commit 5320cca.
2014-05-07 00:05:07 +09:00
Daniel Juyung Seo d4aa2ccc08 genlist: refactor the internal code to make it more readable. 2014-04-27 12:55:58 +09:00
Amitesh Singh 8405b15b2b genlist: Implemented item_select_on_focus feature.
Summary: @feature

Test Plan: elementary_test->Genlist Focus

Reviewers: seoz, raster

CC: seoz

Differential Revision: https://phab.enlightenment.org/D705
2014-04-27 12:40:17 +09:00
Daniel Juyung Seo 9652839c96 genlist: renamed internal function according to the key binding adoption. 2014-04-27 11:26:53 +09:00
Amitesh Singh 8e0ffb8332 config: Added two APIs to enable/disable focus auto scroll bring in feature.
Summary:
 Summary:
    - APIs
      - elm_config_focus_auto_scroll_bring_in_enabled_set
      - elm_config_focus_auto_scroll_bring_in_enabled_get
    - list/genlist/toolbar/gengrid: Using this feature for scrolling for focus movement.
    - Added test case in "List Focus", "Genlist Focus", "Toolbar Focus" and "Gengrid Focus"

    @feature

Test Plan: elementary_test->"List Focus", "Genlist Focus", "Toolbar Focus" & "Gengrid Focus".

Reviewers: raster, seoz

CC: seoz

Differential Revision: https://phab.enlightenment.org/D799
2014-04-27 04:15:26 +09:00
Daniel Juyung Seo 571b60e298 genlist: Removed unnecessary item show call on multi select.
item select will automatically trigger item show.
@fix
2014-04-27 03:02:58 +09:00
Hosang Kim 0f636e890a genlist: Add item loop feature
Summary:
If item loop feature is enabled, item is moved infinitely.

    1. Refactor direction key event handling routine
      - added internal function _elm_genlist_elm_widget_event_direction.
    2. Add looping feature for genlist
      - added Eolian function _elm_genlist_elm_widget_item_loop_enabled_set/get.
    3. Add demo - test_genlist.c / genlist focus

Reviewers: seoz, woohyun, jaehwan, Hermet, raster

Reviewed By: Hermet

Differential Revision: https://phab.enlightenment.org/D778

Conflicts:

	src/lib/elm_widget_genlist.h
2014-04-24 14:17:35 +09:00
Daniel Zaoui d2484d08d5 Genlist: fix EO errors.
Elm-Widget function was called on non elm-widget objects.
2014-04-23 11:00:50 +03:00
Daniel Juyung Seo b173ed7c85 genlist/gengrid/list: Fix first on_focus call correctly by checking focus highlight.
First on_focus call should consider focus highlight enable status and
do the different job according to that.

This can be tested in "genlist 7" and "genlist focus" examples in
elementary_test.
2014-04-22 23:18:04 +09:00
Carsten Haitzler 9d55fab418 entry: wrong viewport value calculation issue fix
Summary:
Issue: As entire scroller edje co-ordinates was being taken instead of the actual viewport value,
if in scroller edje more parts are added apart from just "elm.swallow.content", then the viewport value
set will be wrong. hence the selection handlers will not hide when they have to hide.

solution: Instead of taking scroller edje's geometry, get the actual viewport values.
To get viewport x,y a new scrollable interface is also added.

signed-off by: Shilpa Singh <shilpa.singh@samsung.com>

@fix

Test Plan: Selection handlers have to hide correctly when the text is scrolled in a scrolled entry, if the scroller edc of entry has more parts added other than elm.swallow.content, then when we scroll the selection handlers are not hidden correctly.

Reviewers: jaehwan, woohyun, seoz, Hermet, raster

CC: govi, rajeshps, thiepha

Differential Revision: https://phab.enlightenment.org/D674
2014-04-21 12:31:49 +09:00
Jaeun Choi fc491c7c6c genlist: apply key binding
Summary: This patch applies key binding to elm_genlist.

Test Plan: None

Reviewers: Hermet, raster

Reviewed By: raster

Differential Revision: https://phab.enlightenment.org/D743
2014-04-16 17:29:16 +09:00
ChunEon Park 5ab6a7739f widgets - don't handle the events(key,mouse) if the object is disabled.
we can prevent to handle the widget events from the widget infra,
if the object is disabled.

conceptually, disabled object should not be interacted to user input(key, mouse)
2014-04-16 10:59:43 +09:00
Tom Hacohen e15f80074e genlist: Adjusted to Eo2. 2014-04-10 09:35:00 +01:00
Mike Blumenkrantz 8fba6f77e9 genlist event_block_rect needs a smart parent to reduce BITCH 2014-04-08 16:23:07 -04:00
Amitesh Singh 1479664ec0 list/genlist/gengrid/toolbar: Fix - _nearest_visible_item_get() should always return an item.
Test Plan:
Bug:
- elementary_test->genlist/list/toolbar/gengrid Focus
- Resize the window to a state when no item is fully visible. only partially visible.
- Move Focus from outer widgets (Up/Down/Left/right buttons) to list/genlist/gengrid/toolbar.
- Focus goes away (size - 0). Reason: _nearest_visible_item_get returns NULL.

@fix

Reviewers: seoz, raster, woohyun

Reviewed By: raster

CC: seoz, nirajkr, anand.km

Differential Revision: https://phab.enlightenment.org/D696
2014-04-04 12:04:04 +09:00
Amitesh Singh daee26de35 genlist: Added focus movement on widget items by mouse in.
Summary: @feature

Test Plan: elementary_test->Genlist Focus

Reviewers: raster, cedric, woohyun

Reviewed By: raster

CC: seoz

Differential Revision: https://phab.enlightenment.org/D663
2014-04-01 20:25:03 +09:00
Daniel Zaoui 2bc08afc83 Eolian: Integration of Genlist and Genlist Pan 2014-04-01 13:55:42 +03:00
zmike de67ce137d genlist no longer randomly selects items (or scrolls to them after selecting)
this item focus thing is a giant bug nightmare and needed to be developed/tested much more thoroughly in a branch before being committed to master.
2014-03-30 23:20:04 -04:00
Daniel Juyung Seo dcdd697c70 genlist: Check disabled status of an item in nearest visible item.
Also added a test for it.
2014-03-24 02:07:41 +09:00
Amitesh Singh d37c8dccb1 genlist: removed printf from commit. b72db5c19
Reviewers: seoz

Reviewed By: seoz

CC: seoz

Differential Revision: https://phab.enlightenment.org/D652
2014-03-24 01:20:46 +09:00
Daniel Juyung Seo 1f319f3e2d genlist: Fixed item multi/single selection routine to skip disabled item
correctly.

@fix
2014-03-24 00:49:06 +09:00
zmike ea088ab21f genlist no longer crashes if a selected item is deleted during deselect_all 2014-03-23 10:39:47 -04:00
Daniel Juyung Seo 7f0f50fbc6 list/genlist/gengrid: Internal refactoring of item_focused/unfocused
codes.

- Added a check for focus highlight enable status before calling focus
signal to edje.
- Used obj instead of WIDGET(it) because that is used many times.
2014-03-23 23:29:16 +09:00
Daniel Juyung Seo 32cd38f89d genlist: Fixed focus object hidden bug on re-focus.
On smart_on_focus, genlist calls elm_object_item_focus_set. That API
internally calls _elm_widget_focus_highlight_start() but we need to call
this function once again because of the weird focus behavior.

Condition: enable focus highlight and focus highlight animation.
The first _elm_widget_focus_highlight_start() triggers
_elm_win_focus_highlight_simple_setup, and second call triggers
_elm_win_focus_highlight_anim_setup. But the first call does not show
the focus highlight object properly.

Reproduction scenario:
1. elementary_test -> genlist focus
2. click an item
3. scroll the genlist and move the focused item away from the viewport.
4. move the mouse pointer to another window
5. move the mouse pointer to the genlist window back again.
6. focus highlight object is now shown correctly.

By the way, this bug will be hidden when the focus highlight never
scrolls away. I will add this feature soon.
2014-03-23 21:37:55 +09:00
Daniel Juyung Seo 1343551e2a genlist: Fixed typo for _elm_genlist_nearest_visible_item_get comments. 2014-03-23 19:14:18 +09:00
Daniel Juyung Seo fad3a2dfc4 list/genlist/gengrid: Handle on_focus event on focus set only for key
event.

When you use mouse(touch) that triggers mouse up event, the
focus/selection movement is done by mouse up callback, so don't need to
handle on_focus event when mouse(touch) is used.

You can reproduce the bug by the following step.
1. launch elementary_test -> list focus, genlist focus, gengrid focus
2. focus an item (by touch, by key)
3. move focus to left button (by touch, by key)
4. click an another item (by touch)
5. previously focused item will be unfocused again even it was unfocused
at step #3/

Special thanks to Amitesh for the report.
2014-03-23 16:48:10 +09:00
zmike 5b07498ba1 genlist needs to iterate exactly once over a fixed list when deselcting all items
the selected items list can be modified during deselect from the smart callback, which can cause an infinite loop here

@fix
2014-03-23 03:11:14 -04:00
Daniel Juyung Seo 8129ae20ec genlist: Fixed broken genlist item focus support.
Now it works so much better than before.
- Fixed the separate behavior between selected item and focused item.
- Fixed wrong focus set when genlist is focused first time by mouse.
- Fixed wrong scroll movement when the focus highlight is disabled.
- Item selection sets that item focused. So when an item is selected, do
not need to set the focus again.
- Fixed wrong call for _elm_genlist_item_content_focus_set on deleted
item.
2014-03-22 23:51:44 +09:00
Daniel Juyung Seo 27f98b1e01 genlist/gengrid: Used item callback infrastructure. 2014-03-22 19:10:27 +09:00
Daniel Juyung Seo 65c948ca93 list/genlist/gengrid: Call item_show not bring_in on focus.
Elm 1.9 does item_show not bring_in so let's keep the consistency. I
will make this optional later.
2014-03-22 18:38:00 +09:00
Daniel Juyung Seo 9dd3112f15 genlist: Fixed annoying autoscrolling bug in genlist item focus.
Now, genlist does not autoscroll to last focused/selected item when the genlist
is focused. It tries to find the nearest visible item instead of the
last focused/selected item.
2014-03-19 00:48:07 +09:00
Daniel Juyung Seo 1c5f5ade61 list/genlist: Fixed Home and End key event handling routine.
Move focus and selection when Home or End key is pressed.

@fix
This needs a partial backport to elementary-1.9
2014-03-18 19:14:39 +09:00
Daniel Juyung Seo c08c20aac3 Revert "genlist no longer scrolls crazily"
This reverts commit 7a653914ad048c00871d2ef71a56185e5a7fb1ca.

I will fix this in another way.
2014-03-18 19:05:24 +09:00
Daniel Juyung Seo 699b01bcb2 Revert "genlist now uses uniform item showing behavior when selecting items with keyboard"
This reverts commit 85332555e8d3e5b981cde10ba9a1675ef6a4936e.

I will fix this in another way.
2014-03-18 19:05:24 +09:00
Daniel Zaoui 7460467419 Eolian: Integration of Scrollable Interface 2014-03-18 08:14:44 +02:00
Daniel Zaoui 8c29f2a77b Focus: fix segfault due to bad call to Eo function.
Due to Eolian auto-generation, legacy parameters are directly
transferred to Eo functions without conversion.

In this case, is_next was Eina_Bool in legacy and Eina_Bool * in Eo.
The logic code was expecting a pointer but was receiving a Eina_Bool.

The fix consists in giving the logic code the Eina_Bool instead of the
pointer.

@fix
2014-03-18 08:14:44 +02:00
Mike Blumenkrantz 05a1bd01d9 genlist now uses uniform item showing behavior when selecting items with keyboard 2014-03-17 14:57:07 -04:00
Mike Blumenkrantz f04c347985 genlist no longer scrolls crazily
fix T1090
2014-03-17 13:25:06 -04:00
Daniel Zaoui e2206a1a22 Eolian: Integration of Elm Widget 2014-03-17 09:03:56 +02:00
nirajkr be6f406e54 elm_genlist: Handle prev_focused_item if it get deleted
Summary:
Assign the prev_focused_item to NULL it get deleted

Reviewers: seoz, raster

Differential Revision: https://phab.enlightenment.org/D635
2014-03-16 02:35:13 +09:00
zmike 91a9805bc4 genlist shouldn't try to focus an item when it has no items 2014-03-14 13:55:11 -04:00
Daniel Juyung Seo cdb21fd556 genlist: Initialized local variables and removed unnecessary local
variable.

This fixes coverity CID 1191580 ~ 1191583
2014-03-09 19:36:17 +09:00
Daniel Juyung Seo 0a31f91b20 genlist: Refactor event_block_rect handling routine.
- Changed wrong name alpha_bg to event_block_rect.
- Added more comments to the smart data variable.
- Changed wrong function name _tray_alpha_bg_create to
_event_block_rect_update.
2014-03-09 04:48:21 +09:00
Daniel Juyung Seo e25fbe9768 genlist: Internal refactoring for the code readability.
Added one more internal variable to reduce unnecessary pointer
redirection too much.
Elm_Genlist_Smart_Data *sd is used many times in those functions but it
was always redirected from psd->wsd. I just cut down the step and made
the code more readable and consistent with other lines of code.

psd->wsd --> sd
2014-03-09 04:48:12 +09:00
Daniel Juyung Seo e60e43f8f5 list/genlist/gengrid: Clear some internal variables when an item is deleted.
Set last_selected_item, last_focused_item, focused_item to NULL when the
item is deleted.
For genlist and gengrid, clear them in del_not_serious.
2014-03-09 02:57:09 +09:00
Daniel Juyung Seo 80a3eea785 genlist: Removed trailing whitespaces from the previous Niraj's commit.
I aimed to merge this commit to the previous commit but I made git
amend mistake... :(
2014-03-09 02:48:34 +09:00
nirajkr e014fe92f4 genlist: Implemented the item focus support in genlist
Summary:
Implemented the following function
          1. _item_unfocused
          2. _item_focused
          3. _item_focus_up
          4. _item_focus_down
          5. _item_focus_left : Currently this function return EINA_FALSE. It means focus will move out of genlist to the another left widget
          6. _item_focus_right : Currently this function return EINA_FALSE. It means focus will move out of genlist to the right widget
          7. _item_focus_set_hook
          8. _item_focus_get_hook
          9. _elm_genlist_focus_highlight_geometry_get
          10. _elm_genlist_focused_item_get
          11. Changes in the smart_event, smart_on_focus, pan_smart_calculate, mouse up callback.
              Currently selected/focus logic are both present in the smart_event function and its
              will be separate out.

Reviewers: seoz, woohyun

CC: singh.amitesh

Differential Revision: https://phab.enlightenment.org/D558

Conflicts:

	src/lib/elm_genlist.c
2014-03-09 01:55:40 +09:00
Daniel Juyung Seo d626f9278f genlist/list: Fixed wrong internal function name.
_list/genlist_item_focus_set --> _list/genlist_item_content_focus_set.
These internal functions set the focus to the item's content objects,
 not the item itself. So the name was wrong and very confusing.
2014-03-08 03:27:09 +09:00