Commit Graph

64 Commits

Author SHA1 Message Date
Youngbok Shin 32f8e0c726 elementary config: Fix to use ELEMENTARY_BASE_DIR for configure path
Summary:
"--with-elementary-base-dir" option was ignored by recent patches on elm_config.
The macro is being used in elm_theme. It should be syncronized.
The default value of the macro is ".elementary".

@fix

Test Plan: N/A

Reviewers: raster, cedric, jpeg

Reviewed By: jpeg

Differential Revision: https://phab.enlightenment.org/D5755
2018-01-23 11:27:55 +09:00
Thiep Ha 35339504b0 dnd: add efl_ui_dnd_container
efl_ui_dnd_container is the interface of dnd for container objects.
2018-01-11 17:56:24 +09:00
Carsten Haitzler 9bedda14b3 efl loop - rename ecore_main_loop_get to efl_main_loop_get
ecore_main_loop_get() is really a new "eo api" but it's using our old
ecore_* namespace, so move to the new efl namespace.
2018-01-02 16:13:54 +09:00
Jean-Philippe Andre ff24ac2d6d efl: Reset ecore event types on init
This fixes cycles of init/shutdown/init where ecore event types would
become invalid, since they are now stored in a dynamic array rather than
a statically stored array.

The risk here is that if a module of EFL tends to init/shutdown in a
"normal" scenario then the event type array will grow in a leaking
manner. This could be fixed by resetting those event ID's only when the
loop actually exits (EFL_EVENT_DEL on the main loop). I'm not using
EFL_EVENT_DEL in this patch as this would add too many event callbacks
to the main loop object, which may result in slightly slower event calls
to it, affecting the overall performance.
2017-12-19 11:14:37 +09:00
Amitesh Singh 19e70a8e1f Efl.Ui.Slider: replace default with on_drag in visible_mode enum.
Ref T6376
2017-11-17 14:38:32 +09:00
Cedric Bail cd1f5915d2 elementary: add an interface to enable/disable PAUSE/RESUME application state.
If you want to have EFL application behave in a more efficient way. Like dropping
memory usage or stopping unecessary network operation, this option should be on
and the application should listen on PAUSE/RESUME event on the main loop.
2017-11-15 16:28:20 -08:00
Cedric BAIL f75eb62c55 elementary: don't forget to destroy weak ref when free the iterator. 2017-10-26 10:42:25 -07:00
Mike Blumenkrantz fd00e3de1a elm_config: add offline and powersave config members
these will be used by enlightenment in the future to notify applications of
global system states

@feature
2017-10-25 10:44:16 -04:00
Carsten Haitzler 7f12ca0f84 elm config - check if _elm_config is null - makes coveirty happy
it really should never be null though... or else really bad things
just happened (allocations failed etc.)
2017-10-20 18:30:03 +09:00
Carsten Haitzler 64529eac19 elm config - finish flagging all other values that can be set by api
this now means any app that called elm_config_*set on any field at all
will keep what it set forever until it changes it even if shared/core
config changed.
2017-10-19 17:32:47 +09:00
Carsten Haitzler a04d8a929a elm config - track which vars you set locally and keep them as-is
this now flags about 1/4 of the config vars in elm config if you set
them locally so they wont change on conifg reload. i have just started
and this is the first batch. needs more work.
2017-10-19 17:32:47 +09:00
Jean-Philippe Andre 24c0eced77 config: Simplify EO API
This is:
 - using a property (but terribly ugly due to the ownership on the
   returned value)
 - removing an unused function

Note: This interface Efl.Config covers only elm_config for now. But it's
very generic and could be used in the future for application specific
configuration.
2017-10-18 19:32:00 +09:00
Prince Kumar Dubey 28ce98c411 elementary: fix double assignment
Summary: local variable "bp" assigned twice unnecessarily. The duplicate assignment is removed.

Reviewers: raster, cedric, jpeg

Subscribers: jpeg, rajeshps

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2017-10-17 11:03:24 -07:00
Carsten Haitzler 6f9857ccab elm config - fix eina value setting to check get return
fix CID 1357139
2017-09-29 12:26:57 +09:00
Cedric BAIL 8e5a79f957 elementary: don't crash if API is called after shutdown. 2017-09-26 10:15:07 -07:00
Jean-Philippe Andre f3c9d25c1f elm: Properly unregister providers on shutdown
This should fix some errors in make check with CK_FORK=no

Test:
  <efl/build>/src$ CK_FORK=no ./tests/elementary/elm_suite elm_config

@fix
2017-09-26 17:58:07 +09:00
Carsten Haitzler 50487b4575 efl po files - fix LTR/RTL translation string to be correct for langs
also add the comment in the code for trsanslators

@fix
2017-09-19 16:09:21 +09:00
Jean-Philippe Andre 8f10ed091c efl_config: Fix type of returned value (EO)
An ugly const char * is returned from strdup, freed later with a custom
function that just calls free(). This was probably intended for
stringshare but now free is used. We have to fix the free function for
the EO API so let's keep free(). I'd rather avoid declaring
elm_config_profile_dir_free in the EO files.
2017-09-01 10:09:37 +09:00
Cedric BAIL d179a5c2a9 efl: remove PS3 backend.
This backend has received no patch and maintenance from anyone who could
actually test it over the last few years. After talking with KaKaRoTo it
is best to remove it. If anyone want to take over its maintenance, you
are welcome to revert this patch.
2017-08-25 10:48:42 -07:00
Jean-Philippe Andre b588cefbae config: Automatically fix some key bindings
This changes the name used in the config file, without changing the
system config files yet. This restores key bindings for:
 - Win
 - Image
 - Video
 - Photocam

See also the previous commit.
2017-08-23 11:16:45 +09:00
Jean-Philippe Andre fb57bc0106 elm_config: Add env var to skip profile save
This only skips writing the profile name to
  ~/.elementary/config/profile.cfg

This allows easier testing of elementaryt apps (and E) with custom
profiles.

export ELM_PROFILE_NOSAVE=1
2017-08-18 16:38:15 +09:00
Thiep Ha 5f2e4b9197 elm config: add more NULL check
Add NULL check when we cannot allocate memory.
2017-06-14 10:44:39 +09:00
Shilpa Singh cab2516257 elm_config: password mode change should reflect on already running applications.
Summary:
When password mode is changed, the change has to reflect on already running
apps as well. config_sub_apply will not be called for an already running app.

Test Plan:
1. 2 running process
2. Change the config value of password last show in one process
3. Check whether the change has reflected in previous process.

Signed-off By: Shilpa Singh<shilpa.singh@samsung.com>

Reviewers: jpeg, cedric, thiepha

Subscribers: govi, rajeshps

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-06-05 13:44:51 -07:00
Carsten Haitzler 46bfd7ffb9 elm config - reload at runtime - fix env var overrides being lost
if you set config via environment variables then sa config
update/reload may end up overriding these again whenever it is updated
and thus may result in scaling or other things suddely changing

@fix
2017-04-10 11:05:56 +09:00
Cedric BAIL 93b63b48e8 elementary: avoid crash during shutdown due to Ecore_Event queue. 2017-03-09 16:17:58 -08:00
Chris Michael 0a9542e223 elementary: Fix issue of trying to init ecore_wl2 if DISPLAY is set
Small patch to fix an issue that Derek brought up ... that is
basically, if you try:

WAYLAND_DEBUG=1 WAYLAND_DISPLAY=wayland-0 terminology while inside an
X11 environment, then elm_config would try to initialize ecore_wl2
even when running under X11.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-02-27 12:35:58 -05:00
Carsten Haitzler b8af191a20 fix entry selection by having proper cfg update and def fields
this should fix T5183
2017-02-17 17:21:20 +09:00
Carsten Haitzler 0356b1eb5e vpath usage - simplify to bare minimum to make gustavo happy
since these are only local path resolves, the do and wait are
technically not needed. also remove any other tmp strings
and use the vpath string resolving feature to avoid
printfs/strjoins/cats etc. etc. as well.

also remember to remove old name string from evas shm code - it worked
for me. i guess i was lucky and it happened to be NULL thus free was
fine.
2017-02-10 19:27:15 +09:00
Derek Foreman 2800038ee2 Revert "vpath usage - simplify to bare minimum to make gustavo happy"
This reverts commit 2037474dc0.

This causes the wayland_shm engine to seg fault immediately at
startup when attempting to create shm buffers.

Please make sure when committing changes to the wayland_shm engine to
test on intel, exynos, and at least one platform without dmabuf
capabilities - or using the EVAS_WAYLAND_SHM_DISABLE_DMABUF env var
to disable dmabuf on intel or exynos.

Anyone without the time or hardware to fully test changes to wayland_shm
can submit a patch to phabricator and assign it to me so I can fully
test it before landing.
2017-02-09 09:17:38 -06:00
Carsten Haitzler 2037474dc0 vpath usage - simplify to bare minimum to make gustavo happy
since these are only local path resolves, the do and wait are
technically not needed. also remove any other tmp strings and use the
vpath string resolving feature to avoid printfs/strjoins/cats etc.
etc. as well.
2017-02-09 22:06:16 +09:00
Carsten Haitzler d345b899b2 elm config - handle setuid apps correctly and dont create junk dirs in .
this fixes a bug where elm_cofnig would firstly use
~/.config/elementary which isnt what we have used before and so would
break older config. also it'd create junk if it was setuid. fix this.

@fix
2017-02-09 18:38:28 +09:00
Carsten Haitzler 2cdc63024d elm config - forbid bakcslash in profile name too
/ already is forbidden but \ might be valid on windows, so forbid it
too.
2017-02-08 21:19:39 +09:00
Carsten Haitzler 944ce7ef41 elm config - handle profile name of ".." as its obviously invalid
this forbids .., as a profile name in addition to the existing "stip /
from profile name".
2017-02-08 21:19:39 +09:00
Jee-Yong Um ab68723b60 elm.entry: add configuration for the default value of select_allow
Summary:
Small devices (like smart watch) can disallow entry selection by default.
This patch enables to control this behavior with elementary configuration.

Reviewers: cedric, jpeg

Subscribers: id213sin, woohyun

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-02-07 14:17:47 -08:00
Alok Mishra b1f1cd14c2 elm_config: fix for dereferencing after comparing to NULL
Summary:
arr has been checked earlier so as to avoid when it is NULL.
If there is a possibility of being NULL earlier
then it should be checked even when freeing.
So added the NULL check before free.

@fix

Reviewers: singh.amitesh, bu5hm4n, tasn, cedric, raster, atulfokk, hyunseok, minkyu, Hermet, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4537
2017-01-02 15:14:13 +09:00
Stefan Schmidt 74914c0515 elm: config: check return value of eina_value_get instead of returning always TRUE
There is always a chance that eina_value_get will not return EINA_TRUE here so
better check it and use it as return value directly.

CID: 1357138
2016-12-05 17:07:39 +01:00
Jean-Philippe Andre 8c8cb0d34f elm: Safely delete ecore poller in elm_config_shutdown
This prevents some errors after elm_init / elm_shutdown / elm_init
2016-11-23 13:53:51 +09:00
Stefan Schmidt 4f13e49d2a elm_config: set default year for minimal to 1970
This aligns with the docs we have and also makes sense when taking UNIX time
in consideration.

Fixes T4617
2016-11-22 16:30:30 +01:00
Amitesh Singh 0bcb0302fb efl_ui_clock: Merge datetime/dayselector/clock widgets into efl_ui_clock.
Summary:
Datetime widget is module based, so datetime widget is used as base for efl_ui_clock and merged dayselector/clock features into efl_ui_clock.
Added day selection and seconds support in efl_ui_clock.
 Added clock features like auto updation of time, stop timer etc in efl_ui_clock.
 Added API to enable/disable edit_mode. efl_ui_clock can be configurable to display either only day/date/time or display any two of them or display all three.
Added efl_ui_clock.c and test_ui_clock.c. Theme and Module is added in another patch by Amitesh.

Original author is Yeshwanth <r.yeshwanth@samsung.com>. I have polished this patch a bit and make it compatible with current EFL code.

Test Plan: test_ui_clock

Reviewers: bu5hm4n, tasn, yashu21985, jpeg, cedric, raster

Subscribers: CHAN, woohyun

Differential Revision: https://phab.enlightenment.org/D3938
2016-11-03 12:00:17 +05:30
Jaehyun Cho c54e750040 elm_config: Remove unnecessary NULL check.
Since _config_load() is called and _elm_config is not initialized, NULL
check for _elm_config is not necessary.
The unnecessary NULL check causes false alarm because _elm_config is not
checked in other cases.
2016-09-26 18:47:35 +09:00
Thiep Ha 3689a803db elm_config: add null check before usage 2016-09-21 17:03:14 +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
Jean-Philippe Andre b29847e0da wayland_egl: Fix double free in case of failure
When trying to create a window, the WL EGL engine creates
an ecore_evas and connects to the wayland display. But if
EGL is not supported (in weston with nvidia for instance),
the egl initialization fails and the window must be detroyed
in order to fallback to wayland_shm.

This led to a double disconnect from the wayland display
as both the ecore_evas del and the error handling code
were trying to disconnect.

Also, use ref == 0 in two places rather than ref <= 0, as
it can prevent double frees in bad situations (ref < 0).
And reset a global variable to NULL on shutdown.
2016-08-11 11:37:41 +09:00
Stefan Schmidt 4f840c5feb elm: config: fix API naming to use disabled instead of disable to unify
We use disabled across our APIs so better fix this new one to unify it before
we release. This was introduced in commit 0116e07288

Many thanks to DaveMDS for reporting this!
2016-08-09 16:26:49 +02:00
Carsten Haitzler 9e09c46574 elm config - dont rescale ui if no config that needs rescale changed
also finger size, and other thigns that could affect ui look that may
need elm rescale to work.

this fixes T4296

@fix
2016-08-06 18:10:36 +09:00
Jonghee Choi 09b01de58a [CONFIG] call elm_rescale() only when scale value is changed
Summary: it doesn't need to call elm_rescale() in _config_flush_get() when the scale value is not changed.

Reviewers: jaehwan, cedric, raster

Subscribers: minkyu

Differential Revision: https://phab.enlightenment.org/D4186
2016-07-29 11:44:40 +09:00
Carsten Haitzler 9f2ba9834e elm config - fix previous commit missing strdup
oops - accidentally removed the strcpy. fix
2016-07-12 18:23:12 +09:00
Carsten Haitzler 1ec9ee2a92 elm config - use eina_str_tolower not tolower from libc 2016-07-12 18:20:34 +09:00
Carsten Haitzler 2936834d31 elementary - fix focus switching again after break
this fixes T4053

this was due to everal widgets haveing changed their class names and
are using the new names for mapping to keybinding config that used
legacy names to match binding to widget.
2016-07-12 18:06:13 +09:00