r16850 - gnucash/branches/register-rewrite/src/gnome-utils - Fixed small issue with getting the depth of the selection in the tree model.

Jeff Green jeff at cvs.gnucash.org
Wed Jan 9 22:30:49 EST 2008


Author: jeff
Date: 2008-01-09 22:30:48 -0500 (Wed, 09 Jan 2008)
New Revision: 16850
Trac: http://svn.gnucash.org/trac/changeset/16850

Modified:
   gnucash/branches/register-rewrite/src/gnome-utils/gnc-tree-view-transaction.c
Log:
Fixed small issue with getting the depth of the selection in the tree model.


Modified: gnucash/branches/register-rewrite/src/gnome-utils/gnc-tree-view-transaction.c
===================================================================
--- gnucash/branches/register-rewrite/src/gnome-utils/gnc-tree-view-transaction.c	2008-01-09 15:10:52 UTC (rev 16849)
+++ gnucash/branches/register-rewrite/src/gnome-utils/gnc-tree-view-transaction.c	2008-01-10 03:30:48 UTC (rev 16850)
@@ -1444,14 +1444,11 @@
     transfer = gtk_tree_view_get_column(GTK_TREE_VIEW(tv), 3);
 
     //Use depth to determine if it is a split or parent transaction
-    //ISSUE: the returned depth is a crazy number, not 0,1,2... that
-    //the path string would seem to indicate
-    depth = gtk_tree_path_get_depth((GtkTreePath*)path_string);
+    depth = gtk_tree_path_get_depth(gtk_tree_path_new_from_string(path_string));
 
-    g_print(" depth: %d ", depth);
     //First steps towards setting the column headers based
     //on whether split or parent is being edited
-    if (depth >= 0)
+    if (depth >= 2)
     {
         gtk_tree_view_column_set_title(num, "Action");
         gtk_tree_view_column_set_title(description, "Memo");



More information about the gnucash-changes mailing list