Commit Graph

53 Commits

Author SHA1 Message Date
Vyacheslav Reutskiy f9702fe1f9 elm_fileselector: made fileselector styling more flexible
Previously the progressbar in fileselector use hardcoded style name
"wheel", that made unpossible to create different style for
fileselector. This commit made it possible.

@fix
2017-04-26 11:16:01 +03:00
Daniel Kolesa b780cf2af2 eo: move unbindable event APIs to C
In a few classes, this requires some manual expansion. This should
not break anything but it's also fairly ugly; a better solution
would be appreciated, for now we do this.

Similar changes will be done to a few other Efl.Object APIs as
well at later point.
2017-04-20 18:24:38 +02:00
Vyacheslav Reutskiy c4e7d611d6 elm_filselector: don't force the icon size
A icon in the files view, mode grid, should not apply size bigger then
swallow for it. This commit additional fix for
52ddf9331a
2017-04-18 11:32:52 +03:00
Vyacheslav Reutskiy 52ddf9331a elm_fileselector: fix thumbnail size for other themes bisides default
Elm_fileselector has the hardcoded value for calculate the item size
with thumbail, this size was 16, it's looks like thumbnail size plus
labal text height, but hardcoded value haven't effect to scale. Other
problem with items without labels. As a result we have correct
thumbnail size only with default theme and with scale 1.0.

This commit made the item size accordingly to size what user set. It's
made more clearly this API behavior.

@fix
2017-04-18 10:04:07 +03:00
Vyacheslav Reutskiy 0ecf3c6906 fileselector: apply style for files view
By some reason style does not applyed to genlist/gengrid in
fileselector. Also fixed issue with applyed style for files view on
change mode.  Now this problem is fixed.

@fix
2017-04-18 10:04:07 +03:00
Jean-Philippe Andre abcd918946 fileselector: Add missing call to group_del
Remove unused refcount thingy and enforce call to smart del.

Fixes T4598
2017-02-15 20:11: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
Mykyta Biliavskyi f967c4dea5 Fileselector: make parse path string windows platform support.
On windows platform file path contain '\\' instead of '/'.
Test plan:
   - on windows platform launch elemntary_test -to fileselector.
   - type something into search entry.

@fix
2016-12-27 10:17:43 +02:00
Cedric BAIL 8a471e96be elementary: fix conversion mistake from Eina_Promise to Efl_Future in file selector. 2016-11-07 11:29:23 -08:00
Jean-Philippe Andre bd9c752d3f elm: Fix elementary uninstalled eo headers
This fixes compilation for terminology for example.
Thanks to @Etrunko for the report.

Note: My builds originally worked fine because my installed
      include folder contained the old files :(
2016-10-27 10:00:08 +09:00
Jean-Philippe Andre faa1ab56e4 fileselector: Fix eio model usage (future_all)
The value stored by efl_future_all is an accessor, not an
iterator. This fixes the usage of promises internally to
the fileselector widget.

See 1a2014a122

Fixes T4686
2016-10-06 09:43:19 +09:00
Felipe Magno de Almeida 1a2014a122 efl: Update Efl.Model to use new Efl_Promise and Efl_Future
Replaced all Eina_Promise_Owner and Eina_Promise with Efl_Promise and
Efl_Future.
2016-09-29 13:12:27 -03:00
WooHyun Jung 241196641f elm fileselector: add null checking before strlen 2016-09-20 13:40:37 +09:00
Vitor Sousa 35ecfcd650 elm fileselector: fix legacy methods for Entry and Button
Some legacy functions that works with string paths were not redirecting for
the correct code when called with Elm.Fileselector.Button or
Elm.Fileselector.Entry.
This commit fixes this problem.

@fix
2016-09-14 21:04:00 -03:00
Tom Hacohen 9c779dca90 Rename efl_self to efl_added
It has been discussed on the ML (thread: "[RFC] rename efl_self") and
IRC, and has been decided we should rename it to this in order to avoid
confusion with the already established meaning of self which is very
similar to what we were using it for, but didn't have complete overlap.

Kudos to Marcel Hollerbach for initiating the discussion and
fighting for it until he convinced a significant mass. :)

This commit breaks API, and depending on compiler potentially ABI.

@feature
2016-09-05 16:59:56 +01: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 3f5149a675 elm fileselector: fix events that must be using Efl.Model objects
Use the new behavior of Efl.Object.event_callback_call to correctly
update events to pass Efl.Model objects while still suppling path
strings for legacy smart callbacks.

Override Elm.Fileselector.event_callback_legacy_call in order to separate
the types of any incoming event call that uses Efl.Model.
2016-08-29 12:22:22 -03:00
Vitor Sousa 5d2948b016 elm fileselector: fix possible premature deletion of Listing_Request struct
In a case where eina_promise_then is executed immediately (like with some
quick and light Efl.Model), the Listing_Request struct will be prematurely
freed in the first iteration of the child processing loop, because the
item_total counter had not accumulated the right number of items yet.

With this commit, we traverse the children accessor first, so we can know
the number of items.

Also, no longer use the Listing_Request pointer after the loop, once it
may have been deallocate already.
And put a note about this too.
2016-08-26 19:45:26 -03:00
Jean Guyomarc'h 92d3fc8f4f elementary: better error handling of fileselector 2016-08-26 21:16:39 +02:00
Jean Guyomarc'h 0874c4da38 elementary: prevent double free
This one is a bit tricky... When we create the aggregated
promise, if one of the properties of the model returns an
error, the eina_promise_then() will immediately call the
error callback. In this happened for the first item, the
total items in the listing request would be 1.

Before this commit, we tested for incremented the processed
counter and compared it to this total count. If it was
greater or equal, we would free the common listing request.
But in the case of successive failures, we would set the
total counter to 1, then the processed counter to 1 and
therefore free. Then increment the total counter to 2, then
then processed counter to 2, and free again... which would
cause an abort() from the libc or something else nasty.

Now we just decrease the total count of items. We avoid
the cases and double frees, without leaking.
2016-08-26 21:16:39 +02:00
Jean Guyomarc'h 322adb2e03 elementary: make sure we don't iterate out of bounds
The carray iterator will end iterating only when it finds a NULL
object. We must make sure the last element of the array is NULL
to avoid out of bounds access.
2016-08-26 21:16:39 +02: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 d504284dd2 efl: Rename Efl.Event.XX to Efl.Input.XX
This removes:
 Efl.Event interface

And renames:
 Efl.Event.Input -> Efl.Input.Event
 Efl.Event -> Efl.Input.Event (merged)
 Efl.Event.Pointer -> Efl.Input.Pointer
 Efl.Event.Key -> Efl.Input.Key
 Efl.Event.Hold -> Efl.Input.Hold

This also moves some interfaces from efl/ to evas/ where they
belong better.

This allows renaming Eo_Event to Efl_Event.
2016-08-26 10:18:01 +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
Tom Hacohen c662934be8 Change the EFL to follow the new Eo rename. 2016-08-11 17:04:43 +01:00
Carsten Haitzler 0bcd4f73d2 elm filesel - handle api that might provide path too big for buffer
this addresses a path that could be too small (unlikely due to max
path generally being 4k), for a stack buffer. this should make
coverity happy. fix CID 1356634
2016-08-08 18:38:25 +09:00
Jean-Philippe Andre 28c917836c efl: Cleanup some code (return values)
This removes some useless code in various places, where the
switch from eo_do() to standard function call was not properly
refactored.

This changes:

type ret = 0;
ret = my_eo_function();
return ret;

To:

return my_eo_function();
2016-08-05 10:32:30 +09:00
Vitor Sousa 7efa27faed elementary: fix legacy path set/get for Fileselector specializations
Fix legacy functions elm_fileselector_path_get and
elm_fileselector_path_set.
Make these functions call the correct function when called with a
specialization of Elm.Fileselector (instead of the base class function).

Create internal versions of path set/get functions to avoid warnings
about deprecated function calls.

Fix T4198

@fix
2016-07-27 18:09:23 -03:00
Chris Michael a89186069e elementary: Remove logically dead code
Coverity reports that this is logically dead code. As we check the
validity of 'model' above this function, then testing 'model' for
validity again in this expression is just logically dead.

Fixes Coverity CID1356617

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-07-21 12:58:03 -04:00
Cedric BAIL 03915fc07b elementary: switch code accordingly to use new ref version. 2016-07-13 16:06:30 -07: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
Vitor Sousa c951b6b754 elementary: Use callback array for monitoring callbacks in fileselector
Use callback array to register/unregister monitoring callbacks in
fileselector for added safety and consistency.
2016-06-21 14:04:38 -03: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
Jean-Philippe Andre 2f0b9edbb4 elm: Fix obvious warning (leak / typo)
warning: ignoring return value of function declared with
warn_unused_result attribute [-Wunused-result]

Thanks GCC for pointing out the leak.
2016-06-21 13:54:06 +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
Vitor Sousa 434421021d elementary: Fix fileselector directory monitoring events
@fix
2016-06-17 16:40:49 -03: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
Felipe Magno de Almeida 8e4f383d61 efl: Move promise parameter to return in data model
Summary:
Instead of:

efl_model_property_get("name", &promise);

now:

promise = efl_model_property_get("name");

Reviewers: stefan_schmidt, cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D4038
2016-06-16 22:01:07 -03:00
Larry Jr 963d2af974 elementary: fixed wrong error msg in fileselector 2016-06-14 20:57:05 -03:00
Jean-Philippe Andre 77bd2819b9 fileselector: Remove usage of eo evas object events 2016-06-14 16:27:42 +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 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
Chris Michael 7d18eb8dac elementary: Remove unused variable
Gcc says that 'model' is unused here, so comment it out

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-06-07 07:58:19 -04:00
Vitor Sousa 77a2e9744d elm: Add support for Efl.Model in Elm.Fileselector
Elm.Interface.Fileselector now supports Efl.Model objects, allowing users
to work with paths from different data models.

Example of model attribution:

ELm_Fileselector *fs = eo_add(EFL_FILESELECTOR_CLASS, NULL);
Efl_Model *model = ...;
elm_interface_fileselector_model_set(fs, model, NULL);
2016-06-06 04:30:22 -03:00
Cedric Bail 75a53ece10 eo: for consistency use object like all our API. 2016-05-18 08:18:04 -07:00
Andy Williams 36113b1535 elementary: fix a few non-standard icon names
moving the widgets away from non-standard names.
Tidy the icon sets to clarify what's standard.
2016-04-27 00:01:08 +01:00
Tom Hacohen f14305024e Eo event: rename Eo_Event->event_info to Eo_Event->info.
The previous naming was redundant and too long.
2016-04-12 15:23:55 +01:00
Jean-Philippe Andre 7c05a957cd elm: Fix some warnings with clang
warning: missing field 'desc' initializer
         [-Wmissing-field-initializers]

Solution: use gcc extension to init structs with {}.
This is a bit ugly, but having too many warnings leads to
ignoring them and not noticing valid ones.

The warning is triggered because the first member of Eo_Event
is not a primitive type (it's a struct _Eo_Opaque *).
2016-04-06 16:28:28 +09:00