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 340e394d9075ff7612495dbaf328d685ef70bb8a
Author: Carsten Haitzler (Rasterman) <[email protected]>
AuthorDate: Sat Dec 13 07:51:06 2025 +0000
save+restore scroller on resets/refresh
---
src/efm/efm.c | 2 --
src/efm/efm_back_end.c | 5 ++++-
src/efm/efm_popup_menu.c | 7 ++++++-
src/efm/efm_structs.h | 4 ++++
src/efm/efm_util.c | 9 +++++++++
5 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/src/efm/efm.c b/src/efm/efm.c
index 4a5c270..e089a2c 100644
--- a/src/efm/efm.c
+++ b/src/efm/efm.c
@@ -5,10 +5,8 @@
//
// maximum # of files in a dir that is sane: 10,000
// maximum number of files in a dir on a real system to be fast with: 3,000
-#include "Edje.h"
#include "cmd.h"
#include "efm.h"
-#include "efl_ui_check_eo.legacy.h"
#include "efm_icon.h"
#include "efm_util.h"
#include "efm_dnd.h"
diff --git a/src/efm/efm_back_end.c b/src/efm/efm_back_end.c
index 50df476..dc323ba 100644
--- a/src/efm/efm_back_end.c
+++ b/src/efm/efm_back_end.c
@@ -1,6 +1,5 @@
#include "cmd.h"
#include "efm_structs.h"
-#include "efreet_desktop.h"
#include "sort.h"
#include "efm.h"
#include "efm_util.h"
@@ -651,6 +650,10 @@ _cb_thread_notify(void *data, Ecore_Thread *th EINA_UNUSED, void *msg)
}
else if (!strcmp(c->command, "view-refresh"))
{
+ if (sd->o_scroller) // save view for after reset
+ elm_scroller_region_get(sd->o_scroller, &sd->restore_region.x,
+ &sd->restore_region.y, &sd->restore_region.w,
+ &sd->restore_region.h);
_reset(sd);
CMD_DONE;
}
diff --git a/src/efm/efm_popup_menu.c b/src/efm/efm_popup_menu.c
index efe9957..b64f061 100644
--- a/src/efm/efm_popup_menu.c
+++ b/src/efm/efm_popup_menu.c
@@ -2,8 +2,8 @@
#include "efm_private.h"
#include "efm_structs.h"
#include "efm_util.h"
-#include "eina_strbuf.h"
#include "mimeapps.h"
+#include <stdio.h>
/* have this to put a full icon for a file in the menu - unused right now
static const char *
@@ -247,7 +247,12 @@ static void
_cb_job_refresh(void *data)
{
Smart_Data *sd = data;
+ Evas_Coord x, y, w, h;
+ if (sd->o_scroller) // save view for after reset
+ elm_scroller_region_get(sd->o_scroller, &sd->restore_region.x,
+ &sd->restore_region.y, &sd->restore_region.w,
+ &sd->restore_region.h);
sd->reset_job = NULL;
_reset(sd);
}
diff --git a/src/efm/efm_structs.h b/src/efm/efm_structs.h
index 21c8582..807b085 100644
--- a/src/efm/efm_structs.h
+++ b/src/efm/efm_structs.h
@@ -90,6 +90,10 @@ struct _Smart_Data
Evas_Coord detail_down_x, detail_down_y;
Evas_Coord detail_down_start_min_w;
Evas_Coord detail_header_min_h[7];
+ struct
+ {
+ Evas_Coord x, y, w, h;
+ } restore_region;
double focus_start_time;
double focus_pos;
Ecore_Animator *focus_animator;
diff --git a/src/efm/efm_util.c b/src/efm/efm_util.c
index 03a542d..56e5e44 100644
--- a/src/efm/efm_util.c
+++ b/src/efm/efm_util.c
@@ -2615,6 +2615,7 @@ _cb_reblock(void *data)
Eina_List *l;
Icon *icon;
Block *block;
+ Eina_Bool listing_done_reblock = sd->listing_done_reblock;
sd->reblock_job = NULL;
if (sd->listing_done_reblock)
@@ -2653,6 +2654,14 @@ _cb_reblock(void *data)
// needed etc.
sd->reblocked = EINA_TRUE;
evas_object_smart_changed(sd->o_smart);
+ if ((listing_done_reblock) && (sd->restore_region.w > 0)
+ && (sd->o_scroller))
+ { // we want to restore the previous position we were at after a refresh
+ elm_scroller_region_show(sd->o_scroller, sd->restore_region.x,
+ sd->restore_region.y, sd->restore_region.w,
+ sd->restore_region.h);
+ sd->restore_region.w = 0;
+ }
}
void
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.