[grisbi-cvs] grisbi/src transaction_list.c,1.53,1.54

Pierre Biava pbiava at users.sourceforge.net
Mon Dec 14 23:33:13 CET 2009


Update of /cvsroot/grisbi/grisbi/src
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv23036

Modified Files:
	transaction_list.c 
Log Message:
fixed bug 786

Index: transaction_list.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/transaction_list.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- transaction_list.c	12 Dec 2009 18:14:39 -0000	1.53
+++ transaction_list.c	14 Dec 2009 22:33:10 -0000	1.54
@@ -126,6 +126,7 @@
     CustomList *custom_list;
     CustomRecord **children_rows = NULL;
     CustomRecord *white_record = NULL;
+    GdkColor *mother_text_color;
 
     custom_list = transaction_model_get_model ();
 
@@ -199,6 +200,7 @@
 	/* set the white line if necessary */
 	if (children_rows)
 	{
+
 	    newrecord[i] -> number_of_children = 1;
 	    newrecord[i] -> children_rows = children_rows;
 	}
@@ -239,6 +241,9 @@
 	    {
 		newrecord[i] -> has_expander = TRUE;
 		white_record -> mother_row = newrecord[i];
+        /* set the color of the mother */
+        mother_text_color = &text_color[1];
+        newrecord[i] -> text_color = mother_text_color;
 	    }
 
 	    /* inform the tree view */
@@ -795,6 +800,18 @@
 
 	if (record -> what_is_line == IS_TRANSACTION)
 	{
+        gint transaction_number;
+
+        /* update the color of the mother if necessary */
+        transaction_number = gsb_data_transaction_get_transaction_number (
+                        record -> transaction_pointer);
+        if (gsb_data_transaction_get_split_of_transaction (transaction_number))
+        {
+            CustomRecord *white_record = NULL;
+            
+            white_record = record -> children_rows[record -> number_of_children -1];
+            transaction_list_update_white_child ( white_record );
+        }
 	    /* if we changed of transaction, change the color */
 	    if (record -> transaction_pointer != current_transaction_pointer)
 	    {



More information about the cvs mailing list