[grisbi-cvs] grisbi/src gsb_currency_config.c,1.47,1.48

Pierre Biava pbiava at users.sourceforge.net
Sun Feb 22 21:55:18 CET 2009


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

Modified Files:
	gsb_currency_config.c 
Log Message:
erase the entries of the currency page after remove the selected currency

Index: gsb_currency_config.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_currency_config.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- gsb_currency_config.c	5 Feb 2009 22:19:46 -0000	1.47
+++ gsb_currency_config.c	22 Feb 2009 20:55:15 -0000	1.48
@@ -592,8 +592,10 @@
 void gsb_currency_config_remove_currency ( GtkWidget *button,
 					   GtkWidget *tree_view )
 {
+    GtkWidget *entry_name, *entry_iso_code, *entry_code, *entry_floating_point;
     GSList *list_tmp;
     gint currency_number;
+    GtkTreeModel *model;
 
     devel_debug (NULL);
     currency_number = gsb_currency_config_get_selected ( GTK_TREE_VIEW ( tree_view ) );
@@ -651,6 +653,18 @@
     }
 
     gsb_currency_config_remove_selected_from_view ( GTK_TREE_VIEW(tree_view) );
+
+    /*  pbiava the 02/22/09 erase the entries */
+    model = gtk_tree_view_get_model ( GTK_TREE_VIEW ( tree_view ) );
+    entry_name = g_object_get_data ( G_OBJECT(model), "entry_name" );
+    gsb_autofunc_int_erase_entry ( entry_name );
+    entry_iso_code = g_object_get_data ( G_OBJECT(model), "entry_iso_code" );
+    gsb_autofunc_int_erase_entry ( entry_iso_code );
+    entry_code = g_object_get_data ( G_OBJECT(model), "entry_code" );
+    gsb_autofunc_int_erase_entry ( entry_code );
+    entry_floating_point = g_object_get_data ( G_OBJECT(model), "entry_floating_point" );
+    gsb_autofunc_int_erase_entry ( entry_floating_point );
+
     gsb_data_currency_remove (currency_number);
     gsb_currency_update_combobox_currency_list ();
 }



More information about the cvs mailing list