[Xfce4-commits] [xfce/thunar] 05/13: Fix assertion when hitting KEY_Left on a top-level item in the tree view

noreply at xfce.org noreply at xfce.org
Tue May 12 09:58:18 CEST 2015


This is an automated email from the git hooks/post-receive script.

hjudt pushed a commit to branch master
in repository xfce/thunar.

commit ff373302362600025a0daefc170abb35b0006ce8
Author: Harald Judt <h.judt at gmx.at>
Date:   Sat May 9 13:01:52 2015 +0200

    Fix assertion when hitting KEY_Left on a top-level item in the tree view
    
    Gtk-CRITICAL **: IA__gtk_tree_row_reference_new_proxy: assertion 'path->depth > 0' failed
---
 thunar/thunar-tree-view.c |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/thunar/thunar-tree-view.c b/thunar/thunar-tree-view.c
index 5312bc6..5d823c4 100644
--- a/thunar/thunar-tree-view.c
+++ b/thunar/thunar-tree-view.c
@@ -814,11 +814,11 @@ thunar_tree_view_key_press_event(GtkWidget   *widget,
     case GDK_KP_Left:
       /* if branch is expanded then collapse it */
       if (gtk_tree_view_row_expanded (GTK_TREE_VIEW (tree_view), path))
-          gtk_tree_view_collapse_row (GTK_TREE_VIEW (tree_view), path);
+        gtk_tree_view_collapse_row (GTK_TREE_VIEW (tree_view), path);
 
       else /* if branch is already collapsed then move to parent */
-          if (gtk_tree_path_up (path))
-              gtk_tree_view_set_cursor (GTK_TREE_VIEW (tree_view), path, NULL, FALSE);
+        if (gtk_tree_path_get_depth (path) > 1 && gtk_tree_path_up (path))
+          gtk_tree_view_set_cursor (GTK_TREE_VIEW (tree_view), path, NULL, FALSE);
       thunar_tree_view_action_open (tree_view);
 
       stopPropagation = TRUE;
@@ -828,7 +828,7 @@ thunar_tree_view_key_press_event(GtkWidget   *widget,
     case GDK_KP_Right:
       /* if branch is not expanded then expand it */
       if (!gtk_tree_view_row_expanded (GTK_TREE_VIEW (tree_view), path))
-          gtk_tree_view_expand_row (GTK_TREE_VIEW (tree_view), path, FALSE);
+        gtk_tree_view_expand_row (GTK_TREE_VIEW (tree_view), path, FALSE);
 
       else /* if branch is already expanded then move to first child */
         {
@@ -850,12 +850,13 @@ thunar_tree_view_key_press_event(GtkWidget   *widget,
 
   gtk_tree_path_free (path);
   if (stopPropagation)
-      gtk_widget_grab_focus (widget);
+    gtk_widget_grab_focus (widget);
 
   return stopPropagation;
 }
 
 
+
 static void
 thunar_tree_view_drag_data_received (GtkWidget        *widget,
                                      GdkDragContext   *context,

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list