#826605 geeqie: thumbnails disappear after deleting an image

Package:
geeqie
Source:
geeqie
Description:
image viewer using GTK+
Submitter:
Christoph Anton Mitterer
Date:
2025-07-04 10:01:01 UTC
Severity:
normal
#826605#5
Date:
2016-06-06 22:02:29 UTC
From:
To:
Hi.

After deleting an image (from within geequie) the thumbnail list gets empty
(all white), until one e.g. Page-Up/Down, when it's redrawn.

Cheers,
Chris.

#826605#10
Date:
2016-08-24 06:19:59 UTC
From:
To:
Hi. For fun I thought I'd have a go at fixing this bug. It seems to be
an old bug going back to at least Geeqie 1.0. It's hardly a serious
issue, but I've noticed it on many occasions.

It seems to be triggered by a call to gtk_tree_view_set_cursor in the
function vficon_set_focus in view_file_icon.c. I found that removing
that call makes the problem go away. But what is the call there for?
The comment above the call says the following:

  /* focus is set to an extra column with 0 width to hide focus */

However, try as I might, I cannot see any visual difference if I remove
the call. So maybe it's not needed?

I've included a patch that removes this call (and the similar one in
collect-table.c). This fixes the bug for me, but I have only tested
the patch on GTK2. It is untested on GTK3.

Maybe a GTK wizard can weigh in on correctness here. At the very least
it might act as a starting point for a more correct fix, if there is
one.

Kind regards,

Michael

diff --git a/src/collect-table.c b/src/collect-table.c
index 2695640..b45633b 100644
--- a/src/collect-table.c
+++ b/src/collect-table.c
@@ -1011,13 +1011,6 @@ static void collection_table_set_focus(CollectTable *ct, CollectInfo *info)
 		GtkTreeModel *store;

 		tree_view_row_make_visible(GTK_TREE_VIEW(ct->listview), &iter, FALSE);
-
-		store = gtk_tree_view_get_model(GTK_TREE_VIEW(ct->listview));
-		tpath = gtk_tree_model_get_path(store, &iter);
-		/* focus is set to an extra column with 0 width to hide focus, we draw it ourself */
-		column = gtk_tree_view_get_column(GTK_TREE_VIEW(ct->listview), COLLECT_TABLE_MAX_COLUMNS);
-		gtk_tree_view_set_cursor(GTK_TREE_VIEW(ct->listview), tpath, column, FALSE);
-		gtk_tree_path_free(tpath);
 		}
 }

diff --git a/src/view_file_icon.c b/src/view_file_icon.c
index 1457f81..45cb6a9 100644
--- a/src/view_file_icon.c
+++ b/src/view_file_icon.c
@@ -1200,13 +1200,6 @@ static void vficon_set_focus(ViewFile *vf, IconData *id)
 		GtkTreeModel *store;

 		tree_view_row_make_visible(GTK_TREE_VIEW(vf->listview), &iter, FALSE);
-
-		store = gtk_tree_view_get_model(GTK_TREE_VIEW(vf->listview));
-		tpath = gtk_tree_model_get_path(store, &iter);
-		/* focus is set to an extra column with 0 width to hide focus, we draw it ourself */
-		column = gtk_tree_view_get_column(GTK_TREE_VIEW(vf->listview), VFICON_MAX_COLUMNS);
-		gtk_tree_view_set_cursor(GTK_TREE_VIEW(vf->listview), tpath, column, FALSE);
-		gtk_tree_path_free(tpath);
 		}
 }

#826605#15
Date:
2016-08-24 06:33:40 UTC
From:
To:
In the previous patch I accidentally left a few unused variable
declarations. This patch removes them.

Michael

diff --git a/src/collect-table.c b/src/collect-table.c
index b45633b..d33bf85 100644
--- a/src/collect-table.c
+++ b/src/collect-table.c
@@ -1006,10 +1006,6 @@ static void collection_table_set_focus(CollectTable *ct, CollectInfo *info)

 	if (collection_table_find_iter(ct, ct->focus_info, &iter, NULL))
 		{
-		GtkTreePath *tpath;
-		GtkTreeViewColumn *column;
-		GtkTreeModel *store;
-
 		tree_view_row_make_visible(GTK_TREE_VIEW(ct->listview), &iter, FALSE);
 		}
 }
diff --git a/src/view_file_icon.c b/src/view_file_icon.c
index 45cb6a9..581f72c 100644
--- a/src/view_file_icon.c
+++ b/src/view_file_icon.c
@@ -1195,10 +1195,6 @@ static void vficon_set_focus(ViewFile *vf, IconData *id)

 	if (vficon_find_iter(vf, VFICON(vf)->focus_id, &iter, NULL))
 		{
-		GtkTreePath *tpath;
-		GtkTreeViewColumn *column;
-		GtkTreeModel *store;
-
 		tree_view_row_make_visible(GTK_TREE_VIEW(vf->listview), &iter, FALSE);
 		}
 }

#826605#20
Date:
2025-07-04 09:59:56 UTC
From:
To:
Hi -

I'm replying to a really old bug in geeqie here - can you reproduce
this on an up to date trixie/sid? (Or even on a bookworm machine?)

I cannot reproduce on 1.5-7, and thus will close this if you don't have
information that you still have the problem.

thanks in advance
/Andreas
gusnan@debian.org