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 38f52a4a9933d9ec24cea94da47da3f36fdc92ba
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
AuthorDate: Thu Jan 4 17:03:29 2024 +0000
fix file mod during list and thumb gen in some more real life testing...
---
src/efm/efm_back_end.c | 134 +++++++++++++++++++++++++++----------------------
1 file changed, 75 insertions(+), 59 deletions(-)
diff --git a/src/efm/efm_back_end.c b/src/efm/efm_back_end.c
index aec8152..ae89bc6 100644
--- a/src/efm/efm_back_end.c
+++ b/src/efm/efm_back_end.c
@@ -408,7 +408,8 @@ _cb_thread_notify(void *data, Ecore_Thread *th EINA_UNUSED, void *msg)
Icon *icon, *icon2;
Block *block;
const char *path, *file, *label, *s;
- int file_adds = 0, file_dels = 0;
+ int file_adds = 0, file_dels = 0, tries = 0;
+ Eina_Bool found;
if (!sd)
{ // on cusp point - view gone but buffered thread feedback exists
@@ -698,46 +699,56 @@ _cb_thread_notify(void *data, Ecore_Thread *th EINA_UNUSED, void *msg)
}
else if (!strcmp(c->command, "file-mod"))
{
- for (; il; il = il->next)
+ for (found = EINA_FALSE, tries = 0; (!found) && (tries < 2); tries++)
{
- icon = il->data;
- if (!strcmp(file, icon->info.file))
+ for (; il; il = il->next)
{
- icon->changed = EINA_TRUE;
+ icon = il->data;
+ if (!strcmp(file, icon->info.file))
+ {
+ icon->changed = EINA_TRUE;
- _icon_add_mod_props_get(icon, c, label);
+ _icon_add_mod_props_get(icon, c, label);
- _icon_xy_wh_get(sd, icon, c);
+ _icon_xy_wh_get(sd, icon, c);
- cmd_free(icon->cmd);
- icon->cmd = c;
- break;
+ cmd_free(icon->cmd);
+ icon->cmd = c;
+ found = EINA_TRUE;
+ break;
+ }
}
+ if (!il) il = sd->icons;
}
}
else if (!strcmp(c->command, "file-del"))
{
- for (; il; il = il->next)
+ for (found = EINA_FALSE, tries = 0; (!found) && (tries < 2); tries++)
{
- icon = il->data;
- if (!strcmp(file, icon->info.file))
+ for (; il; il = il->next)
{
- file_dels++;
- il2 = il->next;
- sd->icons = eina_list_remove_list(sd->icons, il);
- il = il2;
- if (sd->last_focused)
+ icon = il->data;
+ if (!strcmp(file, icon->info.file))
{
- // XXX: select prev or next icon
- }
- if (icon->info.size == icon->sd->file_max)
- { // this icon is at max size in dir
- _max_size_recalc(icon->sd); // find new max
- _size_bars_update_queue(icon->sd); // redo all bars
- }
- _icon_free(icon);
- break;
- }
+ file_dels++;
+ il2 = il->next;
+ sd->icons = eina_list_remove_list(sd->icons, il);
+ il = il2;
+ if (sd->last_focused)
+ {
+ // XXX: select prev or next icon
+ }
+ if (icon->info.size == icon->sd->file_max)
+ { // this icon is at max size in dir
+ _max_size_recalc(icon->sd); // find new max
+ _size_bars_update_queue(icon->sd); // redo all bars
+ }
+ _icon_free(icon);
+ found = EINA_TRUE;
+ break;
+ }
+ }
+ if (!il) il = sd->icons;
}
cmd_free(c);
c = NULL;
@@ -751,48 +762,53 @@ _cb_thread_notify(void *data, Ecore_Thread *th EINA_UNUSED, void *msg)
theme_edj_file
= elm_theme_group_path_find(NULL, "e/fileman/default/icon/fixed");
- for (n = 0; il; il = il->next, n++)
+ for (found = EINA_FALSE, tries = 0; (!found) && (tries < 2); tries++)
{
- icon = il->data;
- if (!strcmp(file, icon->info.file))
- {
- int i;
+ for (n = 0; il; il = il->next, n++)
+ {
+ icon = il->data;
+ if (!strcmp(file, icon->info.file))
+ {
+ int i;
- s = cmd_key_find(icon->cmd, "detail-format");
- if (s)
- {
- plist = eina_str_split(s, ",", 6);
- if (plist)
+ s = cmd_key_find(icon->cmd, "detail-format");
+ if (s)
{
- for (i = 0; plist[i];) i++;
- if (i >= 6)
+ plist = eina_str_split(s, ",", 6);
+ if (plist)
{
- for (i = 1; i < 7; i++)
+ for (i = 0; plist[i];) i++;
+ if (i >= 6)
{
- snprintf(bufdetail, sizeof(bufdetail), "detail%i", i);
- s = cmd_key_find(c, bufdetail);
- if (s)
+ for (i = 1; i < 7; i++)
{
- icon->cmd = cmd_modify(icon->cmd,
- bufdetail, s);
- if (icon->realized)
- _icon_detail_add(
- icon, icon->sd,
- evas_object_evas_get(icon->o_base),
- theme_edj_file, i - 1, s,
- plist[i - 1]);
+ snprintf(bufdetail, sizeof(bufdetail),
+ "detail%i", i);
+ s = cmd_key_find(c, bufdetail);
+ if (s)
+ {
+ icon->cmd
+ = cmd_modify(icon->cmd, bufdetail, s);
+ if (icon->realized)
+ _icon_detail_add(
+ icon, icon->sd,
+ evas_object_evas_get(icon->o_base),
+ theme_edj_file, i - 1, s,
+ plist[i - 1]);
+ }
}
}
+ free(*plist);
+ free(plist);
}
- free(*plist);
- free(plist);
}
- }
- break;
- }
+ found = EINA_TRUE;
+ break;
+ }
+ }
+ cmd_free(c);
+ c = NULL;
}
- cmd_free(c);
- c = NULL;
}
cprev = c;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.