[grisbi-cvs] grisbi/src gsb_form.c,1.133,1.134

Pierre Biava pbiava at users.sourceforge.net
Sat Oct 31 18:45:39 CET 2009


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

Modified Files:
	gsb_form.c 
Log Message:
fixed a bug in text input with the autofill decimal separator option

Index: gsb_form.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_form.c,v
retrieving revision 1.133
retrieving revision 1.134
diff -u -d -r1.133 -r1.134
--- gsb_form.c	23 Oct 2009 19:30:17 -0000	1.133
+++ gsb_form.c	31 Oct 2009 17:45:36 -0000	1.134
@@ -834,11 +834,14 @@
 	case TRANSACTION_FORM_DEVISE:
 	    number = gsb_data_mix_get_currency_number (transaction_number, is_transaction);
 
-	    gsb_currency_set_combobox_history ( widget,
-						number);
+	    gsb_currency_set_combobox_history ( widget, number);
 	    if (is_transaction)
-		gsb_form_transaction_check_change_button ( number,
-							   account_number );
+        {
+            if ( gsb_data_transaction_get_marked_transaction ( transaction_number ) == 3 )
+                gtk_widget_set_sensitive ( widget, FALSE );
+            else
+                gsb_form_transaction_check_change_button ( number, account_number );
+        }
 	    break;
 
 	case TRANSACTION_FORM_BANK:
@@ -1437,8 +1440,6 @@
  * */
 gboolean gsb_form_entry_get_focus ( GtkWidget *entry )
 {
-    //~ GtkWidget *fyear_button;
-
     /* the entry can be a combofix or a real entry */
     if (GTK_IS_COMBOFIX ( entry ))
     {
@@ -1462,11 +1463,6 @@
     gtk_widget_set_sensitive (GTK_WIDGET (form_button_valid), TRUE);
     gtk_widget_set_sensitive (GTK_WIDGET (form_button_cancel), TRUE);
 
-    /* set the financial year on automatic by default */
-    //~ fyear_button = gsb_form_widget_get_widget (TRANSACTION_FORM_EXERCICE);
-    //~ if (fyear_button)
-        //~ gsb_fyear_set_combobox_history ( fyear_button, 0 );
-
     return FALSE;
 }
 
@@ -2797,13 +2793,23 @@
 		break;
 
 	    case TRANSACTION_FORM_DEBIT:
-		if (!gsb_form_widget_check_empty (element -> element_widget)) 
-		    gsb_data_mix_set_amount ( transaction_number, gsb_real_opposite (gsb_utils_edit_calculate_entry ( element -> element_widget )), is_transaction);
+		if (!gsb_form_widget_check_empty (element -> element_widget))
+        {
+            gsb_form_check_auto_separator (element -> element_widget);
+		    gsb_data_mix_set_amount ( transaction_number, gsb_real_opposite (
+                        gsb_utils_edit_calculate_entry ( element -> element_widget )),
+                        is_transaction);
+        }
 		break;
 
 	    case TRANSACTION_FORM_CREDIT:
 		if (!gsb_form_widget_check_empty (element -> element_widget)) 
-		    gsb_data_mix_set_amount ( transaction_number, gsb_utils_edit_calculate_entry ( element -> element_widget ), is_transaction);
+        {
+            gsb_form_check_auto_separator (element -> element_widget);
+		    gsb_data_mix_set_amount ( transaction_number,
+                        gsb_utils_edit_calculate_entry ( element -> element_widget ),
+                        is_transaction);
+        }
 		break;
 
 	    case TRANSACTION_FORM_BUDGET:
@@ -2873,7 +2879,9 @@
 		break;
 
 	    case TRANSACTION_FORM_DEVISE:
-		gsb_data_mix_set_currency_number ( transaction_number, gsb_currency_get_currency_from_combobox (element -> element_widget), is_transaction);
+		gsb_data_mix_set_currency_number ( transaction_number, 
+                        gsb_currency_get_currency_from_combobox (
+                        element -> element_widget), is_transaction );
 		if (is_transaction)
 		    gsb_currency_check_for_change ( transaction_number );
 



More information about the cvs mailing list