Commit Graph

743 Commits

Author SHA1 Message Date
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
zmike f3f83a64fd @fix homogeneous genlist recalc on theme change
fix T1023
2014-03-02 15:04:07 -05:00
Daniel Juyung Seo 1a29ad5679 elm: removing trailing white space ceremony for 1.9 release. 2014-03-02 00:52:26 +09:00
Andy Williams 6e71ec05f7 Revert "oops, a mistake in T966 fix that could cause a segv"
This reverts commit b7d1cb531d1e196dee5f93dd4457e68df2692ed3.
2014-02-22 12:40:20 +00:00
Andy Williams a5f38fe810 oops, a mistake in T966 fix that could cause a segv 2014-02-19 18:32:58 +00:00
Andy Williams 72191ab692 Fix T966, sort order of child folders.
Comparison was being incorrectly applied for child elements - they need to be treated differently if there are no siblings
2014-02-19 10:30:50 +00:00
Andy Williams d1534e4aa9 Fix issue where items added into tree with more than 2 levels could be rendered at the wrong location in the list.
Fix this by ensuring items are attached after all items below the current node rather than only below those at the current level of children
2014-02-15 20:23:18 +00:00
zmike 7899534662 +elm_genlist_item_subitems_get() 2014-02-08 16:03:25 -05:00
zmike a3ff700982 +genlist_item_subitems_count()
group apis are currently pretty lacking. there should probably be functions for iterating over subitems in addition to this one
2014-02-08 01:16:06 -05:00
Jaehwan Kim db23689614 access: Add smart signal "access,changed"
It occurs that access mode is changed.
Application can add this callback for each widget.
2014-02-08 14:05:14 +09:00
WooHyun Jung 0a1179dde4 elm_layout now supports focused/unfocused smart callback
by itself for widgets that inherit layout class.
If it uses elm_widget's, smart callback will be called at the
beginning or smart_on_focus function.
2014-02-06 16:18:57 +09:00
ChunEon Park dbacb2fef9 elementary - send signal "language,changed" with one way in the widget.
Call the smart callback in the widget infra so that each widget don't need to hook the smart_translate only for the smart call.

This makes reducing duplicated code and supporting language,chagned from all widgets.
2014-01-23 19:30:34 +09:00
ChunEon Park aebdcff513 elementary - use the focused/unfocused string in widget defined.
Now, it will share the strings so that reduce the binary size also user uses it in one way.
2014-01-23 17:27:17 +09:00
Daniel Juyung Seo 0d1ac0fa05 elm: Removed unnecessary null check for eina_list_free. 2014-01-22 10:55:01 +09:00
Daniel Juyung Seo db5fe2581d elm: Removed unnecessary null check for evas_object_del. 2014-01-22 10:54:52 +09:00
Daniel Juyung Seo 43533a2fb9 elm: Removed unnecessary null check for eina_stringshare_del. 2014-01-22 10:54:45 +09:00