[Xfce4-commits] <thunar:master> Properly update the cursor when a row is deleted in (bug #5361).
Jannis Pohlmann
noreply at xfce.org
Sat Jan 9 22:42:01 CET 2010
Updating branch refs/heads/master
to e49759d5b54c4f44c039648148c47d444ffded0f (commit)
from 1e9764a91c3e4cf79dd8ee46bd148fec3cbd8058 (commit)
commit e49759d5b54c4f44c039648148c47d444ffded0f
Author: Jannis Pohlmann <jannis at xfce.org>
Date: Sat Jan 9 22:36:15 2010 +0100
Properly update the cursor when a row is deleted in (bug #5361).
When cursor and selection are out of sync weird things happen, as
described by Jérôme in the bug comment on
http://bugzilla.xfce.org/show_bug.cgi?id=5361.
thunar/thunar-standard-view.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/thunar/thunar-standard-view.c b/thunar/thunar-standard-view.c
index 8661861..e6fb490 100644
--- a/thunar/thunar-standard-view.c
+++ b/thunar/thunar-standard-view.c
@@ -3019,10 +3019,12 @@ thunar_standard_view_restore_selection (ThunarListModel *model,
* path is set by thunar_standard_view_row_deleted() if this is the case */
if (G_LIKELY (standard_view->priv->selection_before_delete != NULL))
{
- /* Restore the selection by selecting either the row before or the new
- * first row */
+ /* Restore the selection by selecting either the row before or the new first row */
(*THUNAR_STANDARD_VIEW_GET_CLASS (standard_view)->select_path) (standard_view, standard_view->priv->selection_before_delete);
+ /* place the cursor on the selected path */
+ (*THUNAR_STANDARD_VIEW_GET_CLASS (standard_view)->set_cursor) (standard_view, standard_view->priv->selection_before_delete, FALSE);
+
/* Free the tree path */
gtk_tree_path_free (standard_view->priv->selection_before_delete);
standard_view->priv->selection_before_delete = NULL;
More information about the Xfce4-commits
mailing list