[grisbi-cvs] grisbi/src gsb_transactions_list.c,1.162,1.163

Pierre Biava pbiava at users.sourceforge.net
Sun May 17 15:58:26 CEST 2009


Update of /cvsroot/grisbi/grisbi/src
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23463

Modified Files:
	gsb_transactions_list.c 
Log Message:
back due to regression in gsb_transactions_list_selection_changed ()

Index: gsb_transactions_list.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_transactions_list.c,v
retrieving revision 1.162
retrieving revision 1.163
diff -u -d -r1.162 -r1.163
--- gsb_transactions_list.c	10 May 2009 13:06:56 -0000	1.162
+++ gsb_transactions_list.c	17 May 2009 13:58:24 -0000	1.163
@@ -1,8 +1,8 @@
 /* ************************************************************************** */
 /*                                                                            */
-/*     copyright (c)	2000-2008 Cédric Auger (cedric at grisbi.org)	          */
-/*			2004-2009 Benjamin Drieu (bdrieu at april.org) 	                  */
-/*			http://www.grisbi.org   			                              */
+/*     copyright (c)    2000-2008 Cédric Auger (cedric at grisbi.org)            */
+/*          2004-2009 Benjamin Drieu (bdrieu at april.org)                       */
+/*          http://www.grisbi.org                                             */
 /*                                                                            */
 /*  This program is free software; you can redistribute it and/or modify      */
 /*  it under the terms of the GNU General Public License as published by      */
@@ -633,11 +633,13 @@
 
 	if (gsb_data_account_get_current_balance (account_number).mantissa < 0)
 	    string = g_strdup_printf ( "<span color=\"red\">%s</span>",
-				       gsb_real_get_string_with_currency ( gsb_data_account_get_current_balance (account_number),
-									   gsb_data_account_get_currency (account_number), TRUE ));
+                        gsb_real_get_string_with_currency (
+                        gsb_data_account_get_current_balance ( account_number ),
+                        gsb_data_account_get_currency ( account_number ), TRUE ) );
 	else
-	    string = gsb_real_get_string_with_currency ( gsb_data_account_get_current_balance (account_number),
-							 gsb_data_account_get_currency (account_number), TRUE );
+	    string = gsb_real_get_string_with_currency (
+                        gsb_data_account_get_current_balance ( account_number ),
+                        gsb_data_account_get_currency ( account_number ), TRUE );
 	gsb_gui_headings_update_suffix (string);
 	g_free (string);
 
@@ -1332,26 +1334,24 @@
     /* the white number has no account number, so we take the current account */
     if ( new_selected_transaction != -1 )
     {
-	account_number = gsb_data_transaction_get_account_number (new_selected_transaction);
+    account_number = gsb_data_transaction_get_account_number (new_selected_transaction);
     gsb_menu_transaction_operations_set_sensitive ( TRUE );
     }
     else
     {
-	account_number = gsb_gui_navigation_get_current_account ();
-	gsb_menu_transaction_operations_set_sensitive ( FALSE );
+    account_number = gsb_gui_navigation_get_current_account ();
+    gsb_menu_transaction_operations_set_sensitive ( FALSE );
     }
 
     /* save the new current transaction */
     gsb_data_account_set_current_transaction_number ( account_number,
-						      new_selected_transaction);
+                        new_selected_transaction);
 
     /* show the content of the transaction in the form,
-     * only if the form is shown and not a white line */
+     * only if the form is shown */
     if ( etat.show_transaction_selected_in_form
-	&&
-	gsb_form_is_visible ()
     &&
-    new_selected_transaction != -1 )
+    gsb_form_is_visible () )
         gsb_form_fill_by_transaction (new_selected_transaction, TRUE, FALSE);
 
     /* give the focus to the transaction_tree_view pbiava 02/09/2009 
@@ -1653,7 +1653,7 @@
  * \return the number of the chosen reconcile or 0 if cancel
  * */
 gint gsb_transactions_list_choose_reconcile ( gint account_number,
-					      gint selected_reconcile_number )
+                        gint selected_reconcile_number )
 {
     GtkWidget *dialog;
     GtkWidget *tree_view;
@@ -1826,7 +1826,7 @@
  * \return FALSE if canceled or nothing done, TRUE if ok
  * */
 gboolean gsb_transactions_list_delete_transaction ( gint transaction_number,
-						    gint show_warning )
+                        gint show_warning )
 {
     gint account_number;
 
@@ -2507,15 +2507,17 @@
 	gchar *string;
 	gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general ), 1 );
 
-	update_transaction_in_trees (gsb_data_account_get_current_transaction_number (source_account));
+	update_transaction_in_trees ( gsb_data_account_get_current_transaction_number (
+                        source_account ) ) ;
 
-	if (gsb_data_account_get_current_balance (source_account).mantissa < 0)
+	if ( gsb_data_account_get_current_balance (source_account).mantissa < 0 )
 	    string = g_strdup_printf ( "<span color=\"red\">%s</span>",
-				       gsb_real_get_string_with_currency ( gsb_data_account_get_current_balance (source_account),
-									   gsb_data_account_get_currency (source_account), TRUE ));
+                        gsb_real_get_string_with_currency (
+                        gsb_data_account_get_current_balance ( source_account ),
+                        gsb_data_account_get_currency ( source_account ), TRUE ) );
 	else
 	    string = gsb_real_get_string_with_currency ( gsb_data_account_get_current_balance (source_account),
-							 gsb_data_account_get_currency (source_account), TRUE );
+                        gsb_data_account_get_currency ( source_account ), TRUE );
 	gsb_gui_headings_update_suffix (string);
 	g_free (string);
 



More information about the cvs mailing list