[grisbi-cvs] grisbi/src import.c,1.302,1.303

Gunee guneemwelloeux at users.sourceforge.net
Fri Nov 13 21:39:31 CET 2009


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

Modified Files:
	import.c 
Log Message:
Fixed bad operation causing bug with GTK 2.18

Index: import.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/import.c,v
retrieving revision 1.302
retrieving revision 1.303
diff -u -d -r1.302 -r1.303
--- import.c	7 Nov 2009 08:09:57 -0000	1.302
+++ import.c	13 Nov 2009 20:39:28 -0000	1.303
@@ -3613,22 +3613,23 @@
     GtkWidget *combo, *entry;
     GtkTreeView *treeview;
     GtkTreeModel *list_store;
-    const gchar *payee, *search_str;
+    gchar *payee, *search_str;
     gint payee_number;
 
     combo = g_object_get_data ( G_OBJECT (main_widget), "payee" );
-    payee = g_strstrip ( (gchar *) gtk_combofix_get_text ( GTK_COMBOFIX (combo) ) );
+    payee = g_strstrip ( g_strdup ( gtk_combofix_get_text ( GTK_COMBOFIX (combo) ) ) );
     if ( strlen ( payee ) == 0 )
         return;
 
     entry = g_object_get_data ( G_OBJECT (main_widget), "Search_string" );
-    search_str = g_strstrip ( (gchar *)  gtk_entry_get_text ( GTK_ENTRY (entry) ) );
+    search_str = g_strstrip ( g_strdup ( gtk_entry_get_text ( GTK_ENTRY (entry) ) ) );
     if ( strlen ( search_str ) == 0 )
         return;
     devel_debug (payee);
     devel_debug (search_str);
 
     payee_number = gsb_data_payee_get_number_by_name  ( payee, TRUE );
+	g_free(payee);
     treeview = g_object_get_data ( G_OBJECT (main_widget), "treeview" );
     list_store = gtk_tree_view_get_model ( GTK_TREE_VIEW (treeview) );
 
@@ -3639,7 +3640,7 @@
 
         assoc = g_malloc ( sizeof (struct struct_payee_asso) );
         assoc -> payee_number = payee_number;
-        assoc -> search_str = g_strdup ( search_str );
+        assoc -> search_str = search_str;
         liste_associations_tiers = g_slist_append ( liste_associations_tiers,
                         assoc );
         gsb_data_payee_set_search_string ( payee_number, search_str );
@@ -3650,7 +3651,7 @@
 
         assoc = g_malloc ( sizeof (struct struct_payee_asso) );
         assoc -> payee_number = payee_number;
-        assoc -> search_str = g_strdup ( search_str );
+        assoc -> search_str = search_str;
         if ( g_slist_find_custom (liste_associations_tiers,
                         assoc,
                         (GCompareFunc) gsb_import_associations_cmp_assoc) )



More information about the cvs mailing list