This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch main
in repository engage.
View the commit online.
commit 7d5ff22b4205a9342ea7ea337687457bfb502c39
Author: Alastair Poole <[email protected]>
AuthorDate: Tue Dec 1 00:07:09 2026 +0000
engage: remove shelf dependency.
---
README.md | 6 ++
e_mod_main.c | 149 +++++------------------------------
e_mod_main.h | 3 +-
engage_dock.c | 36 +++------
engage_launchers.c | 224 ++++++++++++++++++++++++++++++++++++++++++-----------
engage_menu.c | 1 +
engage_settings.c | 67 ++++------------
engage_windows.c | 2 +-
8 files changed, 236 insertions(+), 252 deletions(-)
diff --git a/README.md b/README.md
index a4cafb9..90ef0db 100644
--- a/README.md
+++ b/README.md
@@ -24,6 +24,12 @@ If Enlightenment is installed under a custom prefix, add its pkg-config director
Enable **Engage** in Enlightenment’s **Settings → Modules**. Right-click the dock and choose **About Engage** to see the installed version.
+## Launchers
+
+Right-click the dock and choose **Edit Launchers** to add or remove apps.
+Drag pinned icons in the dock to change their order. Engage can run with
+all other Enlightenment modules disabled and uses its bundled dock styling.
+
## Auto-hide
Open **Engage Settings** and enable **Automatically hide the dock**. The dock
diff --git a/e_mod_main.c b/e_mod_main.c
index 5344c2f..6282825 100644
--- a/e_mod_main.c
+++ b/e_mod_main.c
@@ -14,7 +14,6 @@ typedef struct
typedef struct
{
Eina_List *sizes;
- int shelf_id;
int dock_width;
int dock_height;
int dock_location;
@@ -23,7 +22,6 @@ typedef struct
int dock_animations_disabled;
int dock_previews_disabled;
int dock_preview_animation_enabled;
- const char *dock_style;
int dock_transparency;
} Engage_Config;
@@ -194,12 +192,6 @@ engage_config_dock_dimensions_set(int width, int height)
e_config_save_queue();
}
-const char *
-engage_config_dock_style_get(void)
-{
- return config->dock_style;
-}
-
int
engage_config_dock_transparency_get(void)
{
@@ -207,13 +199,10 @@ engage_config_dock_transparency_get(void)
}
void
-engage_config_dock_appearance_set(const char *style, int transparency)
+engage_config_dock_transparency_set(int transparency)
{
- Eina_Bool changed;
-
- changed = eina_stringshare_replace(&config->dock_style, style);
transparency = MIN(100, MAX(0, transparency));
- if (!changed && config->dock_transparency == transparency) return;
+ if (config->dock_transparency == transparency) return;
config->dock_transparency = transparency;
engage_dock_appearance_update();
e_config_save_queue();
@@ -231,7 +220,6 @@ config_shutdown(void)
eina_stringshare_del(size->id);
free(size);
}
- eina_stringshare_del(config->dock_style);
E_FREE(config);
}
E_CONFIG_DD_FREE(config_descriptor);
@@ -248,7 +236,6 @@ config_init(void)
E_CONFIG_VAL(size_descriptor, Dock_Size_Config, id, STR);
E_CONFIG_VAL(size_descriptor, Dock_Size_Config, percent, INT);
E_CONFIG_LIST(config_descriptor, Engage_Config, sizes, size_descriptor);
- E_CONFIG_VAL(config_descriptor, Engage_Config, shelf_id, INT);
E_CONFIG_VAL(config_descriptor, Engage_Config, dock_width, INT);
E_CONFIG_VAL(config_descriptor, Engage_Config, dock_height, INT);
E_CONFIG_VAL(config_descriptor, Engage_Config, dock_location, INT);
@@ -257,7 +244,6 @@ config_init(void)
E_CONFIG_VAL(config_descriptor, Engage_Config, dock_animations_disabled, INT);
E_CONFIG_VAL(config_descriptor, Engage_Config, dock_previews_disabled, INT);
E_CONFIG_VAL(config_descriptor, Engage_Config, dock_preview_animation_enabled, INT);
- E_CONFIG_VAL(config_descriptor, Engage_Config, dock_style, STR);
E_CONFIG_VAL(config_descriptor, Engage_Config, dock_transparency, INT);
config = e_config_domain_load("module.engage", config_descriptor);
if (!config)
@@ -290,6 +276,7 @@ client_changed(void *data EINA_UNUSED, int type, void *event)
engage_docks_refresh();
return ECORE_CALLBACK_PASS_ON;
}
+ if (!event) return ECORE_CALLBACK_PASS_ON;
if (type == E_EVENT_CLIENT_ZONE_SET)
ec = ((E_Event_Client_Zone_Set *)event)->ec;
else if (type == E_EVENT_CLIENT_PROPERTY)
@@ -302,6 +289,7 @@ client_changed(void *data EINA_UNUSED, int type, void *event)
else
ec = ((E_Event_Client *)event)->ec;
+ if (!ec) return ECORE_CALLBACK_PASS_ON;
if (type == E_EVENT_CLIENT_REMOVE)
engage_window_removed(ec);
else if (type == E_EVENT_CLIENT_UNICONIFY)
@@ -345,29 +333,8 @@ engage_theme_object_add(Evas *evas, const char *group)
void
engage_panel_style_apply(Evas_Object *panel)
{
- const char *style;
- Eina_Bool themed;
- char group[PATH_MAX];
- char path[PATH_MAX];
int alpha;
- style = engage_config_dock_style_get();
- themed = EINA_FALSE;
- if (style)
- {
- snprintf(group, sizeof(group), "e/shelf/%s/base", style);
- themed = e_theme_edje_object_set(panel, "base/theme/shelf", group);
- }
- if (themed)
- {
- edje_object_signal_emit(panel, "e,state,orientation,bottom", "e");
- edje_object_signal_emit(panel, "e,state,visible", "e");
- }
- else
- {
- theme_path_get(path, sizeof(path));
- edje_object_file_set(panel, path, "dock/panel");
- }
edje_object_scale_set(panel, e_scale);
alpha = lround(255 * (100 - engage_config_dock_transparency_get()) / 100.0);
evas_object_color_set(panel, alpha, alpha, alpha, alpha);
@@ -403,84 +370,6 @@ primary_zone_get(void)
return primary ?: best;
}
-static void
-legacy_gadget_config_migrate(void)
-{
- const Eina_List *l;
- const Eina_List *ll;
- E_Shelf *shelf;
- E_Shelf *dedicated;
- const E_Config_Gadcon_Client *legacy;
- int height;
- E_Config_Gadcon *gc;
- E_Config_Gadcon_Client *item;
- Eina_Bool owned;
- Eina_Bool changed;
- Eina_List *items;
- Eina_List *next;
-
- dedicated = NULL;
- legacy = NULL;
- height = 0;
-
- EINA_LIST_FOREACH(e_shelf_list(), l, shelf)
- {
- if (!shelf->cfg || !shelf->gadcon || !(gc = shelf->gadcon->cf)) continue;
- owned = shelf->cfg->name && !strcmp(shelf->cfg->name, "Engage") &&
- shelf->cfg->style && !strcmp(shelf->cfg->style, "invisible") &&
- (!config->shelf_id || shelf->cfg->id == config->shelf_id);
- EINA_LIST_FOREACH(gc->clients, ll, item)
- if (item->name && !strcmp(item->name, "engage") && (!legacy || owned))
- {
- legacy = item;
- height = shelf->cfg->size;
- if (owned) dedicated = shelf;
- break;
- }
- if (dedicated) break;
- }
-
- if (!legacy)
- EINA_LIST_FOREACH(e_config->gadcons, l, gc)
- {
- EINA_LIST_FOREACH(gc->clients, ll, item)
- if (item->name && !strcmp(item->name, "engage"))
- {
- legacy = item;
- break;
- }
- if (legacy) break;
- }
-
- if (legacy && !config->dock_height)
- {
- engage_config_size_set("dock", engage_config_size_get(legacy->id));
- engage_config_dock_dimensions_set(config->dock_width, height > 0 ? height : 56);
- }
-
- changed = EINA_FALSE;
- EINA_LIST_FOREACH(e_config->gadcons, l, gc)
- EINA_LIST_FOREACH_SAFE(gc->clients, items, next, item)
- if (item->name && !strcmp(item->name, "engage") &&
- !e_gadcon_client_find(NULL, item))
- {
- e_gadcon_client_config_del(gc, item);
- changed = EINA_TRUE;
- }
-
- if (dedicated && !dedicated->gadcon->cf->clients)
- {
- e_shelf_unsave(dedicated);
- e_shelf_hide(dedicated);
- e_object_del(E_OBJECT(dedicated));
- }
- if (config->shelf_id || changed)
- {
- config->shelf_id = 0;
- e_config_save_queue();
- }
-}
-
static void
placement_update(void *data EINA_UNUSED)
{
@@ -488,21 +377,14 @@ placement_update(void *data EINA_UNUSED)
if (!stopping) engage_dock_zone_set(primary_zone_get());
}
-static void
-placement_start(void *data EINA_UNUSED)
-{
- placement_job = NULL;
- if (stopping) return;
- legacy_gadget_config_migrate();
- placement_update(NULL);
-}
-
static void
placement_queue(void)
{
if (!placement_job) placement_job = ecore_job_add(placement_update, NULL);
}
+E_API int e_modapi_shutdown(E_Module *module);
+
E_API E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Engage" };
E_API void *
@@ -517,6 +399,8 @@ e_modapi_init(E_Module *module)
};
unsigned int i;
+ _Static_assert(EINA_C_ARRAY_LENGTH(events) == EINA_C_ARRAY_LENGTH(handlers),
+ "Each event needs a handler slot");
if (!engage_launchers_init()) return NULL;
if (!engage_windows_init())
{
@@ -535,11 +419,18 @@ e_modapi_init(E_Module *module)
engage_badges_init();
for (i = 0; i < EINA_C_ARRAY_LENGTH(events); i++)
- handlers[i] = ecore_event_handler_add(events[i], client_changed, NULL);
+ {
+ handlers[i] = ecore_event_handler_add(events[i], client_changed, NULL);
+ if (!handlers[i]) goto fail;
+ }
- /* Modules load before Enlightenment initializes its shelves. */
- placement_job = ecore_job_add(placement_start, NULL);
+ placement_queue();
+ if (!placement_job) goto fail;
return module;
+
+fail:
+ e_modapi_shutdown(module);
+ return NULL;
}
E_API int
@@ -548,7 +439,7 @@ e_modapi_shutdown(E_Module *module EINA_UNUSED)
unsigned int i;
for (i = 0; i < EINA_C_ARRAY_LENGTH(handlers); i++)
- if (handlers[i]) ecore_event_handler_del(handlers[i]);
+ E_FREE_FUNC(handlers[i], ecore_event_handler_del);
E_FREE_FUNC(placement_job, ecore_job_del);
engage_menu_shutdown();
engage_badges_shutdown();
@@ -558,11 +449,13 @@ e_modapi_shutdown(E_Module *module EINA_UNUSED)
engage_windows_shutdown();
engage_launchers_shutdown();
config_shutdown();
+ engage_module = NULL;
return 1;
}
E_API int
e_modapi_save(E_Module *module EINA_UNUSED)
{
+ if (!config || !config_descriptor) return 0;
return e_config_domain_save("module.engage", config_descriptor, config);
}
diff --git a/e_mod_main.h b/e_mod_main.h
index abb8da0..cb5ce57 100644
--- a/e_mod_main.h
+++ b/e_mod_main.h
@@ -46,11 +46,10 @@ int engage_config_dock_height_get(void);
void engage_config_dock_dimensions_set(int width, int height);
-const char *engage_config_dock_style_get(void);
int engage_config_dock_transparency_get(void);
-void engage_config_dock_appearance_set(const char *style, int transparency);
+void engage_config_dock_transparency_set(int transparency);
void engage_dock_appearance_update(void);
diff --git a/engage_dock.c b/engage_dock.c
index b967cf5..cbf4744 100644
--- a/engage_dock.c
+++ b/engage_dock.c
@@ -1164,33 +1164,12 @@ indicator_pulse(void *data)
static Evas_Object *
running_indicator_add(Evas *evas)
{
- int r;
- int g;
- int b;
- int a;
- Evas_Object *theme;
+ const int r = 124, g = 178, b = 224, a = 255;
Evas_Object *indicator;
Evas_Vg_Container *root;
Evas_Vg_Shape *shape;
Evas_Vg_Gradient_Radial *gradient;
- theme = edje_object_add(evas);
- if (!theme ||
- !e_theme_edje_object_set(theme, "base/theme/modules/tasks", "e/modules/tasks/item") ||
- (!edje_object_color_class_get(theme, "/bg/selected/gadgets/tasks/bar",
- &r, &g, &b, &a, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL) &&
- !edje_object_color_class_get(theme, "/bg/selected",
- &r, &g, &b, &a, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL)))
- {
- r = 124;
- g = 178;
- b = 224;
- a = 255;
- }
- if (theme) evas_object_del(theme);
-
indicator = evas_object_vg_add(evas);
if (!indicator) return NULL;
root = evas_object_vg_root_node_get(indicator);
@@ -1455,7 +1434,7 @@ dock_add(Engage_Dock *dock, Efreet_Desktop *app, E_Client *client, Dock_Tile_Kin
evas_object_color_set(hit, 0, 0, 0, 0);
evas_object_data_set(hit, "engage.tile", tile);
evas_object_event_callback_add(hit, EVAS_CALLBACK_DEL, tile_free, tile);
- if (!evas_object_box_append(dock->box, hit))
+ if (!tile->visual || !evas_object_box_append(dock->box, hit))
{
evas_object_del(hit);
return EINA_FALSE;
@@ -1962,7 +1941,7 @@ dock_minimize(void *data, Evas_Object *frame, const char *signal)
if (!engage_config_dock_animations_get()) return EINA_FALSE;
if (!minimize_effect_stop(frame) ||
- !e_comp_object_effect_set(frame, "iconify/ibox"))
+ !e_comp_object_effect_set(frame, "iconify/default"))
return EINA_FALSE;
entry = eina_list_append(NULL, frame);
@@ -2016,9 +1995,17 @@ engage_dock_zone_set(E_Zone *zone)
dock = E_NEW(Engage_Dock, 1);
if (!dock) return;
+ docks = eina_list_append(NULL, dock);
+ if (!docks)
+ {
+ free(dock);
+ return;
+ }
+
dock->box = evas_object_box_add(e_comp->evas);
if (!dock->box)
{
+ E_FREE_FUNC(docks, eina_list_free);
free(dock);
return;
}
@@ -2048,7 +2035,6 @@ engage_dock_zone_set(E_Zone *zone)
dock_minimize, dock);
evas_object_box_layout_set(dock->box, dock_layout, dock, NULL);
evas_object_show(dock->box);
- docks = eina_list_append(docks, dock);
dock_fill(dock);
}
diff --git a/engage_launchers.c b/engage_launchers.c
index 7b60ff7..a1ab8e7 100644
--- a/engage_launchers.c
+++ b/engage_launchers.c
@@ -1,6 +1,7 @@
#include "e_mod_main.h"
static E_Order *order;
+static Evas_Object *editor;
static void
order_changed(void *data EINA_UNUSED, E_Order *changed EINA_UNUSED)
@@ -32,7 +33,9 @@ engage_launchers_init(void)
void
engage_launchers_shutdown(void)
{
+ E_FREE_FUNC(editor, evas_object_del);
e_object_del(E_OBJECT(order));
+ order = NULL;
}
const Eina_List *
@@ -41,15 +44,6 @@ engage_launchers_list(void)
return order->desktops;
}
-void
-engage_launchers_edit(Evas_Object *parent)
-{
- if (e_configure_registry_exists("internal/ibar_other"))
- e_configure_registry_call("internal/ibar_other", parent, order->path);
- else
- e_util_dialog_show("Engage", "Enable the Applications configuration module to edit Engage launchers.");
-}
-
static Eina_Bool
desktop_matches(const Efreet_Desktop *app, const Efreet_Desktop *desktop)
{
@@ -217,47 +211,29 @@ order_matches(const E_Order *disk)
}
static Eina_Bool
-order_write_move(const char *path, const Eina_List *items, int from, int target)
+order_write(const char *path, const Eina_List *items)
{
- int count;
char pattern[PATH_MAX];
- Eina_Tmpstr *temporary;
+ Eina_Tmpstr *temporary = NULL;
int fd;
FILE *file;
- Eina_Bool saved;
- const Efreet_Desktop *moved;
+ Eina_Bool saved = EINA_FALSE;
const Efreet_Desktop *app;
const Eina_List *l;
- int index;
- int output;
- Eina_Bool written;
-
- count = eina_list_count(items);
- if (from < 0 || target < 0 || from >= count || target >= count) return EINA_FALSE;
if (snprintf(pattern, sizeof(pattern), "%s.XXXXXX", path) >= (int)sizeof(pattern))
return EINA_FALSE;
- temporary = NULL;
fd = eina_file_mkstemp(pattern, &temporary);
if (fd < 0) return EINA_FALSE;
file = fdopen(fd, "w");
- saved = EINA_FALSE;
if (file)
{
- moved = eina_list_nth(items, from);
- index = 0;
- output = 0;
+ Eina_Bool written;
EINA_LIST_FOREACH(items, l, app)
- {
- if (index++ == from) continue;
- if (output == target) fprintf(file, "%s\n", moved->orig_path);
- fprintf(file, "%s\n", app->orig_path);
- output++;
- }
- if (output == target) fprintf(file, "%s\n", moved->orig_path);
+ fprintf(file, "%s\n", app->orig_path);
written = !ferror(file);
if (fclose(file) == 0 && written)
@@ -271,11 +247,165 @@ order_write_move(const char *path, const Eina_List *items, int from, int target)
return saved;
}
+static void
+order_reload(void)
+{
+ E_Order *updated;
+
+ /* The atomic replacement has a new inode, so watch the new file. */
+ updated = e_order_new(order->path);
+ if (updated)
+ {
+ e_object_del(E_OBJECT(order));
+ order = updated;
+ e_order_update_callback_set(order, order_changed, NULL);
+ }
+ engage_docks_refresh();
+}
+
+static Eina_List *
+order_desktop_find(Eina_List *items, const Efreet_Desktop *desktop)
+{
+ Eina_List *l;
+ Efreet_Desktop *app;
+
+ EINA_LIST_FOREACH(items, l, app)
+ if (desktop_matches(desktop, app)) return l;
+ return NULL;
+}
+
+static void
+editor_desktop_changed(void *data, Evas_Object *check, void *event EINA_UNUSED)
+{
+ Efreet_Desktop *desktop = data;
+ Eina_Bool enabled = elm_check_state_get(check);
+ E_Order *disk = e_order_new(order->path);
+ Eina_List *entry;
+ Eina_Bool saved = EINA_FALSE;
+
+ if (disk)
+ {
+ entry = order_desktop_find(disk->desktops, desktop);
+ if (enabled && !entry)
+ {
+ efreet_desktop_ref(desktop);
+ disk->desktops = eina_list_append(disk->desktops, desktop);
+ }
+ else if (!enabled && entry)
+ {
+ efreet_desktop_free(eina_list_data_get(entry));
+ disk->desktops = eina_list_remove_list(disk->desktops, entry);
+ }
+
+ saved = order_write(disk->path, disk->desktops);
+ e_object_del(E_OBJECT(disk));
+ }
+
+ order_reload();
+ if (!saved)
+ {
+ elm_check_state_set(check, !!order_desktop_find(order->desktops, desktop));
+ e_util_dialog_show("Engage", "Could not save the launcher list.");
+ }
+}
+
+static void
+editor_desktop_deleted(void *data, Evas *evas EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
+{
+ efreet_desktop_free(data);
+}
+
+static void
+editor_deleted(void *data EINA_UNUSED, Evas *evas EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
+{
+ editor = NULL;
+}
+
+static int
+editor_desktop_compare(const void *a, const void *b)
+{
+ const Efreet_Desktop *left = a, *right = b;
+
+ return strcasecmp(left->name ?: "", right->name ?: "");
+}
+
+void
+engage_launchers_edit(Evas_Object *parent)
+{
+ Evas_Object *scroll, *box, *check;
+ Eina_List *apps, *l;
+ Efreet_Desktop *desktop;
+ E_Order *disk;
+
+ if (editor)
+ {
+ elm_win_raise(editor);
+ return;
+ }
+
+ editor = elm_win_util_dialog_add(parent, "engage-launchers", "Engage Launchers");
+ if (!editor) return;
+ elm_win_autodel_set(editor, EINA_TRUE);
+ evas_object_event_callback_add(editor, EVAS_CALLBACK_DEL, editor_deleted, NULL);
+
+ scroll = elm_scroller_add(editor);
+ evas_object_size_hint_weight_set(scroll, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(editor, scroll);
+ evas_object_show(scroll);
+
+ box = elm_box_add(scroll);
+ evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, 0.0);
+ evas_object_size_hint_align_set(box, EVAS_HINT_FILL, 0.0);
+ elm_object_content_set(scroll, box);
+ evas_object_show(box);
+
+ disk = e_order_new(order->path);
+ apps = efreet_util_desktop_name_glob_list("*");
+ EINA_LIST_FOREACH(disk ? disk->desktops : order->desktops, l, desktop)
+ if (!order_desktop_find(apps, desktop))
+ {
+ efreet_desktop_ref(desktop);
+ apps = eina_list_append(apps, desktop);
+ }
+
+ apps = eina_list_sort(apps, 0, editor_desktop_compare);
+ EINA_LIST_FREE(apps, desktop)
+ {
+ Eina_Bool pinned = !!order_desktop_find(disk ? disk->desktops : order->desktops,
+ desktop);
+
+ if (!desktop->orig_path || (!pinned && (desktop->no_display || desktop->hidden)))
+ {
+ efreet_desktop_free(desktop);
+ continue;
+ }
+
+ check = elm_check_add(box);
+ elm_object_text_set(check, desktop->name ?: desktop->orig_path);
+ elm_check_state_set(check, pinned);
+ evas_object_size_hint_align_set(check, EVAS_HINT_FILL, 0.5);
+ evas_object_smart_callback_add(check, "changed", editor_desktop_changed, desktop);
+ evas_object_event_callback_add(check, EVAS_CALLBACK_DEL, editor_desktop_deleted,
+ desktop);
+ elm_box_pack_end(box, check);
+ evas_object_show(check);
+ }
+ if (disk) e_object_del(E_OBJECT(disk));
+
+ evas_object_resize(editor, 360 * e_scale, 480 * e_scale);
+ evas_object_show(editor);
+}
+
Eina_Bool
engage_launchers_move(int from, int target)
{
E_Order *disk;
- E_Order *updated;
+ Eina_List *items, *entry;
+ Efreet_Desktop *moved;
+ Eina_Bool saved;
+ unsigned int count;
disk = e_order_new(order->path);
if (!disk) return EINA_FALSE;
@@ -287,23 +417,29 @@ engage_launchers_move(int from, int target)
engage_docks_refresh();
return EINA_FALSE;
}
+ count = eina_list_count(disk->desktops);
+ if (from < 0 || target < 0 || (unsigned int)from >= count ||
+ (unsigned int)target >= count)
+ {
+ e_object_del(E_OBJECT(disk));
+ return EINA_FALSE;
+ }
+
+ entry = eina_list_nth_list(disk->desktops, from);
+ moved = eina_list_data_get(entry);
+ items = eina_list_remove_list(disk->desktops, entry);
+ entry = eina_list_nth_list(items, target);
+ disk->desktops = entry ? eina_list_prepend_relative_list(items, moved, entry)
+ : eina_list_append(items, moved);
+ saved = order_write(disk->path, disk->desktops);
e_object_del(E_OBJECT(disk));
- if (!order_write_move(order->path, order->desktops, from, target))
+ if (!saved)
{
e_util_dialog_show("Engage", "Could not save the launcher order.");
return EINA_FALSE;
}
- /* The atomic replacement has a new inode, so watch the new file. */
- updated = e_order_new(order->path);
- if (updated)
- {
- e_object_del(E_OBJECT(order));
- order = updated;
- e_order_update_callback_set(order, order_changed, NULL);
- }
- engage_docks_refresh();
+ order_reload();
return EINA_TRUE;
}
-
diff --git a/engage_menu.c b/engage_menu.c
index dd201a4..3e3b247 100644
--- a/engage_menu.c
+++ b/engage_menu.c
@@ -6,6 +6,7 @@ static E_Menu *dock_menu;
static void
menu_closed(void *data EINA_UNUSED, E_Menu *menu)
{
+ e_menu_post_deactivate_callback_set(menu, NULL, NULL);
dock_menu = NULL;
e_object_del(E_OBJECT(menu));
}
diff --git a/engage_settings.c b/engage_settings.c
index 2d8bfbf..06c6e2e 100644
--- a/engage_settings.c
+++ b/engage_settings.c
@@ -9,26 +9,10 @@ settings_deleted(void *data EINA_UNUSED, Evas *evas EINA_UNUSED,
settings_window = NULL;
}
-static void
-settings_style_selected(void *data, Evas_Object *selector, void *event)
-{
- const char *label;
- const char *style;
-
- label = elm_object_item_text_get(event);
- style = event == eina_list_data_get(elm_hoversel_items_get(selector))
- ? NULL : label;
-
- elm_object_text_set(selector, label);
- engage_config_dock_appearance_set(style, engage_config_dock_transparency_get());
- if (data) engage_panel_style_apply(data);
-}
-
static void
settings_transparency_changed(void *data, Evas_Object *slider, void *event EINA_UNUSED)
{
- engage_config_dock_appearance_set(engage_config_dock_style_get(),
- lround(elm_slider_value_get(slider)));
+ engage_config_dock_transparency_set(lround(elm_slider_value_get(slider)));
if (data) engage_panel_style_apply(data);
}
@@ -171,7 +155,7 @@ engage_settings_open(void)
{
Evas_Object *win, *box, *frame;
- Evas_Object *sample, *shelf, *panel, *icon;
+ Evas_Object *sample, *preview, *panel, *icon;
Evas *evas;
const char *sample_icons[] =
{
@@ -182,9 +166,7 @@ engage_settings_open(void)
unsigned int i;
int margin;
- Evas_Object *options_frame, *options, *auto_hide, *clock, *animations, *preview_row, *previews, *preview_animation, *selector, *slider, *close;
- Eina_List *styles;
- const char *style, *selected;
+ Evas_Object *options_frame, *options, *auto_hide, *clock, *animations, *preview_row, *previews, *preview_animation, *slider, *close;
if (settings_window)
{
@@ -205,7 +187,7 @@ engage_settings_open(void)
evas_object_show(box);
frame = elm_frame_add(box);
- elm_object_text_set(frame, "Shelf preview");
+ elm_object_text_set(frame, "Dock preview");
evas_object_size_hint_weight_set(frame, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(frame, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_box_pack_end(box, frame);
@@ -218,13 +200,13 @@ engage_settings_open(void)
evas_object_show(sample);
settings_preview_wallpaper_add(sample);
- shelf = elm_table_add(sample);
- evas_object_size_hint_weight_set(shelf, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(shelf, EVAS_HINT_FILL, 1.0);
+ preview = elm_table_add(sample);
+ evas_object_size_hint_weight_set(preview, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(preview, EVAS_HINT_FILL, 1.0);
margin = lround(12 * e_scale);
- evas_object_size_hint_padding_set(shelf, margin, margin, margin, margin);
- elm_table_pack(sample, shelf, 0, 0, 1, 1);
- evas_object_show(shelf);
+ evas_object_size_hint_padding_set(preview, margin, margin, margin, margin);
+ elm_table_pack(sample, preview, 0, 0, 1, 1);
+ evas_object_show(preview);
evas = evas_object_evas_get(win);
panel = engage_theme_object_add(evas, "dock/panel");
@@ -234,16 +216,16 @@ engage_settings_open(void)
evas_object_size_hint_min_set(panel, lround(280 * e_scale), lround(56 * e_scale));
evas_object_size_hint_weight_set(panel, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(panel, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_table_pack(shelf, panel, 0, 0, 3, 1);
+ elm_table_pack(preview, panel, 0, 0, 3, 1);
evas_object_show(panel);
}
for (i = 0; i < EINA_C_ARRAY_LENGTH(sample_icons); i++)
{
- icon = elm_icon_add(shelf);
+ icon = elm_icon_add(preview);
elm_icon_standard_set(icon, sample_icons[i]);
evas_object_size_hint_min_set(icon, lround(32 * e_scale), lround(32 * e_scale));
- elm_table_pack(shelf, icon, i, 0, 1, 1);
+ elm_table_pack(preview, icon, i, 0, 1, 1);
evas_object_show(icon);
}
@@ -315,27 +297,8 @@ engage_settings_open(void)
evas_object_show(preview_animation);
}
- selector = elm_hoversel_add(options);
- elm_hoversel_hover_parent_set(selector, win);
- selected = engage_config_dock_style_get();
-
- elm_object_text_set(selector, "Engage");
- elm_hoversel_item_add(selector, "Engage", NULL, ELM_ICON_NONE, NULL, NULL);
-
- styles = e_theme_shelf_list();
- EINA_LIST_FREE(styles, style)
- {
- elm_hoversel_item_add(selector, style, NULL, ELM_ICON_NONE, NULL, NULL);
- if (selected && !strcmp(selected, style)) elm_object_text_set(selector, style);
- eina_stringshare_del(style);
- }
- evas_object_size_hint_align_set(selector, EVAS_HINT_FILL, 0.5);
- evas_object_smart_callback_add(selector, "selected", settings_style_selected, panel);
- elm_box_pack_end(options, selector);
- evas_object_show(selector);
-
slider = elm_slider_add(options);
- elm_object_text_set(slider, "Shelf transparency");
+ elm_object_text_set(slider, "Dock transparency");
elm_slider_min_max_set(slider, 0, 100);
elm_slider_step_set(slider, 0.01);
elm_slider_unit_format_set(slider, "%.0f%%");
@@ -355,7 +318,7 @@ engage_settings_open(void)
evas_object_resize(win, lround(380 * e_scale), lround(520 * e_scale));
elm_win_center(win, EINA_TRUE, EINA_TRUE);
evas_object_show(win);
- elm_object_focus_set(selector, EINA_TRUE);
+ elm_object_focus_set(slider, EINA_TRUE);
}
void
diff --git a/engage_windows.c b/engage_windows.c
index 6e58870..dc1ebf0 100644
--- a/engage_windows.c
+++ b/engage_windows.c
@@ -213,7 +213,7 @@ engage_windows_shutdown(void)
EINA_LIST_FREE(window_order, client)
e_object_unref(E_OBJECT(client));
- eina_hash_free(snapshots);
+ E_FREE_FUNC(snapshots, eina_hash_free);
#if defined(ENGAGE_HAVE_XCB) && !defined(HAVE_WAYLAND_ONLY)
if (snapshot_x_connection)
{
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.