Commit Graph

143 Commits

Author SHA1 Message Date
Jean-Philippe Andre 6864495c99 elm: Move elm_layout_sizing_eval to legacy
elm_layout_sizing_eval() marks an object as requiring recalc.

Unfortunately, it's been massively abused by various widgets into
actually doing the calc, or the min calc. So we end up with one API
that has 3 different definitions depending on the widget type:
1. Mark as requiring recalc (correct, respects doc, elm_layout)
2. Calculate min size and other size hints
3. Actually do some geometry modification

I believe we need to clarify these 3 requirements into 3 very clear
and specific APIs in elementary. Right now we have similar functions
in evas for 1 (evas_object_smart_changed) and 3 (smart_calculate).
But their exact definition also isn't necessarily what we want for
elementary.

Another clear problem is that layout_eval does not do any calculation
(in theory), so the "eval" word is a bit of a stretch here.

Once we're sure about the exact API we want, we can add this back to
EO and make it work across our EO widgets. For now let's just keep
the legacy API, and its EO overrides, as is.

Ref T5315
2017-08-08 11:10:56 +09:00
Jean-Philippe Andre ad7e16bcf4 layout: Use only legacy "elm_layout_sizing_eval"
This removes all uses of elm_obj_layout_sizing_eval.

Ref T5315
2017-08-04 11:52:16 +09:00
Jean-Philippe Andre aebd37cab8 layout: Remove sub_object_add_enable
Same as the previous patch. This was an ugly hack. Use another
one instead.

Ref T5315
2017-08-04 11:52:16 +09:00
Amitesh Singh 7fa14e5cc6 genlist: fix multiple focus edje signal issue
We need focus edje signal when item is focused or the already
focused item realizes. its wrong to call focus signal on
_elm_genlist_item_state_update()

fixes T4969
2017-07-11 15:17:09 +09:00
Jean-Philippe Andre 242127a96b evas,edje,elm: Mark all legacy objects as such 2017-07-07 13:21:18 +09:00
Amitesh Singh 0141417d5d genlist: move to next focusable/selectable item when looping
this fixes a bug in genlist when scrolling is enabled and
items at top and bottom are disabled. Focus behaviour is not normal
in case up arrow is pressed when focus is at the top enabled item
or down key is pressed when focus is at bottom enabled item.

fixes T5576
2017-06-30 12:21:20 +09:00
Mike Blumenkrantz 990a9d485d elm_list/genlist/gengrid: don't unselect items when moving the mouse out of them
this seems wrong since it's using smart object geometry to determine
event-based positioning within an edje object. considering it from a user pov,
it definitely is wrong because why would you deselect items based on mouse
movement?

ref D2622
ref da81eff897

@fix
2017-06-23 17:43:44 -04:00
Jean-Philippe Andre ed41adf791 widget: Implement mirrored from Efl.Ui.Base
Ref T5363
2017-06-14 11:02:05 +09:00
SangHyeon Lee d1a5df7055 elementary: fix recursive content group calculation in genlist
Summary:
There are several problem is left on recursize content calc.
previously genlist only calculate size of layout class,
but after recursive content group calculation patch,
layout couldn't get proper size because sizing eval is
not pre-processed.

Test Plan: elementary test working fine.

Reviewers: jpeg, cedric, raster, conr2d

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2017-06-12 10:13:05 -07:00
Jean-Philippe Andre 06b14827b7 widget: Implement scale from Efl.Ui.Base 2017-06-12 11:50:30 +09:00
Jeeyong Um 02893c39ba Genlist: Calculate the min size of content before item realize
Summary:
Genlist item doesn't change its size when its content size is changed,
but its size is determined in realization.
Therefore, deferred calculations for content should be performed immediately
before swallowing it by genlist item.

Test Plan: make and run attached sample

Reviewers: jpeg, SanghyeonLee, cedric

Differential Revision: https://phab.enlightenment.org/D4705
2017-06-09 15:09:12 +09:00
SangHyeon Lee dc98fd4f5e elm_gen : apply Elm_Theme_Apply enum return types for theme_object_get of item view.
elm_widget_theme_object_get now return Elm_Theme_Apply enum not bools.
only ELM_THEME_APPLY_FAILED case, need to re-apply default item edje.

Signed-off-by: SangHyeon Lee <sh10233.lee@samsung.com>
2017-06-02 10:32:07 +09:00
Jean-Philippe Andre 55b529cebc evas/elm: Make group_add/group_del internal functions
This hides those two legacy functions from the EO API.
2017-05-19 14:07:00 +09:00
Carsten Haitzler 706c7f9e3b genlist - fix coverity complaint about null check
we checked for null and then just used a null return later inthe loop.
this fixes that. this should fix CID 1360955
2017-04-18 17:30:50 +09:00
Godly T.Alias 5cba6a5857 Genlist: Performance optimization for genlist in non-filter cases
Summary:
When _item_filtered_get is called, block and pan re-calculations
happen, When there is no filter applied, we can skip item filtering to
avoid some unwanted calculations

Reviewers: cedric, raster, SanghyeonLee

Reviewed By: raster

Subscribers: rajeshps, Princekrdubey, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4759
2017-04-13 16:40:29 +09:00
Jean-Philippe Andre 76b5749ea0 genlist: Fix another issue with insert sorted
Fixes T5274

@fix
2017-03-20 22:25:32 +09:00
Jean-Philippe Andre 83619af10a genlist: Fix a leak
Thanks @herdsman
2017-03-14 23:07:34 +09:00
Jean-Philippe Andre fbe72f6e4b genlist: Fix some more decorate mode issues
The item, after having been unswallowed from its decorate
item, becomes unclipped and unparented. The parent was well
reset, but the clip wasn't.

Test case:
  elementary_test -to "Genlist Decorate Item Mode"

I'm sure some bugs are still lurking. Genlist is so lovely.

Fixes T1551
2017-03-14 14:04:39 +09:00
Jean-Philippe Andre 635b4ad8f3 genlist: Make sure only one item is decorated
In "Genlist Decorate Item Mode" after decorating a few items
(rotate or slide, doesn't matter), only one item or none should
be decorated. Scrolling up and down the genlist should work just
fine. This fixes massive render issues and inconsistent states
of the items in this test case.

"rotate" mode is still going nuts.

Ref T1551
2017-03-14 11:04:16 +09:00
Jean-Philippe Andre ab735ada77 genlist: Make logic more readable 2017-03-14 11:04:16 +09:00
Jean-Philippe Andre f1974b7b1c genlist: Fix invalid call to stack above/below
Test process:
  elementary_test -to "Genlist Decorate Item Mode"

Slide any item to the right, observe error logs.

Ref T1551
2017-03-14 11:04:16 +09:00
Jean-Philippe Andre 6c62ae3e6e Revert "Genlist: Calculate the min size of content before item realize"
This reverts commit 60566ca34d.

This broke the layout in "Genlist Full Widget"
2017-03-10 15:20:22 +09:00
Jeeyong Um 60566ca34d Genlist: Calculate the min size of content before item realize
Summary:
Genlist item doesn't change its size when its content size is changed,
but its size is determined in realization.
Therefore, deferred calculations for content should be performed immediately
before swallowing it by genlist item.

Test Plan: make and run attached sample

Reviewers: cedric, SanghyeonLee, jpeg

Reviewed By: jpeg

Differential Revision: https://phab.enlightenment.org/D4705
2017-03-10 14:59:48 +09:00
Jean-Philippe Andre fc40d3d559 genlist: Fix invalid state of reused content
If an item is marked as disabled it should be re-enabled
before being put in the reusable contents cache. Otherwise
a following use of this object may result in a disabled
item being used, making the UI effectively disfunctional.

Also modify the test case to show and test this behaviour.

Add an efl_isa() to protect calls to elm_widget APIs.

Fixes T5236

@fix
2017-03-10 11:22:13 +09:00
Jiwon Kim e6a1e456cb genlist: Remove weird behavior about item_show, bring_in
Summary:
When if item_show / bring_in is proceeded as 'deferred_show'
sequence, Scrollto_Type does not be checked perfectly.
As a result,
ELM_GENLIST_ITEM_SCROLLTO_NONE and any other integer values
are worked such as ELM_GENLIST_ITEM_SCROLLTO_BRING_IN.

As doxygen of Elm_Genlist_Item_Scrollto_Type,
ELM_GENLIST_ITEM_SCROLLTO_NONE and other incorrect number
should not work.

Fixes T4854

@fix

Reviewers: SanghyeonLee, woohyun, jpeg

Reviewed By: jpeg

Subscribers: id213sin, conr2d, cedric

Maniphest Tasks: T4854

Differential Revision: https://phab.enlightenment.org/D4684
2017-03-02 16:43:47 +09:00
Jean-Philippe Andre 726994d175 genlist: Final fix for odd/even styles issue
The key was to emit & process the signal to the edje objects
(item views) at the same time as we move them, ie. from the
loop in _item_block_position().

Also the proper counting must be used at all times. Hidden
items should not be counted.

Tree effect may still have issues but otherwise there is no
more blinking, double odd or even rows, etc... It all looks
good (as long as there is no tree effect!).

Fixes T3086

@fix
2017-02-27 16:26:41 +09:00
Jean-Philippe Andre 3574eb8c07 genlist: Fix fileselector crazy behaviour
When using the fileselector in tree view mode (ie. expandable),
expanding any folder with a lot of files in it would cause the
genlist view to jump somewhere to the bottom. This is because
the mechanism preventing the view from moving was assuming that
all "prepend" operations meant prepending before the selected
item. This is not the case in case of expansion like in the
fileselector.

@fix
2017-02-27 16:26:41 +09:00
Jean-Philippe Andre 380759a89e genlist: Fix rare jump in prepend insert
If an item is selected, and another item is insert before
the selected item, then we try to lock the genlist view (pan)
around the selected item (if it's visible). Unfortunately,
every 16 inserts cause a jump by one line in the scroller.
That's because the scroll math assumes the block position is
known, but since it's a new block it wasn't known.

This patch fixes this issue by precalculating the block position.

Test scenario:
 elementary_test -to "Genlist Tree, Insert Relative"

Select an item, clikck 50 times on "+ before".
The view should not jump.

This does not fix fileselector's craziness.

@fix
2017-02-27 16:26:32 +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 519b782ff2 Revert "elm_genlist: when appending items to the parent, prepend to the parent"
This reverts commit 43d82e567a.

I don't understand this commit. It broke the logical order of
items, as the internal list wouldn't match the order on screen.
Other places in the code didn't seem to make this assumption
that parents come after their children. And for sure my recent
fixes require the parent to come before.

This commit was one of the many reasons why odd/even styles
look often wrong.

See T3086
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 6245639b9c genlist: Simplify code (remove one argument)
Parameter "qadd" is always true when calling _item_process_post(),
so simplify the code by removing it.
2017-02-22 17:05:34 +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 aa5414f95d genlist: Fix insert after with a tree
This fixes a case where inserting item "C" after item "B" in this
tree would go wrong:

A
B
- 1
- 2

Before this patch, 1 and 2 lose their parent:

A
B
C
- 1
- 2

After this patch, 1 and 2 retain their parent:

A
B
- 1
- 2
C

Insert before worked by luck, no need to fix it.
Note that this patch may require the next one to actually
work (ensuring expanded state flag).

NOTE: This is a behaviour break!
2017-02-22 17:05:08 +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
Amitesh Singh b66dd0635f genlist: remove uncessary _item_cache_zero call
_item_cache_zero() is already getting called in _mirrored_set

Signed-off-by: Amitesh Singh <amitesh.sh@samsung.com>
2017-02-15 16:00:15 +05:30
Jean-Philippe Andre a568d26f72 evas & elm: Fix invalid uses of efl_data_ref(obj, NULL)
The data class should be specified for debug purposes.
Also, this fixes invalid uses inside the smart object
implementation where it assumed that the smart data was part
of the eo data. It may not (legacy objects).
2017-02-15 15:35:38 +09:00
Minkyu Kang 669d95252a elm_genlist: do not check scroll if show_item is NULL
Summary:
If show_item is NULL then does not need to check scroll.
But, sometimes show_item is NULL but check_scroll is true.
It was wrong and can makes a crash.

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>

Reviewers: cedric, Hermet, SanghyeonLee, raster

Subscribers: jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-02-07 15:14:54 -08:00
Amitesh Singh 7a5e64ef90 genlist: fix mem leak on focus next
This patch fixes an eina list mem leak on each
focus next(tab/alt-tab) traversal.

@fix
2017-01-24 22:50:24 +05:30
SangHyeon Lee 7b6cd2862d genlist : fixing wrong item realize bug when block is changed
Summary :
If current realized item is changed to another block which
was unrealized, item still stay in realized states because
new block is unrealized.
so when adding item to new block, adding realized state check
to change block realized state correctly.

Test Plan :
The issue is happen in eflete edc group list view.
when you expand and contract the tree view, if child is
bigger then block size, items under the current tree still
floating on the child items.

Signed-off-by: SangHyeon Lee <sh10233.lee@samsung.com>
2017-01-04 14:32:14 +09:00
SangHyeon Lee 3d13678450 genlist : initialize disabled content for reusing
initialize disabled content for reusing again.

Signed-off-by: SangHyeon Lee <sh10233.lee@samsung.com>
2017-01-04 14:26:22 +09:00
Jee-Yong Um 6d0a2398ad Elm.Widget: rename "event.*" methods to solve name conflict
Summary:
Elm.Widget.event_callback_add conflicts with Efl.Object.event_callback_add.
To solve this problem, "widget_" prefix is added to methods starting with
"event".

Reviewers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4521
2017-01-03 10:59:49 +09:00
Hermet Park 436e07277e elementary genlist: code refactoring.
removed duplicated logic and add a descriptive comment.
2016-12-07 14:17:33 +09:00
jinwoo.shin 825af0c89c genlist : fix cannot scroll to item after call elm_genlist_item_update
Summary: Fix cannot scroll to item after call elm_genlist_item_update

Test Plan: https://phab.enlightenment.org/T4974

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: SanghyeonLee, minkyu, cedric, jpeg

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D4460
2016-12-07 13:57:56 +09:00
Shinwoo Kim e648f1e85e [elementary][atspi] change accessible description to char* from const char*
Summary:
The accessible name is char*, this could confuse API user.
If we provide user callback to get description, an user would return allocated string.
The usage of elm_interface_atspi_description_get/set should be same with elm_interface_atspi_name_get/set

Reviewers: lukasz.stanislawski, cedric, raster

Reviewed By: raster

Subscribers: stanluk, jpeg

Differential Revision: https://phab.enlightenment.org/D4378
2016-11-10 11:11:48 +09:00
Daniel Zaoui 773c56c645 Genlist: remove callback from correct object
Edje callback was removed from genlist instead of its Edje object.
2016-11-09 07:42:57 +02:00
Jean-Philippe Andre 8a9f0bd603 evas/elm: Remove function group_resize
This is an override of efl_gfx_size_set. Same as before, the
order of operations matter so it is possible that a corner
case will break. In particular, legacy code was:
 - intercept
 - smart resize (do stuff), super, super, super
 - evas object resize

The new code is more like:
 - intercept
 - super, super, super, evas object resize
 - do stuff

But unfortunately this broke elm_widget (read: all widgets) as
the internal resize was done before the object resize. So,
inside the resize event cb, the resize_obj size would not match
the smart object size. >_<
2016-10-12 11:25:56 +09:00
Jean-Philippe Andre 11b7cf6b72 evas/elm: Remove function group_move
This is an override of efl_gfx_position_set.
As for the other patches, I hope I didn't break anything.

A problem likely to happen is that the super call was inserted
too early or too late in the call flow. For instance:

  _myclass_position_set(obj, x, y) {
    position_set(super(obj), x, y);
    position_get(obj, &prevx, &prevy);
    do_something_with_delta_xy();
  }

The above code flow is obvisouly wrong, but may have crept in this
patch (such a bug sneaked in inside smart object, breaking
everything at first).
2016-10-12 11:25:56 +09:00
Minkyu Kang ec8487a8a4 elm_genlist: apply the item_select_on_focus_disable feature on key_action_move
Summary:
Previously, focused item was always selected on first and last key action.
If item_select_on_focus_disable is true, item should not be selected.

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: jinwoo.shin <jw0227.shin@samsung.com>

Test Plan: elementary_test -to genlist

Reviewers: cedric, SanghyeonLee, Hermet

Reviewed By: Hermet

Subscribers: sju27, seoz, jpeg

Differential Revision: https://phab.enlightenment.org/D4272
2016-09-01 20:20:53 +09:00
Tom Hacohen d5e321466e Efl object: Rename Eo_Event -> Efl_Event.
This is the last step of the Eo renaming efforts.
2016-08-30 13:34:10 +01:00
Vitor Sousa 8356b16a49 Efl Object: remove legacy callback calls from event_callback_call
Efl.Object.event_callback_call no longer calls legacy smart callbacks;
calling only event callbacks registered with the given event description
pointer.

Create the method Efl.Object.event_callback_legacy_call to inherit the old
behavior from Efl.Object.event_callback_call, calling both Efl.Object events
and legacy smart callbacks.

Update all other files accordingly in order to still supply legacy
callbacks while they are necessary.
2016-08-26 15:45:07 -03:00
Jean-Philippe Andre 3b175fd7e9 elm: Fix some ERR messages following previous patch
This simply avoids calling functions on NULL objects, since
the previous patch would ERR out rather than silently ignore
the problem.

I just add explicit NULL checks before calling the functions,
so it's clear the object could be NULL (in the widget).
2016-08-26 17:15:05 +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
Vyacheslav Reutskiy 5135867218 elm_genlist: unhighlight item if it not selected
Summary:
Main trouble in handle click and double click event.
If user hold Esc and do double click on genlist item,
it still highlighted but not selected, because between
click and double click genlist process a key down event.
This patch add check the item state on mouse up, check
a item state - if item highlighted but not selected,
unhighlight it.

@fix
Fixes T3986

Test Plan:
1. run elementary_test Genlist
2. hold ESC
3. double-click on few genlist items

Reviewers: raster, cedric, NikaWhite

Subscribers: seoz, jpeg

Maniphest Tasks: T3986

Differential Revision: https://phab.enlightenment.org/D4222
2016-08-15 16:16:52 +03:00
Tom Hacohen c662934be8 Change the EFL to follow the new Eo rename. 2016-08-11 17:04:43 +01:00
Carsten Haitzler 5f224a6671 efl - elm genlist - clean up sanghyeon's patch to be less code
use if not while, no first, and timing checkis already done at end so
remove from if/while. cleaner now.
2016-07-29 11:57:10 +09:00
Carsten Haitzler 518c59166c fix warnings in sanhyeons's patch/fix 2016-07-29 11:52:02 +09:00
SangHyeon Lee 8d8d08effa genlist: fix memory-leak in filter queue and refactoring queue iteration
Summary:
There are critical memory-leak in filter queue process.
         It looks typo so I fix it and refactoring queue iteration logic to spend
		 less time in for and while loop.

Test Plan: Tested by filter elementary test

Reviewers: shashank0990

Reviewed By: shashank0990

Subscribers: raster, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4170
2016-07-29 11:29:25 +09:00
Jinyong Park 3271ec8d18 theme: return enum from elm_widget_style_set instead of bool
Summary:
if trying to apply incorrect theme, widget apply default theme and return TRUE.
so there is no way to check it really apply correct theme.
To resolve this problem, _elm_theme_set return three type enum

* related history : 4ca3ef4514
* elm_object_style_set is public api, so I didn't change it.
* typedef name [ Theme_Apply ] is temporarily, please suggest better one.

@fix

Reviewers: singh.amitesh, herb, Hermet, cedric, jpeg, raster

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4073
2016-07-01 15:09:43 +09:00
Jee-Yong Um 834dd49944 genlist: scroll to item when calc is done
Summary:
If elm_genlist_item_bring_in() is called immediately after appending
item, genlist will not scroll to the last one but stop in the middle.
This patch blocks genlist from scrolling to not calculated item.

Test Plan:
1. Download F31560 and uncompress the file
2. make
3. ./test

Reviewers: SanghyeonLee

Subscribers: cedric, DaveMDS, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-06-23 10:09:15 -07:00
Jean-Philippe Andre 7bf8da2baa evas: Rename Evas.Object to Efl.Canvas.Object
One step closer to make the EO inheritance tree look like
it's all Efl.
2016-06-21 14:35:19 +09:00
Tom Hacohen 6202cc7485 Adjust the code according to the eo event stop changes.
This was changed in the previous commit.
2016-06-20 18:02:00 +01:00
Jean-Philippe Andre 52f9220b3f Evas: Rename smart object into Efl.Canvas.Group 2016-06-17 19:32:43 +09:00
Jean-Philippe Andre 42b63f5507 Evas: Add smart_ prefix to all smart functions (eo)
This is a first step at separating legacy smart
object features away from standard efl interfaces.
2016-06-17 19:25:48 +09:00
Jean-Philippe Andre 9a052a740d Evas: Move smart_callbacks_descriptions to legacy 2016-06-17 19:25:47 +09:00
Jean-Philippe Andre b2355d7da3 Evas: Rename Selectable_Interface to Efl.Ui.Selectable 2016-06-10 18:06:15 +09:00
Jean-Philippe Andre 31c4fd1f7c Evas: Rename Scrollable_Interface to Efl.Ui.Scrollable 2016-06-10 18:06:15 +09:00
Jean-Philippe Andre d67171940f Evas: Rename Draggable_Interface to Efl.Ui.Draggable 2016-06-10 18:06:10 +09:00
Jean-Philippe Andre e691de04be Evas: Rename Clickable_Interface to Efl.Ui.Clickable
Event prefix is efl_ui:
 EFL_UI_EVENT_CLICKED
 EFL_UI_EVENT_CLICKED_DOUBLE
 ...

The event prefix could be reduced to efl but I personally
prefer with UI.
2016-06-10 17:33:53 +09:00
Jean-Philippe Andre 37625fca91 Evas/Edje/Elm: Use combined_min instead of min everywhere
This allows apps to set the objects min size with hint_min,
while letting the rest of EFL define the minimum size with
rstricted_min.

I don't like the property names much...
2016-06-09 16:37:49 +09:00
Tom Hacohen a6a2338962 Revert "Eo: Remove eo_del() and make eo_unref() the replacement."
This reverts commit 546ff7bbba.

It seems that eo_del() is useful and removing it was creating bugs.
The issue is that the way we defined parents in eo, both the parent and
the programmer share a reference to the object. When we eo_unref() that
reference as the programmer, eo has no way to know it's this specific
reference we are freeing, and not a general one, so in some
circumstances, for example:
eo_ref(child);
eo_unref(child); // trying to delete here
eo_unref(container); // container is deleted here
eo_unref(child); // child already has 0 refs before this point.

We would have an issue with references and objects being freed too soon
and in general, issue with the references.

Having eo_del() solves that, because this one explicitly unparents if
there is a parent, meaning the reference ownership is explicitly taken
by the programmer.

eo_del() is essentially a convenience function around "check if has
parent, and if so unparent, otherwise, unref". Which should be used when
you want to delete an object although it has a parent, and is equivalent
to eo_unref() when it doesn't have one.
2016-06-01 13:33:21 +01:00
Jaehwan Kim 62cf70034d widget: set the parent-child relation again, when the widget is unset
Summary:
When the widget is unset from any container, a parent of the widget
doesn't exist. So we should set its parent to the top object.
But if we just set sd->parent, the parent can not find the widget as a
child. So the container widgets set the parent-child relation when
sub object is unset.
This commit is related to 0822ad2195.

@fix

Test Plan:
Check this issue.
https://phab.enlightenment.org/D3855
The unset widget don't added any widget as child.
So when it set scale, the widget can not reload the thmeme.

Reviewers: raster, cedric, Hermet, reutskiy.v.v

Reviewed By: Hermet, reutskiy.v.v

Subscribers: cedric, jpeg

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

Conflicts:
	src/lib/elementary/elm_mapbuf.c
2016-05-30 09:49:04 +09:00
SangHyeon Lee 89d886af48 genlist: process message before restricted calc for get proper size of text and content visibled
Summary:
genlist text_get and content_get send signal for visibled or re-arrange
it's part on edc.
this singal may need to be processed before calculating item edc for
proper result.

we cannot call one only one time in realized function, because, size
must calculated before the realized callback, and user can send
customized signal in their realized callback which also need to be
processed.

Signed-off-by: SangHyeon Lee <sh10233.lee@samsung.com>
2016-05-24 14:14:24 +09:00
Cedric Bail 45bc4f30eb efl: change name of animator,tick event in C. 2016-05-18 02:20:13 -07:00
Tom Hacohen 546ff7bbba Eo: Remove eo_del() and make eo_unref() the replacement.
We used to have eo_del() as the mirrored action to eo_add(). No longer,
now you just always eo_unref() to delete an object. This change makes it
so the reference of the parent is shared with the reference the
programmer has. So eo_parent_set(obj, NULL) can free an object, and so
does eo_unref() (even if there is a parent).

This means Eo no longer complains if you have a parent during deletion.
2016-05-17 16:23:23 +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
Mike Blumenkrantz 51e86a4c0d elm_genlist: throw CRI when group item insertion fails
this really needs a better solution since it results in a blank genlist
item space, with the item itself typically located somewhere offscreen due
to caching
2016-04-30 14:31:29 -04:00
Mike Blumenkrantz 43d82e567a elm_genlist: when appending items to the parent, prepend to the parent
the parent/group item is located after its child items in the list of items,
so if an item is appended to the parent's list of items then it must be
prepended to the parent or else it will end up being in the wrong group

@fix
2016-04-30 14:26:51 -04:00
Mike Blumenkrantz 5c933b0176 elm_genlist: accurately handle contents for cached items
more fixes for the comically unreviewed revision from elm which continues
to cause bugs months after it was pushed

ref 4c86a66f28876b68e92a90c8f741eed1130dd034 (elm)
ref e88423e994
2016-04-30 13:53:46 -04:00
Mike Blumenkrantz 673f703bb0 elm_genlist: outdent _item_content_realize() harder
no functional changes
2016-04-30 13:53:41 -04:00
SangHyeon Lee 0181a940f1 Revert "genlist: recalc item size after item content field updated"
This reverts commit b48d3eb04e.

This patch can be occurred performance issue.
update is needed for only non-homogeneous case.
I'll revert patch and update new patch in phabricator for check.
2016-04-28 16:04:54 +09:00
SangHyeon Lee 5f7f59b3d8 Revert "genlist: scroll to item when calc is done"
This reverts commit 87b12327c3.

This patch occurred some side effect.
Need to fix the code without any side effect.
2016-04-28 16:04:54 +09:00
Andrii Kroitor 802e671cda elementary: fix genlist tree filters
Summary:
In tree mode if parent item is hidden all its subitems should also be hidden.
@fix

Reviewers: Hermet, raster, cedric

Reviewed By: cedric

Subscribers: jpeg, reutskiy.v.v

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-04-26 14:54:39 -07:00
Vyacheslav Reutskiy 287f84baaf elm_genlist: fix the sorted insert after expanded tree item
Insert a new item after subitem of ELM_GENLIST_ITEM_TREE item, if
it expanded.

@fix
2016-04-26 15:16:09 +03:00
SangHyeon Lee c5427e875d genlist : arrange focus set in mouse up
Summary :
when mouse up happens, item must be focused, and after that,
select must be called.
current logic, focus is already called inside the select function
and again focus set is called in the end of mouse_up,
so if user new focused widget inside the select callback,
mouse_up forcely take the focus into the item again.
select callback should comes after the focus callback calls
to work properly.

@fix
2016-04-22 16:08:25 +09:00
SangHyeon Lee 81f45c1b90 genlist: call update_job after smart_calculation done
Summary :
if item_update happens before the smart calcuate finished,
item can be delayed updated(next frame).
to prevent this issue, if unsolved job is remaining after
smart calc done, call update_job directly and remove job.

@fix
2016-04-19 18:43:55 +09:00
SangHyeon Lee b48d3eb04e genlist: recalc item size after item content field updated
Summary :
after item content fields updated, item and block should be
recalculated about it's height because content size can be updated.
if do not recaculate, items can be overlapped.

@fix
2016-04-19 14:57:45 +09:00
Jee-Yong Um 87b12327c3 genlist: scroll to item when calc is done
Summary:
If elm_genlist_item_bring_in() is called immediately after appending
item, genlist will not scroll to the last one but stop in the middle.
This patch blocks genlist from scrolling to not calculated item.

Test Plan:
1. Uncompress attached file
2. make
3. ./test

Reviewers: cedric, SanghyeonLee

Reviewed By: SanghyeonLee

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3861
2016-04-19 14:00:42 +09:00
Shuhrat Dehkanov eae53f2218 genlist: do not evaluate against max coord if the value is negative
Summary:
If x is already less than '0', there is no need to check if it is
bigger than pan_max_x. Likewise, if y is already less than '0',
there is no need to check if it is bigger than pan_max_y.

Reviewers: Hermet, cedric, SanghyeonLee, singh.amitesh

Reviewed By: singh.amitesh

Subscribers: seoz, minkyu, sju27, jpeg

Differential Revision: https://phab.enlightenment.org/D3865
2016-04-11 17:44:56 +05:30
SangHyeon Lee c0bbf53cb9 support elm_object_item_style_set/get on genlist items 2016-04-01 16:53:57 +09:00
SangHyeon Lee fc2f341e41 fix item_class refcount bug when class updated 2016-04-01 16:40:16 +09:00
SangHyeon Lee e8c3346379 fix genlist content leak in reausable case 2016-04-01 16:26:57 +09:00
Cedric BAIL c2a1c49ab2 elementary: move all legacy files to their expected new location. 2016-03-23 13:24:41 -07:00