[Xfce4-commits] <thunar:master> Open tree node if expanded and mounted (bug #9603).

Nick Schermer noreply at xfce.org
Sun Dec 16 15:58:01 CET 2012


Updating branch refs/heads/master
         to 71145004e3c633c221a580ba6ffc9574d20ded39 (commit)
       from c1b8dc11319a3c7b8e4ca56b82cfb9dea81933af (commit)

commit 71145004e3c633c221a580ba6ffc9574d20ded39
Author: Nick Schermer <nick at xfce.org>
Date:   Sun Dec 16 15:55:49 2012 +0100

    Open tree node if expanded and mounted (bug #9603).

 thunar/thunar-tree-view.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/thunar/thunar-tree-view.c b/thunar/thunar-tree-view.c
index 1bca480..bb976f3 100644
--- a/thunar/thunar-tree-view.c
+++ b/thunar/thunar-tree-view.c
@@ -976,9 +976,18 @@ thunar_tree_view_row_activated (GtkTreeView       *tree_view,
 
   /* toggle the expanded state of the activated row... */
   if (gtk_tree_view_row_expanded (tree_view, path))
-    gtk_tree_view_collapse_row (tree_view, path);
+    {
+      gtk_tree_view_collapse_row (tree_view, path);
+    }
   else
-    gtk_tree_view_expand_row (tree_view, path, FALSE);
+    {
+      /* expand the row, but open it if mounted */
+      if (gtk_tree_view_expand_row (tree_view, path, FALSE))
+        {
+          /* ...open the selected folder */
+          thunar_tree_view_action_open (THUNAR_TREE_VIEW (tree_view));
+        }
+    }
 }
 
 


More information about the Xfce4-commits mailing list