Compare commits

...

3 Commits

Author SHA1 Message Date
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 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 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
4 changed files with 42 additions and 31 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

@ -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);
}