[grisbi-cvs] grisbi/src gsb_data_payee.c, 1.41, 1.42 gsb_data_payee.h, 1.19, 1.20 gsb_file_load.c, 1.154, 1.155 gsb_file_save.c, 1.115, 1.116 import.c, 1.267, 1.268 import.h, 1.38, 1.39 tiers_onglet.c, 1.154, 1.155 utils_buttons.c, 1.48, 1.49 utils_buttons.h, 1.22, 1.23

Pierre Biava pbiava at users.sourceforge.net
Sun Mar 22 19:53:27 CET 2009


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

Modified Files:
	gsb_data_payee.c gsb_data_payee.h gsb_file_load.c 
	gsb_file_save.c import.c import.h tiers_onglet.c 
	utils_buttons.c utils_buttons.h 
Log Message:
Add reunification of payees including in the imports. See import tab for options and to make the associations. Shortcuts used in the management of payees are automatically added to the list.

Index: gsb_data_payee.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_payee.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- gsb_data_payee.c	5 Mar 2009 19:12:29 -0000	1.41
+++ gsb_data_payee.c	22 Mar 2009 18:53:25 -0000	1.42
@@ -52,6 +52,7 @@
     guint payee_number;
     gchar *payee_name;
     gchar *payee_description;
+    gchar *payee_search_string;
 
     gint payee_nb_transactions;
     gsb_real payee_balance;
@@ -801,3 +802,41 @@
     }
     return nb_removed;
 }
+
+
+const gchar *gsb_data_payee_get_search_string ( gint no_payee )
+{
+    struct_payee *payee;
+
+    payee = gsb_data_payee_get_structure ( no_payee );
+
+    if (!payee)
+        return "";
+
+    if ( payee -> payee_search_string && strlen (payee -> payee_search_string) )
+        return payee -> payee_search_string;
+    else
+        return "";
+}
+
+gboolean gsb_data_payee_set_search_string ( gint no_payee, const gchar *search_string )
+{
+    struct_payee *payee;
+
+    payee = gsb_data_payee_get_structure ( no_payee );
+
+    if (!payee)
+        return FALSE;
+
+    /* we free the last name */
+    if ( payee -> payee_search_string )
+        g_free (payee -> payee_search_string);
+    
+    /* and copy the new one */
+    if (search_string)
+        payee -> payee_search_string = my_strdup (search_string);
+    else
+        payee -> payee_search_string = NULL;
+
+    return TRUE;
+}

Index: gsb_data_payee.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_payee.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- gsb_data_payee.h	13 Mar 2009 20:15:37 -0000	1.19
+++ gsb_data_payee.h	22 Mar 2009 18:53:25 -0000	1.20
@@ -21,6 +21,7 @@
 gint gsb_data_payee_get_number_by_name ( const gchar *name,
 					 gboolean create );
 GSList *gsb_data_payee_get_payees_list ( void );
+const gchar *gsb_data_payee_get_search_string ( gint no_payee );
 gpointer gsb_data_payee_get_structure ( gint no_payee );
 gboolean gsb_data_payee_init_variables ( void );
 gint gsb_data_payee_new ( const gchar *name );
@@ -33,6 +34,7 @@
 				   const gchar *name );
 gint gsb_data_payee_set_new_number ( gint no_payee,
 				     gint new_no_payee );
+gboolean gsb_data_payee_set_search_string ( gint no_payee, const gchar *search_string );
 void gsb_data_payee_update_counters ( void );
 /* END_DECLARATION */
 #endif

Index: gsb_file_save.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_save.c,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -d -r1.115 -r1.116
--- gsb_file_save.c	17 Mar 2009 22:05:33 -0000	1.115
+++ gsb_file_save.c	22 Mar 2009 18:53:25 -0000	1.116
@@ -102,8 +102,8 @@
 					gulong *length_calculated,
 					gchar **file_content );
 static gulong gsb_file_save_party_part ( gulong iterator,
-				  gulong *length_calculated,
-				  gchar **file_content );
+                        gulong *length_calculated,
+                        gchar **file_content );
 static gulong gsb_file_save_payment_part ( gulong iterator,
 				    gulong *length_calculated,
 				    gchar **file_content );
@@ -115,8 +115,8 @@
 				      gulong *length_calculated,
 				      gchar **file_content );
 static gulong gsb_file_save_scheduled_part ( gulong iterator,
-				      gulong *length_calculated,
-				      gchar **file_content );
+                        gulong *length_calculated,
+                        gchar **file_content );
 static gulong gsb_file_save_transaction_part ( gulong iterator,
 					gulong *length_calculated,
 					gchar **file_content,
@@ -1173,8 +1173,8 @@
  * \return the new iterator
  * */
 gulong gsb_file_save_scheduled_part ( gulong iterator,
-				      gulong *length_calculated,
-				      gchar **file_content )
+                        gulong *length_calculated,
+                        gchar **file_content )
 {
     GSList *list_tmp;
 	
@@ -1250,8 +1250,8 @@
  * \return the new iterator
  * */
 gulong gsb_file_save_party_part ( gulong iterator,
-				  gulong *length_calculated,
-				  gchar **file_content )
+                        gulong *length_calculated,
+                        gchar **file_content )
 {
     GSList *list_tmp;
 	
@@ -1259,26 +1259,27 @@
 
     while ( list_tmp )
     {
-	gchar *new_string;
-	gint payee_number;
+        gchar *new_string;
+        gint payee_number;
 
-	payee_number = gsb_data_payee_get_no_payee (list_tmp -> data);
-	/* now we can fill the file content */
+        payee_number = gsb_data_payee_get_no_payee (list_tmp -> data);
+        /* now we can fill the file content */
 
-	new_string = g_markup_printf_escaped ( "\t<Party Nb=\"%d\" Na=\"%s\" Txt=\"%s\" />\n",
-					       payee_number,
-					       gsb_data_payee_get_name (payee_number,
-								   TRUE ),
-					       gsb_data_payee_get_description (payee_number));
+        new_string = g_markup_printf_escaped ( 
+                            "\t<Party Nb=\"%d\" Na=\"%s\" Txt=\"%s\" Search=\"%s\" />\n",
+                            payee_number,
+                            gsb_data_payee_get_name (payee_number, TRUE ),
+                            gsb_data_payee_get_description (payee_number),
+                            gsb_data_payee_get_search_string (payee_number) );
 
-	/* append the new string to the file content
-	 * and take the new iterator */
+        /* append the new string to the file content
+         * and take the new iterator */
 
-	iterator = gsb_file_save_append_part ( iterator,
-					       length_calculated,
-					       file_content,
-					       new_string );
-	list_tmp = list_tmp -> next;
+        iterator = gsb_file_save_append_part ( iterator,
+                            length_calculated,
+                            file_content,
+                            new_string );
+        list_tmp = list_tmp -> next;
     }
     return iterator;
 }

Index: import.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/import.c,v
retrieving revision 1.267
retrieving revision 1.268
diff -u -d -r1.267 -r1.268
--- import.c	22 Mar 2009 10:52:53 -0000	1.267
+++ import.c	22 Mar 2009 18:53:25 -0000	1.268
@@ -58,19 +58,22 @@
 #include "./tiers_onglet.h"
 #include "./gsb_real.h"
 #include "./gsb_status.h"
+#include "./utils_str.h"
 #include "./gsb_transactions_list.h"
+#include "./gtk_combofix.h"
 #include "./traitement_variables.h"
 #include "./main.h"
 #include "./accueil.h"
-#include "./utils_str.h"
 #include "./parametres.h"
 #include "./qif.h"
 #include "./transaction_list.h"
 #include "./structures.h"
 #include "./gsb_transactions_list.h"
 #include "./go-charmap-sel.h"
+#include "./utils_buttons.h"
 #include "./gsb_data_payment.h"
 #include "./gsb_data_account.h"
+#include "./gtk_combofix.h"
 #include "./include.h"
 #include "./gsb_data_transaction.h"
 #include "./gsb_form_scheduler.h"
@@ -94,6 +97,24 @@
 static GtkWidget * cree_ligne_recapitulatif ( struct struct_compte_importation * compte );
 static void gsb_import_add_imported_transactions ( struct struct_compte_importation *imported_account,
 					    gint account_number );
+static void gsb_import_associations_add_assoc ( GtkWidget *button, GtkWidget *dialog );
+static  void gsb_import_associations_cell_edited (GtkCellRendererText *cell,
+                        const gchar *path_string,
+                        const gchar *new_text,
+                        gpointer data);
+static gint gsb_import_associations_cmp_assoc (struct struct_payee_asso *assoc_1,
+                                        struct struct_payee_asso *assoc_2);
+static void gsb_import_associations_combo_changed ( GtkEditable *editable,
+                        GtkDialog *dialog );
+static void gsb_import_associations_del_assoc ( GtkWidget *button, GtkWidget *dialog );
+static void gsb_import_associations_fill_model ( GtkListStore *list_store );
+static gint gsb_import_associations_find_payee ( gchar *imported_tiers);
+static void gsb_import_associations_gere_tiers (GtkWidget *button, gpointer data );
+static gboolean gsb_import_associations_select_func ( GtkTreeSelection *selection,
+                        GtkTreeModel *model,
+                        GtkTreePath *path,
+                        gboolean path_currently_selected,
+                        gpointer data );
 static gchar **gsb_import_by_rule_ask_filename ( gint rule );
 static gboolean gsb_import_by_rule_get_file ( GtkWidget *button,
 				       GtkWidget *entry );
@@ -175,6 +196,10 @@
 
 gchar   * charmap_imported;
 
+/* gestion des associations entre un tiers et sa chaine de recherche */
+GSList *liste_associations_tiers = NULL;
+
+
 enum import_filesel_columns {
     IMPORT_FILESEL_SELECTED = 0,
     IMPORT_FILESEL_TYPENAME,
@@ -1864,7 +1889,10 @@
 						date_fin_comparaison ) <= 0 )
 
 			     &&
-			     !imported_transaction -> ope_de_ventilation )
+			     !imported_transaction -> ope_de_ventilation 
+                 &&
+                gsb_data_transaction_get_automatic_transaction (
+                        transaction_number_tmp) > 0 )
 			{
 			    /* the imported transaction has the same date and same amount, will ask the user */
 			    imported_transaction -> action = IMPORT_TRANSACTION_ASK_FOR_TRANSACTION;
@@ -2250,12 +2278,27 @@
 					       imported_transaction -> devise );
 
     /* récupération du tiers */
+    /* pbiava on 03/22/2009 utilisation des remplacements de tiers.
+     * on sauvegarde systématiquement le tiers importé. Peut-etre
+     * remplacé plus loin si des notes sont attachées aux 
+     * transactions importées */
     if ( imported_transaction -> tiers
 	 &&
 	 strlen (imported_transaction -> tiers))
     {
-        payee_number = gsb_data_payee_get_number_by_name ( imported_transaction -> tiers,
-										    TRUE );
+        payee_number = gsb_import_associations_find_payee (
+                        imported_transaction -> tiers );
+        if ( payee_number == 0 )
+            payee_number = gsb_data_payee_get_number_by_name (
+                        imported_transaction -> tiers, TRUE );
+        else
+        {
+            if ( g_utf8_collate ( (gchar *) gsb_data_payee_get_name (
+                        payee_number, FALSE ),
+                        imported_transaction -> tiers ) != 0 )
+                gsb_data_transaction_set_notes ( transaction_number,
+                        imported_transaction -> tiers );
+        }
         gsb_data_transaction_set_party_number ( transaction_number, payee_number );
     }
 
@@ -2313,19 +2356,26 @@
 	}
     else if ( etat.get_categorie_for_payee )
     {
-        /* pbiava the 02/26/2009 associate category to the tiers */
+        /* pbiava the 02/26/2009 associate category and bugetary to the tiers */
         last_transaction_number = gsb_form_transactions_look_for_last_party (
                                     payee_number, transaction_number,
                                     account_number );
         category_number = gsb_data_transaction_get_category_number (
                                     last_transaction_number );
-        devel_debug_int (category_number);
         gsb_data_transaction_set_category_number ( transaction_number,
                                 category_number );
         category_number = gsb_data_transaction_get_sub_category_number (
                                 last_transaction_number );
         gsb_data_transaction_set_sub_category_number ( transaction_number,
                                 category_number );
+        category_number = gsb_data_transaction_get_budgetary_number (
+                                    last_transaction_number );
+        gsb_data_transaction_set_budgetary_number ( transaction_number,
+                                category_number );
+        category_number = gsb_data_transaction_get_sub_budgetary_number ( 
+                                last_transaction_number );
+        gsb_data_transaction_set_sub_budgetary_number ( transaction_number,
+                                category_number );
     }
 	else
 	{
@@ -2335,7 +2385,11 @@
     }
 
     /* récupération des notes */
-    gsb_data_transaction_set_notes ( transaction_number,
+    /* 	pbiava on 03/22/2009 modifié pour conserver la sauvegarde de l'import
+     * du tiers importé si nécessaire */
+    if ( imported_transaction -> notes &&
+                        strlen (imported_transaction -> notes) )
+        gsb_data_transaction_set_notes ( transaction_number,
 				     imported_transaction -> notes );
 
     if (origine && g_ascii_strcasecmp (origine, "OFX") == 0 )
@@ -3135,48 +3189,60 @@
     GtkWidget *button;
 
     vbox_pref = new_vbox_with_title_and_icon ( _("Import"),
-					       "importlg.png" );
+                        "importlg.png" );
 
-    /* Dataimport settings */
+    /* Data import settings */
     paddingbox = new_paddingbox_with_title (vbox_pref, FALSE,
 					    _("Import settings"));
 
 	/* hbox for label and range-selection */
     hbox = gtk_hbox_new ( FALSE, 0 );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ), hbox,
-			 FALSE, FALSE, 0 );
+    gtk_box_pack_start ( GTK_BOX ( paddingbox ), hbox, FALSE, FALSE, 0 );
 
 	label = gtk_label_new ( _("Threshold while matching transaction date during import (in days)"));
-    gtk_box_pack_start ( GTK_BOX ( hbox ), label,
-			 FALSE, FALSE, 0 );
+    gtk_box_pack_start ( GTK_BOX ( hbox ), label, FALSE, FALSE, 0 );
 
     button = gtk_spin_button_new_with_range ( 0.0,
-					      100.0,
-					      1.0);
+                        100.0,
+                        1.0);
     gtk_spin_button_set_value ( GTK_SPIN_BUTTON ( button ),
 				valeur_echelle_recherche_date_import );
     g_signal_connect ( G_OBJECT ( button ),
-		       "value-changed",
+                        "value-changed",
 		       G_CALLBACK ( changement_valeur_echelle_recherche_date_import ),
 		       NULL );
-    gtk_box_pack_start ( GTK_BOX ( hbox ), button,
-			 FALSE, FALSE, 0 );
+    gtk_box_pack_start ( GTK_BOX ( hbox ), button, FALSE, FALSE, 0 );
 
     /* merge transactions imported with planned transactions */
     button = gsb_automem_checkbutton_new (
                         _("merge transactions imported with planned transactions"),
-                        &etat.get_fusion_import_planed_transactions,
-                        NULL, NULL );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ), button,
-			 FALSE, FALSE, 0 );
+                        &etat.get_fusion_import_planed_transactions, NULL, NULL );
+    
+    gtk_box_pack_start ( GTK_BOX ( paddingbox ), button, FALSE, FALSE, 0 );
 
     /* automatically associate the category of the payee if it is possible */
+    hbox = gtk_hbox_new ( FALSE, 0 );
+    gtk_box_pack_start ( GTK_BOX ( paddingbox ), hbox, FALSE, FALSE, 0 );
+
     button = gsb_automem_checkbutton_new (
                         _("automatically associate the category of the payee if it is possible"),
                         &etat.get_categorie_for_payee,
                         NULL, NULL );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ), button,
-			 FALSE, FALSE, 0 );
+
+    gtk_box_pack_start ( GTK_BOX (hbox ), button, FALSE, FALSE, 0 );
+
+    /* button manage payees */
+    button = gsb_automem_stock_button_new ( GSB_BUTTON_BOTH_HORIZ, 
+                        GTK_STOCK_PREFERENCES,
+                        _("Manage payees"), 
+                        G_CALLBACK (gsb_import_associations_gere_tiers), NULL );
+#if GTK_CHECK_VERSION(2,12,0)
+    gtk_widget_set_tooltip_text ( GTK_WIDGET (button),
+                        SPACIFY(_("create an association between two payees "
+                        "to simplify the list")));
+#endif
+
+    gtk_box_pack_start ( GTK_BOX (hbox ), button, FALSE, FALSE, 10 );
 
     /* propose to choose between getting the fyear by value date or by date */
     gsb_automem_radiobutton_new_with_title ( vbox_pref,
@@ -3190,6 +3256,485 @@
 
     return ( vbox_pref );
 }
+
+
+/**
+ * callback quand on appuie sur le bouton gestion des associations des tiers
+ *
+ * \param button	
+ * \param data	
+ *
+ * */
+void gsb_import_associations_gere_tiers (GtkWidget *button, gpointer data )
+{
+    GtkWidget *dialog,*vbox_main, *vbox, *paddingbox;
+    GtkWidget *hbox, *vbox2, *sw, *treeview ;
+    GtkWidget *table, *label, *entry;
+    GtkListStore *list_store;
+    GtkTreeViewColumn *column;
+    GtkCellRenderer *cell;
+    GtkTreeSelection *selection;
+    gchar *texte;
+    gint result;
+
+    dialog = gtk_dialog_new_with_buttons ( 
+                        _("Associations for the import of payees"),
+                        GTK_WINDOW ( window ),
+                        GTK_DIALOG_MODAL,
+                        GTK_STOCK_CLOSE, 1,
+                        NULL );
+
+    gtk_window_set_position ( GTK_WINDOW ( dialog ), GTK_WIN_POS_CENTER_ON_PARENT );
+    gtk_window_set_resizable ( GTK_WINDOW ( dialog ), TRUE );
+
+    vbox_main = new_vbox_with_title_and_icon ( 
+                        _("Manage the associations"),
+                        "payees.png" );
+    gtk_box_pack_start ( GTK_BOX ( GTK_DIALOG ( dialog ) -> vbox ), 
+                        vbox_main, TRUE, TRUE, 0 );
+
+    vbox = gtk_vbox_new ( FALSE, 12 );
+    gtk_box_pack_start ( GTK_BOX ( vbox_main ), vbox, TRUE, TRUE, 0 );
+    gtk_container_set_border_width ( GTK_CONTAINER ( vbox ), 12 );
+
+    paddingbox = new_paddingbox_with_title ( vbox,
+					     TRUE, _("Associations"));
+
+    texte = g_strdup ( _("To modify a search string, just edit it into "
+                        "the cell.\nMake Enter to validate") );
+	label = gtk_label_new ( texte );
+	gtk_misc_set_alignment ( GTK_MISC ( label ), 0, 0);
+	gtk_label_set_justify ( GTK_LABEL ( label ), GTK_JUSTIFY_LEFT );
+	g_free ( texte );
+	gtk_box_pack_start ( GTK_BOX(paddingbox), label, FALSE, FALSE, 6 );
+
+    hbox = gtk_hbox_new ( FALSE, 5 );
+    gtk_box_pack_start ( GTK_BOX ( paddingbox ), hbox, TRUE, TRUE, 0);
+
+    sw = gtk_scrolled_window_new (NULL, NULL);
+    gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
+                        GTK_SHADOW_ETCHED_IN);
+    gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
+                        GTK_POLICY_NEVER,
+                        GTK_POLICY_ALWAYS);
+    gtk_box_pack_start ( GTK_BOX (hbox), sw, TRUE,TRUE, 0 );
+
+    /* Create Add/Remove buttons */
+    vbox2 = gtk_vbox_new ( FALSE, 5 );
+    gtk_box_pack_start ( GTK_BOX ( hbox ), vbox2, FALSE, FALSE, 0 );
+
+    /* Button "Add" */
+    button = gtk_button_new_from_stock (GTK_STOCK_ADD);
+    g_signal_connect ( G_OBJECT ( button ),
+                        "clicked",
+                        G_CALLBACK  ( gsb_import_associations_add_assoc ),
+                        dialog );
+    gtk_box_pack_start ( GTK_BOX ( vbox2 ), button, FALSE, FALSE, 5 );
+    g_object_set_data ( G_OBJECT (dialog), "add_button", button );
+
+    /* Button "Remove" */
+    button = gtk_button_new_from_stock (GTK_STOCK_REMOVE);
+    g_signal_connect ( G_OBJECT ( button ),
+                        "clicked",
+                        G_CALLBACK ( gsb_import_associations_del_assoc ),
+                        dialog );
+    gtk_box_pack_start ( GTK_BOX ( vbox2 ), button, FALSE, FALSE, 5 );
+    gtk_widget_set_sensitive ( button, FALSE );
+    g_object_set_data ( G_OBJECT (dialog), "remove_button", button );
+
+    /* create the model */
+    list_store = gtk_list_store_new ( 
+                        3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT );
+
+    /* remplit le modèle si nécessaire */
+    if (g_slist_length ( liste_associations_tiers ) > 0 )
+        gsb_import_associations_fill_model ( list_store );
+
+    /* create the treeview */
+    treeview = gtk_tree_view_new_with_model (
+                        GTK_TREE_MODEL (list_store) );
+    g_object_unref (list_store);
+
+    gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview), TRUE);
+    gtk_widget_set_size_request ( treeview, -1, 230 );
+    selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW (treeview) );
+    gtk_tree_selection_set_select_function ( selection, 
+                        gsb_import_associations_select_func,
+                        dialog, NULL );
+    gtk_container_add (GTK_CONTAINER (sw), treeview);
+    gtk_container_set_resize_mode (GTK_CONTAINER (sw), GTK_RESIZE_PARENT);
+    g_object_set_data ( G_OBJECT (dialog), "treeview", treeview );
+
+    /* payee name */
+    cell = gtk_cell_renderer_text_new ( );
+    column = gtk_tree_view_column_new_with_attributes ( _("Payee name"),
+						     cell, "text", 0, NULL);
+    gtk_tree_view_column_set_expand ( column, TRUE );
+    gtk_tree_view_column_set_alignment ( column, 0.5 );
+    gtk_tree_view_column_set_sort_column_id (column, 0);
+    gtk_tree_view_append_column ( GTK_TREE_VIEW (treeview), column);
+
+    /* Search string */
+    cell = gtk_cell_renderer_text_new ( );
+    g_object_set (cell, "editable", TRUE, NULL);
+    g_signal_connect ( cell, 
+                        "edited",
+                        G_CALLBACK (gsb_import_associations_cell_edited), 
+                        dialog );
+    column = gtk_tree_view_column_new_with_attributes ( _("Search string"),
+						     cell, "text", 1, NULL);
+    gtk_tree_view_column_set_expand ( column, TRUE );
+    gtk_tree_view_column_set_alignment ( column, 0.5 );
+    gtk_tree_view_column_set_sort_column_id (column, 1);
+    gtk_tree_view_append_column ( GTK_TREE_VIEW (treeview), column);
+
+
+    paddingbox = new_paddingbox_with_title ( vbox,
+					     FALSE, _("Details of associations"));
+
+    /* Create table */
+    table = gtk_table_new ( 2, 2, FALSE );
+    gtk_table_set_col_spacings ( GTK_TABLE ( table ), 5 );
+    gtk_table_set_row_spacings ( GTK_TABLE ( table ), 5 );
+    gtk_box_pack_start ( GTK_BOX ( paddingbox ), table, TRUE, TRUE, 0 );
+
+    /* Create entry liste des tiers */
+    label = gtk_label_new (COLON(_("Payee name")));
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 1);
+    gtk_label_set_justify ( GTK_LABEL(label), GTK_JUSTIFY_RIGHT );
+    gtk_table_attach ( GTK_TABLE ( table ), label, 0, 1, 0, 1,
+		       GTK_SHRINK | GTK_FILL, 0, 0, 0 );
+
+    entry = gtk_combofix_new_complex ( 
+                        gsb_data_payee_get_name_and_report_list());
+    g_signal_connect ( G_OBJECT ( GTK_COMBOFIX (entry) -> entry ),
+                        "changed",
+                        G_CALLBACK (gsb_import_associations_combo_changed), 
+                        dialog );
+    gtk_combofix_set_text ( GTK_COMBOFIX (entry), "" );
+    gtk_combofix_set_force_text ( GTK_COMBOFIX (entry),FALSE );
+    gtk_combofix_set_max_items ( GTK_COMBOFIX (entry),
+                        etat.combofix_max_item );
+    gtk_combofix_set_case_sensitive ( GTK_COMBOFIX (entry),
+                        etat.combofix_case_sensitive );
+    gtk_combofix_set_enter_function ( GTK_COMBOFIX (entry),
+					      FALSE );
+    gtk_table_attach ( GTK_TABLE ( table ), entry, 1, 2, 0, 1,
+		       GTK_EXPAND|GTK_FILL, 0, 0, 0 );
+    g_object_set_data ( G_OBJECT (dialog), "payee", entry );
+
+    /* Create entry search string */
+    label = gtk_label_new (COLON(_("Search string")));
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 1);
+    gtk_label_set_justify ( GTK_LABEL(label), GTK_JUSTIFY_RIGHT );
+    gtk_table_attach ( GTK_TABLE ( table ), label, 0, 1, 1, 2,
+		       GTK_SHRINK | GTK_FILL, 0, 0, 0 );
+
+    entry = gtk_entry_new ();
+    gtk_entry_set_text ( GTK_ENTRY (entry), "" );
+    gtk_table_attach ( GTK_TABLE ( table ), entry, 1, 2, 1, 2,
+		       GTK_EXPAND|GTK_FILL, 0, 0, 0 );
+    g_object_set_data ( G_OBJECT (dialog), "Search_string", entry );
+
+    gtk_widget_show_all ( GTK_WIDGET ( dialog ) );
+    result = gtk_dialog_run ( GTK_DIALOG ( dialog ));
+
+     gtk_widget_destroy ( GTK_WIDGET ( dialog ));
+}
+
+
+void gsb_import_associations_add_assoc ( GtkWidget *button, GtkWidget *dialog )
+{
+    GtkWidget *combo, *entry;
+    GtkTreeView *treeview;
+    GtkTreeModel *list_store;
+    const gchar *payee, *search_str;
+    gint payee_number;
+
+    combo = g_object_get_data ( G_OBJECT (dialog), "payee" );
+    payee = g_strstrip ( (gchar *) gtk_combofix_get_text ( GTK_COMBOFIX (combo) ) );
+    if ( strlen ( payee ) == 0 )
+        return;
+
+    entry = g_object_get_data ( G_OBJECT (dialog), "Search_string" );
+    search_str = g_strstrip ( (gchar *)  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 );
+    treeview = g_object_get_data ( G_OBJECT (dialog), "treeview" );
+    list_store = gtk_tree_view_get_model ( GTK_TREE_VIEW (treeview) );
+
+    /* add association in liste_associations_tiers */
+    if (g_slist_length ( liste_associations_tiers ) == 0 )
+    {
+        struct struct_payee_asso *assoc;
+
+        assoc = g_malloc ( sizeof (struct struct_payee_asso) );
+        assoc -> payee_number = payee_number;
+        assoc -> search_str = g_strdup ( search_str );
+        liste_associations_tiers = g_slist_append ( liste_associations_tiers,
+                        assoc );
+        gsb_data_payee_set_search_string ( payee_number, search_str );
+    }
+    else 
+    {
+        struct struct_payee_asso *assoc;
+
+        assoc = g_malloc ( sizeof (struct struct_payee_asso) );
+        assoc -> payee_number = payee_number;
+        assoc -> search_str = g_strdup ( search_str );
+        if ( g_slist_find_custom (liste_associations_tiers,
+                        assoc,
+                        (GCompareFunc) gsb_import_associations_cmp_assoc) )
+        {
+            /* on remet à zero les entry */
+            gtk_combofix_set_text ( GTK_COMBOFIX (combo), "" );
+            gtk_entry_set_text ( GTK_ENTRY (entry), "" );
+        }
+        else
+        {
+            liste_associations_tiers = g_slist_insert_sorted ( 
+                        liste_associations_tiers, 
+                        assoc,
+                        (GCompareFunc) gsb_import_associations_cmp_assoc);
+            gsb_data_payee_set_search_string ( payee_number, search_str );
+        }
+    }
+    if (g_slist_length ( liste_associations_tiers ) > 0 )
+        gsb_import_associations_fill_model ( GTK_LIST_STORE (list_store) );
+}
+
+
+gint gsb_import_associations_cmp_assoc (struct struct_payee_asso *assoc_1,
+                                        struct struct_payee_asso *assoc_2)
+{
+    gint num_1, num_2;
+
+    num_1 = assoc_1 -> payee_number;
+    num_2 = assoc_2 -> payee_number;
+
+    if ( num_1 == num_2 )
+        return 0;
+    else
+        return g_utf8_collate ( gsb_data_payee_get_name (num_1, FALSE),
+                        gsb_data_payee_get_name (num_2, FALSE) );
+}
+
+
+void gsb_import_associations_del_assoc ( GtkWidget *button, GtkWidget *dialog )
+{
+    GtkTreeView *treeview;
+    GtkTreeModel *model;
+    GtkTreeIter iter;
+    GSList *list_tmp;
+    gint payee_number;
+
+    treeview = g_object_get_data ( G_OBJECT (dialog), "treeview" );
+    if ( !gtk_tree_selection_get_selected ( 
+                        gtk_tree_view_get_selection (treeview),
+					    &model,
+					    &iter ))
+    return;
+    
+    gtk_tree_model_get ( model, &iter, 2, &payee_number, -1 );
+    printf ("numero de tiers = %d\n", payee_number);
+    if ( payee_number > 0 )
+    {
+        gsb_data_payee_set_search_string ( payee_number, "" );
+        list_tmp = liste_associations_tiers;
+        while ( list_tmp )
+        {
+            struct struct_payee_asso *assoc;
+
+            assoc = list_tmp -> data;
+            if ( assoc -> payee_number == payee_number )
+            {
+                liste_associations_tiers = g_slist_remove ( 
+                        liste_associations_tiers, assoc );
+                gsb_import_associations_fill_model ( 
+                        GTK_LIST_STORE (model) );
+                break;
+            }
+            list_tmp = list_tmp -> next;
+        }
+    }
+}
+
+
+void gsb_import_associations_fill_model ( GtkListStore *list_store )
+{
+    GSList *list_tmp;
+    GtkTreeIter iter;
+
+    list_tmp = liste_associations_tiers;
+    gtk_list_store_clear ( GTK_LIST_STORE (list_store) );
+    while ( list_tmp )
+    {
+        gchar *tmpstr;
+        struct struct_payee_asso *assoc;
+
+        assoc = list_tmp -> data;
+        tmpstr = g_strdup ( gsb_data_payee_get_name (
+                    assoc -> payee_number, TRUE) );
+        gtk_list_store_append (GTK_LIST_STORE (list_store), &iter);
+        gtk_list_store_set (GTK_LIST_STORE (list_store), &iter,
+                    0, tmpstr,
+                    1, assoc -> search_str,
+                    2, assoc -> payee_number,
+                    -1);
+        g_free (tmpstr);
+        list_tmp = list_tmp -> next;
+    }
+}
+
+gboolean gsb_import_associations_select_func ( GtkTreeSelection *selection,
+                        GtkTreeModel *model,
+                        GtkTreePath *path,
+                        gboolean path_currently_selected,
+                        gpointer data )
+{
+    GtkDialog *dialog = ( GtkDialog *) data;
+    GtkWidget *combo, *entry, *button;
+    GtkTreeIter iter;
+    gchar *payee_str;
+    gchar *search_str;
+
+    combo = g_object_get_data ( G_OBJECT (dialog), "payee" );
+    entry = g_object_get_data ( G_OBJECT (dialog), "Search_string" );
+    button = g_object_get_data ( G_OBJECT (dialog), "remove_button" );
+
+    gtk_tree_model_get_iter ( model, &iter, path );
+    gtk_tree_model_get ( model, &iter, 0, &payee_str, 1, &search_str, -1 );
+
+    gtk_combofix_set_text ( GTK_COMBOFIX (combo), payee_str );
+    gtk_entry_set_text ( GTK_ENTRY (entry), search_str );
+    gtk_widget_set_sensitive ( entry, FALSE );
+    gtk_widget_set_sensitive ( button, TRUE );
+
+    return TRUE;
+}
+
+
+static void gsb_import_associations_cell_edited (GtkCellRendererText *cell,
+                        const gchar *path_string,
+                        const gchar *new_text,
+                        gpointer data)
+{
+    GtkWidget *entry;
+    GtkDialog *dialog = ( GtkDialog *) data;
+    GtkTreeView *treeview;
+    GtkTreeModel *model;
+    GtkTreePath *path = gtk_tree_path_new_from_string (path_string);
+    GtkTreeIter iter;
+    GSList *list_tmp;
+    gchar *search_str;
+    gint payee_number;
+
+    treeview = g_object_get_data ( G_OBJECT (dialog), "treeview" );
+    model = gtk_tree_view_get_model ( treeview );
+    gtk_tree_model_get_iter (model, &iter, path);
+    gtk_tree_model_get ( model, &iter, 1, &search_str, 2, &payee_number, -1 );
+    if ( g_utf8_collate ( search_str, new_text ) != 0 )
+    {
+        devel_debug (new_text);
+        gtk_list_store_set (GTK_LIST_STORE (model), &iter, 1, new_text, -1);
+
+        list_tmp = liste_associations_tiers;
+        while ( list_tmp )
+        {
+            struct struct_payee_asso *assoc;
+
+            assoc = list_tmp -> data;
+            if ( assoc -> payee_number == payee_number )
+            {
+                if ( assoc -> search_str && strlen (assoc -> search_str) )
+                    g_free ( assoc -> search_str );
+                assoc -> search_str = g_strdup ( new_text );
+                entry = g_object_get_data ( G_OBJECT (dialog),
+                        "Search_string" );
+                gtk_entry_set_text ( GTK_ENTRY (entry), new_text );
+                break;
+            }
+            list_tmp = list_tmp -> next;
+        }
+        gsb_data_payee_set_search_string ( payee_number, new_text );
+    }
+}
+
+
+void gsb_import_associations_combo_changed ( GtkEditable *editable,
+                        GtkDialog *dialog )
+{
+    GtkWidget *button, *entry;
+    const gchar *tmpstr;
+    gint payee_number;
+
+    payee_number = gsb_data_payee_get_number_by_name (
+                        gtk_editable_get_chars (editable, 0, -1), FALSE );
+    tmpstr = gsb_data_payee_get_search_string ( payee_number );
+
+    entry = g_object_get_data ( G_OBJECT (dialog), "Search_string" );
+    
+    if ( strlen ( tmpstr) == 0 )
+    {
+        gtk_entry_set_text ( GTK_ENTRY (entry), tmpstr );
+        gtk_widget_set_sensitive ( entry, TRUE );
+    }
+    else
+        gtk_editable_delete_text  ( editable, 0, -1 );
+
+    /* on empeche la suppression par inadvertance d'une association */
+    button = g_object_get_data ( G_OBJECT (dialog), "remove_button" );
+    gtk_widget_set_sensitive ( button, FALSE );
+}
+
+
+gint gsb_import_associations_find_payee ( gchar *imported_tiers)
+{
+    GSList *list_tmp;
+
+    list_tmp = liste_associations_tiers;
+    while ( list_tmp )
+    {
+        struct struct_payee_asso *assoc;
+
+        assoc = list_tmp -> data;
+        printf ("imported_tiers = %s et search_str = %s\n", 
+                        imported_tiers, assoc -> search_str);
+        if ( gsb_string_is_trouve ( imported_tiers, assoc -> search_str ) )
+        {
+           return assoc -> payee_number;
+        }
+        list_tmp = list_tmp -> next;
+    }
+
+    return 0;
+}
+
+gint gsb_import_associations_list_append_assoc ( gint payee_number, 
+                        const gchar *search_str )
+{
+    struct struct_payee_asso *assoc;
+
+    assoc = g_malloc ( sizeof (struct struct_payee_asso) );
+    assoc -> payee_number = payee_number;
+    assoc -> search_str = g_strdup ( search_str );
+
+     if ( ! g_slist_find_custom (liste_associations_tiers,
+                        assoc,
+                        (GCompareFunc) gsb_import_associations_cmp_assoc) )
+        liste_associations_tiers = g_slist_insert_sorted ( 
+                        liste_associations_tiers, 
+                        assoc,
+                        (GCompareFunc) gsb_import_associations_cmp_assoc);
+
+    return g_slist_length ( liste_associations_tiers );
+}
+
+
 /* *******************************************************************************/
 
 
@@ -3599,6 +4144,14 @@
     return FALSE;
 }
 
+/**
+ * fonction de contournement du bug des fichiers OFX des PTT
+ *
+ * \param filename	        nom du fichier provisoire
+ * \param pointeur_char		contenu du fichier à traiter
+ *
+ * \return TRUE si OK FALSE autrement
+ * */
 gboolean gsb_import_set_tmp_file ( gchar * filename,
 				       gchar * pointeur_char )
 {

Index: utils_buttons.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/utils_buttons.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- utils_buttons.h	30 Sep 2008 15:28:30 -0000	1.22
+++ utils_buttons.h	22 Mar 2009 18:53:25 -0000	1.23
@@ -9,6 +9,7 @@
     GSB_BUTTON_TEXT,
     GSB_BUTTON_ICON,
     GSB_BUTTON_BOTH,
+    GSB_BUTTON_BOTH_HORIZ,
 } GsbButtonStyle;
 
 

Index: gsb_file_load.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_load.c,v
retrieving revision 1.154
retrieving revision 1.155
diff -u -d -r1.154 -r1.155
--- gsb_file_load.c	17 Mar 2009 22:05:33 -0000	1.154
+++ gsb_file_load.c	22 Mar 2009 18:53:25 -0000	1.155
@@ -52,6 +52,7 @@
 #include "./utils_dates.h"
 #include "./gsb_file.h"
 #include "./gsb_file_util.h"
+#include "./import.h"
 #include "./gsb_plugins.h"
 #include "./gsb_real.h"
 #include "./gsb_select_icon.h"
@@ -2321,6 +2322,18 @@
 	    continue;
 	}
 
+    if ( !strcmp ( attribute_names[i],
+		       "Search" ))
+	{
+        if ( attribute_values[i] && strlen (attribute_values[i]) > 0 )
+	    gsb_data_payee_set_search_string ( payee_number,
+					attribute_values[i]);
+        gsb_import_associations_list_append_assoc ( payee_number,
+                    attribute_values[i] );
+	    i++;
+	    continue;
+	}
+
 	/* normally, shouldn't come here */
 	i++;
     }

Index: import.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/import.h,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- import.h	1 Jan 2009 20:43:49 -0000	1.38
+++ import.h	22 Mar 2009 18:53:25 -0000	1.39
@@ -111,7 +111,18 @@
 };
 
 
+/* structure définissant une association entre un tiers
+ * et une chaine de recherche contenant un ou des jokers (%)
+ */
+struct struct_payee_asso
+{
+    gint    payee_number;
+    gchar   *search_str;
+};
+
 /* START_DECLARATION */
+gint gsb_import_associations_list_append_assoc ( gint payee_number, 
+                        const gchar *search_str );
 gboolean gsb_import_by_rule ( gint rule );
 void gsb_import_register_account ( struct struct_compte_importation * account );
 void gsb_import_register_account_error ( struct struct_compte_importation * account );

Index: tiers_onglet.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/tiers_onglet.c,v
retrieving revision 1.154
retrieving revision 1.155
diff -u -d -r1.154 -r1.155
--- tiers_onglet.c	22 Mar 2009 10:52:53 -0000	1.154
+++ tiers_onglet.c	22 Mar 2009 18:53:25 -0000	1.155
@@ -763,9 +763,11 @@
         GtkTreeSelection *selection;
         GtkTreeIter iter;
         GtkTreePath *path = NULL;
-        gint nb_removed;
+        GtkComboFix *combo;
+        const gchar *str_cherche;
         gchar *tmpstr;
         gint new_payee_number = 0;
+        gint nb_removed;
         gboolean save_notes = FALSE;
         gboolean extract_num = FALSE;
         gboolean valid = FALSE;
@@ -776,6 +778,10 @@
         new_payee_number = gsb_data_payee_get_number_by_name (
                         gtk_entry_get_text ( g_object_get_data (
                         G_OBJECT (assistant), "new_payee") ), TRUE );
+        /* on sauvegarde la chaine de recherche */
+        combo = g_object_get_data ( G_OBJECT (assistant), "payee");
+        str_cherche = gtk_combofix_get_text ( combo );
+        gsb_data_payee_set_search_string ( new_payee_number, str_cherche );
         extract_num = gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON (
                         g_object_get_data ( G_OBJECT (assistant),
                         "check_option_1" ) ) );
@@ -864,7 +870,8 @@
 		}
 		else
 		{
-			tmpstr = g_strdup_printf ( _("%d payees were replaced with a new one."), nb_removed);
+			tmpstr = g_strdup_printf ( _("%d payees were replaced with a new one."), 
+                        nb_removed);
 		}
         dialogue (tmpstr);
         g_free (tmpstr);
@@ -1224,7 +1231,6 @@
         tmpstr = gsb_data_payee_get_name ( payee_number, FALSE );
         if ( gsb_string_is_trouve ( tmpstr, str_cherche ) )
         {
-            //~ printf ("payee : %s\n", tmpstr );
             if (!g_slist_find (sup_payees, GINT_TO_POINTER (payee_number)))
             {
                 sup_payees = g_slist_append ( sup_payees,
@@ -1254,7 +1260,6 @@
         gtk_label_set_text ( GTK_LABEL (label ),
                         g_strdup_printf ("%d", i ) );
         g_object_set_data ( G_OBJECT (assistant), "sup_payees", sup_payees );
-        //~ printf ( "nombre de tiers trouvés = %d\n", g_slist_length (sup_payees) );
     }
     return FALSE;
 }
@@ -1277,14 +1282,13 @@
     devel_debug ("Enter page finish");
     treeview = g_object_get_data ( G_OBJECT (assistant), "treeview" );
     sup_payees = g_object_get_data ( G_OBJECT (assistant), "sup_payees" );
-    //~ printf ( "nombre de tiers à supprimer = %d\n", g_slist_length (sup_payees) );
     combo = g_object_get_data ( G_OBJECT (assistant), "payee");
     str_cherche = gtk_combofix_get_text ( combo );
     entry = g_object_get_data ( G_OBJECT (assistant), "new_payee");
 	if ( g_slist_length (sup_payees) == 1 )
 	{
     tmpstr = g_strdup_printf (
-                        _("You are about to replace one payee whose names contain %s by %s\n\n"
+                        _("You are about to replace one payee which name contain %s by %s\n\n"
                         "Are you sure?"),
                         gsb_string_remplace_joker ( str_cherche, "..." ),
                         gtk_entry_get_text ( entry) );

Index: utils_buttons.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/utils_buttons.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- utils_buttons.c	13 Mar 2009 20:15:38 -0000	1.48
+++ utils_buttons.c	22 Mar 2009 18:53:25 -0000	1.49
@@ -39,9 +39,10 @@
 
 GtkWidget * new_stock_image_label ( GsbButtonStyle style, const gchar * stock_id, const gchar * name )
 {
-    GtkWidget * vbox, * label, * image;
+    GtkWidget * vbox, *hbox, * label, * image;
 
     vbox = gtk_vbox_new ( FALSE, 0 );
+    hbox = gtk_hbox_new ( FALSE, 5 );
 
     /* Define image */
     if ( style == GSB_BUTTON_ICON || style == GSB_BUTTON_BOTH )
@@ -49,6 +50,12 @@
 	image = gtk_image_new_from_stock ( stock_id, GTK_ICON_SIZE_LARGE_TOOLBAR );
 	gtk_box_pack_start ( GTK_BOX(vbox), image, TRUE, TRUE, 0 );
     }
+    else if (style == GSB_BUTTON_BOTH_HORIZ )
+    {
+        image = gtk_image_new_from_stock ( stock_id, 
+                        GTK_ICON_SIZE_SMALL_TOOLBAR );
+        gtk_box_pack_start ( GTK_BOX(hbox), image, TRUE, TRUE, 0 );
+    }
 
     /* Define label */
     if ( style == GSB_BUTTON_TEXT || style == GSB_BUTTON_BOTH )
@@ -58,7 +65,19 @@
 	gtk_label_set_justify ( GTK_LABEL(label), GTK_JUSTIFY_CENTER );
 	gtk_box_pack_start ( GTK_BOX(vbox), label, TRUE, TRUE, 0 );
     }
-    
+    else if (style == GSB_BUTTON_BOTH_HORIZ )
+    {
+        label = gtk_label_new ( name );
+        gtk_label_set_text_with_mnemonic ( GTK_LABEL(label), name );
+        gtk_label_set_justify ( GTK_LABEL(label), GTK_JUSTIFY_CENTER );
+        gtk_box_pack_start ( GTK_BOX(hbox), label, TRUE, TRUE, 0 );
+    }
+
+    if (style == GSB_BUTTON_BOTH_HORIZ )
+    {
+        gtk_box_pack_start ( GTK_BOX(vbox), hbox, TRUE, TRUE, 0 );
+    }
+
     return vbox;
 }
 
@@ -67,9 +86,10 @@
 
 GtkWidget * new_image_label ( GsbButtonStyle style, const gchar * image_name, const gchar * name )
 {
-    GtkWidget * vbox, * label, * image;
+    GtkWidget * vbox, *hbox, * label, * image;
 
     vbox = gtk_vbox_new ( FALSE, 0 );
+    hbox = gtk_hbox_new ( FALSE, 0 );
 
     /* Define image */
     if ( style == GSB_BUTTON_ICON || style == GSB_BUTTON_BOTH )
@@ -78,6 +98,12 @@
 							   image_name, NULL));
 	gtk_box_pack_start ( GTK_BOX(vbox), image, TRUE, TRUE, 0 );
     }
+    else if (style == GSB_BUTTON_BOTH_HORIZ )
+    {
+        image = gtk_image_new_from_file (g_build_filename (PIXMAPS_DIR,
+							   image_name, NULL));
+        gtk_box_pack_start ( GTK_BOX(hbox), image, TRUE, TRUE, 0 );
+    }
 
     /* Define label */
     if ( style == GSB_BUTTON_TEXT || style == GSB_BUTTON_BOTH )
@@ -88,7 +114,19 @@
 	gtk_label_set_justify ( GTK_LABEL(label), GTK_JUSTIFY_CENTER );
 	gtk_box_pack_start ( GTK_BOX(vbox), label, TRUE, TRUE, 0 );
     }
+    else if (style == GSB_BUTTON_BOTH_HORIZ )
+    {
+        label = gtk_label_new ( name );
+        gtk_label_set_text_with_mnemonic ( GTK_LABEL(label), name );
+        gtk_label_set_line_wrap ( GTK_LABEL(label), TRUE );
+        gtk_label_set_justify ( GTK_LABEL(label), GTK_JUSTIFY_CENTER );
+        gtk_box_pack_start ( GTK_BOX(hbox), label, TRUE, TRUE, 0 );
+    }
 
+    if (style == GSB_BUTTON_BOTH_HORIZ )
+    {
+        gtk_box_pack_start ( GTK_BOX(vbox), hbox, TRUE, TRUE, 0 );
+    }
     gtk_widget_show_all ( vbox );
 
     return vbox;



More information about the cvs mailing list