[grisbi-cvs] grisbi/src affichage_liste.c, 1.118, 1.119 gsb_form.c, 1.148, 1.149 gsb_form_widget.c, 1.48, 1.49 gsb_payment_method_config.c, 1.38, 1.39 gtk_combofix.c, 1.71, 1.72 gtk_combofix.h, 1.7, 1.8 metatree.c, 1.144, 1.145 transaction_model.c, 1.6, 1.7 utils_files.c, 1.52, 1.53

Pierre Biava pbiava at users.sourceforge.net
Sat Feb 13 18:45:01 CET 2010


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

Modified Files:
	affichage_liste.c gsb_form.c gsb_form_widget.c 
	gsb_payment_method_config.c gtk_combofix.c gtk_combofix.h 
	metatree.c transaction_model.c utils_files.c 
Log Message:
fixed bug 929 and 935. Update russian string. changed the management of the combobox for the payes and categories

Index: gtk_combofix.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gtk_combofix.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -d -r1.71 -r1.72
--- gtk_combofix.c	6 Feb 2010 08:49:46 -0000	1.71
+++ gtk_combofix.c	13 Feb 2010 17:44:59 -0000	1.72
@@ -1,24 +1,25 @@
-/* ComboFix Widget
- *
- *     Copyright (C)	2001-2008 Cédric Auger (cedric at grisbi.org)
- *			2003-2008 Benjamin Drieu (bdrieu at april.org)
- * 			http://www.grisbi.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
[...1112 lines suppressed...]
-					     GtkTreeIter *iter_1,
-					     GtkTreeIter *iter_2,
-					     GtkComboFix *combofix )
+                        GtkTreeIter *iter_1,
+                        GtkTreeIter *iter_2,
+                        GtkComboFix *combofix )
 {
     gint list_number_1;
     gint list_number_2;
@@ -1787,8 +1846,8 @@
  * \return TRUE if it's a separator, FALSE else
  * */
 static gboolean gtk_combofix_separator_func ( GtkTreeModel *model,
-					      GtkTreeIter *iter,
-					      GtkComboFix *combofix )
+                        GtkTreeIter *iter,
+                        GtkComboFix *combofix )
 {
     gboolean value;
 

Index: gsb_payment_method_config.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_payment_method_config.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- gsb_payment_method_config.c	24 Aug 2009 11:54:22 -0000	1.38
+++ gsb_payment_method_config.c	13 Feb 2010 17:44:59 -0000	1.39
@@ -814,19 +814,26 @@
 	gint payment_number;
 
 	model = gtk_tree_view_get_model ( GTK_TREE_VIEW (tree_view));
-	gtk_tree_model_get ( GTK_TREE_MODEL(model), &iter,
-			     PAYMENT_METHODS_NUMBER_COLUMN, &payment_number,
-			     -1 );
+	gtk_tree_model_get ( GTK_TREE_MODEL(model),
+                    &iter,
+			        PAYMENT_METHODS_NUMBER_COLUMN,
+                    &payment_number,
+			        -1 );
 
 	if (payment_number)
 	{
 	    if ( gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( button_auto_numbering )))
 	    {
-		gtk_widget_set_sensitive ( payment_last_number_entry, TRUE );
-		gtk_tree_store_set (GTK_TREE_STORE (model), &iter,
-				    PAYMENT_METHODS_NUMBERING_COLUMN,
-				    gsb_data_payment_get_last_number (payment_number),
-				    -1);
+            gchar* tmpstr;
+
+            gtk_widget_set_sensitive ( payment_last_number_entry, TRUE );
+            tmpstr = utils_str_itoa ( gsb_data_payment_get_last_number ( payment_number ) );
+            gtk_tree_store_set ( GTK_TREE_STORE ( model ),
+                            &iter,
+                            PAYMENT_METHODS_NUMBERING_COLUMN,
+                            tmpstr,
+                            -1);
+            g_free ( tmpstr );
 	    }
 	    else
 	    {
@@ -873,11 +880,13 @@
 			     -1 );
 	if (payment_number)
 	{
-	    gchar* tmpstr = utils_str_itoa (gsb_data_payment_get_last_number (payment_number));
-	    gtk_tree_store_set (GTK_TREE_STORE (model), &iter,
-				PAYMENT_METHODS_NUMBERING_COLUMN,
-				tmpstr,
-				-1);
+        gchar* tmpstr;
+
+        tmpstr = utils_str_itoa ( gsb_data_payment_get_last_number ( payment_number ) );
+        gtk_tree_store_set (GTK_TREE_STORE (model), &iter,
+                        PAYMENT_METHODS_NUMBERING_COLUMN,
+                        tmpstr,
+                        -1);
 	    g_free ( tmpstr );
 	}
     }

Index: metatree.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/metatree.c,v
retrieving revision 1.144
retrieving revision 1.145
diff -u -d -r1.144 -r1.145
--- metatree.c	7 Oct 2009 21:46:21 -0000	1.144
+++ metatree.c	13 Feb 2010 17:44:59 -0000	1.145
@@ -1737,7 +1737,11 @@
     gtk_box_pack_start ( GTK_BOX ( GTK_DIALOG ( dialog ) -> vbox ), hbox,
 			 FALSE, FALSE, 0 );
 
-    tmpstr1 = g_strdup_printf (_("Transfer transactions to %s"), _(iface -> meta_name));
+    if ( iface -> content == 0 )
+        tmpstr1 = g_strdup_printf ( _("Transfer transactions to payee") );
+    else
+        tmpstr1 = g_strdup_printf (_("Transfer transactions to %s"), _(iface -> meta_name));
+
     button_move = gtk_radio_button_new_with_label ( NULL, tmpstr1);
     g_free ( tmpstr1 );
     gtk_box_pack_start ( GTK_BOX ( hbox ), button_move,
@@ -1833,10 +1837,13 @@
     gtk_box_pack_start ( GTK_BOX ( GTK_DIALOG ( dialog ) -> vbox ), hbox,
 			 FALSE, FALSE, 0 );
 
-    if (!sub_division)
-	tmpstr = g_strdup_printf(_("Just remove this %s."), _(iface -> meta_name) );
+    if ( iface -> content == 0 )
+        tmpstr = g_strdup_printf( _("Just remove this payee.") );
+    else if ( !sub_division )
+	    tmpstr = g_strdup_printf(_("Just remove this %s."), _(iface -> meta_name) );
     else
 	tmpstr = g_strdup_printf(_("Just remove this sub-%s."), _(iface -> meta_name) );
+
     button_delete = gtk_radio_button_new_with_label ( gtk_radio_button_get_group ( GTK_RADIO_BUTTON ( button_move )), tmpstr );
     g_free ( tmpstr );
     gtk_box_pack_start ( GTK_BOX ( hbox ), button_delete, FALSE, FALSE, 0 );

Index: gsb_form.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_form.c,v
retrieving revision 1.148
retrieving revision 1.149
diff -u -d -r1.148 -r1.149
--- gsb_form.c	4 Feb 2010 20:04:51 -0000	1.148
+++ gsb_form.c	13 Feb 2010 17:44:59 -0000	1.149
@@ -2042,7 +2042,6 @@
     gint account_number;
     gint element_suivant;
     GtkWidget *widget_prov;
-    gchar *tmp_str;
     
     element_number = GPOINTER_TO_INT (ptr_origin);
     account_number = gsb_form_get_account_number ();
@@ -2110,11 +2109,6 @@
 	    break;
 
 	case GDK_ISO_Left_Tab:
-        widget_prov = gsb_form_widget_get_widget ( element_number );
-        tmp_str = g_object_get_data ( G_OBJECT ( widget_prov ), "combo_text" );
-        if ( tmp_str && strlen ( tmp_str ) > 0 )
-            gtk_combofix_set_text ( GTK_COMBOFIX ( widget_prov ), tmp_str );
-
         element_suivant = gsb_form_widget_next_element ( account_number,
 							     element_number,
 							     GSB_LEFT );
@@ -2137,11 +2131,6 @@
 	    break;
 
 	case GDK_Tab :
-        widget_prov = gsb_form_widget_get_widget ( element_number );
-        tmp_str = g_object_get_data ( G_OBJECT ( widget_prov ), "combo_text" );
-        if ( tmp_str && strlen ( tmp_str ) > 0 )
-            gtk_combofix_set_text ( GTK_COMBOFIX ( widget_prov ), tmp_str );
-
 	    element_suivant = gsb_form_widget_next_element ( account_number,
 							     element_number,
 							     GSB_RIGHT );
@@ -2248,6 +2237,8 @@
     gboolean is_transaction;
     gboolean execute_scheduled = FALSE;
     gint saved_scheduled_number = 0;
+    gint source_transaction_number = -1;
+    gint nbre_passage = 0;
 
     devel_debug (NULL);
 
@@ -2310,150 +2301,176 @@
 
     while ( list_tmp )
     {
-	if ( GPOINTER_TO_INT (list_tmp -> data) == -1 )
-	    /* it's a normal party, we set the list_tmp to NULL */
-	    list_tmp = NULL;
-	else
-	{
-	    /* it's a report, so each time we come here we set the parti's combofix to the
-	     * party of the report */
+        if ( GPOINTER_TO_INT (list_tmp -> data) == -1 )
+            /* it's a normal party, we set the list_tmp to NULL */
+            list_tmp = NULL;
+        else
+        {
+            /* it's a report, so each time we come here we set the parti's combofix to the
+             * party of the report */
 
-	    if ( !list_tmp -> data )
-	    {
-		dialogue_error ( _("No payee selected for this report."));
-		return FALSE;
-	    }
-	    else
-	    {
-		gtk_combofix_set_text ( GTK_COMBOFIX ( gsb_form_widget_get_widget (TRANSACTION_FORM_PARTY)),
-					gsb_data_payee_get_name ( GPOINTER_TO_INT (list_tmp -> data), TRUE ));
+            if ( !list_tmp -> data )
+            {
+                dialogue_error ( _("No payee selected for this report."));
+                return FALSE;
+            }
+            else
+            {
+                GtkWidget *widget;
+                gint payment_number;
 
-		/* if it's not the first party and the method of payment has to change its number (cheque),
-		 * we increase the number. as we are in a party's list, it's always a new transactio, 
-		 * so we know that it's not the first if transaction_number is not 0 */
-		if ( transaction_number )
-		{
-		    gint payment_number;
+                if ( nbre_passage == 0 )
+                {
+                    widget = gsb_form_widget_get_widget ( TRANSACTION_FORM_PARTY );
+                    gtk_combofix_set_text ( GTK_COMBOFIX ( widget ),
+                                gsb_data_payee_get_name ( GPOINTER_TO_INT (
+                                list_tmp -> data ), TRUE ) );
+                    gsb_form_widget_set_empty ( GTK_WIDGET ( GTK_COMBOFIX ( widget ) -> entry ), FALSE );
+                }
+                else
+                {
+                    transaction_number = gsb_data_transaction_new_transaction ( account_number );
 
-		    /* needn't to use mix here because can only be a transaction */
-		    payment_number = gsb_data_transaction_get_method_of_payment_number (transaction_number);
+                    gsb_data_transaction_copy_transaction ( source_transaction_number,
+                                    transaction_number, TRUE );
+                    gsb_data_transaction_set_party_number ( transaction_number,
+                                    GPOINTER_TO_INT ( list_tmp -> data ) );
 
-		    if ( gsb_data_payment_get_automatic_numbering (payment_number)
-			 &&
-			 gsb_data_form_check_for_value ( TRANSACTION_FORM_CHEQUE ))
-		    {
-			gchar* tmpstr = utils_str_itoa (gsb_data_payment_get_last_number (payment_number) + 1);
-			gtk_entry_set_text ( GTK_ENTRY ( gsb_form_widget_get_widget (TRANSACTION_FORM_CHEQUE)), tmpstr);
-			g_free ( tmpstr ) ;
-		    }
-		}
-		list_tmp = list_tmp -> next;
-	    }
-	}
+                    /* if it's not the first party and the method of payment has to change its number (cheque),
+                     * we increase the number. as we are in a party's list, it's always a new transactio, 
+                     * so we know that it's not the first if transaction_number is not 0 */
 
-	/* now we create the transaction if necessary and set the mother in case of child of split */
-	if ( new_transaction )
-	{
-	    /* it's a new transaction, we create it, and set the mother if necessary */
-	    gint mother_transaction = 0;
+                    payment_number = gsb_data_transaction_get_method_of_payment_number (
+                                    source_transaction_number);
 
-	    /* if we are on a white child (ie number < -1, -1 is only for the general white line),
-         * get the mother of transaction */
-	    if ( transaction_number < -1 )
-            mother_transaction = gsb_data_mix_get_mother_transaction_number (
-                                        transaction_number, is_transaction);
-	    transaction_number = gsb_data_mix_new_transaction (account_number, is_transaction);
+                    if ( gsb_data_payment_get_automatic_numbering ( payment_number ) )
+                    {
+                        gchar *tmpstr;
 
-	    gsb_data_mix_set_mother_transaction_number ( transaction_number,
-							 mother_transaction,
-							 is_transaction );
-	}
+                        tmpstr = utils_str_itoa ( gsb_data_payment_get_last_number (
+                                        payment_number ) + nbre_passage );
+                        gsb_data_transaction_set_method_of_payment_content (
+                                        transaction_number,
+                                        tmpstr );
+                        g_free ( tmpstr ) ;
+                    }
+                    gsb_transactions_list_append_new_transaction ( transaction_number, TRUE);
+                }
+                nbre_passage++;
+	        }
 
-	/* take the datas in the form, except the category */
-	gsb_form_take_datas_from_form ( transaction_number, is_transaction );
+            list_tmp = list_tmp -> next;
+            if ( list_tmp == NULL )
+                break;
+            else if ( nbre_passage > 1 )
+                continue;
+	    }
 
-	/* perhaps the currency button is not shown
-	 * in that case, we give the account currency to that transaction */
-	if ( new_transaction
-	     &&
-	     !gsb_form_widget_get_widget (TRANSACTION_FORM_DEVISE))
-	    gsb_data_mix_set_currency_number ( transaction_number,
-					       gsb_data_account_get_currency (account_number),
-					       is_transaction );
+	    /* now we create the transaction if necessary and set the mother in case of child of split */
+        if ( new_transaction )
+        {
+            /* it's a new transaction, we create it, and set the mother if necessary */
+            gint mother_transaction = 0;
 
-	/* get the category and do the stuff with that (contra-transaction...) */
-	gsb_form_get_categories ( transaction_number,
-				  new_transaction,
-				  is_transaction );
+            /* if we are on a white child (ie number < -1, -1 is only for the general white line),
+             * get the mother of transaction */
+            if ( transaction_number < -1 )
+                mother_transaction = gsb_data_mix_get_mother_transaction_number (
+                                            transaction_number, is_transaction);
+            transaction_number = gsb_data_mix_new_transaction (account_number, is_transaction);
+            if ( source_transaction_number == -1 )
+                source_transaction_number = transaction_number;
+            printf ("transaction_number = %d\n", transaction_number);
+            gsb_data_mix_set_mother_transaction_number ( transaction_number,
+                                 mother_transaction,
+                                 is_transaction );
+        }
 
-	/* for the rest we need to split for transactions/scheduled */
-	if (is_transaction)
-	{
-	    /* it's a transaction or an execution of scheduled transaction */
-	    if ( new_transaction )
-	    {
-		gint split_transaction_number;
+        /* take the datas in the form, except the category */
+        gsb_form_take_datas_from_form ( transaction_number, is_transaction );
 
-		gsb_transactions_list_append_new_transaction (transaction_number, TRUE);
+        /* perhaps the currency button is not shown
+         * in that case, we give the account currency to that transaction */
+        if ( new_transaction
+             &&
+             !gsb_form_widget_get_widget (TRANSACTION_FORM_DEVISE))
+            gsb_data_mix_set_currency_number ( transaction_number,
+                               gsb_data_account_get_currency (account_number),
+                               is_transaction );
 
-		/* if it's a real new transaction and if it's a split, we ask if the user wants
-		 * to recover previous children */
-		if ( gsb_data_transaction_get_split_of_transaction (transaction_number)
-		     &&
-		     !execute_scheduled
-		     &&
-		     gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (form_button_recover_split))
-		     &&
-		     (split_transaction_number = gsb_form_transactions_look_for_last_party ( gsb_data_transaction_get_party_number (transaction_number),
-											     transaction_number,
-											     gsb_data_transaction_get_account_number(transaction_number))))
-		    gsb_form_transaction_recover_splits_of_transaction ( transaction_number,
-									 split_transaction_number);
-	    }
-	    else
-	    {
-		/* update a transaction */
-		gsb_transactions_list_update_transaction (transaction_number);
+        /* get the category and do the stuff with that (contra-transaction...) */
+        gsb_form_get_categories ( transaction_number,
+                      new_transaction,
+                      is_transaction );
 
-		/* we are on a modification of transaction, but if the modified transaction is a split
-		 * and has no children (ie only white line), we assume the user wants now fill the children, so we will do the
-		 * same as for a new transaction : open the expander and select the white line */
-		if (transaction_list_get_n_children (transaction_number) == 1)
-		{
-		    new_transaction = TRUE;
-		    gsb_transactions_list_switch_expander (transaction_number);
-		}
-	    }
-	}
-	else
-	{
-	    /* it's a scheduled transaction */
-	    gsb_form_scheduler_get_scheduler_part (transaction_number);
+        /* for the rest we need to split for transactions/scheduled */
+        if (is_transaction)
+        {
+            /* it's a transaction or an execution of scheduled transaction */
+            if ( new_transaction )
+            {
+            gint split_transaction_number;
 
-	    if (new_transaction)
-	    {
-		gint split_transaction_number;
+            gsb_transactions_list_append_new_transaction (transaction_number, TRUE);
 
-		gsb_scheduler_list_append_new_scheduled ( transaction_number,
-							  gsb_scheduler_list_get_end_date_scheduled_showed ());
-		/* recover if necessary previous children */
-		if (gsb_data_scheduled_get_split_of_scheduled (transaction_number)
-		    &&
-		    gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (form_button_recover_split))
-		    &&
-		    (split_transaction_number = gsb_form_transactions_look_for_last_party ( gsb_data_scheduled_get_party_number (transaction_number),
-											    0,
-											    gsb_data_scheduled_get_account_number(transaction_number))))
-		    gsb_form_scheduler_recover_splits_of_transaction ( transaction_number,
-								       split_transaction_number);
-	    }
-	    else
-		gsb_scheduler_list_update_transaction_in_list (transaction_number);
+            /* if it's a real new transaction and if it's a split, we ask if the user wants
+             * to recover previous children */
+            if ( gsb_data_transaction_get_split_of_transaction (transaction_number)
+                 &&
+                 !execute_scheduled
+                 &&
+                 gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (form_button_recover_split))
+                 &&
+                 (split_transaction_number = gsb_form_transactions_look_for_last_party ( gsb_data_transaction_get_party_number (transaction_number),
+                                                     transaction_number,
+                                                     gsb_data_transaction_get_account_number(transaction_number))))
+                gsb_form_transaction_recover_splits_of_transaction ( transaction_number,
+                                         split_transaction_number);
+            }
+            else
+            {
+            /* update a transaction */
+            gsb_transactions_list_update_transaction (transaction_number);
 
-	    /* needed for the two in case of we change the date */
-	    gsb_scheduler_list_set_background_color (gsb_scheduler_list_get_tree_view ());
-	    gsb_calendar_update ();
-	}
+            /* we are on a modification of transaction, but if the modified transaction is a split
+             * and has no children (ie only white line), we assume the user wants now fill the children, so we will do the
+             * same as for a new transaction : open the expander and select the white line */
+            if (transaction_list_get_n_children (transaction_number) == 1)
+            {
+                new_transaction = TRUE;
+                gsb_transactions_list_switch_expander (transaction_number);
+            }
+            }
+        }
+        else
+        {
+            /* it's a scheduled transaction */
+            gsb_form_scheduler_get_scheduler_part (transaction_number);
+
+            if (new_transaction)
+            {
+            gint split_transaction_number;
+
+            gsb_scheduler_list_append_new_scheduled ( transaction_number,
+                                  gsb_scheduler_list_get_end_date_scheduled_showed ());
+            /* recover if necessary previous children */
+            if (gsb_data_scheduled_get_split_of_scheduled (transaction_number)
+                &&
+                gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (form_button_recover_split))
+                &&
+                (split_transaction_number = gsb_form_transactions_look_for_last_party ( gsb_data_scheduled_get_party_number (transaction_number),
+                                                    0,
+                                                    gsb_data_scheduled_get_account_number(transaction_number))))
+                gsb_form_scheduler_recover_splits_of_transaction ( transaction_number,
+                                           split_transaction_number);
+            }
+            else
+            gsb_scheduler_list_update_transaction_in_list (transaction_number);
+
+            /* needed for the two in case of we change the date */
+            gsb_scheduler_list_set_background_color (gsb_scheduler_list_get_tree_view ());
+            gsb_calendar_update ();
+        }
     }
     g_slist_free ( payee_list );
 
@@ -2753,7 +2770,7 @@
 		dialogue_error ( _("A transaction with a multiple payee must be a new one.") );
 		return (FALSE);
 	    }
-	    if (transaction_number < 0)
+	    if ( mother_number > 0 )
 	    {
 		dialogue_error ( _("A transaction with a multiple payee cannot be a split child.") );
 		return (FALSE);
@@ -2805,7 +2822,7 @@
      * and perhaps a second time with the financial year
      * (cannot take it from the transaction if the fyear field is before the date field...) */
     /* get the date first, because the financial year will use it and it can set before the date in the form */
-    date = gsb_calendar_entry_get_date (gsb_form_widget_get_widget (TRANSACTION_FORM_DATE));
+    date = gsb_calendar_entry_get_date ( gsb_form_widget_get_widget ( TRANSACTION_FORM_DATE ) );
 
     /* as financial year can be taken with value date, need to get the value date now too,
      * if TRANSACTION_FORM_VALUE_DATE doesn't exist, value_date will be NULL */
@@ -2853,14 +2870,18 @@
 		    gsb_data_mix_set_financial_year_number ( transaction_number,
                         gsb_fyear_get_fyear_from_combobox (
                         element -> element_widget, date ), is_transaction);
-		break;
+
+            break;
 
 	    case TRANSACTION_FORM_PARTY:
 		if (gsb_form_widget_check_empty (element -> element_widget)) 
 		    gsb_data_mix_set_party_number ( transaction_number, 0, is_transaction );
 		else
 		{
-		    gsb_data_mix_set_party_number ( transaction_number, gsb_data_payee_get_number_by_name ( gtk_combofix_get_text ( GTK_COMBOFIX ( element -> element_widget )), TRUE ), is_transaction);
+		    gsb_data_mix_set_party_number ( transaction_number, 
+                        gsb_data_payee_get_number_by_name (
+                        gtk_combofix_get_text ( GTK_COMBOFIX ( element -> element_widget ) ),
+                        TRUE ), is_transaction );
 		    gsb_payee_update_combofix ();
 		}
 		break;

Index: gtk_combofix.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gtk_combofix.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- gtk_combofix.h	22 Nov 2009 18:45:52 -0000	1.7
+++ gtk_combofix.h	13 Feb 2010 17:44:59 -0000	1.8
@@ -97,20 +97,6 @@
 
 
 /**
- * create a normal combofix, ie just 1 list
- * by default, force is not set, auto_sort is TRUE, no max items
- * and case unsensitive
- *
- * \param list a g_slist of name (\t at the begining makes it as a child)
- * \param force TRUE and the text must be in the list
- * \param sort TRUE and the list will be sorted automatickly
- * \param min_length the minimum of characters to show the popup
- * 
- * \return the new widget
- * */
-GtkWidget *gtk_combofix_new ( GSList *list );
-
-/**
  * create a complex combofix, ie several list set one after the others
  * by default, force is not set, auto_sort is TRUE, no max items
  * and case unsensitive

Index: affichage_liste.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/affichage_liste.c,v
retrieving revision 1.118
retrieving revision 1.119
diff -u -d -r1.118 -r1.119
--- affichage_liste.c	3 Jan 2010 11:21:26 -0000	1.118
+++ affichage_liste.c	13 Feb 2010 17:44:59 -0000	1.119
@@ -48,8 +48,8 @@
 /*START_STATIC*/
 static  gboolean display_mode_button_changed ( GtkWidget *button,
                         gint *line_ptr );
-//~ static gboolean gsb_transactions_list_display_change_max_items ( GtkWidget *entry,
-                        //~ gpointer null );
+static gboolean gsb_transactions_list_display_change_max_items ( GtkWidget *entry,
+                        gpointer null );
 static void gsb_transactions_list_display_show_gives_balance ( void );
 static gboolean gsb_transactions_list_display_sort_by_value_date ( GtkWidget *checkbutton,
                         gpointer null );
@@ -491,9 +491,9 @@
 GtkWidget *onglet_form_completion ( void )
 {
     GtkWidget *vbox_pref;
-    //~ GtkWidget *hbox, *label, *entry;
+    GtkWidget *hbox, *label, *entry;
     GtkWidget *button;
-	//~ gchar* tmpstr;
+	gchar* tmpstr;
 
     vbox_pref = new_vbox_with_title_and_icon ( _("Form completion"), "form.png" );
 
@@ -543,23 +543,23 @@
                         G_CALLBACK ( gsb_transactions_list_display_update_combofix), NULL),
                         FALSE, FALSE, 0 );
 
-    //~ hbox = gtk_hbox_new ( FALSE, 5 );
-    //~ gtk_box_pack_start ( GTK_BOX (vbox_pref), hbox, FALSE, FALSE, 0 );
+    hbox = gtk_hbox_new ( FALSE, 5 );
+    gtk_box_pack_start ( GTK_BOX (vbox_pref), hbox, FALSE, FALSE, 0 );
 
-    //~ label = gtk_label_new (
-                        //~ COLON (_("Maximum items showed in drop down lists (0 for no limit)") ) );
-    //~ gtk_box_pack_start ( GTK_BOX (hbox), label, FALSE, FALSE, 0 );
+    label = gtk_label_new (
+                        COLON (_("Maximum items showed in drop down lists (0 for no limit)") ) );
+    gtk_box_pack_start ( GTK_BOX (hbox), label, FALSE, FALSE, 0 );
 
-    //~ entry = gtk_entry_new ();
-    //~ gtk_widget_set_size_request ( entry, 30, -1 );
-    //~ tmpstr = utils_str_itoa (etat.combofix_max_item);
-    //~ gtk_entry_set_text ( GTK_ENTRY (entry), tmpstr);
-    //~ g_free ( tmpstr );
-    //~ g_signal_connect ( G_OBJECT (entry),
-                        //~ "changed",
-                        //~ G_CALLBACK (gsb_transactions_list_display_change_max_items),
-                        //~ NULL );
-    //~ gtk_box_pack_start ( GTK_BOX (hbox), entry, FALSE, FALSE, 0 );
+    entry = gtk_entry_new ();
+    gtk_widget_set_size_request ( entry, 30, -1 );
+    tmpstr = utils_str_itoa (etat.combofix_max_item);
+    gtk_entry_set_text ( GTK_ENTRY (entry), tmpstr);
+    g_free ( tmpstr );
+    g_signal_connect ( G_OBJECT (entry),
+                        "changed",
+                        G_CALLBACK (gsb_transactions_list_display_change_max_items),
+                        NULL );
+    gtk_box_pack_start ( GTK_BOX (hbox), entry, FALSE, FALSE, 0 );
     
     if ( !gsb_data_account_get_accounts_amount () )
     {
@@ -641,14 +641,14 @@
  *
  * \return FALSE
  * */
-/*gboolean gsb_transactions_list_display_change_max_items ( GtkWidget *entry,
+gboolean gsb_transactions_list_display_change_max_items ( GtkWidget *entry,
                         gpointer null )
 {
     etat.combofix_max_item = utils_str_atoi ( gtk_entry_get_text (GTK_ENTRY (entry)));
     gsb_transactions_list_display_update_combofix ();
 
     return FALSE;
-}*/
+}
 
 
 /**

Index: gsb_form_widget.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_form_widget.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- gsb_form_widget.c	4 Feb 2010 20:04:51 -0000	1.48
+++ gsb_form_widget.c	13 Feb 2010 17:44:59 -0000	1.49
@@ -796,7 +796,6 @@
     }
     element_number = GPOINTER_TO_INT (ptr_origin);
     account_number = gsb_form_get_account_number ();
-    devel_debug_int (element_number);
 
     switch ( element_number )
     {
@@ -1040,9 +1039,6 @@
 
     gtk_tree_model_get ( model, &iter, 1, &tmp_str, -1 );
 
-    widget = gsb_form_widget_get_widget ( element_number );
-    g_object_set_data_full ( G_OBJECT ( widget ), "combo_text", tmp_str, g_free );
-
     if ( tmp_str && strlen ( tmp_str ) )
     {
         switch ( element_number )

Index: utils_files.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/utils_files.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- utils_files.c	6 Feb 2010 14:33:37 -0000	1.52
+++ utils_files.c	13 Feb 2010 17:44:59 -0000	1.53
@@ -81,7 +81,9 @@
     "ISO-8859-1",
     "ISO-8859-15",
     "windows-1252",
-    "IBM850"};
+    "IBM850",
+    NULL};
+
 
 static gchar *all_charset_array[] = {
     "IBM850",
@@ -164,7 +166,9 @@
     "VISCII",
     "x-viet-vps",
     "windows-1258",
-    "ISO-8859-8"};
+    "ISO-8859-8",
+    NULL};
+
 
 /**
  * Handler triggered by clicking on the button of a "print to file"

Index: transaction_model.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/transaction_model.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- transaction_model.c	7 Feb 2010 20:04:16 -0000	1.6
+++ transaction_model.c	13 Feb 2010 17:44:59 -0000	1.7
@@ -149,7 +149,7 @@
     GtkTreeIter iter;
 
     g_return_val_if_fail ( custom_list != NULL, NULL );
-//~ printf ("transaction_number = %d line_in_transaction = %d\n", transaction_number, line_in_transaction);
+
     if (!transaction_model_get_transaction_iter ( &iter,
 						  transaction_number, line_in_transaction ))
     {
@@ -172,7 +172,7 @@
 	/* it's a child, need to get the path of the mother */
 	gtk_tree_path_append_index (path, record -> mother_row -> filtered_pos);
     }
-    //~ printf ("record -> filtered_pos = %d\n", record -> filtered_pos);
+
     gtk_tree_path_append_index (path, record -> filtered_pos);
 
     return path;



More information about the cvs mailing list