Commit Graph

372 Commits

Author SHA1 Message Date
Amitesh Singh ab50a85937 list/genlist/gengrid/toolbar: set focus/unfocus on item when focus is actually set on widget.
Summary: @Fix

Reviewers: raster, Hermet, seoz

Reviewed By: seoz

Subscribers: seoz

Differential Revision: https://phab.enlightenment.org/D1918
2015-02-03 15:48:36 +09:00
VBS fdfde0d5e0 Gengrid: fix gengrid reorder animation bug
Summary: When gengrid reordering by thumb scroll, some items disapear on screan.

Test Plan:
1. Enabled thumb scroll in elm config
           2. Launch gengrid test in elementary_test
           3. Check reorder mode enabled
           4. Try to move reordering item to upon or lower area by thumb scrolling,
              items disapear.

Reviewers: seoz, raster

Reviewed By: raster

Subscribers: bluezery

Differential Revision: https://phab.enlightenment.org/D1852
2015-01-08 19:36:19 +09:00
Davide Andreoli a6486bc1b6 Gengrid: new signal: clicked,right with proper test
@feature
2014-12-29 11:38:17 +01:00
Amitesh Singh fc1579020c list/genlist/gengrid: Fix memory leak.
Summary: @Fix

Reviewers: kimcinoo, SanghyeonLee, raster, seoz

Reviewed By: seoz

Subscribers: seoz

Differential Revision: https://phab.enlightenment.org/D1825
2014-12-26 20:22:57 +09:00
Daniel Juyung Seo 748f86feff gengrid: Enhance realized_items_get performance. 2014-12-26 18:45:29 +09:00
Daniel Juyung Seo d47a4adae4 gengrid, genlist, list, toolbar: Fix memory leak and enhance performance.
1. Fix memory leak by freeing eina_list.
2. Enhance performance by getting the item list when it is really
needed.

@fix
2014-12-26 18:41:48 +09:00
Daniel Juyung Seo 4e6ce7da7a gengrid: Add missing "moved" callback call on item reorder by key.
This is a gengrid version of de75e6c0e852a2664c0ed022a6f79d6f431f64a0.

@fix
2014-12-26 14:33:32 +09:00
Hosang Kim 7ca7e06253 gengrid: Fix mirroring issue about key event
Summary:
Originally, key "Left" is mapped elm_gengrid_item_prev_get. But when gengrid is mirrored, key "Left" should remap elm_gengrid_item_next_get.
So I add more condition for checking mirroring.

1. reverse Left and Right key event
2. fix _elm_gengrid_item_edge_check logic
3. fix _item_show_region logic

Test Plan: elementary_test -> gengrid

Reviewers: SanghyeonLee

Subscribers: seoz

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

Conflicts:
	src/lib/elm_gengrid.c
2014-12-16 19:34:39 +09:00
Chinmaya a5c8af0493 Gengrid: Focus highlight should move to nearest visible object.
Summary:
If item_loop is not enabled, the focus highlight should move to nearest visible object
with key events.

Test Plan: elementary_test -to "gengrid 2"

Reviewers: seoz, raster

Subscribers: sachin.dev, seoz

Differential Revision: https://phab.enlightenment.org/D1261
2014-12-16 12:22:59 +09:00
Daniel Juyung Seo e31df3372c gengrid, genlist: Optimize eo item usage.
Remove unnecessary pointer reference.
2014-11-25 21:55:14 +09:00
Daniel Zaoui 05225b162e Object Items: remove data variable from widget item.
Now, data is stored in Eo layer via eo_key_data_set/get.

Two macros have been added to facilitate access.
2014-11-12 12:03:58 +02:00
Daniel Zaoui ef03bc098e Object Items: remove legacy APIs.
They are now generated by Eolian.
2014-11-12 12:03:58 +02:00
Daniel Zaoui b01d01528a Object Items: remove casts that are no more needed.
It includes casts to Eo, Elm_Object_Item and to specific items data.
This belongs to the cleaning phase of the object items porting to Eo.
2014-11-12 12:03:57 +02:00
Daniel Zaoui ae4c43d2ee Elm Gengrid Item: Migrate to Eo 2014-11-12 12:03:56 +02:00
Daniel Zaoui a9b13f7633 Elm Widget Item: Migrate to Eo
Since we want to support legacy inheritance mechanism, code is not
finished and will have to be cleaned when all the items are ported.
2014-11-12 11:52:10 +02:00
Lukasz Stanislawski 2ca1f8a75a atspi: properly include at-spi headers.
Summary:
Change requested by TAsn. Previuosly AT-SPI headers were kept private
and included directly into elementary source code. From now on,
AT-SPI headers can be included from Elementary.h public header, however
will be marked as beta APIs.

Commit includes following changes:
* include all atspi headers into new elm_interfaces.h header.
* marking all at-spi interfaces methods/properties as @protected.
* wrap all common headers with EFL_BETA_API_SUPPORT.
* make some common APIs visible in lib, by adding EAPI attribute
  (if someone decides to use beta APIs).

Test Plan: out-off tree build with gcc, g++

Reviewers: tasn

Reviewed By: tasn

Subscribers: seoz, q66, kuuko

Maniphest Tasks: T1721

Differential Revision: https://phab.enlightenment.org/D1528
2014-10-17 16:57:26 +01:00
Tom Hacohen 236bab8d53 Change according to recent Eo changes, and fix related wrong unrefs.
eo_add()'s counterpart is eo_del, not eo_unref. Regardless of that, some
objects were being double-deleted which spew out some eo errors. These
things should now be fixed.

bc6b6aa457 is the relevant EFL commit.
2014-09-30 14:54:52 +01:00
Tom Hacohen 7629c147eb Eo related: Change according to recent changes in eo_add().
For more info check out a7560dbc61 in
the EFL tree.
2014-09-25 17:39:34 +01:00
Jae Yong Hwang d84dfe2985 gengrid: Fixed item select logic when item select mode is ALWAYS.
Summary:
If gengrid select mode is not ELM_OBJECT_SELECT_MODE_ALWAYS, ELM_OBJECT_SELECT_MODE_ALWAYS mode for
elm_genlist_item_select_mode was broken. In the item select routine, item mode(it->mode) was not checked.
So, I added the check routine there.
@fix

Test Plan: I revised the elementary_test code and tested with that.

Reviewers: raster, seoz

Reviewed By: seoz

Subscribers: SanghyeonLee, bluezery

Differential Revision: https://phab.enlightenment.org/D1372
2014-08-27 21:56:38 +09:00
Daniel Juyung Seo 27346f4ecb gengrid: Deprecated elm_gengrid_page_show.
Use elm_scroller_page_show. elm_gengrid_page_bring_in was deprecated
long ago.
2014-08-27 17:24:03 +09:00
SangHyeon Lee 22d1ef2574 gengrid/popup: Fix wrong return type of _item_del_pre_hook.
Summary:
elm_widget calls _item_del_pre_hook of each widget and widget can
decide item deletion by return type. But gengrid and popup widget implemented
those _item_del_pre_hook function as a void type.
So this commit fixs the return types to Eina_Bool and changes gengrid widget to return EINA_FALSE when
the item wants to be deleted later.
And when the item wants to be deleted directly, it returns EINA_TRUE.

@fix

Test Plan: test in demo.

Reviewers: seoz, raster, bluezery

Subscribers: Hermet, jaehwan

Differential Revision: https://phab.enlightenment.org/D872
2014-08-23 01:53:08 +09:00
Daniel Juyung Seo 4b4ed72181 gengrid, list: Use newly introduced macros internally.
ELM_GENGRID_DATA_GET_FROM_ITEM and ELM_LIST_DATA_GET_FROM_ITEM.
2014-08-22 03:09:10 +09:00
Daniel Juyung Seo fc4a3a840e gengrid: Fixed ELM_OBJECT_SELECT_MODE_NONE codes and added more DISPLAY_ONLY check.
Also made an internal function to check it easily.

@fix
2014-08-22 02:48:29 +09:00
Daniel Juyung Seo 844ff540cb gengrid: Fixed _item_unselect to check select value not highlight value.
This caused infinite loop in a DISPLAY_ONLY mode on clicking an item.

@fix
2014-08-22 01:12:38 +09:00
Daniel Juyung Seo 509112325d gengrid, genlist, list, toolbar: Fixed DISPLAY_ONLY select mode for an object.
DISPLAY_ONLY select mode for elm_xxx_item_select_mode_set works fine but
elm_xxx_select_mode_set was broken.

@fix
2014-08-22 01:12:38 +09:00
zmike fc26cb04da gengrid once again selects items using keyboard when no item was previously selected
this was yet another thing broken by the mostly-unreviewed and untested widget item focus feature. it's still not completely fixed, since the reorder modes are broken, but at least it works for the general case again

@fix
2014-08-10 14:30:34 -04:00
Davide Andreoli 922055f9c7 blank line --
Remove an unwanted blank line from my previous commit
2014-08-09 15:59:39 +02:00
Davide Andreoli 3235f96eb1 Gengrid: fix position calculation
@fix
To calc the position in a table you need to make the modulo of the col/row size, not the modulo on the x/y value

This unbreak the elm_gengrid_item_pos_get() function that was reporting wrong values
2014-08-09 15:47:59 +02:00
Carsten Haitzler b0d9d4977d elm gengrid - fix CID 1222464
it's possible to have a NULL item in this code - also missing a valid
return at the end (though code path never gets there).
2014-08-08 16:23:10 +09:00
Davide Andreoli 0aae7d2b4e Gengrid: fix search_by_text_item_get() text_get call
The text_get function was called with the wrong params, now its usage is consistent with the rest of the code.
2014-08-01 17:28:24 +02:00
Lukasz Stanislawski 09b9ef0bc0 atspi: expose more actions through atspi bus.
Summary:
Main purpose of exposing widget actions and keyboard shortcuts
is to allow accessibility clients to implement alternative methods
of GUI navigation.

Reviewers: z.kosinski

Reviewed By: z.kosinski

Subscribers: seoz

Differential Revision: https://phab.enlightenment.org/D1227
2014-07-25 11:58:16 +02:00
Carsten Haitzler e741a19b21 fix genlist/grid search item patch to be simpler and just better
better - why?

1. no reliance on fnmatrch headers - have special enums for this so
fnmatch is an internal detail (casefole may not exist)
2. don't leak strduped strings - free them when done
3. have the same code for genlist and grid (dup for now until an
interface makes it the same search interface)
4. improve docs
5. get right @since version
6. use label get func in item class - providing a func won't work when
multiple items of multiple classes exist in the list
2014-07-24 12:41:33 +09:00
Jyotiprakash Sahoo d9f14f194b gengrid: Add function to search item by string.
Summary: This function allows user to search for item in Gengrid.

Test Plan: elementary_test -to "Gengrid Item Search By Text"

Reviewers: seoz, singh.amitesh, Hermet, raster

Differential Revision: https://phab.enlightenment.org/D1178
2014-07-23 11:35:20 +09:00
Amitesh Singh 92f928dd4d gengrid: corrected the reorder start and end evas smart callback call.
Summary: @fix

Reviewers: seoz, raster

Reviewed By: raster

Subscribers: raster, seoz

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

Conflicts:
	src/lib/elm_gengrid.c
2014-07-21 19:14:40 +09:00
Anil Kumar Nahak 76e3372531 Focus: first item should be focused when there is no focused/selected item
Summary: First item of widget should be focused when focus comes to the widget for first time.

Test Plan:
elementary_test -to "Genlist Focus"
elementary_test -to "Gengrid Focus"
elementary_test -to "List Focus"
elementary_test -to "toolbar Focus"

Reviewers: seoz

Differential Revision: https://phab.enlightenment.org/D1135
2014-07-21 18:55:55 +09:00
Daniel Juyung Seo e7e1b39014 gengrid, list: removed unnecessary condition check.
This is a successive commit of aac6e071e.
2014-07-10 00:46:52 +09:00
Amitesh Singh 04bbda8911 gengrid: Added normal reorder type
Summary:
- Added Elm_Gengrid_Reorder_Type enum
- Added API elm_gengrid_reorder_type_set()
- Implemented the normal reorder type animation
- The old reorder type is changed to ELM_GENGRID_REORDER_TYPE_SWAP.
- ELM_GENGRID_REORDER_TYPE_NORMAL is the default reorder type.

Test Plan:
1. elementary_test->"Gengrid Focus"
2. Enable "Reorder Mode Enable"
3. Move the items by keys

@feature

Reviewers: raster, seoz

CC: seoz, chinmaya061, aryarockstar

Differential Revision: https://phab.enlightenment.org/D813
2014-07-09 15:09:43 +09:00
Chinmaya 84f5de5a74 Gengrid: In reorder & sd->horizontal mode, the condition must be checked for item_loop_enable set or not. Also added a check button to enable reorder mode in gengrid 2.
Summary:
The bug was there when reorder mode and sd->horizontal mode is enabled but item_loop_enable
is not set, then also the loop was occuring with right key event.

Test Plan: elementary_test -to "gengrid 2"

Reviewers: raster, seoz, eagleeye, SanghyeonLee

CC: seoz

Differential Revision: https://phab.enlightenment.org/D1121
2014-07-07 12:30:21 +09:00
Amitesh Singh 24ce4835c1 list/genlist/gengrid/toolbar: removed unused smart data member prev_focused_item.
Reviewers: raster, seoz

CC: seoz

Differential Revision: https://phab.enlightenment.org/D1119
2014-07-07 12:20:54 +09:00
Zbigniew Kosinski 9ce23f0004 atspi:Set roles for widgets
Reviewers: stanluk, m.jagiello, raster

Differential Revision: https://phab.enlightenment.org/D930
2014-06-11 11:07:16 +09:00
efl b087e80e9b Gengrid: Added horizontal item loop feature.
Summary:
If item loop is enabled, the item moves infinitely in
         horizontal manner (from right to left and from left to
         right).
         Need to implement:
             -for reorder mode and horizontal mode.
         @feature

DEPENDs On D841

Test Plan: elementary_test -to gengrid2

Reviewers: seoz, eagleeye, SanghyeonLee, raster

CC: seoz, raster

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

Conflicts:
	src/lib/elm_gengrid.c
2014-06-10 15:00:09 +09:00
Carsten Haitzler f4faf5d54a fix whitespace formatting 2014-06-07 14:57:44 +09:00
abhi e45774f6f2 gengrid: fixed _elm_gengrid_item_edge_check for ELM_FOCUS_DOWN and ELM_FOCUS_UP for normal and horizontal mode
Summary:
Added fixes for:
1.Normal mode: ELM_FOCUS_DOWN and ELM_FOCUS_UP
2.Horizontal mode: ELM_FOCUS_DOWN and ELM_FOCUS_UP

(i)

1|2|3
4|5|6
7|8|9

_elm_gengrid_item_edge_check for ELM_FOCUS_DOWN returns EINA_TRUE for item no.6.
It should not. Fixed this.

(ii)

1|2|3
4|5|6
7

_elm_gengrid_item_edge_check returns EINA_FALSE for ELM_FOCUS_DOWN
for item no. 5 and 6 but EINA_TRUE for item no. 7.
It should return EINA_TRUE for item no. 5 and 6 instead.
Fixed this.

(iii)

1|2|3
4|

_elm_gengrid_item_edge_check returned EINA_FALSE for ELM_FOCUS_UP
for item no. 3. Fixed this.

(iv)

1|4|7
2|5|
3|6|

Horizontal Mode: _elm_gengrid_item_edge_check returned EINA_FALSE
for ELM_FOCUS_DOWN for item no. 7. Fixed this.

(v)

1|4|7
2|5|
3|6|

Horizontal Mode: _elm_gengrid_item_edge_check returned EINA_FALSE
for ELM_FOCUS_UP for item no. 1. Fixed this.

Test Plan: elementary_test -to gengrid2

Reviewers: seoz, raster

CC: singh.amitesh, raster

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

Conflicts:
	src/lib/elm_gengrid.c
2014-06-07 14:56:06 +09:00
Tom Hacohen efa41c7d75 Elm: Update code to use the new class names generated by eolian. 2014-06-03 11:54:44 +01:00
efl a6e1a0e2c8 Gengrid: Fixed _elm_gengrid_item_edge_check for ELM_FOCUS_LEFT and ELM_FOCUS_RIGHT in horizontal mode.
Summary:
1|4         _elm_gengrid_item_edge_check for ELM_FOCUS_LEFT returns EINA_FALSE for item no. 3,
2|          which should return EINA_TRUE. Fixed this.
3|

1|4|7|      _elm_gengrid_item_edge_check for ELM_FOCUS_RIGHT returns EINA_FALSE for item no.5,
2|5|        which should return EINA_TRUE. Fixed this.
3|6|

Test Plan: elementary_test -to gengrid2

Reviewers: seoz, eagleeye, SanghyeonLee, raster

CC: seoz, raster

Differential Revision: https://phab.enlightenment.org/D846
2014-05-28 18:21:11 +09:00
Daniel Juyung Seo 7357290056 genlist: fixed wrong item focus set on item_focus_set API call.
Reset the last_focused_item on _item_focus_set_hook.
This fixes the issue which sets the focus to the wrong item when the
focus is set by an API.

Reproduction step:
elementary_test -> genlist focus -> click an item (not the 2nd item) -> click "Focus 2nd
Item after 1.5 seconds" button.
Focus is not moved to the 2nd item.

@fix
2014-05-26 22:08:13 +09:00
SangHyeon Lee c565ec1cde [Gengrid] Fix gengrid item position update bug, when item is reordered or deleted.
Summary:
When gengrid item is reordered or deleted, gengrid didn't update item's position.
         This Patch update item's position when item is placed. if middle of item deleted,
         every item after the deleted one, will re-postion on _item_place function, so they
         will be update there position well.

Test Plan:
modify test_gengrid grid_sel fuction to print there position. so when item selected,
           they print there position and it works fine both horizontal and vertical.

Reviewers: bluezery, seoz, raster

Reviewed By: raster

CC: Hermet, chinmaya061

Differential Revision: https://phab.enlightenment.org/D855
2014-05-15 12:13:23 +09:00
nirajkr 495fe1462c gengrid : Fix the issue to skip disable item in item select
Summary:
Fix to skip the item which is disabled and select the next item to the
         disabled item
         @fix

Reviewers: seoz, raster

CC: seoz, singh.amitesh

Differential Revision: https://phab.enlightenment.org/D700
2014-05-14 20:50:11 +09:00
Daniel Juyung Seo a64e8eed91 focus: update the focus in_theme status on each item's focus set.
As widget and widget item can have different in_theme value (since
 30cada369), we need to update in_theme value whenever the widget or
widget item get the focus.

Applied this logic to genlist, gengrid, toolbar first.
List focus is not working well at the moment.

This fixes small focus highlight on the left top corner of genlist
when the genlist scroller is clicked before the genlist is focused.

Special thanks to zmike for the report.
2014-05-12 01:25:43 +09:00
Daniel Juyung Seo 45e8b4c82e focus: Change new API names related to focus auto scrolling.
elm_config_focus_auto_scroll_bring_in_enabled_get/set()
 ->
elm_config_focus_autoscroll_mode_get/set()

The main reason is that bring_in_enabled_get/set() APIs are too restricted
and thus not flexible. I got more requirements for the focus autoscrolling
such as none, wholely visible not just bring_in and show. So it is correct
to add mode_set/get() APIs for the focus auto scrolling.

Thanks god, we've found this before the release :)

@feature
2014-05-11 22:46:16 +09:00