[grisbi-cvs] grisbi/src gsb_data_partial_balance.c, 1.13, 1.14 gsb_form_transaction.c, 1.56, 1.57 main.c, 1.178, 1.179

Pierre Biava pbiava at users.sourceforge.net
Sat May 22 10:21:30 CEST 2010


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

Modified Files:
	gsb_data_partial_balance.c gsb_form_transaction.c main.c 
Log Message:
Fixed a bug in treatment of transfers between accounts

Index: gsb_data_partial_balance.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_partial_balance.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- gsb_data_partial_balance.c	4 May 2010 12:27:53 -0000	1.13
+++ gsb_data_partial_balance.c	22 May 2010 08:21:27 -0000	1.14
@@ -81,7 +81,6 @@
 /*END_STATIC*/
 
 /*START_EXTERN*/
-extern GtkWidget *main_vbox;
 extern gsb_real null_real;
 extern GtkWidget *window;
 /*END_EXTERN*/

Index: main.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/main.c,v
retrieving revision 1.178
retrieving revision 1.179
diff -u -d -r1.178 -r1.179
--- main.c	20 May 2010 22:12:18 -0000	1.178
+++ main.c	22 May 2010 08:21:28 -0000	1.179
@@ -120,7 +120,7 @@
     struct sigaction sig_sev;
 #endif
 #ifdef _MSC_VER
-	gchar * gtkrc_file;
+	gchar *gtkrc_file;
 #endif
 
 #if GSB_GMEMPROFILE

Index: gsb_form_transaction.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_form_transaction.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- gsb_form_transaction.c	3 Apr 2010 19:57:41 -0000	1.56
+++ gsb_form_transaction.c	22 May 2010 08:21:28 -0000	1.57
@@ -429,6 +429,7 @@
 {
     gint contra_transaction_number;
     gint contra_mother_number = 0;
+    gint contra_marked_transaction = 0;
     GtkWidget *contra_payment_button;
 
     g_return_val_if_fail ( account_transfer >= 0, -1 );
@@ -453,9 +454,13 @@
 	    /* if the contra transaction was a child of split, copying/deleting it
 	     * will remove the information of the mother, so we get it here */
 	    contra_mother_number = gsb_data_transaction_get_mother_transaction_number (
-                        contra_transaction_number);
+                        contra_transaction_number );
 
-	    /* check if we change the account targe */
+        /* Copying/deleting remove the marked information, so we get it here */
+        contra_marked_transaction = gsb_data_transaction_get_marked_transaction (
+                        contra_transaction_number );
+        
+	    /* check if we change the account target */
 	    if ( gsb_data_transaction_get_contra_transaction_account (
                         transaction_number) != account_transfer )
 	    {
@@ -481,7 +486,7 @@
      * already set */
 
     if ( new_transaction )
-        contra_transaction_number = gsb_data_transaction_new_transaction (account_transfer);
+        contra_transaction_number = gsb_data_transaction_new_transaction ( account_transfer );
 
     gsb_data_transaction_copy_transaction ( transaction_number,
 					    contra_transaction_number, new_transaction );
@@ -493,6 +498,10 @@
     gsb_data_transaction_set_mother_transaction_number ( contra_transaction_number,
 							 contra_mother_number );
 
+    /* If this is not a new transaction it restores the marked statement */
+    gsb_data_transaction_set_marked_transaction ( contra_transaction_number,
+                        contra_marked_transaction );
+
     /* we have to change the amount by the opposite */
     gsb_data_transaction_set_amount (contra_transaction_number,
 				     gsb_real_opposite (gsb_data_transaction_get_amount (transaction_number)));
@@ -527,7 +536,6 @@
 }
 
 
-
 /**
  * callback called when the user click on the 'change' button in the form
  * show a popup to modify the values



More information about the cvs mailing list