[grisbi-cvs] grisbi/src balance_estimate_tab.c, 1.32, 1.33 gsb_currency.c, 1.55, 1.56 gsb_file_load.c, 1.204, 1.205 gsb_form_widget.c, 1.44, 1.45 gsb_form_widget.h, 1.5, 1.6

Pierre Biava pbiava at users.sourceforge.net
Sat Jan 23 20:35:12 CET 2010


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

Modified Files:
	balance_estimate_tab.c gsb_currency.c gsb_file_load.c 
	gsb_form_widget.c gsb_form_widget.h 
Log Message:
fixed bug 884 and minor corrections

Index: balance_estimate_tab.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/balance_estimate_tab.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- balance_estimate_tab.c	23 Jan 2010 13:46:12 -0000	1.32
+++ balance_estimate_tab.c	23 Jan 2010 19:35:10 -0000	1.33
@@ -40,6 +40,7 @@
 
 /*START_INCLUDE*/
 #include "balance_estimate_tab.h"
+//~ #include "balance_estimate_config.h"
 #include "./utils_dates.h"
 #include "./gsb_data_account.h"
 #include "./gsb_data_budget.h"
@@ -510,7 +511,8 @@
 
     title = g_strdup_printf (
                         _("Balance estimate of the account \"%s\" from %s to %s"),
-                        account_name, str_date_min, str_date_max );
+                        gsb_data_account_get_name ( selected_account ),
+                        str_date_min, str_date_max );
 
     widget = GTK_WIDGET ( g_object_get_data ( G_OBJECT ( bet_container ), "bet_array_title") );
     gtk_label_set_label ( GTK_LABEL ( widget ), title );

Index: gsb_form_widget.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_form_widget.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- gsb_form_widget.c	21 Jan 2010 22:16:52 -0000	1.44
+++ gsb_form_widget.c	23 Jan 2010 19:35:10 -0000	1.45
@@ -60,7 +60,6 @@
                         gint *ptr_origin );
 static gboolean gsb_form_widget_amount_entry_changed ( GtkWidget *entry,
 				        gpointer null );
-gboolean gsb_form_widget_get_valide_amout_entry ( const gchar *string );
 /*END_STATIC*/
 
 /*START_EXTERN*/

Index: gsb_currency.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_currency.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- gsb_currency.c	13 Jan 2010 19:30:10 -0000	1.55
+++ gsb_currency.c	23 Jan 2010 19:35:10 -0000	1.56
@@ -100,6 +100,7 @@
 
 
 /*START_EXTERN*/
+extern GdkColor calendar_entry_color;
 extern GtkWidget *combo_devise_totaux_categ;
 extern GtkWidget *combo_devise_totaux_ib;
 extern GtkWidget *combo_devise_totaux_tiers;
@@ -942,6 +943,7 @@
     GtkWidget *entry, *entry_3, *entry_4;
     gsb_real amount_1, amount_2, taux;
     gboolean link_currency;
+    gboolean valide;
 
     entry = g_object_get_data ( G_OBJECT ( entry_1 ), "exchange_rate" );
     link_currency = GPOINTER_TO_INT ( g_object_get_data (
@@ -958,6 +960,35 @@
         entry_4 = entry_2;
     }
 
+    valide = gsb_form_widget_get_valide_amout_entry (
+                gtk_entry_get_text ( GTK_ENTRY ( entry_1 ) ) );
+    if ( valide )
+    {
+        /* the entry is valid, make it normal */
+        gtk_widget_modify_base ( entry_1, GTK_STATE_NORMAL, NULL );
+    }
+    else
+    {
+        /* the entry is not valid, make it red */
+        gtk_widget_modify_base ( entry_1, GTK_STATE_NORMAL,
+                        &calendar_entry_color );
+        return FALSE;
+    }
+    valide = gsb_form_widget_get_valide_amout_entry (
+                gtk_entry_get_text ( GTK_ENTRY ( entry_2 ) ) );
+    if ( valide )
+    {
+        /* the entry is valid, make it normal */
+        gtk_widget_modify_base ( entry_2, GTK_STATE_NORMAL, NULL );
+    }
+    else
+    {
+        /* the entry is not valid, make it red */
+        gtk_widget_modify_base ( entry_2, GTK_STATE_NORMAL,
+                        &calendar_entry_color );
+        return FALSE;
+    }
+
     if ( strlen ( gtk_entry_get_text ( GTK_ENTRY ( entry_3 ) ) ) > 0 )
     {
         if ( !strlen ( gtk_entry_get_text ( GTK_ENTRY ( entry_4 ) ) ) )

Index: gsb_file_load.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_load.c,v
retrieving revision 1.204
retrieving revision 1.205
diff -u -d -r1.204 -r1.205
--- gsb_file_load.c	13 Jan 2010 22:38:20 -0000	1.204
+++ gsb_file_load.c	23 Jan 2010 19:35:10 -0000	1.205
@@ -6149,15 +6149,15 @@
     gsb_real number;
     
     tmp_string = utils_str_reduce_exponant_from_string ( text, 2 );
-    printf ("solde_initial = %s\n", tmp_string );
+    //~ printf ("solde_initial = %s\n", tmp_string );
     number = gsb_real_get_from_string ( tmp_string );
     if ( number.mantissa == error_real.mantissa )
         gsb_data_account_set_init_balance ( account_number, null_real );
     else
         gsb_data_account_set_init_balance ( account_number, number );
-    printf ("tmp_string = %s number.mantissa = %ld number.exponent = %d initial_balance = %s\n", tmp_string,
-                        number.mantissa, number.exponent,
-                        gsb_real_get_string ( gsb_data_account_get_init_balance ( account_number, 2)));
+    //~ printf ("tmp_string = %s number.mantissa = %ld number.exponent = %d initial_balance = %s\n", tmp_string,
+                        //~ number.mantissa, number.exponent,
+                        //~ gsb_real_get_string ( gsb_data_account_get_init_balance ( account_number, 2)));
 
     if (tmp_string) 
         g_free (tmp_string);

Index: gsb_form_widget.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_form_widget.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- gsb_form_widget.h	25 May 2009 19:42:27 -0000	1.5
+++ gsb_form_widget.h	23 Jan 2010 19:35:10 -0000	1.6
@@ -32,5 +32,7 @@
 void gsb_form_widget_set_empty ( GtkWidget *entry,
                     gboolean empty );
 void gsb_form_widget_set_focus ( gint element_number );
+gboolean gsb_form_widget_get_valide_amout_entry ( const gchar *string );
+
 /* END_DECLARATION */
 #endif



More information about the cvs mailing list