[grisbi-cvs] grisbi/src balance_estimate_hist.c, 1.16, 1.17 balance_estimate_tab.c, 1.52, 1.53 gsb_data_category.c, 1.74, 1.75 gsb_transactions_list.c, 1.200, 1.201

Pierre Biava pbiava at users.sourceforge.net
Sun Mar 14 20:42:29 CET 2010


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

Modified Files:
	balance_estimate_hist.c balance_estimate_tab.c 
	gsb_data_category.c gsb_transactions_list.c 
Log Message:
fixed bug 994 and minor corrections

Index: gsb_data_category.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_category.c,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -d -r1.74 -r1.75
--- gsb_data_category.c	28 Feb 2010 08:40:57 -0000	1.74
+++ gsb_data_category.c	14 Mar 2010 19:42:26 -0000	1.75
@@ -841,24 +841,29 @@
     category = gsb_data_category_get_structure ( no_category );
 
     if (!category || !no_category)
-	return my_strdup (return_value_error);
+    {
+        if ( return_value_error == NULL )
+            return NULL;
+        else
+	        return my_strdup ( return_value_error );
+    }
 
-    return_value = my_strdup (category -> category_name);
+    return_value = my_strdup ( category -> category_name );
 
     if ( no_sub_category )
     {
-	struct_sub_category *sub_category;
+        struct_sub_category *sub_category;
 
-	sub_category = gsb_data_category_get_sub_category_structure ( no_category,
-								      no_sub_category );
+        sub_category = gsb_data_category_get_sub_category_structure ( no_category,
+                                          no_sub_category );
 
-	if (sub_category)
-	{
-	    return_value = g_strconcat ( return_value,
-					 " : ",
-					 sub_category -> sub_category_name,
-					 NULL );
-	}
+        if ( sub_category )
+        {
+            return_value = g_strconcat ( return_value,
+                         " : ",
+                         sub_category -> sub_category_name,
+                         NULL );
+        }
     }
     return return_value;
 }

Index: gsb_transactions_list.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_transactions_list.c,v
retrieving revision 1.200
retrieving revision 1.201
diff -u -d -r1.200 -r1.201
--- gsb_transactions_list.c	8 Mar 2010 21:30:01 -0000	1.200
+++ gsb_transactions_list.c	14 Mar 2010 19:42:26 -0000	1.201
@@ -363,39 +363,41 @@
 	GtkCellRenderer *cell_renderer;
 
 	cell_renderer = gtk_cell_renderer_text_new ();
-	g_object_set ( G_OBJECT (cell_renderer),
-		       "xalign", alignment[i],
-		       NULL );
-	transactions_tree_view_columns[i] = gtk_tree_view_column_new_with_attributes ( _(titres_colonnes_liste_operations[i]),
-										       cell_renderer,
-										       "text", i,
-										       "cell-background-gdk", CUSTOM_MODEL_BACKGROUND,
-										       "font", CUSTOM_MODEL_FONT,
-										       NULL );
+	g_object_set ( G_OBJECT ( cell_renderer ),
+		                "xalign", alignment[i],
+		                NULL );
+	transactions_tree_view_columns[i] = gtk_tree_view_column_new_with_attributes (
+                        _(titres_colonnes_liste_operations[i]),
+					    cell_renderer,
+					    "text", i,
+					    "cell-background-gdk", CUSTOM_MODEL_BACKGROUND,
+					    "font", CUSTOM_MODEL_FONT,
+					    NULL );
 
-	if (i == column_balance)
+	if ( i == column_balance )
 	    gtk_tree_view_column_add_attribute ( transactions_tree_view_columns[i],
-						 cell_renderer,
-						 "foreground", CUSTOM_MODEL_AMOUNT_COLOR);
+						cell_renderer,
+						"foreground", CUSTOM_MODEL_AMOUNT_COLOR);
 	else
 	    gtk_tree_view_column_add_attribute ( transactions_tree_view_columns[i],
-						 cell_renderer,
-						 "foreground-gdk", CUSTOM_MODEL_TEXT_COLOR);
+						cell_renderer,
+						"foreground-gdk", CUSTOM_MODEL_TEXT_COLOR );
 
 
 	if ( i == find_element_col (ELEMENT_MARK))
 	{
 	    GtkCellRenderer * radio_renderer = gtk_cell_renderer_toggle_new ( );
 	    gtk_tree_view_column_pack_start ( transactions_tree_view_columns[i],
-					      radio_renderer,
-					      FALSE );
+					    radio_renderer,
+					     FALSE );
 	    gtk_tree_view_column_set_attributes (transactions_tree_view_columns[i], radio_renderer,
-						 "active", CUSTOM_MODEL_CHECKBOX_ACTIVE,
-						 "activatable", CUSTOM_MODEL_CHECKBOX_VISIBLE,
-						 "visible", CUSTOM_MODEL_CHECKBOX_VISIBLE,
-						 "cell-background-gdk", CUSTOM_MODEL_BACKGROUND,
-						 NULL);
-	    g_object_set_data ( G_OBJECT(transactions_tree_view_columns[i]), "radio_renderer", radio_renderer );
+						"active", CUSTOM_MODEL_CHECKBOX_ACTIVE,
+						"activatable", CUSTOM_MODEL_CHECKBOX_VISIBLE,
+						"visible", CUSTOM_MODEL_CHECKBOX_VISIBLE,
+						"cell-background-gdk", CUSTOM_MODEL_BACKGROUND,
+						NULL );
+	    g_object_set_data ( G_OBJECT ( transactions_tree_view_columns[i] ),
+                        "radio_renderer", radio_renderer );
 	}
 
 	gtk_tree_view_column_set_alignment ( transactions_tree_view_columns[i],
@@ -403,9 +405,9 @@
 
 	/* automatic and resizeable sizing */
 	gtk_tree_view_column_set_sizing ( transactions_tree_view_columns[i],
-					  GTK_TREE_VIEW_COLUMN_FIXED );
+					    GTK_TREE_VIEW_COLUMN_FIXED );
 	gtk_tree_view_column_set_resizable ( transactions_tree_view_columns[i],
-					     TRUE );
+					    TRUE );
     }
 
 }
@@ -424,14 +426,16 @@
 
     for ( i = 0 ; i < CUSTOM_MODEL_N_VISIBLES_COLUMN ; i++ )
     {
-	gtk_tree_view_column_set_title ( GTK_TREE_VIEW_COLUMN (transactions_tree_view_columns[i]),
-					 _(titres_colonnes_liste_operations[i]) );
+        gtk_tree_view_column_set_title ( GTK_TREE_VIEW_COLUMN (
+                        transactions_tree_view_columns[i] ),
+                        _(titres_colonnes_liste_operations[i] ) );
 
-	if ( GTK_TREE_VIEW_COLUMN (transactions_tree_view_columns[i])->button )
-	{
-	    gtk_widget_set_tooltip_text ( GTK_WIDGET (GTK_TREE_VIEW_COLUMN (transactions_tree_view_columns[i])->button),
-					  tips_col_liste_operations[i]);
-	}
+        if ( GTK_TREE_VIEW_COLUMN ( transactions_tree_view_columns[i] )->button )
+        {
+            gtk_widget_set_tooltip_text ( GTK_WIDGET ( GTK_TREE_VIEW_COLUMN (
+                        transactions_tree_view_columns[i] )->button ),
+                        tips_col_liste_operations[i] );
+        }
     }
 }
 
@@ -452,55 +456,56 @@
     tree_view = gtk_tree_view_new ();
 
     /*  we cannot do a selection */
-    gtk_tree_selection_set_mode ( GTK_TREE_SELECTION ( gtk_tree_view_get_selection ( GTK_TREE_VIEW( tree_view ))),
-				  GTK_SELECTION_NONE );
+    gtk_tree_selection_set_mode ( GTK_TREE_SELECTION ( gtk_tree_view_get_selection (
+                        GTK_TREE_VIEW( tree_view ))),
+				        GTK_SELECTION_NONE );
 
     /* check the buttons on the list */
     g_signal_connect ( G_OBJECT ( tree_view ),
-		       "button_press_event",
-		       G_CALLBACK ( gsb_transactions_list_button_press ),
-		       NULL );
+		                "button_press_event",
+		                G_CALLBACK ( gsb_transactions_list_button_press ),
+		                NULL );
 
     /* check the keys on the list */
     g_signal_connect ( G_OBJECT ( tree_view ),
-		       "key_press_event",
-		       G_CALLBACK ( gsb_transactions_list_key_press ),
-		       NULL );
+		                "key_press_event",
+		                G_CALLBACK ( gsb_transactions_list_key_press ),
+		                NULL );
 
     g_signal_connect ( G_OBJECT ( tree_view ),
-		       "size_allocate",
-		       G_CALLBACK (gsb_transactions_list_size_allocate),
-		       NULL );
+		                "size_allocate",
+		                G_CALLBACK (gsb_transactions_list_size_allocate),
+		                NULL );
 
     /* we create the columns of the tree view */
     gsb_transactions_list_create_tree_view_columns ();
 
     for ( i = 0 ; i < CUSTOM_MODEL_N_VISIBLES_COLUMN ; i++ )
     {
-	gtk_tree_view_append_column ( GTK_TREE_VIEW ( tree_view ),
-				      transactions_tree_view_columns[i] );
+	    gtk_tree_view_append_column ( GTK_TREE_VIEW ( tree_view ),
+				        transactions_tree_view_columns[i] );
 
-	gtk_tree_view_column_set_clickable ( transactions_tree_view_columns[i],
-					     TRUE );
+	    gtk_tree_view_column_set_clickable ( transactions_tree_view_columns[i],
+					    TRUE );
 
 	/* 	    set the tooltips */
-	gtk_widget_set_tooltip_text ( GTK_WIDGET (transactions_tree_view_columns[i] ->button),
-				      tips_col_liste_operations[i]);
+	    gtk_widget_set_tooltip_text ( GTK_WIDGET (transactions_tree_view_columns[i] -> button),
+				        tips_col_liste_operations[i] );
 
-	g_signal_connect ( G_OBJECT ( transactions_tree_view_columns[i] -> button),
-			   "button-press-event",
-			   G_CALLBACK ( gsb_transactions_list_title_column_button_press ),
-			   GINT_TO_POINTER (i));
+	    g_signal_connect ( G_OBJECT ( transactions_tree_view_columns[i] -> button),
+			            "button-press-event",
+			            G_CALLBACK ( gsb_transactions_list_title_column_button_press ),
+			            GINT_TO_POINTER ( i ) );
 
-	/* use the click to sort the list */
-	g_signal_connect ( G_OBJECT ( transactions_tree_view_columns[i] ),
-			   "clicked",
-			   G_CALLBACK ( gsb_transactions_list_change_sort_column ),
-			   GINT_TO_POINTER (i));
+	    /* use the click to sort the list */
+	    g_signal_connect ( G_OBJECT ( transactions_tree_view_columns[i] ),
+			            "clicked",
+			            G_CALLBACK ( gsb_transactions_list_change_sort_column ),
+			            GINT_TO_POINTER ( i ) );
     }
 
-    gtk_tree_view_set_model ( GTK_TREE_VIEW (tree_view),
-			      GTK_TREE_MODEL (model));
+    gtk_tree_view_set_model ( GTK_TREE_VIEW ( tree_view ),
+			            GTK_TREE_MODEL ( model ) );
     return tree_view;
 }
 
@@ -2256,13 +2261,15 @@
     /* set a menu to clear the cell except for the first line */
     if ( y > 0 )
     {
-    item = gtk_menu_item_new_with_label ( _("Clear cell") );
+        item = gtk_menu_item_new_with_label ( _("Clear cell") );
 
-	g_object_set_data ( G_OBJECT (item), "x", GINT_TO_POINTER (x) );
-	g_object_set_data ( G_OBJECT (item), "y", GINT_TO_POINTER (y) );
-	g_signal_connect ( G_OBJECT(item), "activate",
-			   G_CALLBACK(gsb_gui_change_cell_content), GINT_TO_POINTER (i+1));
-	gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ), item );
+        g_object_set_data ( G_OBJECT ( item ), "x", GINT_TO_POINTER ( x ) );
+        g_object_set_data ( G_OBJECT ( item ), "y", GINT_TO_POINTER ( y ) );
+        g_signal_connect ( G_OBJECT ( item ),
+                        "activate",
+			            G_CALLBACK ( gsb_gui_change_cell_content ),
+                        GINT_TO_POINTER ( i+1 ) );
+        gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ), item );
     }
     return menu;
 }
@@ -2287,21 +2294,25 @@
     gint col, line;
     gint last_col, last_line;
     gint element;
+    gint sort_column;
+    gint current_account;
 
-    element = GPOINTER_TO_INT (element_ptr);
+    element = GPOINTER_TO_INT ( element_ptr );
 
-    devel_debug_int (element);
+    devel_debug_int ( element );
 
-    last_col = find_element_col (element);
-    last_line = find_element_line (element);
+    last_col = find_element_col ( element );
+    last_line = find_element_line ( element );
+    current_account = gsb_gui_navigation_get_current_account ( );
+    sort_column = gsb_data_account_get_sort_column ( current_account );
 
-    col = GPOINTER_TO_INT (g_object_get_data ( G_OBJECT (item), "x" ));
-    line = GPOINTER_TO_INT (g_object_get_data ( G_OBJECT (item), "y" ));
+    col = GPOINTER_TO_INT ( g_object_get_data ( G_OBJECT ( item ), "x" ) );
+    line = GPOINTER_TO_INT ( g_object_get_data ( G_OBJECT ( item ), "y" ) );
 
     /* if no change, change nothing */
-    if (last_col == col
+    if ( last_col == col
 	&&
-	last_line == line)
+	last_line == line )
 	return FALSE;
 
     /* save the new position */
@@ -2315,11 +2326,22 @@
     }
 
     /* now we can update the element */
-    transaction_list_update_element (element);
+    transaction_list_update_element ( element );
     recuperation_noms_colonnes_et_tips ( );
     update_titres_tree_view ( );
+
+    /* update the sort column */
+    if ( sort_column == last_col )
+    {
+        gsb_data_account_set_sort_column ( current_account, col );
+        gsb_data_account_set_element_sort ( current_account, col, element );
+        transaction_list_sort_set_column ( col, 
+				        gsb_data_account_get_sort_type ( current_account ) );
+    }
+
     if ( etat.modification_fichier == 0 )
         modification_fichier ( TRUE );
+
     return FALSE;
 }
 
@@ -2995,7 +3017,7 @@
     /* we want a descending sort but gsb_transactions_list_change_sort_column will
      * invert the order, so set DESCENDING for now */
     transaction_list_sort_set_column ( column_number,
-				       GTK_SORT_DESCENDING );
+				        GTK_SORT_DESCENDING );
     gsb_transactions_list_change_sort_column (NULL, no_column);
     return FALSE;
 }

Index: balance_estimate_tab.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/balance_estimate_tab.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- balance_estimate_tab.c	13 Mar 2010 21:06:58 -0000	1.52
+++ balance_estimate_tab.c	14 Mar 2010 19:42:26 -0000	1.53
@@ -355,7 +355,7 @@
                         _("Please select the data source for the account: \"%s\""),
                         gsb_data_account_get_name ( account_nb ) );
     widget = GTK_WIDGET ( g_object_get_data ( G_OBJECT ( notebook ), "bet_hist_title") );
-    gtk_label_set_markup ( GTK_LABEL ( widget ), title );
+    gtk_label_set_label ( GTK_LABEL ( widget ), title );
     g_free ( title );
 
     /* clear the model */
@@ -424,9 +424,9 @@
 GtkWidget *bet_array_create_page ( void )
 {
     GtkWidget *notebook;
+    GtkWidget *page;
     GtkWidget *widget = NULL;
     GtkWidget *initial_date = NULL;
-    GtkWidget *vbox;
     GtkWidget *hbox;
     GtkWidget *align;
     GtkWidget *label;
@@ -442,19 +442,19 @@
 
     devel_debug (NULL);
     notebook = g_object_get_data ( G_OBJECT ( notebook_general ), "account_notebook");
-    vbox = gtk_vbox_new ( FALSE, 5 );
-    g_object_set_data ( G_OBJECT ( notebook ), "bet_account_duration", vbox );
+    page = gtk_vbox_new ( FALSE, 5 );
+    g_object_set_data ( G_OBJECT ( notebook ), "bet_account_duration", page );
 
     /* create the title */
     align = gtk_alignment_new (0.5, 0.0, 0.0, 0.0);
-    gtk_box_pack_start ( GTK_BOX ( vbox ), align, FALSE, FALSE, 5) ;
+    gtk_box_pack_start ( GTK_BOX ( page ), align, FALSE, FALSE, 5) ;
 
     label = gtk_label_new ("Estimate array");
     gtk_container_add ( GTK_CONTAINER ( align ), label );
     g_object_set_data ( G_OBJECT ( notebook ), "bet_array_title", label );
 
     align = gtk_alignment_new (0.5, 0.0, 0.0, 0.0);
-    gtk_box_pack_start ( GTK_BOX ( vbox ), align, FALSE, FALSE, 5) ;
+    gtk_box_pack_start ( GTK_BOX ( page ), align, FALSE, FALSE, 5) ;
 
     hbox = gtk_hbox_new ( FALSE, 5 );
     gtk_container_add ( GTK_CONTAINER ( align ), hbox );
@@ -556,7 +556,7 @@
 				        GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC );
     gtk_container_add ( GTK_CONTAINER ( scrolled_window ), tree_view );
     gtk_widget_show ( scrolled_window );
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
+    gtk_box_pack_start ( GTK_BOX ( page ),
 		                GTK_WIDGET ( scrolled_window ), TRUE, TRUE, 5 );
 
     /* Date column */
@@ -638,9 +638,9 @@
 		                G_CALLBACK ( bet_array_list_button_press ),
 		                NULL );
 
-    gtk_widget_show_all ( vbox );
+    gtk_widget_show_all ( page );
 
-    return vbox;
+    return page;
 }
 
 
@@ -1376,6 +1376,7 @@
     gint account_nb;
     GDate *date;
 
+    devel_debug (NULL);
     gtk_editable_select_region ( GTK_EDITABLE ( entry ), 0, 0 );
     account_nb = gsb_gui_navigation_get_current_account ( );
     date = gsb_parse_date_string ( gtk_entry_get_text ( GTK_ENTRY ( entry ) ) );

Index: balance_estimate_hist.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/balance_estimate_hist.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- balance_estimate_hist.c	13 Mar 2010 21:54:28 -0000	1.16
+++ balance_estimate_hist.c	14 Mar 2010 19:42:26 -0000	1.17
@@ -127,12 +127,12 @@
     GtkWidget *notebook;
     GtkWidget *widget;
     GtkWidget *page;
-    GtkWidget *vbox;
     GtkWidget *hbox;
+    GtkWidget *align;
+    GtkWidget *label;
     GtkWidget *button_1, *button_2;
     GtkWidget *tree_view;
     gchar *str_year;
-    gchar *title;
     gint year;
 
     devel_debug (NULL);
@@ -140,29 +140,19 @@
     page = gtk_vbox_new ( FALSE, 5 );
 
     /* titre de la page */
-    hbox = gtk_hbox_new ( FALSE, 5 );
-    gtk_box_pack_start ( GTK_BOX ( page ), hbox, FALSE, FALSE, 15 );
+    align = gtk_alignment_new (0.5, 0.0, 0.0, 0.0);
+    gtk_box_pack_start ( GTK_BOX ( page ), align, FALSE, FALSE, 5) ;
  
-    widget = gtk_image_new_from_stock(
-                        GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG);
-    gtk_box_pack_start ( GTK_BOX ( hbox ), widget, FALSE, FALSE, 5 );
-
-    vbox = gtk_vbox_new ( FALSE, 5 );
-    gtk_box_pack_start ( GTK_BOX ( hbox ), vbox, FALSE, FALSE, 5) ;
-
-    widget = gtk_label_new ( "bet_hist_title" );
-    g_object_set_data ( G_OBJECT ( notebook ), "bet_hist_title", widget);
-    title = g_strdup_printf (
-                        _("Please select the data source for the account: \"%s\""),
-                        gsb_data_account_get_name (
-                        gsb_gui_navigation_get_current_account ( ) ) );
-    gtk_label_set_markup ( GTK_LABEL ( widget ), title );
-    g_free ( title );
-    gtk_box_pack_start ( GTK_BOX ( vbox ), widget, FALSE, FALSE, 5 );
+    label = gtk_label_new ( "bet_hist_title" );
+    gtk_container_add ( GTK_CONTAINER ( align ), label );
+    g_object_set_data ( G_OBJECT ( notebook ), "bet_hist_title", label);
 
     /* Choix des données sources */
+    align = gtk_alignment_new (0.5, 0.0, 0.0, 0.0);
+    gtk_box_pack_start ( GTK_BOX ( page ), align, FALSE, FALSE, 5) ;
+
     hbox = gtk_hbox_new ( FALSE, 5 );
-    gtk_box_pack_start ( GTK_BOX ( vbox ), hbox, FALSE, FALSE, 15 );
+    gtk_container_add ( GTK_CONTAINER ( align ), hbox );
     g_object_set_data ( G_OBJECT ( notebook ), "bet_historical_data", hbox );
 
     button_1 = gtk_radio_button_new_with_label ( NULL,
@@ -416,7 +406,7 @@
         number = gsb_real_get_from_string ( new_text );
         currency_number = gsb_data_account_get_currency ( account_nb );
         tmp_str = gsb_real_get_string_with_currency ( number, currency_number, TRUE );
-        //~ printf ("div = %d sub_div = %d tmp_str = %s\n", div, sub_div, tmp_str);
+
         if ( bet_data_search_div_hist ( account_nb, div_number, sub_div_nb ) == FALSE )
             bet_data_add_div_hist ( account_nb, div_number, sub_div_nb );
 
@@ -427,6 +417,7 @@
                             SPP_HISTORICAL_RETAINED_COLUMN, tmp_str,
                             SPP_HISTORICAL_RETAINED_AMOUNT, new_text,
                             -1 );
+        g_free ( tmp_str );
 
         if ( is_parent )
         gtk_tree_store_set ( GTK_TREE_STORE ( model ),
@@ -439,8 +430,6 @@
             number = bet_historical_get_children_amount ( model, &parent );
             bet_data_set_div_amount ( account_nb, div_number, 0, number );
             str_amount = gsb_real_save_real_to_string ( number, 2 );
-            if ( tmp_str )
-                g_free ( tmp_str );
             tmp_str = gsb_real_get_string_with_currency ( number,
                         gsb_data_account_get_currency ( account_nb ), TRUE );
             gtk_tree_store_set ( GTK_TREE_STORE ( model ),
@@ -844,12 +833,12 @@
                         SPP_HISTORICAL_RETAINED_COLUMN, str_retained,
                         SPP_HISTORICAL_RETAINED_AMOUNT, str_amount,
                         -1);
+        g_free ( str_retained );
     }
 
     g_free ( div_name );
     g_free ( str_average );
     g_free ( str_amount );
-    g_free ( str_retained );
 
     if ( g_hash_table_size ( sh -> list_sub_div ) <= 1 )
         return;
@@ -888,7 +877,7 @@
         gtk_tree_store_append ( GTK_TREE_STORE ( model ), &fils, &parent );
         gtk_tree_store_set ( GTK_TREE_STORE ( model ),
                         &fils,
-                        SPP_HISTORICAL_DESC_COLUMN, g_strdup ( div_name ),
+                        SPP_HISTORICAL_DESC_COLUMN, div_name,
                         SPP_HISTORICAL_BALANCE_COLUMN, str_balance,
                         SPP_HISTORICAL_AVERAGE_COLUMN, str_average,
                         SPP_HISTORICAL_AVERAGE_AMOUNT, str_amount,
@@ -931,12 +920,13 @@
                         -1);
             sub_div_visible = TRUE;
             gtk_tree_view_expand_to_path ( tree_view, gtk_tree_model_get_path ( model, &fils ) );
+
+            g_free ( str_retained );
         }
         g_free ( div_name );
         g_free ( str_balance );
         g_free ( str_average );
         g_free ( str_amount );
-        g_free ( str_retained );
     }
 
     if ( sub_div_visible && bet_historical_get_full_div ( model, &parent ) )



More information about the cvs mailing list