This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository efm2.
View the commit online.
commit 7e4f72ada7a7d0552c9f4fba606e7b624dbe2ad9
Author: Carsten Haitzler (Rasterman) <[email protected]>
AuthorDate: Fri Aug 1 13:00:38 2025 +0100
add cleanup for icons for custom pos
---
TODO.md | 1 -
src/efm/efm_popup_menu.c | 23 +++++++++++++++++++++--
src/efm/efm_util.c | 19 +++++++++++++++++++
src/efm/efm_util.h | 2 ++
4 files changed, 42 insertions(+), 3 deletions(-)
diff --git a/TODO.md b/TODO.md
index 9d59f18..139ab4c 100644
--- a/TODO.md
+++ b/TODO.md
@@ -8,7 +8,6 @@
* Custom view x/y cleanup/grid align of files with xy props
* Custon view x/y resize all files
* .efm/.efm in dir set more than backend type (view mode and more)
- * Custom style per icon
* Resize mode/menu option for icons in custom view
* DND auto-open dir on hover-over
* File properties dialog
diff --git a/src/efm/efm_popup_menu.c b/src/efm/efm_popup_menu.c
index ef2d3d4..efe9957 100644
--- a/src/efm/efm_popup_menu.c
+++ b/src/efm/efm_popup_menu.c
@@ -264,6 +264,18 @@ _cb_menu_item_all(void *data, void *data2 EINA_UNUSED,
ctx->sd->reset_job = ecore_job_add(_cb_job_refresh, ctx->sd);
}
+static void
+_cb_menu_item_clean_icons(void *data, void *data2 EINA_UNUSED,
+ Evas_Object *efm EINA_UNUSED,
+ const Efm_Menu_Item *menu_item EINA_UNUSED)
+{
+ Popup_Context *ctx = data;
+
+ _efm_icons_custom_xy_reset(ctx->sd);
+ if (ctx->sd->reset_job) ecore_job_del(ctx->sd->reset_job);
+ ctx->sd->reset_job = ecore_job_add(_cb_job_refresh, ctx->sd);
+}
+
static void
_cb_menu_item_refresh(void *data, void *data2 EINA_UNUSED,
Evas_Object *efm EINA_UNUSED,
@@ -419,8 +431,15 @@ _efm_popup_icon_menu_add(Smart_Data *sd, Icon *ic, Evas_Coord x, Evas_Coord y)
_efm_menu_it_normal(m2, "Select None", NULL, !have_sel,
_cb_menu_item_sel_none, ctx, NULL);
_efm_menu_it_separator(m2);
- _efm_menu_it_check(m2, "Show All", NULL, sd->config.all_files,
- EINA_FALSE, _cb_menu_item_all, ctx, NULL);
+ _efm_menu_it_check(m2, "Show All", NULL, sd->config.all_files, EINA_FALSE,
+ _cb_menu_item_all, ctx, NULL);
+ if ((sd->config.view_mode == EFM_VIEW_MODE_ICONS_CUSTOM)
+ || (sd->config.view_mode == EFM_VIEW_MODE_ICONS_CUSTOM_VERTICAL))
+ {
+ _efm_menu_it_separator(m2);
+ _efm_menu_it_normal(m2, "Clean Icons", "std:view-restore", EINA_FALSE,
+ _cb_menu_item_clean_icons, ctx, NULL);
+ }
_efm_menu_it_separator(m2);
_efm_menu_it_normal(m2, "Refresh", "std:view-refresh", EINA_FALSE,
_cb_menu_item_refresh, ctx, NULL);
diff --git a/src/efm/efm_util.c b/src/efm/efm_util.c
index fa81639..f2a8aeb 100644
--- a/src/efm/efm_util.c
+++ b/src/efm/efm_util.c
@@ -2600,3 +2600,22 @@ _efm_sel_rename(Smart_Data *sd)
if (!ic) return;
_icon_rename_begin(ic);
}
+
+void
+_efm_icons_custom_xy_reset(Smart_Data *sd)
+{
+ Eina_List *l;
+ Icon *ic;
+
+ EINA_LIST_FOREACH(sd->icons, l, ic)
+ {
+ Eina_Strbuf *buf = cmd_strbuf_new("meta-del");
+
+ if (buf)
+ {
+ _icon_path_cmd_strbuf_append(buf, "path", ic->sd, ic);
+ cmd_strbuf_append(buf, "meta", "xy");
+ cmd_strbuf_exe_consume(buf, ic->sd->exe_open);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/efm/efm_util.h b/src/efm/efm_util.h
index 4a18063..4397fff 100644
--- a/src/efm/efm_util.h
+++ b/src/efm/efm_util.h
@@ -70,4 +70,6 @@ Icon *_efm_sel_first_get(Smart_Data *sd);
Icon *_efm_sel_last_get(Smart_Data *sd);
void _efm_sel_rename(Smart_Data *sd);
+void _efm_icons_custom_xy_reset(Smart_Data *sd);
+
#endif
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.