[grisbi-cvs] [SCM] grisbi branch, master, updated. upstream_version_0_9_1-22-g6211a36

Philippe Delorme nobody at users.sourceforge.net
Mon May 2 20:41:19 CEST 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grisbi".

The branch, master has been updated
       via  6211a362d3a05cb7571c04aff7933df0dd096b9c (commit)
      from  3651453fd595878b919ef085d16ed578eec342d5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 6211a362d3a05cb7571c04aff7933df0dd096b9c
Author: Philippe Delorme <philippedelorme at users.sourceforge.net>
Date:   Mon May 2 20:38:28 2011 +0200

    Fix bug in heading bar: navigation with left and right arrows
    
    Navigation was broken when tree of accounts was collapsed:
    1. Unable to go back to welcome page when selection was on further pages
    2. Unable to go the scheduler page when homepage was selected

-----------------------------------------------------------------------

Changes:
diff --git a/src/navigation.c b/src/navigation.c
index 04c5f39..7170932 100644
--- a/src/navigation.c
+++ b/src/navigation.c
@@ -1379,18 +1379,21 @@ gboolean gsb_gui_navigation_select_prev ()
     }
     else
     {
-	gtk_tree_model_get_iter ( model, &iter, path );
-	if ( gtk_tree_model_iter_has_child ( model, &iter ) )
-	{
-	    GtkTreeIter parent = iter;
-	    gtk_tree_model_iter_nth_child ( model, &iter, &parent, 
-					    gtk_tree_model_iter_n_children ( model, 
-									     &parent ) - 1 );
-	    path = gtk_tree_model_get_path ( model, &iter );
-	}
+        gtk_tree_model_get_iter ( model, &iter, path );
+        /* if row has children and if row is expanded, go to the last child */
+        if ( gtk_tree_model_iter_has_child ( model, &iter )
+             && gtk_tree_view_row_expanded ( GTK_TREE_VIEW ( navigation_tree_view ), path ) )
+        {
+            GtkTreeIter parent = iter;
+            gtk_tree_model_iter_nth_child ( model, &iter, &parent, 
+                                            gtk_tree_model_iter_n_children ( model, 
+                                                                             &parent ) - 1 );
+            path = gtk_tree_model_get_path ( model, &iter );
+        }
     }
     
     gtk_tree_selection_select_path ( selection, path );
+    gtk_tree_path_free ( path );
 
     return FALSE;
 }
@@ -1419,7 +1422,10 @@ gboolean gsb_gui_navigation_select_next ()
 
     if ( gtk_tree_model_iter_has_child ( model, &iter ) )
     {
-	gtk_tree_path_down ( path );
+        if ( gtk_tree_view_row_expanded ( GTK_TREE_VIEW ( navigation_tree_view ), path ) )
+            gtk_tree_path_down ( path );
+        else
+            gtk_tree_path_next ( path );
     }
     else
     {
@@ -1435,6 +1441,7 @@ gboolean gsb_gui_navigation_select_next ()
     }
 
     gtk_tree_selection_select_path ( selection, path );
+    gtk_tree_path_free ( path );
 
     return FALSE;
 }


hooks/post-receive
-- 
grisbi


More information about the cvs mailing list