Commit Graph

984 Commits

Author SHA1 Message Date
ChunEon Park 91d42b500d genlist: if the item was selected, then skip item_select() procedure. 2015-01-08 23:58:11 +09:00
ChunEon Park 54b221703b genlist: simple code clean up
no logic change.
2015-01-08 23:54:37 +09:00
ChunEon Park 8c5231ca80 genlist: use eina bool 2015-01-08 23:41:29 +09:00
ChunEon Park 5cdcdf5c71 genilst: descriptive comment++ 2015-01-08 23:37:06 +09:00
ChunEon Park e7ab25d3ce genlist: remove internal callback usage.
there were multiple ports for item procedures.
one port is enough.
2015-01-08 23:23:44 +09:00
ChunEon Park a045ca8289 genilst: get rid of lazy deletion.
delete genlist item directly.
instead, remove the bunch of code that was related to lazy deletion.

we can success, if we clean up the resources and callback calls properly.
here i only found item focus callback that (may) required the lazy deletion.
2015-01-08 23:07:39 +09:00
ChunEon Park 59b32785e1 genlist: send signal to deco_all_view additionally. 2015-01-08 19:50:52 +09:00
ChunEon Park 293c5dbb13 genlist: +warning 2015-01-08 19:49:39 +09:00
ChunEon Park 6a92dc4058 genlist: make up lack of behaviors in item_disable 2015-01-08 19:47:14 +09:00
ChunEon Park 51cca32085 genlist: replace to internal call 2015-01-08 19:45:17 +09:00
ChunEon Park 6f293dcf5f genlist: +parent validation check 2015-01-08 18:10:12 +09:00
ChunEon Park 94f530fca9 genlist: code refactoring.
there are 2 variables that has same purpose.
cut off one dependency.
2015-01-08 17:55:11 +09:00
ChunEon Park a87021aba0 genlist: fix crash issue.
"selected" list has the eo list, not elm_gen_item.

this is side effect caused while on refactoring genlist.
2015-01-08 11:13:02 +09:00
ChunEon Park b92ba5eeaa genlist: add more arguments validation checks 2015-01-07 18:12:33 +09:00
ChunEon Park accdefce6f genlist: + parent validation check 2015-01-07 15:49:19 +09:00
ChunEon Park 2dd465215e genlist: code refactoring.
type check than boolean(to be removed)
2015-01-07 15:20:45 +09:00
ChunEon Park 4e8f373b7c genlist: use simple macro 2015-01-07 15:18:01 +09:00
ChunEon Park 34732967eb genlist: null check++ 2015-01-07 14:39:34 +09:00
ChunEon Park 115bfee81f genlist: clean up missing resources in genlist_clear() 2015-01-07 14:38:25 +09:00
ChunEon Park b34df7d58c genlist: cancel multi selected items.
cancel multi selected items if the multi-select mode is canceled.

@fix
2015-01-07 14:10:18 +09:00
ChunEon Park 57bf376c91 genlist: refactor code.
select/unselect items by using common select function.
2015-01-06 20:20:19 +09:00
ChunEon Park 0e939442d0 genlist: use macro as possible. 2015-01-06 15:50:30 +09:00
ChunEon Park 1b2401849a gelnist: unswallow makes sense. not smart member del. 2015-01-06 15:46:35 +09:00
ChunEon Park fa6e06a450 genlist: keep the item class as given argument. 2015-01-05 22:17:12 +09:00
ChunEon Park b79e3e4ffa genlist: Fix genlist index get bug
Because not all item block have "max_items_per_block" number of items in it's block.
So the calculation is not correct when items are added & removed in each block.

Anyhow, we need more efficient way for this API because genlist uses inlinst.
2015-01-05 20:43:58 +09:00
ChunEon Park 3695c3c0b3 genlist: add some comment in code. 2015-01-05 20:21:26 +09:00
ChunEon Park a898ca295f genlist: use macro as possible. 2015-01-05 15:56:27 +09:00
ChunEon Park a831b625b9 genlist: use ELM_NEW 2015-01-05 15:55:39 +09:00
ChunEon Park e608c88448 genilst: unselect items if the genlist select mode is display only or none.
make it behavior same with elm_genlist_item_select_mode_set()

@fix
2015-01-05 15:42:22 +09:00
ChunEon Park a0b170c2a3 genlist: unselect item if the select mode is display only or none.
@fix
2015-01-05 15:37:41 +09:00
ChunEon Park 28ac4ffe65 ggenlist: code refactoring.
don't do anything if same mode is applied.
2015-01-05 15:03:37 +09:00
ChunEon Park f3efe45e5e genlist: remove useless deco texts. 2015-01-02 20:18:24 +09:00
ChunEon Park 30a74e27da genlist: + null check 2015-01-02 20:04:55 +09:00
ChunEon Park 2ede0112bd genlist: code refactoring
refactor _item_content_realize() prototype to keep the consistency with state,text_realize()
2015-01-02 19:59:39 +09:00
ChunEon Park e89125754e genlist: code refactoring.
apply facade at _view_inflate() for simple item realization.
2015-01-02 19:45:48 +09:00
ChunEon Park a1b36ae6ee genlist: code refactoring.
remove contents_obj but use contents instead.
2015-01-02 19:04:34 +09:00
ChunEon Park 4cdcfac116 genlist: code refactoring.
remove target states strings in the widget item.
2015-01-02 17:34:05 +09:00
ChunEon Park 1470572cef genlist: code refactoring.
just clean up code. no logic change.
2015-01-02 16:54:01 +09:00
ChunEon Park a41e9d8044 genlist: refactoring code.
removed invalid content string free call.
and renamed flip_content_objs -> flip_contents.
2015-01-02 16:48:29 +09:00
ChunEon Park 60202b7f0a genlist: code refactoring.
remove contents string list that doesn't needed to keep in widget data.

next code refactoring based on this patch will be coming.
2015-01-02 16:17:16 +09:00
ChunEon Park 67e4baf1df genlist: exceptional handling.
just be hidden if contents are failed to swallow.
2015-01-02 12:14:41 +09:00
ChunEon Park 2dd05e1580 genlist: free selected items when genlist is cleared. 2014-12-31 19:55:09 +09:00
ChunEon Park ff9de8bea8 genlist: send reorder signal to decoration item and views.
Previous logic was too much stick to special case for *tizen*
let decide item styles in theme as possible.

This might break reorder group item ui, but it won't be critical.
because tizen ui only depeneded on the scenario and they don't use them anymore.

This will be much better for multiple scenario in the future.
2014-12-31 19:10:40 +09:00
ChunEon Park 4f1b1bcb9f genlist: let group item set reorder style as it needs.
we don't need to limit the group item it's reorder style.
2014-12-31 18:59:28 +09:00
ChunEon Park 66d78a4512 genlist: + warning msg for user notice
don't unrealize reordering item.
2014-12-30 17:56:24 +09:00
ChunEon Park 7dc5c3863c genlist: use convenient macro. 2014-12-30 17:36:14 +09:00
ChunEon Park 0e5b3f32d5 Revert "genlist: return as possible as soon."
This reverts commit ef56ed167206612f146d2c70f5b35a7bcd62c4c6.

This caused logic change. should not be changed.
2014-12-30 15:44:46 +09:00
ChunEon Park 10ac198400 Revert "genlist: return as possible as soon"
This reverts commit 1e6736c3a13d58c4e1a01d7e23983c721051be08.

This caused logic. should not be changed.
2014-12-30 15:43:20 +09:00
ChunEon Park 65de16477c genlist: return as possible as soon 2014-12-30 15:32:41 +09:00
ChunEon Park f86dbe4854 genlist: removed unnecessary check 2014-12-30 11:17:46 +09:00
Daniel Juyung Seo f14fa87c84 genlist: Fix internal comments. 2014-12-30 01:31:43 +09:00
ChunEon Park f9cc9863a3 genlist: return as possible as soon. 2014-12-29 22:58:38 +09:00
ChunEon Park f2b7e575f0 genlist: clean up code.
repositioned function and remove unnecessary prototype declaration.
2014-12-29 22:51:39 +09:00
ChunEon Park fb8af1004c genlist: remove duplicated signal registration. 2014-12-29 22:34:45 +09:00
ChunEon Park 1f73409844 genlist: send an additional signal
send flip disabled signal when it's state is switched.
2014-12-29 22:27:28 +09:00
ChunEon Park cce9511130 genlist: send a signal internally.
send a signal so that item set it's style according to it's depth
2014-12-29 22:16:34 +09:00
ChunEon Park 5b2493b7af genlist: send a disabled signal when the decorated item is unrealized. 2014-12-29 21:44:50 +09:00
ChunEon Park b4fe364f1b genlist: code refactoring
declare/use const strings for internal signals
2014-12-29 19:50:39 +09:00
Davide Andreoli 9988b752c7 Genlist: do not fire clicked,right while dragging in progress 2014-12-29 11:19:21 +01:00
ChunEon Park eb229ae0e2 genlist: add "scroll" smart call
@feature
2014-12-29 19:02:08 +09:00
Davide Andreoli 69b6310954 Improve -clicked- detection code by accept only if the mouse do not move too much
Too much in this case is a fixed 4px. As fingers do not have a right button I think
that taking into account finger size is not needed here.

Also someone argued about the signal name is not really correct...
should I change it to somethig like: clicked,secondary ?
2014-12-26 18:46:28 +01:00
Davide Andreoli 536c5de134 Genlist: added the clicked,right event on items
@feature
2014-12-26 17:29:51 +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 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 9b038471bf genlist: Return the correct pointer for object item.
No backport needed.
2014-12-26 14:36:36 +09:00
Andrii Kroitor 8148de6e17 elm_genlist: add missing callback call
Summary:
Added missing "moved" callback call when reordering items with keyboard
"up" and "down" arrows

@fix

Reviewers: cedric, raster, seoz

Reviewed By: seoz

Subscribers: reutskiy.v.v

Differential Revision: https://phab.enlightenment.org/D1818
2014-12-26 14:23:42 +09:00
Mike Blumenkrantz c201ec6c87 genlist should ignore no-select items when moving with the keyboard
@fix
2014-12-25 20:39:17 -05:00
Daniel Juyung Seo 4a61d3955e genlist: Fix dereference before null check.
This fixes coverity CID 1258636.
No backport needed.
2014-12-16 23:54:13 +09:00
Carsten Haitzler 17f411f6be elm - fix warnings added in f99be3a1d6bdc63153598b592b5437c33da44bf0 2014-12-16 19:36:35 +09:00
Jyotiprakash Sahoo 17419ec81c genlist: added reorder feature on key events
Summary: This feature allows user to reorder items using up/down keys.

Test Plan: elementary_test -to "Genlist Reorder Mode"

Reviewers: singh.amitesh, raster, seoz, SanghyeonLee

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

Conflicts:
	src/bin/test_genlist.c
	src/lib/elm_genlist_legacy.h
2014-12-16 18:20:32 +09:00
Daniel Juyung Seo 14e79451c2 genlist: Fix genlist crash issue when clearing genlist on item focus callback.
This fixes "genlist focus" test sample's crash issue.

@fix
2014-12-14 04:19:42 +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 dfc3f7ac30 Genlist: Fix previous commit.
The items of an item is a list of Elm_Object_Item and not of Elm_Gen_Item.
Sorry @zmike ;-)

Fixes T1859

Another fix has been added in this commit, related to relative items.
2014-11-23 09:18:42 +02:00
Daniel Zaoui 0f28743080 Genlist: Fix API return value.
elm_genlist_item_subitems_get has to return a list of Elm_Object_Item.
Because of the porting of the genlist item to Eo, this function returns
a list of Elm_Gen_Item.

Thanks to zmike and seoz for catching this.

Fixes T1859
2014-11-22 09:40:37 +02:00
Daniel Juyung Seo 7fc83c54b5 genlist: Fix build warning for uninitialized variable.
elm_genlist.c:1916:15: warning: 'eo_it' may be used uninitialized in
this function [-Wuninitialized]
2014-11-19 19:53:40 +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 ca286ea1cb Elm Genlist 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
Daniel Juyung Seo f9ec18f586 genlist: Remove unnecessary callbacks when item loop is disabled.
@fix
2014-11-07 02:20:21 +09: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
zmike 2bcbe743d1 genlist item block recalc checks now more readable 2014-10-07 14:07:13 -04:00
zmike dbc3b87b18 genlist item block recalc checks make more sense 2014-10-07 14:07:13 -04: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
Amitesh Singh b9744e58f5 genlist: Removed unnecessary casting of genlist item.
Reviewers: seoz

Subscribers: seoz

Differential Revision: https://phab.enlightenment.org/D1471
2014-09-25 01:36:03 +09:00
Jae Yong Hwang fbee0944db genlist: Fixed a crash bug in case of calling a genlist_clear in a select callback function.
Summary:
If item select callback is elm_genlist_clear and genlist object have many item, elm_genlist_clear was broken.
This reason is due to incorrect code. In Old code, check the item focus  after an item was deleted. So, I changed the order of the code.
Before item was deleted, Check the item focus.
@fix

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

Reviewers: raster, SanghyeonLee, seoz

Reviewed By: seoz

Subscribers: bluezery, SanghyeonLee

Differential Revision: https://phab.enlightenment.org/D1418
2014-09-06 01:47:55 +09:00
Daniel Juyung Seo e68db15448 genlist: added internal function _view_clear() for common codes.
Use this function for normal items, decorate items, and decorate all
items.
2014-08-22 03:44:26 +09:00
Daniel Juyung Seo 08fe37c254 genlist: merged _item_content_realize() and _item_mode_content_realize(). 2014-08-22 03:44:26 +09:00
Daniel Juyung Seo 460609ce80 genlist: moved internals functions before refactoring it.
_item_text_realize(), _item_content_realize(), and
_item_state_realize().
2014-08-22 03:44:26 +09:00
Daniel Juyung Seo 122dda0b48 genlist: Added internal functions _view_create and _view_style_update
for the commonly used codes.
2014-08-22 03:44:26 +09:00
Daniel Juyung Seo 9c81e0e02a genlist: Unbreak double click smart callback.
Fixed a typo in my commit adb976e.
2014-08-22 03:42:11 +09:00
Daniel Juyung Seo 4a398c6ee9 genlist: 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:47:24 +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
Jae Yong Hwang 9a13ed55fc genlist: Fixed item select logic when item select mode is ALWAYS.
Summary:
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/D1347
2014-08-21 22:54:22 +09:00
Davide Andreoli 4052f7521e Genlist: do not segv if the user clear the list on item double-click
@fix
moved the user callbacks call at the end of the function, so the user
is able to modify the list without making the code below the call to
fail miserably.

Also improved the Genlist Del test to also include this case.
2014-08-09 17:53:46 +02:00
Chinmaya 7dbc9f48b6 Genlist: Fixed indentation.
Summary: Fixed indentation.

Test Plan: -NA-

Reviewers: seoz, raster

Subscribers: seoz

Differential Revision: https://phab.enlightenment.org/D1269
2014-08-06 13:58:52 +09:00
Anand c464abf99b genlist: removed unnecessary EINA_UNUSED macro
Reviewers: singh.amitesh, nirajkr, seoz

Reviewed By: seoz

Subscribers: sachin.dev

Differential Revision: https://phab.enlightenment.org/D1270
2014-08-06 13:56:07 +09:00
Davide Andreoli 139a1ddb08 Genlist: 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 16:29:16 +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
Anand 8b6ac56dc3 genlist: Focus highlight when loop is enable
Summary:
This patch is dependent on D1193 and D1136.
It will be pushed after D1193 and D1136 patch.

Reviewers: singh.amitesh

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

Conflicts:
	src/lib/elm_genlist.c
2014-07-22 15:57:32 +09:00
Hosang Kim 105ee3660d genlist : Add item looping on flag.
Summary: When item looping feature is on and press up or down key, screen seems to be frozen.

Test Plan: elementary_test -to "genlist focus" -> click item looing enable -> move list up and down

Reviewers: anand.km, seoz, woohyun

Subscribers: singh.amitesh

Differential Revision: https://phab.enlightenment.org/D1193
2014-07-22 15:11:18 +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
ChunEon Park 0f6bb7fac2 genlist - fix a crash.
It allows NULL focused item.
let it null check.
2014-07-15 12:31:07 +09:00
Shobhit f4fea0abca genlist: Removed unnecessary calculation.
Summary: Removed unnecessary calculation from _elm_genlist_elm_widget_focus_highlight_geometry_get()

Test Plan: elementary_test -to "genlist focus"

Reviewers: seoz, Hermet

Reviewed By: Hermet

Subscribers: sachin.dev

Differential Revision: https://phab.enlightenment.org/D1145
2014-07-15 12:15:53 +09:00
wonguk.jeong de7dc33904 genlist: remove annoying error message
Summary:
content couldn't be always a elm widget.
After checking whether it's elm widget or not, use widget API

Test Plan:
terminology -> options -> font -> select font and check below error message

ERR<25935>:eo lib/eo/eo.c:603 _eo_call_resolve() in elm_widget.eo.c:8: you called func 'elm_obj_widget_focus_get' (213) which is unknown in class 'Edje_Object'.

Reviewers: raster, cedric, seoz, Hermet

Reviewed By: Hermet

Subscribers: seoz

Differential Revision: https://phab.enlightenment.org/D1186
2014-07-15 12:07:10 +09:00
Shobhit 32c3bf41b5 genlist: Removed unnecessary condition check.
Summary:
Removed condition check from _elm_genlist_elm_widget_item_loop_enabled_set()

Reviewers: seoz

CC: sachin.dev

Differential Revision: https://phab.enlightenment.org/D1144
2014-07-10 00:39:52 +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
Anil Kumar Nahak 2b8e6862ac genlist: focus of genlist item should adjust according to genlist's viewport
Summary: The focus of genlist should adjust its position on resizing(shrinking).

Reviewers: seoz

Differential Revision: https://phab.enlightenment.org/D1072
2014-07-03 16:39:42 +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
Anil Kumar Nahak bdb51ddd45 genlist: Focus out of genlist viewport area on resize fixed
Summary:
The focus of genlist was coming out of genlist's viewport area on resizing(shrinking).
This is fixed in this patch.

Test Plan: elementary_test -to genlist5, elementary_test -to fileselector

Reviewers: seoz, singh.amitesh, nirajkr

Differential Revision: https://phab.enlightenment.org/D949
2014-06-10 19:29:47 +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
Kateryna Fesyna 28e73198f7 Genlist: Add function to search item by string.
Summary:
This function allows user to search for item in Genlist.
It takes four search parameters:
1. pointer to function to get text of the item. It could be the same with item's
   get_text function. This parameter is added to let user use the specific search key
   and to avoid problems with setting item's text, that is not constant.
2. pointer to the item from which search should start.
3. search pattern.
4. fnmatch() flags.
To check it's usage the new test is added to the elementary_test (Genlist Item Search By Text)

Reviewers: cedric, seoz, raster

CC: reutskiy.v.v

Differential Revision: https://phab.enlightenment.org/D566
2014-05-27 15:55:05 +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
chinmaya 184c394259 Genlist: On focus_on_selection mode, the focus should set on item content objects of item type ELM_GENLIST_ITEM_TREE.
Summary:
On focus_on_selection set, the focus set on genlist item of type ELM_GENLIST_ITEM_TREE rather than
         on item content objects.

Test Plan: elementary_test -to "genlist focus"

Reviewers: seoz, eagleeye, SanghyeonLee, raster

Reviewed By: raster

CC: seoz

Differential Revision: https://phab.enlightenment.org/D899
2014-05-26 15:52:07 +09:00
chinmaya cd603fa02b Genlist: Focus does not move, if it is set on item content objects.
Summary:
If focus is set on item content object, it's treated as a
         different object which results the focus deadlock. So, every
         time whenever focus sets on item content object, we need to
         unset and set the focus on genlist object. Thanks to Seoz for
         the idea.

Test Plan: elementary_test -to "genlist focus"

Reviewers: seoz, SanghyeonLee, eagleeye

CC: seoz

Differential Revision: https://phab.enlightenment.org/D891
2014-05-26 15:45:54 +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
Daniel Juyung Seo 4f8614e866 Revert "remove all scrolling changes for focused items."
This reverts commit 377179bdaf84aa1a86621cdfa64ed43613ab9d45.

The main claim of https://phab.enlightenment.org/T1205 was fixed in
the previous commit 30cada369. This code will be modifed again in the
next commit due to the api change during development life cycle.

Note: do not blindly revert this commit if you have any problem with
widget item focus. This commit is not related to any fundamental cause
of the issues. If you have a problem, please contact me first.

seojuyung2@gmail.com or SeoZ on IRC.

Thanks.
2014-05-11 22:42:15 +09:00
Daniel Juyung Seo dfead75366 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.
2014-05-11 21:21:51 +09:00
Daniel Juyung Seo 8ffbf246f4 elm: fixed trivial formattings.
Just found them while reading codes.
2014-05-10 23:44:27 +09:00
Daniel Juyung Seo af92b3e6f9 elm: call elm_widget_item_del instead of elm_object_item_del inside elementary.
This reduces only one more function call but this makes the elm code
more consistent between widgets.
2014-05-10 23:44:27 +09:00
Anil Kumar Nahak 9d1813f7ee genlist/gengrid: Use pan object geometry for focus highlight calculation
Summary: Genlist/gengrid object geometry was used before this patch but using the pan object geometry is more correct. This can be reproduced when the size of "elm.swallow.content" part is smaller then the size of scroller object, focus animtaion on items is jerky.

Reviewers: raster, seoz, singh.amitesh

CC: nirajkr

Differential Revision: https://phab.enlightenment.org/D818
2014-05-10 01:07:58 +09:00
zmike fe4fae4954 Revert "Revert "focus: Removed unused parameter from an internal focus function.""
This reverts commit b8549f3e83a8592145a50085182583adead2c74e.

this build system is bad and whoever did the eo integration should not feel pleased with themselves.
2014-05-07 01:13:19 -04:00
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