Compare commits

...

18 Commits

Author SHA1 Message Date
Dmitri Chudinov e371555774
Merge branch 'ecore-glib' 2023-12-13 20:47:45 +05:00
Dmitri Chudinov 7d74e3fad8
Merge branch 'devs/dimmus/elm_config_icons' 2023-12-13 20:46:49 +05:00
Dmitri Chudinov 32e5fb84b0
Merge branch 'devs/dimmus/elm_config_profile' 2023-12-13 20:46:33 +05:00
Dmitri Chudinov 72d191bde7
Merge branch 'devs/dimmus/ecore_evas_sdl_fix' 2023-12-13 20:45:19 +05:00
Dmitri Chudinov 5f2df980ac
Merge branch 'devs/dimmus/examples_ecore_audio_fix' 2023-12-13 20:45:00 +05:00
Dmitri Chudinov c67c6ccc01
Merge branch 'devs/dimmus/elua_fix_fix' 2023-12-13 20:44:29 +05:00
Dmitri Chudinov 67dde68af7
elua: move err label to ENABLE_LUA_OLD defined branch 2023-12-06 20:30:35 +05:00
Dmitri Chudinov 986c4f9214
elua: solve discarded 'const' qualifier warning 2023-12-06 20:28:06 +05:00
Dmitri Chudinov d87e2f54df
examples: solve EFL_BETA_API_SUPPORT redefinition warning 2023-12-06 20:20:40 +05:00
Dmitri Chudinov 20e4c949df
ecore_evas_sdl: add attribute to unused parameter
Test with -Dsdl=true
2023-12-06 20:03:11 +05:00
Dmitri Chudinov 45d7e64775
elm-config: correct wrong "if" statement
If nothing is selected then nothing to disable.
"If" statement did not work here until now.

Test:
1. Run elementary_config from terminal.
2. Select Profile menu item (make no clicks on any item).
4. Close the app.
3. Verify the error log messages before to and following the patch.

@fixed
2023-11-15 19:36:33 +05:00
Dmitri Chudinov 7309b85f27
elm-config: correct wrong "if" statement
If nothing is selected then nothing to disable.
"If" statement did not work here until now.

Test:
1. Run elementary_config from terminal.
2. Select Profile menu item (make no clicks on any item).
4. Close the app.
3. Verify the error log messages before to and following the patch.

@fixed
2023-11-15 19:34:51 +05:00
Dmitri Chudinov 16decad1aa
elm-config: add icons to menu
Some menu items of elementary_config have no icons. So add some. Not the best design solution, but better than nothing.

Activated i-utilities icon. Only the icons that were already in efl were used.

@fixed
2023-11-15 19:18:05 +05:00
Dmitri Chudinov 6d0c8f4c82
elm-config: add icons to menu
Some menu items of elementary_config have no icons. So add some. Not the best design solution, but better than nothing.

Activated i-utilities icon. Only the icons that were already in efl were used.

@fixed
2023-11-15 19:06:20 +05:00
Dmitri Chudinov f5ce4f8290
ecore: solve error with gsource = null
Compiling using -Dglib=true and -Dg-mainloop=true causes glib errors every time when efreet_icon_cache_create is invoked (ex., run and stop elementary_config and observe the terminal output).

So, i added error message in place where ecore_glib_source may be undefined. The issue was with undefined ecore_glib_source variable in _ecore_main_loop_setup function. Here _ecore_main_fdh_poll_add was used before actual ecore_glib_source definition.

@fixed
2023-11-15 18:28:40 +05:00
Dmitri Chudinov 847093ae23
ecore: solve error with gsource = null
Compiling using -Dglib=true and -Dg-mainloop=true causes glib errors every time when efreet_icon_cache_create is invoked (ex., run and stop elementary_config and observe the terminal output).

So, i added error message in place where ecore_glib_source may be undefined. The issue was with undefined ecore_glib_source variable in _ecore_main_loop_setup function. Here _ecore_main_fdh_poll_add was used before actual ecore_glib_source definition.

@fixed
2023-11-15 18:25:31 +05:00
Dmitri Chudinov 6cadc4f41e
Revert "tests: eina - replaced deprecated fail_* functions"
This reverts commit 073b70bf42.
2023-11-15 17:41:39 +05:00
Dmitri Chudinov b6d43ec705
tests: eina - replaced deprecated fail_* functions
The fail* APIs have been deprecated since check version 0.9.9 a decade ago. Solved warnings about having too many arguments for the supplied format string.
2023-11-15 17:41:39 +05:00
10 changed files with 59 additions and 40 deletions

View File

@ -889,6 +889,7 @@ ICON("preferences-desktop-screensaver", "i-screen")
ICON("preferences-desktop-wallpaper", "i-picture-landscape")
ICON("preferences-system", "i-gear")
ICON("preferences-other", "i-gear-spanner")
ICON("preferences-etc", "i-utilities")
ICON("system-file-manager", "i-folder")
ICON("applications-accessories", "i-scissor-rule")
ICON("applications-development", "i-gear-curly-braces")

View File

@ -360,7 +360,7 @@ I160("i-monitor-speakers", "monitor-speakers")
I160("i-briefcase", "briefcase")
I160("i-app-window", "app-window")
I160("i-beaker", "beaker")
// not used yet I160("i-utilities", "utilities")
I160("i-utilities", "utilities")
I160("i-sun", "sun")
I160("i-moon", "moon")
I160("i-moon-clouds", "moon-clouds")

View File

@ -3376,7 +3376,7 @@ _profiles_list_unselect_cb(void *data EINA_UNUSED,
Evas_Object *obj,
void *event_info EINA_UNUSED)
{
if (elm_list_selected_item_get(obj)) return;
if (!elm_list_selected_item_get(obj)) return;
elm_object_disabled_set(evas_object_data_get(obj, "prof_del_btn"),
EINA_TRUE);
elm_object_disabled_set(evas_object_data_get(obj, "prof_reset_btn"),
@ -4383,11 +4383,16 @@ _status_config_full(Evas_Object *win,
"Audio", _cf_audio, win);
elm_toolbar_item_append(tb, "preferences-profile",
"Profiles", _cf_profiles, win);
elm_toolbar_item_append(tb, NULL, "Scrolling", _cf_scrolling, win);
elm_toolbar_item_append(tb, NULL, "Rendering", _cf_rendering, win);
elm_toolbar_item_append(tb, NULL, "Caches", _cf_caches, win);
elm_toolbar_item_append(tb, NULL, "Focus", _cf_focus, win);
elm_toolbar_item_append(tb, NULL, "Etc", _cf_etc, win);
elm_toolbar_item_append(tb, "system-run",
"Scrolling", _cf_scrolling, win);
elm_toolbar_item_append(tb, "preferences-desktop",
"Rendering", _cf_rendering, win);
elm_toolbar_item_append(tb, "appointment-new",
"Caches", _cf_caches, win);
elm_toolbar_item_append(tb, "magnifying-glass",
"Focus", _cf_focus, win);
elm_toolbar_item_append(tb, "preferences-etc",
"Etc", _cf_etc, win);
elm_box_pack_end(bx0, tb);
evas_object_show(tb);

View File

@ -1,6 +1,8 @@
// Compile with:
// gcc -o ecore_audio_custom ecore_audio_custom.c `pkg-config --libs --cflags ecore ecore-audio`
#define EFL_BETA_API_SUPPORT
#ifndef EFL_BETA_API_SUPPORT
# define EFL_BETA_API_SUPPORT
#endif
#include <stdio.h>
#include <sys/types.h>

View File

@ -1,6 +1,8 @@
// Compile with:
// gcc -o ecore_audio_playback ecore_audio_playback.c `pkg-config --libs --cflags ecore eina ecore-audio`
#define EFL_BETA_API_SUPPORT
#ifndef EFL_BETA_API_SUPPORT
# define EFL_BETA_API_SUPPORT
#endif
#include <stdio.h>
#include <string.h>

View File

@ -1,6 +1,8 @@
// Compile with:
// gcc -o ecore_audio_to_ogg ecore_audio_to_ogg.c `pkg-config --libs --cflags ecore eina ecore-audio`
#define EFL_BETA_API_SUPPORT
#ifndef EFL_BETA_API_SUPPORT
# define EFL_BETA_API_SUPPORT
#endif
#include <stdio.h>
#include <libgen.h>

View File

@ -447,7 +447,11 @@ _ecore_main_fdh_poll_add(Efl_Loop_Data *pd EINA_UNUSED, Ecore_Fd_Handler *fdh)
fdh->gfd.events = _gfd_events_from_fdh(fdh);
fdh->gfd.revents = 0;
DBG("adding gpoll on %d %08x", fdh->fd, fdh->gfd.events);
g_source_add_poll(ecore_glib_source, &fdh->gfd);
if (ecore_glib_source)
g_source_add_poll(ecore_glib_source, &fdh->gfd);
else
ERR("Failed to add gpoll on %d %08x. GSource is NULL",
fdh->fd, fdh->gfd.events);
#endif
}
return r;
@ -939,29 +943,6 @@ quit:
static void
_ecore_main_loop_setup(Eo *obj, Efl_Loop_Data *pd)
{
// Please note that this function is being also called in case of a bad
// fd to reset the main loop.
#ifdef HAVE_SYS_EPOLL_H
pd->epoll_fd = epoll_create(1);
if (pd->epoll_fd < 0) WRN("Failed to create epoll fd!");
else
{
eina_file_close_on_exec(pd->epoll_fd, EINA_TRUE);
pd->epoll_pid = getpid();
// add polls on all our file descriptors
Ecore_Fd_Handler *fdh;
EINA_INLIST_FOREACH(pd->fd_handlers, fdh)
{
if (fdh->delete_me) continue;
_ecore_epoll_add(pd->epoll_fd, fdh->fd,
_ecore_poll_events_from_fdh(fdh), fdh);
_ecore_main_fdh_poll_add(pd, fdh);
}
}
#endif
if (obj == ML_OBJ)
{
#ifdef HAVE_LIBUV
@ -1072,6 +1053,30 @@ _ecore_main_loop_setup(Eo *obj, Efl_Loop_Data *pd)
}
#endif
}
// Please note that this function is being also called in case of a bad
// fd to reset the main loop.
#ifdef HAVE_SYS_EPOLL_H
pd->epoll_fd = epoll_create(1);
if (pd->epoll_fd < 0) WRN("Failed to create epoll fd!");
else
{
eina_file_close_on_exec(pd->epoll_fd, EINA_TRUE);
pd->epoll_pid = getpid();
// add polls on all our file descriptors
Ecore_Fd_Handler *fdh;
EINA_INLIST_FOREACH(pd->fd_handlers, fdh)
{
if (fdh->delete_me) continue;
_ecore_epoll_add(pd->epoll_fd, fdh->fd,
_ecore_poll_events_from_fdh(fdh), fdh);
_ecore_main_fdh_poll_add(pd, fdh);
}
}
#endif
_ecore_main_timechanges_start(obj);
}

View File

@ -193,11 +193,13 @@ elua_state_new(const char *progname)
lua_setfield(L, LUA_REGISTRYINDEX, "elua_ptr1");
lua_setfield(L, LUA_REGISTRYINDEX, "elua_ptr2");
return ret;
#ifdef ENABLE_LUA_OLD
err:
lua_close(L);
eina_stringshare_del(ret->progname);
free(ret);
return NULL;
#endif
}
EAPI void

View File

@ -458,7 +458,7 @@ static Ecore_Evas_Engine_Func _ecore_sdl_engine_func =
};
static Ecore_Evas*
_ecore_evas_internal_sdl_new(int rmethod, const char* name, int w, int h, int fullscreen, int hwsurface, int noframe, int alpha)
_ecore_evas_internal_sdl_new(int rmethod, const char* name, int w, int h, int fullscreen, int hwsurface, int noframe EINA_UNUSED, int alpha)
{
Ecore_Evas_SDL_Switch_Data *swd;
Ecore_Evas *ee;

View File

@ -21,9 +21,9 @@ EFL_START_TEST(elua_api)
lua_State *lst;
FILE *f;
int fd;
char *cargv[2];
char arg1[] = "test";
char arg2[] = "test";
const char *cargv[2];
const char arg1[] = "test";
const char arg2[] = "test";
int quit = 0;
cargv[0] = arg1;
cargv[1] = arg2;
@ -106,14 +106,14 @@ EFL_START_TEST(elua_api)
fprintf(f, "return true");
fclose(f);
cargv[1] = tmpf;
fail_if(!elua_util_script_run(st, 2, cargv, 1, &quit));
fail_if(!elua_util_script_run(st, 2, (char **)cargv, 1, &quit));
fail_if(quit != 1);
f = fopen(tmpf, "wb");
fail_if(!f);
fprintf(f, "return false");
fclose(f);
fail_if(!elua_util_script_run(st, 2, cargv, 1, &quit));
fail_if(!elua_util_script_run(st, 2, (char **)cargv, 1, &quit));
fail_if(quit != 0);
fail_if(remove(tmpf));