Commit Graph

8 Commits

Author SHA1 Message Date
Godly T.Alias 0496b7988a Genlist Item Pin Feature
Summary:
**@feature** T6241

This feature enables genlist to pin an item to viewport which will
be available always for user to view/select.

**Use Case**:
In a big list of music, most times when user finds a song which they
like, before playing that they may want to go through the entire list
to check whether there is some other good songs, but
after seeing the entire list user have to again scroll back to the
position of item which they liked to play it then.
In this case item pinning can be used, so that the item
which they want to keep for future selection can be pinned
and then it will remain in viewport, finally when user want to do
operation on item, it will be readily available in viewport.

Signed-off-by: Godly T.Alias <godlytalias@yahoo.co.in>

Test Plan: Elementary Test -> Genlist -> Double click on items to enable/disable pinning

Reviewers: raster, cedric, prince.dubey, SanghyeonLee

Subscribers: rajeshps, jpeg, shilpasingh

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D5340
2017-11-01 16:11:30 +09:00
Jean-Philippe Andre bb38083287 genlist: (Mostly) fix item index odd/even styles
This fixes the internal item order index.

Note that groups don't reset the odd/even styles. The
original code wasn't very clear on the intent (setting
to 0 in one case, not increasing the counter in another,
but that was not consistent all over the place). I believe
resetting the odd/even styles at a group boundary would
look great, but this might be for another patch :)

This amends part of another commit, but keeps its feature:
 b40a6eb85bf44a genlist: implement list position signals.

See T3086

PS: I've discovered more odd/even issues with the
    fileselector in particular. Still working on it...

@fix
2017-02-27 09:26:41 +09:00
Jean-Philippe Andre 254ff7926b genlist: Remove macro GL_IT()
It was used to hide "it->item"... but was used less than it->item
itself. Explicit code here is not longer, and just as readable.
This macro I think was harmful to readability.

Simple sed, no real change at all.
2017-02-27 09:26:41 +09:00
Jean-Philippe Andre 3f41cdf59b genlist: Fix more tree issues (expanded state)
This fixes a lot of cases where a genlist node (of any type)
with children may have appeared in the invalid expanded or
contracted state.

Before this patch, the test case "Genlist tree, Relative insert"
looked like below (all items are programmatically added):

> A
  > 1
  > 2
> B
  > 3
  > 4

The problem above is that A and B have visible children but
still believe they are in contracted state. This patch ensures
that A and B will be marked as expanded, but will do so without
firing an "expanded" signal and definitely without the
"expand,request" signal.

After this patch, the test case will look like this:

v A
  > 1
  > 2
v B
  > 3
  > 4

Which is more correct. Note that this test case does not handle
any expand/contract signal.

NOTE: This is a behaviour break!
2017-02-22 17:05:34 +09:00
Jean-Philippe Andre fe6bdf30cd genlist: Fix sorted_insert with tree
This fixes the test case "Genlist Tree, Insert Sorted".
This is a pretty ugly patch... but the genlist code is already
pretty ugly, as it keeps a flat inlist of items (sd->items)
as well as a tree structure in parallel.

Before this patch, the following configuration led to issues:

 1
 3
 - A
 - B

Adding item "2" led to a crash. Adding item 4 led to this:

 1
 3
 4
 - A
 - B

Items A and B lost their parent "3". Subsequent sorted inserts
would lead to insane bahaviour, where for instance "8" would
appear before "3".

This patch fixes all sorted inserts, at the cost of performance
(an optimized code path is avoided). Subsequent patches will
increase the robustness of the tree structure.

NOTE: This is a behaviour break!

Fixes T4850
2017-02-22 14:46:28 +09:00
Tom Hacohen e65aae994e Eo: Finish the renaming of Eo to the EFL.
This renames all the rest of the API to the EFL namespace except for
Eo_Event that will follow soon.

Obviously breaks both API and ABI.
2016-08-15 15:07:42 +01:00
SangHyeon Lee 782f28e9a1 genlist : fix content cache issue by content_get
Summary:
genlist content_get sometimes work weird after reusable_content_get pushed.
cached content is shown even content_get function is not exist or
return NULL.
now cache check item_class instead of item style string.

Test Plan: check genlist cache in elementary_test

Reviewers: Hermet, cedric, raster

Subscribers: Jaehyun_Cho, jpeg

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

Conflicts:
	src/lib/elementary/elm_genlist.c
2016-05-12 07:12:18 +09:00
Cedric BAIL c2a1c49ab2 elementary: move all legacy files to their expected new location. 2016-03-23 13:24:41 -07:00