[grisbi-cvs] [SCM] grisbi branch, master, updated. 311beaf62e08f6d75eb3e4d97c3d07c471362506

Pierre Biava nobody at users.sourceforge.net
Wed Jun 9 18:33:25 CEST 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grisbi".

The branch, master has been updated
       via  311beaf62e08f6d75eb3e4d97c3d07c471362506 (commit)
       via  4dcbe2b49240149a5756930a11156d2ddd8f9d41 (commit)
       via  80f2378de293fdd0698d102faae300a700800f30 (commit)
       via  55f3b4b3a2a6313d9be7ef8c51313b72672fa1c9 (commit)
       via  07ead8f2e3ebd06362b5853a27d20ed2ff6eb182 (commit)
       via  09275a4acc8610f6e205c442c4084b6cc8e0bd75 (commit)
      from  c2a76b67923dd2e87449ead42e1b01d00035988d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 311beaf62e08f6d75eb3e4d97c3d07c471362506
Author: Pierre Biava <pierre.biava at nerim.net>
Date:   Wed Jun 9 18:07:11 2010 +0200

    Minor changes

commit 4dcbe2b49240149a5756930a11156d2ddd8f9d41
Author: Pierre Biava <pierre.biava at nerim.net>
Date:   Wed Jun 9 17:27:17 2010 +0200

    Structure modification of gtk_combofix

commit 80f2378de293fdd0698d102faae300a700800f30
Author: Pierre Biava <pierre.biava at nerim.net>
Date:   Wed Jun 9 17:12:04 2010 +0200

    Structure modification of gtk_combofix

commit 55f3b4b3a2a6313d9be7ef8c51313b72672fa1c9
Author: Pierre Biava <pierre.biava at nerim.net>
Date:   Wed Jun 9 16:50:03 2010 +0200

    Minor change for Ctrl+R key

commit 07ead8f2e3ebd06362b5853a27d20ed2ff6eb182
Author: Pierre Biava <pierre.biava at nerim.net>
Date:   Wed Jun 9 06:26:18 2010 +0200

    Change gtk_combofix and minor changes

commit 09275a4acc8610f6e205c442c4084b6cc8e0bd75
Author: Pierre Biava <pierre.biava at nerim.net>
Date:   Fri Jun 4 21:02:43 2010 +0200

    Fixed a bug display of the form in the  budget module

-----------------------------------------------------------------------

Changes:
diff --git a/src/balance_estimate_data.c b/src/balance_estimate_data.c
index 45711aa..a7b3edb 100644
--- a/src/balance_estimate_data.c
+++ b/src/balance_estimate_data.c
@@ -1706,7 +1706,6 @@ void bet_data_transfert_update_date_if_necessary ( struct_transfert_data *transf
     GDate *date_jour_1;
     GDate *tmp_date;
 
-    devel_debug (NULL);
     date_jour_1 = gdate_today ( );
     g_date_set_day ( date_jour_1, 1 );
     tmp_date = gsb_date_copy ( transfert -> date );
diff --git a/src/balance_estimate_future.c b/src/balance_estimate_future.c
index 1abf8e4..e5fec41 100644
--- a/src/balance_estimate_future.c
+++ b/src/balance_estimate_future.c
@@ -452,7 +452,7 @@ gboolean bet_form_create_current_form ( GtkWidget *dialog,
     column ++;
 
     element_number = TRANSACTION_FORM_PARTY;
-    widget = gtk_combofix_new_complex (
+    widget = gtk_combofix_new (
                         gsb_data_payee_get_name_and_report_list ( ) );
     gtk_widget_set_size_request ( widget, width, -1 );
     gtk_combofix_set_force_text ( GTK_COMBOFIX (widget),
@@ -542,7 +542,7 @@ gboolean bet_form_create_current_form ( GtkWidget *dialog,
     column ++;
 
     element_number = TRANSACTION_FORM_CATEGORY;
-    widget = gtk_combofix_new_complex (
+    widget = gtk_combofix_new (
                          gsb_data_category_get_name_list ( TRUE, TRUE, TRUE, FALSE ) );
     gtk_widget_set_size_request ( widget, width, -1 );
     gtk_combofix_set_force_text ( GTK_COMBOFIX (widget),
@@ -592,7 +592,7 @@ gboolean bet_form_create_current_form ( GtkWidget *dialog,
     row ++; 
 
     element_number = TRANSACTION_FORM_BUDGET;
-    widget = gtk_combofix_new_complex (
+    widget = gtk_combofix_new (
                         gsb_data_budget_get_name_list (TRUE, TRUE));
     gtk_widget_set_size_request ( widget, width, -1 );
     gtk_combofix_set_force_text ( GTK_COMBOFIX (widget),
@@ -967,9 +967,7 @@ gboolean bet_form_entry_lose_focus ( GtkWidget *entry,
      element_number == TRANSACTION_FORM_BUDGET )
     {
         widget = bet_form_widget_get_widget ( element_number );
-        gtk_grab_remove ( GTK_COMBOFIX ( widget ) -> popup );
-        gdk_pointer_ungrab ( GDK_CURRENT_TIME );
-        gtk_widget_hide ( GTK_COMBOFIX ( widget ) ->popup );
+        gtk_combofix_hide_popup ( GTK_COMBOFIX ( widget ) );
     }
 
     /* string will be filled only if the field is empty */
@@ -1859,6 +1857,7 @@ dialog_return:
             gtk_widget_hide ( bet_transfert_dialog );
             return FALSE;
         }
+        transfert -> account_number = account_number;
 
         tree_view = g_object_get_data ( G_OBJECT ( bet_transfert_dialog ), "tree_view" );
         if ( !gtk_tree_selection_get_selected ( GTK_TREE_SELECTION (
@@ -1986,7 +1985,7 @@ GtkWidget *bet_transfert_create_dialog ( gint account_number )
     hbox = gtk_hbox_new ( FALSE, 0 );
     gtk_box_pack_start ( GTK_BOX ( paddingbox ), hbox, FALSE, TRUE, 5 );
 
-    combo = gtk_combofix_new_complex (
+    combo = gtk_combofix_new (
                         gsb_data_category_get_name_list ( TRUE, TRUE, FALSE, FALSE ) );
     gtk_widget_set_size_request ( combo, width, -1 );
     gtk_combofix_set_force_text ( GTK_COMBOFIX ( combo ),
@@ -1999,7 +1998,7 @@ GtkWidget *bet_transfert_create_dialog ( gint account_number )
 					    etat.combofix_mixed_sort );
     gtk_box_pack_start ( GTK_BOX ( hbox ), combo, FALSE, FALSE, 0 );
     gsb_form_widget_set_empty ( GTK_COMBOFIX ( combo ) -> entry, TRUE );
-                gtk_combofix_set_text ( GTK_COMBOFIX ( combo ), _("Categories : Sub-categories") );
+    gtk_combofix_set_text ( GTK_COMBOFIX ( combo ), _("Categories : Sub-categories") );
     g_object_set_data ( G_OBJECT ( GTK_COMBOFIX ( combo ) -> entry ), "combo", combo );
     g_object_set_data ( G_OBJECT ( dialog ), "bet_transfert_category_combo", combo );
 
@@ -2013,7 +2012,7 @@ GtkWidget *bet_transfert_create_dialog ( gint account_number )
                         GINT_TO_POINTER ( TRANSACTION_FORM_CATEGORY ) );
     gtk_widget_set_sensitive ( combo, FALSE );
     
-    combo = gtk_combofix_new_complex (
+    combo = gtk_combofix_new (
                         gsb_data_budget_get_name_list ( TRUE, TRUE ) );
     gtk_widget_set_size_request ( combo, width, -1 );
     gtk_combofix_set_force_text ( GTK_COMBOFIX ( combo ),
@@ -2202,24 +2201,23 @@ gboolean bet_transfert_entry_lose_focus ( GtkWidget *entry,
      * wich is nothing, so protect here */
     if ( !GTK_IS_WIDGET ( entry )
      ||
-     !GTK_IS_ENTRY ( entry ))
+     !GTK_IS_ENTRY ( entry ) )
         return FALSE;
 
     /* remove the selection */
     gtk_editable_select_region ( GTK_EDITABLE ( entry ), 0, 0 );
+
     element_number = GPOINTER_TO_INT ( ptr_origin );
+    if ( element_number != TRANSACTION_FORM_CATEGORY
+     &&
+     element_number != TRANSACTION_FORM_BUDGET )
+        return FALSE;
+
     widget = g_object_get_data ( G_OBJECT ( entry ), "combo" );
     account_number = gsb_form_get_account_number ();
 
     /* sometimes the combofix popus stays showed, so remove here */
-    if ( element_number == TRANSACTION_FORM_CATEGORY
-     ||
-     element_number == TRANSACTION_FORM_BUDGET )
-    {
-        gtk_grab_remove ( GTK_COMBOFIX ( widget ) -> popup );
-        gdk_pointer_ungrab ( GDK_CURRENT_TIME );
-        gtk_widget_hide ( GTK_COMBOFIX ( widget ) ->popup );
-    }
+    gtk_combofix_hide_popup ( GTK_COMBOFIX ( widget ) );
 
     /* string will be filled only if the field is empty */
     string = NULL;
@@ -2406,6 +2404,7 @@ dialog_return:
             gtk_widget_hide ( bet_transfert_dialog );
             return FALSE;
         }
+        transfert -> account_number = account_number;
 
         tree_view = g_object_get_data ( G_OBJECT ( bet_transfert_dialog ), "tree_view" );
         if ( !gtk_tree_selection_get_selected ( GTK_TREE_SELECTION (
diff --git a/src/balance_estimate_hist.c b/src/balance_estimate_hist.c
index 2247050..f4b6d61 100644
--- a/src/balance_estimate_hist.c
+++ b/src/balance_estimate_hist.c
@@ -929,9 +929,6 @@ void bet_historical_populate_div_model ( gpointer key,
         if ( str_amount )
             g_free ( str_amount );
         str_amount = gsb_real_save_real_to_string ( amount, 2 );
-
-        if ( str_retained )
-            g_free ( str_retained );
         str_retained = gsb_real_get_string_with_currency ( amount,
                     gsb_data_account_get_currency ( account_nb ), TRUE );
 
diff --git a/src/fenetre_principale.c b/src/fenetre_principale.c
index dbeed65..4ef7c74 100644
--- a/src/fenetre_principale.c
+++ b/src/fenetre_principale.c
@@ -302,8 +302,10 @@ gboolean gsb_gui_on_account_switch_page ( GtkNotebook *notebook,
                         guint page_number,
                         gpointer null )
 {
+#ifdef ENABLE_BALANCE_ESTIMATE
     gint account_number;
-    
+#endif /* ENABLE_BALANCE_ESTIMATE */
+
     //~ devel_debug_int (page_number);
     switch ( page_number )
     {
@@ -312,11 +314,13 @@ gboolean gsb_gui_on_account_switch_page ( GtkNotebook *notebook,
         break;
 #ifdef ENABLE_BALANCE_ESTIMATE
     case GSB_ESTIMATE_PAGE:
+        gsb_form_set_expander_visible (FALSE, FALSE );
         account_number = gsb_gui_navigation_get_current_account ( );
         if ( gsb_data_account_get_bet_maj ( account_number ) )
             bet_data_update_bet_module ( account_number, GSB_ESTIMATE_PAGE );
         break;
     case GSB_HISTORICAL_PAGE:
+        gsb_form_set_expander_visible (FALSE, FALSE );
         account_number = gsb_gui_navigation_get_current_account ( );
         if ( gsb_data_account_get_bet_maj ( account_number ) )
             bet_data_update_bet_module ( account_number, GSB_HISTORICAL_PAGE );
diff --git a/src/gsb_form.c b/src/gsb_form.c
index afce484..c987bbe 100644
--- a/src/gsb_form.c
+++ b/src/gsb_form.c
@@ -1521,11 +1521,8 @@ gboolean gsb_form_entry_lose_focus ( GtkWidget *entry,
      ||
      element_number == TRANSACTION_FORM_BUDGET )
     {
-    widget = gsb_form_widget_get_widget (element_number);
-
-    gtk_grab_remove ( GTK_COMBOFIX ( widget ) -> popup );
-    gdk_pointer_ungrab ( GDK_CURRENT_TIME );
-    gtk_widget_hide ( GTK_COMBOFIX ( widget ) ->popup );
+        widget = gsb_form_widget_get_widget (element_number);
+        gtk_combofix_hide_popup ( GTK_COMBOFIX ( widget ) );
     }
 
     /* string will be filled only if the field is empty */
diff --git a/src/gsb_form_widget.c b/src/gsb_form_widget.c
index 3eb034f..c611d85 100644
--- a/src/gsb_form_widget.c
+++ b/src/gsb_form_widget.c
@@ -130,6 +130,7 @@ gboolean gsb_form_widget_free_list ( void )
                     g_signal_handlers_block_by_func ( element -> element_widget,
                         gsb_payment_method_changed_callback, NULL );
                     gtk_combofix_set_text ( GTK_COMBOFIX (element -> element_widget), "" );
+                    gsb_form_widget_set_empty ( GTK_WIDGET ( element -> element_widget ), TRUE );
                 }
                 gtk_widget_destroy (element -> element_widget);
                 element -> element_widget = NULL;
@@ -162,7 +163,6 @@ GtkWidget *gsb_form_widget_create ( gint element_number,
                         gint account_number )
 {
     GtkWidget *widget;
-    GtkTreeSelection *tree_selection;
 
     if (!element_number)
 	return NULL;
@@ -209,7 +209,7 @@ GtkWidget *gsb_form_widget_create ( gint element_number,
 	    break;
 
 	case TRANSACTION_FORM_PARTY:
-	    widget = gtk_combofix_new_complex (
+	    widget = gtk_combofix_new (
                         gsb_data_payee_get_name_and_report_list ( ) );
 	    gtk_combofix_set_force_text ( GTK_COMBOFIX (widget),
 					  etat.combofix_force_payee );
@@ -217,8 +217,6 @@ GtkWidget *gsb_form_widget_create ( gint element_number,
 					 etat.combofix_max_item );
 	    gtk_combofix_set_case_sensitive ( GTK_COMBOFIX (widget),
 					      etat.combofix_case_sensitive );
-	    //~ gtk_combofix_set_enter_function ( GTK_COMBOFIX (widget),
-					      //~ etat.combofix_enter_select_completion );
 	    /* we never mix the payee because the only case of the complex combofix is
 	     * for the report and there is non sense to mix report with the payee */
 	    gtk_combofix_set_mixed_sort ( GTK_COMBOFIX (widget),
@@ -226,7 +224,7 @@ GtkWidget *gsb_form_widget_create ( gint element_number,
 	    break;
 
 	case TRANSACTION_FORM_CATEGORY:
-	    widget = gtk_combofix_new_complex (
+	    widget = gtk_combofix_new (
                          gsb_data_category_get_name_list ( TRUE, TRUE, TRUE, TRUE ) );
 	    gtk_combofix_set_force_text ( GTK_COMBOFIX (widget),
 					  etat.combofix_force_category );
@@ -234,8 +232,6 @@ GtkWidget *gsb_form_widget_create ( gint element_number,
 					 etat.combofix_max_item );
 	    gtk_combofix_set_case_sensitive ( GTK_COMBOFIX (widget),
 					      etat.combofix_case_sensitive );
-	    //~ gtk_combofix_set_enter_function ( GTK_COMBOFIX (widget),
-					      //~ etat.combofix_enter_select_completion );
 	    gtk_combofix_set_mixed_sort ( GTK_COMBOFIX (widget),
 					  etat.combofix_mixed_sort );
 	    break;
@@ -245,7 +241,7 @@ GtkWidget *gsb_form_widget_create ( gint element_number,
 	    break;
 
 	case TRANSACTION_FORM_BUDGET:
-	    widget = gtk_combofix_new_complex (
+	    widget = gtk_combofix_new (
                         gsb_data_budget_get_name_list (TRUE, TRUE));
 	    gtk_combofix_set_force_text ( GTK_COMBOFIX (widget),
 					  etat.combofix_force_category );
@@ -253,8 +249,6 @@ GtkWidget *gsb_form_widget_create ( gint element_number,
 					 etat.combofix_max_item );
 	    gtk_combofix_set_case_sensitive ( GTK_COMBOFIX (widget),
 					      etat.combofix_case_sensitive );
-	    //~ gtk_combofix_set_enter_function ( GTK_COMBOFIX (widget),
-					      //~ etat.combofix_enter_select_completion );
 	    gtk_combofix_set_mixed_sort ( GTK_COMBOFIX (widget),
 					  etat.combofix_mixed_sort );
 	    break;
@@ -321,7 +315,7 @@ GtkWidget *gsb_form_widget_create ( gint element_number,
 	form_list_widgets = g_slist_append ( form_list_widgets, element );
 
 	/* set the signals */
-	if ( GTK_IS_ENTRY ( widget ))
+	if ( GTK_IS_ENTRY ( widget ) )
 	{
 	    g_signal_connect ( G_OBJECT ( widget ),
 			       "focus-in-event",
@@ -342,11 +336,8 @@ GtkWidget *gsb_form_widget_create ( gint element_number,
 	}
 	else
 	{
-	    if ( GTK_IS_COMBOFIX ( widget ))
+	    if ( GTK_IS_COMBOFIX ( widget ) )
 	    {
-            tree_selection = gtk_tree_view_get_selection (
-                        GTK_TREE_VIEW ( GTK_COMBOFIX ( widget ) -> tree_view ) );
-
 		    g_signal_connect ( G_OBJECT ( GTK_COMBOFIX ( widget ) -> entry ),
                        "focus-in-event",
                        G_CALLBACK ( gsb_form_entry_get_focus ),
@@ -359,14 +350,13 @@ GtkWidget *gsb_form_widget_create ( gint element_number,
                        "button-press-event",
                        G_CALLBACK ( gsb_form_button_press_event ),
                        GINT_TO_POINTER ( element_number ));
-            g_signal_connect ( G_OBJECT ( GTK_COMBOFIX (widget ) -> entry ),
+            g_signal_connect ( G_OBJECT ( GTK_COMBOFIX ( widget ) -> entry ),
                        "key-press-event",
                        G_CALLBACK ( gsb_form_key_press_event ),
                        GINT_TO_POINTER ( element_number ));
-            g_signal_connect ( G_OBJECT ( tree_selection ),
-                       "changed",
-                       G_CALLBACK ( gsb_form_combo_selection_changed ),
-                       GINT_TO_POINTER ( element_number ) );
+            gtk_combofix_set_selection_callback ( GTK_COMBOFIX ( widget ),
+						G_CALLBACK ( gsb_form_combo_selection_changed ),
+					    GINT_TO_POINTER ( element_number ) );
 	    }
 	    else
 		/* neither an entry, neither a combofix */
@@ -1082,26 +1072,6 @@ gint gsb_form_widget_get_old_debit_payment ( void )
 }
 
 
-/** Essai de remplacement des gtk_combofix */
-/**
- * crée un gtk_combo_box pour les tiers
- *
- **/
-GtkWidget *gtk_combo_payee_new ( GSList *list )
-{
-    GtkWidget *combo_box;
-    GtkListStore *store;
-    GSList *tmp_list;
-
-
-    combo_box = gtk_combo_box_new ( );
-
-
-
-    
-    return combo_box;
-}
-
 /* Local Variables: */
 /* c-basic-offset: 4 */
 /* End: */
diff --git a/src/gsb_transactions_list.c b/src/gsb_transactions_list.c
index baa4472..0b87f96 100644
--- a/src/gsb_transactions_list.c
+++ b/src/gsb_transactions_list.c
@@ -1309,20 +1309,27 @@ gboolean gsb_transactions_list_key_press ( GtkWidget *widget,
 
     case GDK_P:         /* touche P */
     case GDK_p:         /* touche p */
+    case GDK_F12:       /* touche F12 pour pointer dépointer comme avec <ctrl>p*/ 
 
-        if ( ( ev -> state & GDK_CONTROL_MASK ) == GDK_CONTROL_MASK )
-        gsb_transactions_list_switch_mark (
+        if ( ( ev -> state & GDK_CONTROL_MASK ) == GDK_CONTROL_MASK
+            ||
+            ev -> keyval == GDK_F12 )
+        {
+            gsb_transactions_list_switch_mark (
                         gsb_data_account_get_current_transaction_number ( account_number ) );
-        transaction_list_set_balances ( );
+            transaction_list_set_balances ( );
+        }
         break;
 
     case GDK_r:         /* touche r */
     case GDK_R:         /* touche R */
 
         if ( ( ev -> state & GDK_CONTROL_MASK ) == GDK_CONTROL_MASK )
-        gsb_transactions_list_switch_R_mark (
-                        gsb_data_account_get_current_transaction_number ( account_number ) );
-        transaction_list_set_balances ( );
+        {
+            gsb_transactions_list_switch_R_mark (
+                            gsb_data_account_get_current_transaction_number ( account_number ) );
+            transaction_list_set_balances ( );
+        }
         break;
 
     case GDK_t:         /* touche t */
diff --git a/src/gtk_combofix.c b/src/gtk_combofix.c
index 54336cb..eb68357 100644
--- a/src/gtk_combofix.c
+++ b/src/gtk_combofix.c
@@ -28,27 +28,55 @@
 
 /*START_INCLUDE*/
 #include "gtk_combofix.h"
-#include "./dialog.h"
-#include "./gsb_form_widget.h"
-#include "./utils_str.h"
-#include "./parametres.h"
-#include "./include.h"
 #include "./erreur.h"
 /*END_INCLUDE*/
 
+#define GTK_COMBOFIX_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_COMBOFIX, GtkComboFixPrivate))
+
+struct _GtkComboFixPrivate
+{
+    GtkWidget *button;
+    GtkWidget *popup;
+    GtkWidget *tree_view;
+
+    GtkTreeStore *store;
+    GtkTreeModel *model_filter;
+    GtkTreeModel *model_sort;
+    GtkTreeSelection *selection;
+
+    /* TRUE for case sensitive (in that case, the first entry give the case) */
+    gboolean case_sensitive;
+    /* TRUE if the entry content must belong to the list  */
+    gboolean force;
+
+    /* TRUE mix the different list, FALSE separate them */
+    gboolean mixed_sort;
+    /* 0 to show all the items */
+    gint max_items;
+    /* automatic sorting */
+    gint auto_sort;
+
+    gint visible_items;
+};
+
 
 /* Liste des fonctions statiques */
 
+/* common */
 static void gtk_combofix_class_init ( GtkComboFixClass *klass );
 static void gtk_combofix_init ( GtkComboFix *combofix );
 static gboolean gtk_combofix_fill_store ( GtkComboFix *combofix,
                         GSList *list,
                         gint list_number );
+static void gtk_combofix_dialog ( gchar *text, gchar *hint );
+
+/* entry */
 static gboolean gtk_combofix_entry_insert ( GtkComboFix *combofix );
 static gboolean gtk_combofix_entry_delete ( GtkComboFix *combofix );
 static gboolean gtk_combofix_entry_changed ( GtkComboFix *combofix,
                         gboolean insert_text );
-static gboolean gtk_combofix_show_popup ( GtkComboFix *combofix );
+
+/* popup */
 static gboolean gtk_combofix_expose_entry ( GtkComboFix *combofix );
 static gchar *gtk_combofix_update_visible_rows ( GtkComboFix *combofix,
                         const gchar *string );
@@ -76,7 +104,6 @@ static gint gtk_combofix_get_rows_number_by_page ( GtkComboFix *combofix );
 static gboolean gtk_combofix_move_selection_one_step ( GtkComboFix *combofix,
                         GtkTreeIter *iter,
                         gint direction );
-static gboolean gtk_combofix_hide_popup ( GtkComboFix *combofix );
 static gint gtk_combofix_default_sort_func ( GtkTreeModel *model_sort,
                         GtkTreeIter *iter_1,
                         GtkTreeIter *iter_2,
@@ -89,15 +116,17 @@ static gboolean gtk_combofix_popup_key_press_event ( GtkWidget *popup,
                         GtkComboFix *combofix );
 static gboolean gtk_combofix_select_item ( GtkComboFix *combofix,
                         const gchar *item );
+
+
 /* globals variables */
 static gint block_expose_event;
 
 enum combofix_columns {
-    COMBOFIX_COL_VISIBLE_STRING = 0,
-    COMBOFIX_COL_REAL_STRING,
-    COMBOFIX_COL_VISIBLE,
-    COMBOFIX_COL_LIST_NUMBER,
-    COMBOFIX_COL_SEPARATOR,
+    COMBOFIX_COL_VISIBLE_STRING = 0,    /* string : what we see in the combofix */
+    COMBOFIX_COL_REAL_STRING,           /* string : what we set in the entry when selecting something */
+    COMBOFIX_COL_VISIBLE,               /* boolean : if that line has to be showed */
+    COMBOFIX_COL_LIST_NUMBER,           /* int : the number of the list 1, 2 ou 3 (CREDIT DEBIT SPECIAL) */
+    COMBOFIX_COL_SEPARATOR,             /* TRUE : if this is a separator */
     COMBOFIX_N_COLUMNS,
 };
 
@@ -109,7 +138,6 @@ enum combofix_key_direction {
 };
 
 /*START_EXTERN*/
-extern GtkWidget *window;
 /*END_EXTERN*/
 
 
@@ -121,18 +149,18 @@ guint gtk_combofix_get_type ( void )
 
     if ( !gtk_combofix_type )
     {
-	static const GtkTypeInfo gtk_combofix_info = {
-	    "GtkComboFix",
-	    sizeof (GtkComboFix),
-	    sizeof (GtkComboFixClass),
-	    (GtkClassInitFunc) gtk_combofix_class_init,
-	    (GtkObjectInitFunc) gtk_combofix_init,
-	    NULL,
-	    NULL,
-	    (GtkClassInitFunc) NULL
-	};
-
-	gtk_combofix_type = gtk_type_unique ( gtk_hbox_get_type(),
+        static const GtkTypeInfo gtk_combofix_info = {
+            "GtkComboFix",
+            sizeof (GtkComboFix),
+            sizeof (GtkComboFixClass),
+            (GtkClassInitFunc) gtk_combofix_class_init,
+            (GtkObjectInitFunc) gtk_combofix_init,
+            NULL,
+            NULL,
+            (GtkClassInitFunc) NULL
+	    };
+
+	    gtk_combofix_type = gtk_type_unique ( gtk_hbox_get_type(),
 					      &gtk_combofix_info );
     }
 
@@ -141,7 +169,7 @@ guint gtk_combofix_get_type ( void )
 
 
 /**
- * create a complex combofix, ie several list set one after the others
+ * create a combofix, with several list set one after the others
  * by default, force is not set, auto_sort is TRUE, no max items
  * and case unsensitive
  *
@@ -152,23 +180,42 @@ guint gtk_combofix_get_type ( void )
  *
  * \return the new widget
  * */
-GtkWidget *gtk_combofix_new_complex ( GSList *list )
+GtkWidget *gtk_combofix_new ( GSList *list )
 {
-    GtkComboFix *combofix = GTK_COMBOFIX ( gtk_type_new ( gtk_combofix_get_type () ) );
+    GtkComboFixPrivate *priv;
 
-    /* set the fields of the combofix */
+    GtkComboFix *combofix = GTK_COMBOFIX ( gtk_type_new ( gtk_combofix_get_type ( ) ) );
+    priv = combofix -> priv;
 
-    combofix -> force = FALSE;
-    combofix -> auto_sort = TRUE;
-    combofix -> max_items = 0;
-    combofix -> visible_items = 0;
-    combofix -> case_sensitive = FALSE;
+    /* set the fields of the combofix */
+    priv -> force = FALSE;
+    priv -> max_items = 0;
+    priv -> case_sensitive = FALSE;
+    priv -> auto_sort = TRUE;
+    priv -> visible_items = 0;
 
     gtk_combofix_set_list (combofix, list);
 
-   return ( GTK_WIDGET ( combofix ) );
+    return ( GTK_WIDGET ( combofix ) );
 }
 
+
+/**
+ * get the text in the combofix
+ *
+ * \param combofix
+ *
+ * \return a const gchar
+ * */
+const gchar *gtk_combofix_get_text ( GtkComboFix *combofix )
+{
+    g_return_val_if_fail (combofix , NULL);
+    g_return_val_if_fail (GTK_IS_COMBOFIX (combofix), NULL);
+
+    return ( gtk_entry_get_text ( GTK_ENTRY (combofix->entry)));
+}
+
+
 /**
  * set the text in the combofix without showing the popup or
  * doing any check
@@ -178,8 +225,7 @@ GtkWidget *gtk_combofix_new_complex ( GSList *list )
  *
  * \return
  * */
-void gtk_combofix_set_text ( GtkComboFix *combofix,
-                        const gchar *text )
+void gtk_combofix_set_text ( GtkComboFix *combofix, const gchar *text )
 {
     g_return_if_fail (combofix);
     g_return_if_fail (GTK_IS_COMBOFIX (combofix));
@@ -190,13 +236,12 @@ void gtk_combofix_set_text ( GtkComboFix *combofix,
     g_signal_handlers_block_by_func ( G_OBJECT (combofix -> entry),
                         G_CALLBACK (gtk_combofix_entry_delete),
                         combofix );
+
     if ( text && strlen ( text ) > 0 )
         gtk_entry_set_text ( GTK_ENTRY ( combofix -> entry ), text );
     else
-    {
-        gsb_form_widget_set_empty ( GTK_WIDGET ( combofix -> entry ), TRUE );
         gtk_entry_set_text ( GTK_ENTRY ( combofix -> entry ), "" );
-    }
+
     g_signal_handlers_unblock_by_func ( G_OBJECT (combofix -> entry),
                         G_CALLBACK (gtk_combofix_entry_insert),
                         combofix );
@@ -207,99 +252,128 @@ void gtk_combofix_set_text ( GtkComboFix *combofix,
 
 
 /**
- * get the text in the combofix
+ * set the flag to force/unforce the text in the entry
+ * if force is set, the value in the entry must belong to the list
  *
  * \param combofix
+ * \param value
  *
- * \return a const gchar
+ * \return
  * */
-const gchar *gtk_combofix_get_text ( GtkComboFix *combofix )
+void gtk_combofix_set_force_text ( GtkComboFix *combofix, gboolean value )
 {
-    g_return_val_if_fail (combofix , NULL);
-    g_return_val_if_fail (GTK_IS_COMBOFIX (combofix), NULL);
-
-    return ( gtk_entry_get_text ( GTK_ENTRY (combofix->entry)));
-}
+    GtkComboFixPrivate *priv = combofix -> priv;
 
+    g_return_if_fail (combofix );
+    g_return_if_fail (GTK_IS_COMBOFIX (combofix));
 
+    priv->force = value;
+}
 
 
 /**
- * set the flag to force/unforce the text in the entry
- * if force is set, the value in the entry must belong to the list
+ * set if the completion is case sensitive or not
  *
  * \param combofix
- * \param value
+ * \param case_sensitive TRUE or FALSE
  *
  * \return
  * */
-void gtk_combofix_set_force_text ( GtkComboFix *combofix,
-                        gboolean value )
+void gtk_combofix_set_case_sensitive ( GtkComboFix *combofix, gboolean case_sensitive )
 {
+    GtkComboFixPrivate *priv = combofix -> priv;
+
     g_return_if_fail (combofix );
     g_return_if_fail (GTK_IS_COMBOFIX (combofix));
 
-    combofix->force = value;
+    priv -> case_sensitive = case_sensitive;
 }
 
 
 /**
- * set the maximum items viewable in the popup,
- * if there is more items corresponding to the entry than that number,
- * the popup is not showed
+ * hide the popup
  *
  * \param combofix
- * \param max_items
  *
- * \return
+ * \return FALSE
  * */
-void gtk_combofix_set_max_items ( GtkComboFix *combofix,
-                        gint max_items )
+gboolean gtk_combofix_hide_popup ( GtkComboFix *combofix )
 {
-    g_return_if_fail (combofix );
-    g_return_if_fail (GTK_IS_COMBOFIX (combofix));
+    GtkComboFixPrivate *priv = combofix -> priv;
+
+    g_return_val_if_fail ( combofix != NULL, FALSE );
+    g_return_val_if_fail ( GTK_IS_COMBOFIX ( combofix ), FALSE );
 
-    combofix -> max_items = max_items;
+    if ( GTK_WIDGET_VISIBLE ( priv -> popup ))
+    {
+        gtk_grab_remove ( priv -> popup );
+        gdk_pointer_ungrab ( GDK_CURRENT_TIME );
+        gtk_widget_hide ( priv -> popup );
+    }
+    return FALSE;
 }
 
 
 /**
- * set if the completion is case sensitive or not
+ * show the popup with all the content, not according to the entry
  *
  * \param combofix
- * \param case_sensitive TRUE or FALSE
  *
- * \return
+ * return FALSE
  * */
-void gtk_combofix_set_case_sensitive ( GtkComboFix *combofix,
-                        gboolean case_sensitive )
+gboolean gtk_combofix_show_popup ( GtkComboFix *combofix )
 {
-    g_return_if_fail (combofix );
-    g_return_if_fail (GTK_IS_COMBOFIX (combofix));
+    GtkComboFixPrivate *priv = combofix -> priv;
+
+    if ( GTK_WIDGET_VISIBLE ( priv -> popup ) )
+        return FALSE;
+
+    g_signal_handlers_block_by_func ( G_OBJECT ( combofix -> entry ),
+                        G_CALLBACK ( gtk_combofix_entry_insert ),
+                        combofix );
+    g_signal_handlers_block_by_func ( G_OBJECT ( combofix -> entry ),
+                        G_CALLBACK ( gtk_combofix_entry_delete ),
+                        combofix );
+
+    gtk_combofix_set_all_visible_rows ( combofix );
+    gtk_combofix_set_popup_position ( combofix );
+    gtk_widget_show ( priv -> popup );
+    gtk_combofix_select_item ( combofix, gtk_combofix_get_text ( combofix ) );
+    gtk_widget_grab_focus ( GTK_WIDGET ( combofix -> entry ));
+    gtk_window_set_modal (GTK_WINDOW ( priv -> popup ), TRUE);
+
+    g_signal_handlers_unblock_by_func ( G_OBJECT ( combofix -> entry),
+                        G_CALLBACK ( gtk_combofix_entry_insert ),
+                        combofix );
+    g_signal_handlers_unblock_by_func ( G_OBJECT ( combofix -> entry ),
+                        G_CALLBACK ( gtk_combofix_entry_delete ),
+                        combofix );
 
-    combofix -> case_sensitive = case_sensitive;
+    return FALSE;
 }
 
 
 /**
- * set the function of the enter key
- * either take the current selection and set it in the entry (FALSE)
- * either keep the current completion and close the popup (TRUE)
+ * set the maximum items viewable in the popup,
+ * if there is more items corresponding to the entry than that number,
+ * the popup is not showed
  *
  * \param combofix
- * \param enter_function TRUE or FALSE
+ * \param max_items
  *
  * \return
  * */
-void gtk_combofix_set_enter_function ( GtkComboFix *combofix,
-                        gboolean  enter_function )
+void gtk_combofix_set_max_items ( GtkComboFix *combofix, gint max_items )
 {
+    GtkComboFixPrivate *priv = combofix -> priv;
+
     g_return_if_fail (combofix );
     g_return_if_fail (GTK_IS_COMBOFIX (combofix));
 
-    combofix -> enter_function = enter_function;
+    priv -> max_items = max_items;
 }
 
+
 /**
  * set for the complex combofix if the different list have to
  * be mixed or separate
@@ -309,13 +383,14 @@ void gtk_combofix_set_enter_function ( GtkComboFix *combofix,
  *
  * \return
  * */
-void gtk_combofix_set_mixed_sort ( GtkComboFix *combofix,
-                        gboolean mixed_sort )
+void gtk_combofix_set_mixed_sort ( GtkComboFix *combofix, gboolean mixed_sort )
 {
+    GtkComboFixPrivate *priv = combofix -> priv;
+
     g_return_if_fail (combofix );
     g_return_if_fail (GTK_IS_COMBOFIX (combofix));
 
-    combofix -> mixed_sort = mixed_sort;
+    priv -> mixed_sort = mixed_sort;
 }
 
 
@@ -327,9 +402,10 @@ void gtk_combofix_set_mixed_sort ( GtkComboFix *combofix,
  *
  * \return TRUE if ok, FALSE if problem
  * */
-gboolean gtk_combofix_set_list ( GtkComboFix *combofix,
-                        GSList *list )
+gboolean gtk_combofix_set_list ( GtkComboFix *combofix, GSList *list )
 {
+    GtkComboFixPrivate *priv = combofix -> priv;
+
     GSList *tmp_list;
     gint list_number = 0;
     gint length;
@@ -338,30 +414,27 @@ gboolean gtk_combofix_set_list ( GtkComboFix *combofix,
     g_return_val_if_fail (combofix, FALSE );
     g_return_val_if_fail (GTK_IS_COMBOFIX (combofix), FALSE);
 
-    gtk_tree_store_clear (combofix -> store);
+    gtk_tree_store_clear ( priv -> store );
 
     tmp_list = list;
     length = g_slist_length (list);
 
     while ( tmp_list )
     {
-        gtk_combofix_fill_store ( combofix,
-                      tmp_list -> data,
-                      list_number );
+        gtk_combofix_fill_store ( combofix, tmp_list -> data, list_number );
 
         /* set the separator */
-        if (list_number < (length-1))
+        if (list_number < ( length-1 ) )
         {
-        gtk_tree_store_append ( combofix -> store,
-                    &iter,
-                    NULL );
-        gtk_tree_store_set ( combofix -> store,
-                     &iter,
-                     COMBOFIX_COL_LIST_NUMBER, list_number,
-                     COMBOFIX_COL_SEPARATOR, TRUE,
-                     -1 );
+            gtk_tree_store_append ( priv -> store, &iter, NULL );
+            gtk_tree_store_set ( priv -> store,
+                        &iter,
+                        COMBOFIX_COL_LIST_NUMBER, list_number,
+                        COMBOFIX_COL_SEPARATOR, TRUE,
+                        -1 );
         }
         list_number++;
+
         tmp_list = tmp_list -> next;
     }
 
@@ -369,20 +442,33 @@ gboolean gtk_combofix_set_list ( GtkComboFix *combofix,
 }
 
 
+void gtk_combofix_set_selection_callback ( GtkComboFix *combofix,
+						GCallback func,
+					    gpointer data )
+{
+    GtkComboFixPrivate *priv = combofix -> priv;
 
+    if ( func )
+	    g_signal_connect ( G_OBJECT ( priv -> selection ),
+                        "changed",
+					    G_CALLBACK ( func ),
+                        data );
+}
 
 /* *********************** the second part contains all the static functions ******************************************** */
-
-
 static void gtk_combofix_class_init ( GtkComboFixClass *klass )
 {
+    GObjectClass *object_class;
+
 /*   GtkWidgetClass *widget_class; */
 /*   GtkObjectClass *gtk_object_class; */
 
 /*   widget_class = (GtkWidgetClass *)klass; */
-
 /*   gtk_object_class = (GtkObjectClass *)klass; */
 /*   gtk_object_class->destroy = gtk_combofix_destroy; */
+    object_class = ( GObjectClass *) klass;
+
+    g_type_class_add_private ( object_class, sizeof ( GtkComboFixPrivate ) );
 }
 
 
@@ -398,10 +484,12 @@ static void gtk_combofix_init ( GtkComboFix *combofix )
     GtkWidget *hbox;
     GtkWidget *vbox;
     GtkWidget *frame;
-    GtkWidget *button;
     GtkCellRenderer *cell_renderer;
     GtkTreeViewColumn *tree_view_column;
     GtkWidget *scrolled_window;
+    GtkComboFixPrivate *priv = GTK_COMBOFIX_GET_PRIVATE ( combofix );
+
+    combofix -> priv = priv;
 
     /* the combofix is a vbox */
     vbox = gtk_vbox_new ( FALSE, 0 );
@@ -414,64 +502,63 @@ static void gtk_combofix_init ( GtkComboFix *combofix )
     gtk_widget_show ( hbox );
 
     /* set the entry */
-    combofix->entry = gtk_entry_new();
-    g_signal_connect ( G_OBJECT (combofix -> entry),
+    combofix -> entry = gtk_entry_new ( );
+    g_signal_connect ( G_OBJECT ( combofix -> entry ),
                             "key-press-event",
                             G_CALLBACK ( gtk_combofix_key_press_event ),
                             combofix );
-    g_signal_connect_object ( G_OBJECT (combofix -> entry),
+    g_signal_connect_object ( G_OBJECT ( combofix -> entry ),
                             "insert-text",
-                            G_CALLBACK (gtk_combofix_entry_insert),
+                            G_CALLBACK ( gtk_combofix_entry_insert ),
                             combofix,
-                            G_CONNECT_AFTER | G_CONNECT_SWAPPED);
-    g_signal_connect_object ( G_OBJECT (combofix -> entry),
+                            G_CONNECT_AFTER | G_CONNECT_SWAPPED );
+    g_signal_connect_object ( G_OBJECT ( combofix -> entry ),
                             "delete-text",
-                            G_CALLBACK (gtk_combofix_entry_delete),
+                            G_CALLBACK ( gtk_combofix_entry_delete ),
                             combofix,
                             G_CONNECT_AFTER | G_CONNECT_SWAPPED);
-    g_signal_connect_swapped ( G_OBJECT (combofix -> entry),
+    g_signal_connect_swapped ( G_OBJECT ( combofix -> entry ),
                             "expose-event",
-                            G_CALLBACK (gtk_combofix_expose_entry),
+                            G_CALLBACK ( gtk_combofix_expose_entry ),
                             combofix );
-    g_signal_connect_after ( G_OBJECT ( combofix->entry ),
+    g_signal_connect_after ( G_OBJECT ( combofix -> entry ),
                             "focus-out-event",
                             G_CALLBACK ( gtk_combofix_focus_out ),
                             combofix );
-    gtk_box_pack_start ( GTK_BOX ( hbox ), combofix->entry, TRUE, TRUE, 0 );
-    gtk_widget_show ( combofix->entry );
+    gtk_box_pack_start ( GTK_BOX ( hbox ), combofix -> entry, TRUE, TRUE, 0 );
+    gtk_widget_show ( combofix -> entry );
 
     /* set the button */
-    button = gtk_button_new ();
-    gtk_button_set_relief ( GTK_BUTTON (button), GTK_RELIEF_NONE );
-    gtk_container_add ( GTK_CONTAINER (button),
-                            gtk_arrow_new ( GTK_ARROW_DOWN,
-                            GTK_SHADOW_ETCHED_OUT) );
-    g_signal_connect_swapped ( G_OBJECT (button),
+    priv -> button = gtk_button_new ( );
+    gtk_button_set_relief ( GTK_BUTTON ( priv -> button ), GTK_RELIEF_NONE );
+    gtk_container_add ( GTK_CONTAINER ( priv -> button ),
+                            gtk_arrow_new ( GTK_ARROW_DOWN, GTK_SHADOW_NONE) );
+    g_signal_connect_swapped ( G_OBJECT ( priv -> button ),
                             "clicked",
                             G_CALLBACK ( gtk_combofix_show_popup ),
                             combofix );
-    gtk_box_pack_start ( GTK_BOX ( hbox ), button, FALSE, FALSE, 0 );
-    gtk_widget_show_all (button);
+    gtk_box_pack_start ( GTK_BOX ( hbox ), priv -> button, FALSE, FALSE, 0 );
+    gtk_widget_show_all ( priv -> button );
 
     /* set the popup but don't show it */
-    combofix->popup = gtk_window_new ( GTK_WINDOW_POPUP );
-    g_signal_connect ( G_OBJECT (combofix -> popup),
+    priv -> popup = gtk_window_new ( GTK_WINDOW_POPUP );
+    g_signal_connect ( G_OBJECT ( priv -> popup ),
                             "key-press-event",
                             G_CALLBACK (gtk_combofix_popup_key_press_event),
                             combofix );
-    gtk_window_set_resizable ( GTK_WINDOW ( combofix->popup ), FALSE );
+    gtk_window_set_resizable ( GTK_WINDOW ( priv -> popup ), FALSE );
 
-    g_signal_connect ( G_OBJECT ( combofix->popup ),
+    g_signal_connect ( G_OBJECT ( priv -> popup ),
                             "button-press-event",
                             G_CALLBACK ( gtk_combofix_button_press ),
                             combofix );
-    g_signal_connect ( G_OBJECT ( combofix->popup ),
+    g_signal_connect ( G_OBJECT ( priv -> popup ),
                             "button-release-event",
                             G_CALLBACK ( gtk_combofix_button_release_event ),
                             combofix );
 
     frame = gtk_frame_new ( NULL );
-    gtk_container_add ( GTK_CONTAINER ( combofix -> popup ), frame );
+    gtk_container_add ( GTK_CONTAINER ( priv -> popup ), frame );
     gtk_widget_show ( frame );
 
     scrolled_window = gtk_scrolled_window_new ( FALSE, FALSE );
@@ -481,34 +568,30 @@ static void gtk_combofix_init ( GtkComboFix *combofix )
     gtk_container_add ( GTK_CONTAINER (frame), scrolled_window );
     gtk_widget_show (scrolled_window);
 
-    /* the tree_store is 5 columns :
-     * COMBOFIX_COL_VISIBLE_STRING (a string) : what we see in the combofix
-     * COMBOFIX_COL_REAL_STRING (a string) : what we set in the entry when selecting something
-     * COMBOFIX_COL_VISIBLE (a boolean) : if that line has to be showed
-     * COMBOFIX_COL_LIST_NUMBER (a int) : the number of the list for a complex combofix (0 else)
-     * COMBOFIX_COL_SEPARATOR (a boolean) : TRUE for a separator
-     * */
-    combofix -> store = gtk_tree_store_new ( COMBOFIX_N_COLUMNS,
-                         G_TYPE_STRING,
-                         G_TYPE_STRING,
-                         G_TYPE_BOOLEAN,
-                         G_TYPE_INT,
-                         G_TYPE_BOOLEAN );
+    /* Create the tree_store */
+    priv -> store = gtk_tree_store_new ( COMBOFIX_N_COLUMNS,
+                        G_TYPE_STRING,
+                        G_TYPE_STRING,
+                        G_TYPE_BOOLEAN,
+                        G_TYPE_INT,
+                        G_TYPE_BOOLEAN );
 
     /* we set the store in a filter to show only what is selected */
-    combofix -> model_filter = gtk_tree_model_filter_new ( GTK_TREE_MODEL (combofix -> store),
+    priv -> model_filter = gtk_tree_model_filter_new ( GTK_TREE_MODEL ( priv -> store),
                                    NULL );
-    gtk_tree_model_filter_set_visible_column ( GTK_TREE_MODEL_FILTER (combofix -> model_filter),
+    gtk_tree_model_filter_set_visible_column ( GTK_TREE_MODEL_FILTER ( priv -> model_filter ),
                            COMBOFIX_COL_VISIBLE );
 
     /* we set the filter in a sorting model */
-    combofix -> model_sort = gtk_tree_model_sort_new_with_model ( GTK_TREE_MODEL (combofix -> model_filter));
-    gtk_tree_sortable_set_sort_column_id ( GTK_TREE_SORTABLE (combofix -> model_sort),
-                           0, GTK_SORT_ASCENDING );
-    gtk_tree_sortable_set_sort_func ( GTK_TREE_SORTABLE (combofix->model_sort),
-                      0,
-                      (GtkTreeIterCompareFunc) gtk_combofix_default_sort_func,
-                      combofix, NULL );
+    priv -> model_sort = gtk_tree_model_sort_new_with_model ( GTK_TREE_MODEL (
+                        priv -> model_filter ) );
+    gtk_tree_sortable_set_sort_column_id ( GTK_TREE_SORTABLE ( priv -> model_sort ),
+                        COMBOFIX_COL_VISIBLE_STRING,
+                        GTK_SORT_ASCENDING );
+    gtk_tree_sortable_set_sort_func ( GTK_TREE_SORTABLE ( priv -> model_sort ),
+                        COMBOFIX_COL_VISIBLE_STRING,
+                        (GtkTreeIterCompareFunc) gtk_combofix_default_sort_func,
+                        combofix, NULL );
 
     /* make the column */
     cell_renderer = gtk_cell_renderer_text_new ();
@@ -520,36 +603,34 @@ static void gtk_combofix_init ( GtkComboFix *combofix )
                       GTK_TREE_VIEW_COLUMN_FIXED );
 
     /* set the sorting model in the tree view */
-    combofix -> tree_view = gtk_tree_view_new_with_model (
-                            GTK_TREE_MODEL (combofix -> model_sort ) );
+    priv -> tree_view = gtk_tree_view_new_with_model (
+                            GTK_TREE_MODEL ( priv -> model_sort ) );
 
-    gtk_tree_selection_set_mode ( GTK_TREE_SELECTION (
-                            gtk_tree_view_get_selection (
-                            GTK_TREE_VIEW(combofix -> tree_view))),
+    priv -> selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW ( priv -> tree_view ) );
+    gtk_tree_selection_set_mode ( GTK_TREE_SELECTION ( priv -> selection ),
                             GTK_SELECTION_SINGLE );
-    gtk_tree_view_set_hover_selection ( GTK_TREE_VIEW (combofix -> tree_view),
+    gtk_tree_view_set_hover_selection ( GTK_TREE_VIEW ( priv -> tree_view ),
                             TRUE );
-    gtk_tree_view_set_headers_visible ( GTK_TREE_VIEW (combofix -> tree_view),
+    gtk_tree_view_set_headers_visible ( GTK_TREE_VIEW ( priv -> tree_view ),
                             FALSE );
-    gtk_tree_view_append_column ( GTK_TREE_VIEW (combofix -> tree_view),
+    gtk_tree_view_append_column ( GTK_TREE_VIEW ( priv -> tree_view ),
                             tree_view_column );
-    gtk_tree_view_set_fixed_height_mode ( GTK_TREE_VIEW(combofix -> tree_view),
+    gtk_tree_view_set_fixed_height_mode ( GTK_TREE_VIEW ( priv -> tree_view ),
                             TRUE );
-    gtk_tree_view_set_row_separator_func ( GTK_TREE_VIEW(combofix -> tree_view),
+    gtk_tree_view_set_row_separator_func ( GTK_TREE_VIEW ( priv -> tree_view ),
                            (GtkTreeViewRowSeparatorFunc) gtk_combofix_separator_func,
                            combofix, NULL );
 
-    g_signal_connect ( G_OBJECT (combofix -> tree_view),
+    g_signal_connect ( G_OBJECT ( priv -> tree_view ),
                             "button-press-event",
-                            G_CALLBACK (gtk_combofix_button_press_event),
+                            G_CALLBACK ( gtk_combofix_button_press_event ),
                             combofix );
-    gtk_container_add ( GTK_CONTAINER (scrolled_window), combofix -> tree_view);
+    gtk_container_add ( GTK_CONTAINER ( scrolled_window ), priv -> tree_view );
 
-    gtk_widget_show (combofix -> tree_view);
+    gtk_widget_show ( priv -> tree_view );
 }
 
 
-
 /**
 * fill the model of the combofix given in param
 * with the list given in param
@@ -569,9 +650,10 @@ static gboolean gtk_combofix_fill_store ( GtkComboFix *combofix,
     GtkTreeIter iter_parent;
     GtkTreeIter iter_child;
     gchar *last_parent = NULL;
+    GtkComboFixPrivate *priv = combofix -> priv;
 
     if ( !list )
-	return FALSE;
+	    return FALSE;
 
     /* normally the list cannot begin by a child, but we check here to
      * avoid a big crash */
@@ -580,58 +662,57 @@ static gboolean gtk_combofix_fill_store ( GtkComboFix *combofix,
 	 &&
 	 ((gchar *)(list -> data))[0] == '\t' )
     {
-	devel_debug ( "GtkComboFix error : the first entry in the list is a child, cannot fill the combofix\n");
-	return FALSE;
+        devel_debug ( "GtkComboFix error : the first entry in the list is a child, "
+                        "cannot fill the combofix\n" );
+        return FALSE;
     }
 
     tmp_list = list;
 
     while (tmp_list)
     {
-	gchar *string;
-	gchar* tmpstr;
+        gchar *string;
+        gchar* tmpstr;
 
-	string = tmp_list -> data;
+        string = tmp_list -> data;
 
-	/* create the new iter where it's necessary and iter will focus on it */
-	if (string)
-	{
-	    if ( string[0] == '\t' )
-	    {
-		/* it's a child */
-		gtk_tree_store_append ( combofix -> store,
-					&iter_child,
-					&iter_parent );
-		tmpstr = g_strconcat ( last_parent, " : ", string + 1, NULL );
-		gtk_tree_store_set ( combofix -> store,
-				     &iter_child,
-				     COMBOFIX_COL_VISIBLE_STRING, string + 1,
-				     COMBOFIX_COL_REAL_STRING, tmpstr,
-				     COMBOFIX_COL_VISIBLE, TRUE,
-				     COMBOFIX_COL_LIST_NUMBER, list_number,
-				     -1 );
-		g_free ( tmpstr );
-	    }
-	    else
-	    {
-		/* it's a parent */
-		gtk_tree_store_append ( combofix -> store,
-					&iter_parent,
-					NULL );
-		gtk_tree_store_set ( combofix -> store,
-				     &iter_parent,
-				     COMBOFIX_COL_VISIBLE_STRING, string,
-				     COMBOFIX_COL_REAL_STRING, string,
-				     COMBOFIX_COL_VISIBLE, TRUE,
-				     COMBOFIX_COL_LIST_NUMBER, list_number,
-				     -1 );
-		last_parent = string;
-	    }
-	}
-	tmp_list = tmp_list -> next;
+        /* create the new iter where it's necessary and iter will focus on it */
+        if (string)
+        {
+            if ( string[0] == '\t' )
+            {
+                /* it's a child */
+                tmpstr = g_strconcat ( last_parent, " : ", string + 1, NULL );
+
+                gtk_tree_store_append ( priv -> store, &iter_child, &iter_parent );
+                gtk_tree_store_set ( priv -> store,
+                            &iter_child,
+                            COMBOFIX_COL_VISIBLE_STRING, string + 1,
+                            COMBOFIX_COL_REAL_STRING, tmpstr,
+                            COMBOFIX_COL_VISIBLE, TRUE,
+                            COMBOFIX_COL_LIST_NUMBER, list_number,
+                            -1 );
+                g_free ( tmpstr );
+            }
+            else
+            {
+                /* it's a parent */
+                gtk_tree_store_append ( priv -> store, &iter_parent, NULL );
+                gtk_tree_store_set ( priv -> store,
+                            &iter_parent,
+                            COMBOFIX_COL_VISIBLE_STRING, string,
+                            COMBOFIX_COL_REAL_STRING, string,
+                            COMBOFIX_COL_VISIBLE, TRUE,
+                            COMBOFIX_COL_LIST_NUMBER, list_number,
+                            -1 );
+                last_parent = string;
+            }
+        }
+        tmp_list = tmp_list -> next;
     }
 
-    combofix -> visible_items = combofix -> visible_items + g_slist_length (list);
+    priv -> visible_items += g_slist_length ( list );
+
     return TRUE;
 }
 
@@ -676,17 +757,16 @@ static gboolean gtk_combofix_entry_delete ( GtkComboFix *combofix )
  *
  * \return TRUE to stop the signal, FALSE to continue
  * */
-static gboolean gtk_combofix_entry_changed ( GtkComboFix *combofix,
-                        gboolean insert_text )
+static gboolean gtk_combofix_entry_changed ( GtkComboFix *combofix, gboolean insert_text )
 {
     gchar *completed_string = NULL;
     const gchar *entry_string;
+    GtkComboFixPrivate *priv = combofix -> priv;
 
     entry_string = gtk_entry_get_text ( GTK_ENTRY ( combofix -> entry ) );
 
     if ( strlen ( entry_string ) )
     {
-        gsb_form_widget_set_empty ( combofix -> entry, FALSE );
         completed_string = gtk_combofix_update_visible_rows ( combofix,
                         entry_string);
         if ( completed_string == NULL )
@@ -697,20 +777,20 @@ static gboolean gtk_combofix_entry_changed ( GtkComboFix *combofix,
 
     /* if force is set and there is no completed_string, we deleted 1 character by one
      * from the end to have again a completed string */
-    if ( combofix -> force
+    if ( priv -> force
      &&
-     !completed_string 
-     && !gsb_form_widget_check_empty ( GTK_WIDGET ( combofix -> entry ) ) )
+     !completed_string )
     {
         gchar *new_string = NULL;
 
-        new_string = my_strdup ( entry_string );
-
-        if ( strlen ( entry_string) )
-            dialogue_warning_hint ( _("You cannot create new payee or category "
+        if ( entry_string && strlen ( entry_string) )
+        {
+            new_string = g_strdup ( entry_string );
+            gtk_combofix_dialog ( _("You cannot create new payee or category "
                             "and subcategory without changing the options "
                             "in preferences"),
                             _("Warning you cannot create payee or category") );
+        }
 
         while (!completed_string
                &&
@@ -756,17 +836,17 @@ static gboolean gtk_combofix_entry_changed ( GtkComboFix *combofix,
     }
 
     /* show the popup */
-    if ( combofix -> visible_items && strlen ( entry_string )
+    if ( priv -> visible_items && strlen ( entry_string )
      &&
      completed_string
      &&
-     (!combofix -> max_items
+     (!priv -> max_items
      ||
-     combofix -> visible_items < combofix -> max_items))
+     priv -> visible_items < priv -> max_items ) )
     {
         gtk_combofix_set_popup_position ( combofix );
-        gtk_widget_show ( combofix -> popup );
-        gtk_window_set_modal (GTK_WINDOW (combofix -> popup), TRUE);
+        gtk_widget_show ( priv -> popup );
+        gtk_window_set_modal ( GTK_WINDOW ( priv -> popup ), TRUE );
     }
 
     return TRUE;
@@ -783,14 +863,13 @@ static gboolean gtk_combofix_entry_changed ( GtkComboFix *combofix,
  * */
 static gboolean gtk_combofix_expose_entry ( GtkComboFix *combofix )
 {
-    if (block_expose_event
-	||
-	gsb_form_widget_check_empty (combofix -> entry))
-	return FALSE;
+    if ( block_expose_event )
+	    return FALSE;
+
     block_expose_event = 1;
 
     gtk_editable_select_region ( GTK_EDITABLE (combofix -> entry),
-				 gtk_editable_get_position (GTK_EDITABLE (combofix -> entry)),
+				 gtk_editable_get_position (GTK_EDITABLE ( combofix -> entry) ),
 				 -1 );
     return FALSE;
 }
@@ -818,6 +897,7 @@ static gchar *gtk_combofix_update_visible_rows ( GtkComboFix *combofix,
     gint length;
     gboolean text_written = FALSE;
     gboolean separator = FALSE;
+    GtkComboFixPrivate *priv = combofix -> priv;
 
     //~ devel_debug ( string);
     if (!combofix
@@ -829,9 +909,9 @@ static gchar *gtk_combofix_update_visible_rows ( GtkComboFix *combofix,
     if (!length)
 	return NULL;
 
-    combofix -> visible_items = 0;
-    model = GTK_TREE_MODEL (combofix -> store);
-    path = gtk_tree_path_new_first ();
+    priv -> visible_items = 0;
+    model = GTK_TREE_MODEL ( priv -> store );
+    path = gtk_tree_path_new_first ( );
     path_ok = gtk_tree_model_get_iter ( model, &iter, path );
 
     while ( path_ok )
@@ -850,9 +930,9 @@ static gchar *gtk_combofix_update_visible_rows ( GtkComboFix *combofix,
             show_row = 0;
         else
         {
-            model_string_length = strlen (model_string);
+            model_string_length = strlen ( model_string );
 
-            if ( combofix -> case_sensitive )
+            if ( priv -> case_sensitive )
             {
                 show_row = !strncmp ( model_string,
                           string,
@@ -872,8 +952,7 @@ static gchar *gtk_combofix_update_visible_rows ( GtkComboFix *combofix,
                 if ( !complete_string && model_string_length > length )
                     complete_string = model_string;
 
-                combofix -> visible_items = combofix -> visible_items + 1;
-
+                priv -> visible_items ++;
                 text_written = TRUE;
             }
         }
@@ -894,21 +973,20 @@ static gchar *gtk_combofix_update_visible_rows ( GtkComboFix *combofix,
         path_ok = gtk_tree_model_get_iter ( model, &iter, path );
 
         /* if path_ok is FALSE, perhaps we are on the end of the children list... */
-        if (!path_ok
+        if ( !path_ok
             &&
-            gtk_tree_path_get_depth (path) > 1)
+            gtk_tree_path_get_depth ( path ) > 1 )
         {
-            gtk_tree_path_up (path);
-            gtk_tree_path_next (path);
+            gtk_tree_path_up ( path );
+            gtk_tree_path_next ( path );
             path_ok = gtk_tree_model_get_iter ( model, &iter, path );
         }
     }
 
     gtk_tree_path_free (path);
 
-    gtk_tree_view_expand_all ( GTK_TREE_VIEW ( combofix -> tree_view ) );
-    gtk_tree_selection_unselect_all ( GTK_TREE_SELECTION (
-                        gtk_tree_view_get_selection ( GTK_TREE_VIEW ( combofix -> tree_view ) ) ) );
+    gtk_tree_view_expand_all ( GTK_TREE_VIEW ( priv -> tree_view ) );
+    gtk_tree_selection_unselect_all ( priv -> selection );
 
     return complete_string;
 }
@@ -927,22 +1005,22 @@ static gboolean gtk_combofix_set_all_visible_rows ( GtkComboFix *combofix )
     GtkTreePath *path;
     GtkTreeIter iter;
     gint path_ok;
+    GtkComboFixPrivate *priv = combofix -> priv;
 
-    if (!combofix )
-	return FALSE;
+    if ( !combofix )
+	    return FALSE;
+
+    priv -> visible_items = 0;
+    model = GTK_TREE_MODEL ( priv -> store);
+    path = gtk_tree_path_new_first ( );
+    path_ok = gtk_tree_model_get_iter ( model, &iter, path );
 
-    combofix -> visible_items = 0;
-    model = GTK_TREE_MODEL (combofix -> store);
-    path = gtk_tree_path_new_first ();
-    path_ok = gtk_tree_model_get_iter ( model,
-					&iter,
-					path );
     while (path_ok)
     {
         gint value;
 
         /* if mixed_sort is set, we don't show any separator line */
-        if (combofix -> mixed_sort)
+        if ( priv -> mixed_sort )
         {
             gint separator;
 
@@ -952,9 +1030,9 @@ static gboolean gtk_combofix_set_all_visible_rows ( GtkComboFix *combofix )
                      -1 );
 
 	    if (separator)
-		value = FALSE;
+		    value = FALSE;
 	    else
-		value = TRUE;
+		    value = TRUE;
 	}
 	else
 	    value = TRUE;
@@ -963,32 +1041,28 @@ static gboolean gtk_combofix_set_all_visible_rows ( GtkComboFix *combofix )
                      &iter,
                      COMBOFIX_COL_VISIBLE, value,
                      -1 );
-        combofix -> visible_items++;
+
+        priv -> visible_items++;
 
         /* increment the path */
-        if ( gtk_tree_model_iter_has_child ( model,
-                             &iter))
-            gtk_tree_path_down (path);
+        if ( gtk_tree_model_iter_has_child ( model, &iter ) )
+            gtk_tree_path_down ( path );
         else
-            gtk_tree_path_next (path);
+            gtk_tree_path_next ( path );
 
-        path_ok = gtk_tree_model_get_iter ( model,
-                            &iter,
-                            path );
+        path_ok = gtk_tree_model_get_iter ( model, &iter, path );
 
         /* if path_ok is FALSE, perhaps we are on the end of the children list... */
         if (!path_ok
             &&
-            gtk_tree_path_get_depth (path) > 1)
+            gtk_tree_path_get_depth ( path ) > 1 )
         {
-            gtk_tree_path_up (path);
-            gtk_tree_path_next (path);
-            path_ok = gtk_tree_model_get_iter ( model,
-                            &iter,
-                            path );
+            gtk_tree_path_up ( path );
+            gtk_tree_path_next ( path );
+                path_ok = gtk_tree_model_get_iter ( model, &iter, path );
         }
     }
-    gtk_tree_view_expand_all ( GTK_TREE_VIEW (combofix -> tree_view));
+    gtk_tree_view_expand_all ( GTK_TREE_VIEW ( priv -> tree_view ) );
 
     return FALSE;
 }
@@ -1007,59 +1081,60 @@ static gboolean gtk_combofix_set_popup_position ( GtkComboFix *combofix )
     gint height;
     GdkRectangle rectangle;
     gint horizontal_separator;
+    GtkComboFixPrivate *priv = combofix -> priv;
 
-    if (!combofix)
-	return FALSE;
+    if ( !combofix )
+	    return FALSE;
 
     /* get the position of the combofix */
-    gdk_window_get_origin ( GTK_WIDGET ( combofix->entry )->window,
-			    &x,
-			    &y );
+    gdk_window_get_origin ( GTK_WIDGET ( combofix->entry ) -> window, &x, &y );
 
-    gtk_widget_style_get(GTK_WIDGET(combofix -> tree_view),
-			 "horizontal-separator", &horizontal_separator,
-			 NULL);
+    gtk_widget_style_get(GTK_WIDGET ( priv -> tree_view ),
+			            "horizontal-separator", &horizontal_separator,
+			            NULL );
 
-    if (GTK_WIDGET_REALIZED (combofix -> tree_view))
+    if ( GTK_WIDGET_REALIZED ( priv -> tree_view ) )
     {
-        gtk_tree_view_get_cell_area ( GTK_TREE_VIEW (combofix -> tree_view),
-                          gtk_tree_path_new_first (),
+        gtk_tree_view_get_cell_area ( GTK_TREE_VIEW ( priv -> tree_view),
+                          gtk_tree_path_new_first ( ),
                           NULL,
                           &rectangle );
         /* the 4 is found at home, a good number to avoid the scrollbar with 1 item */
-        height = (combofix -> visible_items) * (rectangle.height + horizontal_separator) + 4;
+        height = ( priv -> visible_items ) * ( rectangle.height + horizontal_separator ) + 4;
     }
     else
-        height = (combofix -> visible_items) * (GTK_WIDGET (combofix -> entry) -> allocation.height + horizontal_separator) + 4;
+        height = ( priv -> visible_items ) * ( GTK_WIDGET (
+                        combofix -> entry ) -> allocation.height + horizontal_separator) + 4;
 
     /* if the popup is too small to contain all, we check to set it on the bottom or on the top
      * if the place on the top is more than 2 times bigger than the bottom, we set it on the top */
-    if ( (( gdk_screen_height () - y - GTK_WIDGET ( combofix ) -> allocation.height ) < height )
+    if ( ( ( gdk_screen_height ( ) - y - GTK_WIDGET ( combofix ) -> allocation.height ) < height )
 	 &&
 	 ( ( ( gdk_screen_height () - y ) * 3 ) < y ) )
     {
-	/* popup on the top */
-	if ( y > height )
-	    y = y - height;
-	else
-	{
-	    height = y;
-	    y = 0;
-	}
+        /* popup on the top */
+        if ( y > height )
+            y = y - height;
+        else
+        {
+            height = y;
+            y = 0;
+        }
     }
     else
     {
-	/* popup on the bottom */
-	y = y + GTK_WIDGET ( combofix ) -> allocation.height;
+        /* popup on the bottom */
+        y += GTK_WIDGET ( combofix ) -> allocation.height;
 
-	if ( ( gdk_screen_height () - y ) < height )
-	    height = gdk_screen_height () - y;
+        if ( ( gdk_screen_height ( ) - y ) < height )
+            height = gdk_screen_height ( ) - y;
     }
 
-    gtk_window_move ( GTK_WINDOW ( combofix->popup ), x, y );
-    gtk_widget_set_size_request ( GTK_WIDGET ( combofix->popup ),
-			   GTK_WIDGET ( combofix ) ->allocation.width,
-			   height );
+    gtk_window_move ( GTK_WINDOW ( priv -> popup ), x, y );
+    gtk_widget_set_size_request ( GTK_WIDGET ( priv -> popup ),
+			            GTK_WIDGET ( combofix ) -> allocation.width,
+			            height );
+
     return FALSE;
 }
 
@@ -1121,64 +1196,6 @@ static gboolean gtk_combofix_focus_out ( GtkWidget *entry,
 
 
 /**
- * hide the popup
- *
- * \param combofix
- *
- * \return FALSE
- * */
-static gboolean gtk_combofix_hide_popup ( GtkComboFix *combofix )
-{
-    g_return_val_if_fail ( combofix != NULL, FALSE );
-    g_return_val_if_fail ( GTK_IS_COMBOFIX (combofix), FALSE );
-
-    if ( GTK_WIDGET_VISIBLE ( combofix -> popup ))
-    {
-	gdk_pointer_ungrab ( GDK_CURRENT_TIME );
-	gtk_widget_hide ( combofix->popup );
-    }
-    return FALSE;
-}
-
-
-/**
- * show the popup with all the content, not according to the entry
- *
- * \param combofix
- *
- * return FALSE
- * */
-static gboolean gtk_combofix_show_popup ( GtkComboFix *combofix )
-{
-    if ( GTK_WIDGET_VISIBLE (combofix -> popup))
-        return FALSE;
-
-    g_signal_handlers_block_by_func ( G_OBJECT (combofix -> entry),
-                        G_CALLBACK (gtk_combofix_entry_insert),
-                        combofix );
-    g_signal_handlers_block_by_func ( G_OBJECT (combofix -> entry),
-                        G_CALLBACK (gtk_combofix_entry_delete),
-                        combofix );
-
-    gtk_combofix_set_all_visible_rows ( combofix );
-    gtk_combofix_set_popup_position ( combofix );
-    gtk_widget_show ( combofix -> popup );
-    gtk_combofix_select_item ( combofix, gtk_combofix_get_text ( combofix ) );
-    gtk_widget_grab_focus ( GTK_WIDGET ( combofix -> entry ));
-    gtk_window_set_modal (GTK_WINDOW (combofix -> popup), TRUE);
-
-    g_signal_handlers_unblock_by_func ( G_OBJECT (combofix -> entry),
-                        G_CALLBACK (gtk_combofix_entry_insert),
-                        combofix );
-    g_signal_handlers_unblock_by_func ( G_OBJECT (combofix -> entry),
-                        G_CALLBACK (gtk_combofix_entry_delete),
-                        combofix );
-
-    return FALSE;
-}
-
-
-/**
  * the popup need to be modal to work fine, but the entry won't receive
  * some signal anymore... that function continue the signal to the entry
  *
@@ -1215,56 +1232,44 @@ static gboolean gtk_combofix_key_press_event ( GtkWidget *entry,
                         GdkEventKey *ev,
                         GtkComboFix *combofix )
 {
+    GtkComboFixPrivate *priv = combofix -> priv;
+
     switch ( ev -> keyval )
     {
     case GDK_ISO_Left_Tab:
     case GDK_Tab :
 	case GDK_KP_Enter :
 	case GDK_Return :
-	    if (combofix -> enter_function)
-	    {
-            if ( strlen ( gtk_combofix_get_text ( combofix ) ) == 0 )
-                gtk_combofix_choose_selection ( combofix );
-            else
+        /* we get the current selection */
+        if ( GTK_WIDGET_VISIBLE ( priv -> popup ) )
+        {
+           if ( ! gtk_combofix_choose_selection ( combofix ) )
             {
-                /* we keep the current completion */
-                gtk_combofix_hide_popup (combofix);
+                /* here we did entry key, but no selection... so
+                 * keep the current completion */
+                gtk_combofix_hide_popup ( combofix );
                 gtk_editable_select_region ( GTK_EDITABLE (combofix -> entry), 0, 0 );
             }
-	    }
-	    else
-	    {
-            /* we get the current selection */
-            if ( GTK_WIDGET_VISIBLE ( combofix -> popup ))
-            {
-               if ( ! gtk_combofix_choose_selection ( combofix ) )
-                {
-                    /* here we did entry key, but no selection... so
-                     * keep the current completion */
-                    gtk_combofix_hide_popup ( combofix );
-                    gtk_editable_select_region ( GTK_EDITABLE (combofix -> entry), 0, 0 );
-                }
-             }
-	    }
+        }
         /* le traitement de ENTER est fait dans le formulaire */
         return FALSE;
 	    break;
 
 	case GDK_Escape:
-	    if ( GTK_WIDGET_VISIBLE ( combofix -> popup ))
+	    if ( GTK_WIDGET_VISIBLE ( priv -> popup ))
 	    {
-		gtk_combofix_hide_popup (combofix);
-		gtk_editable_select_region ( GTK_EDITABLE (combofix -> entry),
-					     0,
-					     0 );
-		return TRUE;
+            gtk_combofix_hide_popup ( combofix );
+            gtk_editable_select_region ( GTK_EDITABLE ( combofix -> entry ),
+					    0,
+					    0 );
+            return TRUE;
 	    }
 	    break;
 
 	case GDK_Down :
 	case GDK_KP_Down :
 	    /* show the popup if necessary */
-	    if (!GTK_WIDGET_VISIBLE (combofix -> popup))
+	    if ( !GTK_WIDGET_VISIBLE ( priv -> popup ) )
 		gtk_combofix_show_popup ( combofix );
 
 	    gtk_combofix_move_selection ( combofix,
@@ -1276,19 +1281,17 @@ static gboolean gtk_combofix_key_press_event ( GtkWidget *entry,
 	case GDK_KP_Up :
 	    /* move the selection up in the combofix only if the popup is showed,
 	     * else let the program works with the upper key */
-	    if (GTK_WIDGET_VISIBLE (combofix -> popup))
+	    if (GTK_WIDGET_VISIBLE ( priv -> popup))
 	    {
-		gtk_combofix_move_selection ( combofix,
-					      COMBOFIX_UP );
-		return TRUE;
+            gtk_combofix_move_selection ( combofix, COMBOFIX_UP );
+            return TRUE;
 	    }
 	    break;
 
 	case GDK_Page_Up :
 	case GDK_KP_Page_Up :
-	    gtk_combofix_move_selection ( combofix,
-					  COMBOFIX_PAGE_UP );
-	    return TRUE;
+	    gtk_combofix_move_selection ( combofix, COMBOFIX_PAGE_UP );
+        return TRUE;
 	    break;
 
 	case GDK_Page_Down :
@@ -1296,8 +1299,7 @@ static gboolean gtk_combofix_key_press_event ( GtkWidget *entry,
 	    /* show the popup if necessary */
 	    gtk_combofix_show_popup ( combofix );
 
-	    gtk_combofix_move_selection ( combofix,
-					  COMBOFIX_PAGE_DOWN );
+	    gtk_combofix_move_selection ( combofix, COMBOFIX_PAGE_DOWN );
 	    return TRUE;
 	    break;
     }
@@ -1366,25 +1368,22 @@ static gboolean gtk_combofix_button_release_event ( GtkWidget *popup,
 static gboolean gtk_combofix_choose_selection ( GtkComboFix *combofix )
 {
     GtkTreeIter iter;
-    GtkTreeSelection *tree_selection;
     gchar *string;
-
-    tree_selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW (combofix -> tree_view));
+    GtkComboFixPrivate *priv = combofix -> priv;
 
     /* if there is no selection, go away */
-    if (!gtk_tree_selection_get_selected ( tree_selection,
-					   NULL,
-					   &iter ))
-	return FALSE;
+    if (!gtk_tree_selection_get_selected ( priv -> selection, NULL, &iter ) )
+	    return FALSE;
 
-    gtk_tree_model_get ( GTK_TREE_MODEL (combofix -> model_sort),
+    gtk_tree_model_get ( GTK_TREE_MODEL ( priv -> model_sort ),
 			 &iter,
 			 COMBOFIX_COL_REAL_STRING, &string,
 			 -1 );
+
     if ( string && strlen ( string ) )
         gtk_combofix_set_text ( combofix, string );
 
-    gtk_combofix_hide_popup (combofix);
+    gtk_combofix_hide_popup ( combofix );
     return TRUE;
 }
 
@@ -1404,91 +1403,87 @@ static gboolean gtk_combofix_move_selection ( GtkComboFix *combofix,
                         gint direction )
 {
     GtkTreeIter sorted_iter;
-    GtkTreeSelection *tree_selection;
     gint result = 0;
+    GtkComboFixPrivate *priv = combofix -> priv;
 
-    if (!combofix)
-	return FALSE;
-
-    tree_selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW (combofix -> tree_view));
+    if ( !combofix )
+	    return FALSE;
 
-    if (gtk_tree_selection_get_selected ( tree_selection,
-					  NULL,
-					  &sorted_iter ))
+    if ( gtk_tree_selection_get_selected ( priv -> selection, NULL, &sorted_iter ) )
     {
-	/* there is already a selection */
-	gint i;
-
-	switch (direction)
-	{
-	    case COMBOFIX_DOWN:
-		result = gtk_combofix_move_selection_one_step ( combofix,
-								&sorted_iter,
-								COMBOFIX_DOWN );
-		break;
-
-	    case COMBOFIX_UP:
-		result = gtk_combofix_move_selection_one_step ( combofix,
-								&sorted_iter,
-								COMBOFIX_UP );
-		break;
-
-	    case COMBOFIX_PAGE_DOWN:
-		for ( i=0 ; i<gtk_combofix_get_rows_number_by_page ( combofix ) ; i++ )
-		    result = result | gtk_combofix_move_selection_one_step ( combofix,
-									     &sorted_iter,
-									     COMBOFIX_DOWN );
-		break;
-
-	    case COMBOFIX_PAGE_UP:
-		for ( i=0 ; i<gtk_combofix_get_rows_number_by_page ( combofix ) ; i++ )
-		    result = result | gtk_combofix_move_selection_one_step ( combofix,
-									     &sorted_iter,
-									     COMBOFIX_UP );
-		break;
-	}
+        /* there is already a selection */
+        gint i;
+
+        switch (direction)
+        {
+            case COMBOFIX_DOWN:
+            result = gtk_combofix_move_selection_one_step ( combofix,
+                                    &sorted_iter,
+                                    COMBOFIX_DOWN );
+            break;
+
+            case COMBOFIX_UP:
+            result = gtk_combofix_move_selection_one_step ( combofix,
+                                    &sorted_iter,
+                                    COMBOFIX_UP );
+            break;
+
+            case COMBOFIX_PAGE_DOWN:
+            for ( i=0 ; i<gtk_combofix_get_rows_number_by_page ( combofix ) ; i++ )
+                result = result | gtk_combofix_move_selection_one_step ( combofix,
+                                             &sorted_iter,
+                                             COMBOFIX_DOWN );
+            break;
+
+            case COMBOFIX_PAGE_UP:
+            for ( i=0 ; i<gtk_combofix_get_rows_number_by_page ( combofix ) ; i++ )
+                result = result | gtk_combofix_move_selection_one_step ( combofix,
+                                             &sorted_iter,
+                                             COMBOFIX_UP );
+            break;
+        }
     }
     else
     {
-	/* there is no current selection,
-	 * get the first selectable line */
-	gint separator = 0;
-	do
-	{
-	    if (separator)
-		result = gtk_tree_model_iter_next ( GTK_TREE_MODEL (combofix -> model_sort),
-						    &sorted_iter);
-	    else
-		result = gtk_tree_model_get_iter_first ( GTK_TREE_MODEL (combofix -> model_sort),
-							 &sorted_iter );
-	    if (result)
-		gtk_tree_model_get ( GTK_TREE_MODEL (combofix -> model_sort),
-				     &sorted_iter,
-				     COMBOFIX_COL_SEPARATOR, &separator,
-				     -1 );
-	    else
-		separator = 0;
-	}
-	while (separator);
-    }
+        /* there is no current selection,
+         * get the first selectable line */
+        gint separator = 0;
+        do
+        {
+            if (separator)
+            result = gtk_tree_model_iter_next ( GTK_TREE_MODEL ( priv -> model_sort ),
+                                &sorted_iter);
+            else
+            result = gtk_tree_model_get_iter_first ( GTK_TREE_MODEL ( priv -> model_sort),
+                                 &sorted_iter );
+            if (result)
+            gtk_tree_model_get ( GTK_TREE_MODEL ( priv -> model_sort),
+                         &sorted_iter,
+                         COMBOFIX_COL_SEPARATOR, &separator,
+                         -1 );
+            else
+            separator = 0;
+        }
+        while (separator);
+        }
 
-    if (result)
-    {
-	GtkTreePath *path;
-
-	gtk_tree_selection_select_iter ( tree_selection,
-					 &sorted_iter );
-	path = gtk_tree_model_get_path ( GTK_TREE_MODEL (combofix -> model_sort),
-					 &sorted_iter );
-	if (path)
-	{
-	    gtk_tree_view_scroll_to_cell ( GTK_TREE_VIEW (combofix -> tree_view),
-					   path,
-					   NULL,
-					   FALSE,
-					   0 , 0 );
-	    gtk_tree_path_free (path);
-	}
+        if (result)
+        {
+        GtkTreePath *path;
+
+        gtk_tree_selection_select_iter ( priv -> selection, &sorted_iter );
+        path = gtk_tree_model_get_path ( GTK_TREE_MODEL ( priv -> model_sort ),
+                         &sorted_iter );
+        if (path)
+        {
+            gtk_tree_view_scroll_to_cell ( GTK_TREE_VIEW ( priv -> tree_view),
+                        path,
+                        NULL,
+                        FALSE,
+                        0,
+                        0 );
+            gtk_tree_path_free ( path );
+        }
     }
 
     return FALSE;
@@ -1508,11 +1503,11 @@ static gboolean gtk_combofix_select_item ( GtkComboFix *combofix,
 {
     GtkTreeModel *model;
     GtkTreeIter iter;
-    GtkTreeSelection *tree_selection;
     GtkTreePath *path;
     gchar *ptr;
     gchar *tmp_item = NULL;
     gint result = 0;
+    GtkComboFixPrivate *priv = combofix -> priv;
 
     if ( !combofix )
 	    return FALSE;
@@ -1524,7 +1519,7 @@ static gboolean gtk_combofix_select_item ( GtkComboFix *combofix,
     else
         tmp_item = g_strdup ( item );
         
-    model = GTK_TREE_MODEL ( combofix -> model_sort );
+    model = GTK_TREE_MODEL ( priv -> model_sort );
     result = gtk_tree_model_get_iter_first ( model, &iter );
 
     while ( result )
@@ -1549,17 +1544,17 @@ static gboolean gtk_combofix_select_item ( GtkComboFix *combofix,
     if ( result == 0 )
         result = gtk_tree_model_get_iter_first ( model, &iter );
 
-    tree_selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW ( combofix -> tree_view ) );
-    gtk_tree_selection_select_iter ( tree_selection, &iter );
+    gtk_tree_selection_select_iter ( priv -> selection, &iter );
     path = gtk_tree_model_get_path ( model, &iter );
     if (path)
     {
-        gtk_tree_view_scroll_to_cell ( GTK_TREE_VIEW (combofix -> tree_view),
+        gtk_tree_view_scroll_to_cell ( GTK_TREE_VIEW ( priv -> tree_view ),
                         path,
                         NULL,
                         FALSE,
-                        0 , 0 );
-        gtk_tree_path_free (path);
+                        0,
+                        0 );
+        gtk_tree_path_free ( path );
     }
 
     return FALSE;
@@ -1577,12 +1572,13 @@ static gint gtk_combofix_get_rows_number_by_page ( GtkComboFix *combofix )
 {
     gint return_value;
     GtkAdjustment *adjustment;
+    GtkComboFixPrivate *priv = combofix -> priv;
 
     if (!combofix)
 	return 0;
 
-    adjustment = gtk_tree_view_get_vadjustment (GTK_TREE_VIEW (combofix -> tree_view));
-    return_value = combofix -> visible_items * adjustment -> page_size / adjustment -> upper;
+    adjustment = gtk_tree_view_get_vadjustment ( GTK_TREE_VIEW ( priv -> tree_view ) );
+    return_value = priv -> visible_items * adjustment -> page_size / adjustment -> upper;
 
     return return_value;
 }
@@ -1608,10 +1604,10 @@ static gboolean gtk_combofix_move_selection_one_step ( GtkComboFix *combofix,
     GtkTreePath *saved_path;
     GtkTreeModel *model;
     gint separator;
+    GtkComboFixPrivate *priv = combofix -> priv;
 
-    model = combofix -> model_sort;
-    path = gtk_tree_model_get_path ( model,
-				     iter );
+    model = priv -> model_sort;
+    path = gtk_tree_model_get_path ( model, iter );
     saved_path = gtk_tree_path_copy (path);
 
     switch (direction)
@@ -1619,75 +1615,63 @@ static gboolean gtk_combofix_move_selection_one_step ( GtkComboFix *combofix,
 	case COMBOFIX_DOWN:
 	    do
 	    {
-		if ( gtk_tree_model_iter_has_child ( model,
-						     iter)
+		if ( gtk_tree_model_iter_has_child ( model, iter)
 		     &&
-		     gtk_tree_view_row_expanded ( GTK_TREE_VIEW (combofix -> tree_view),
-						  path ))
-		    gtk_tree_path_down (path);
+		     gtk_tree_view_row_expanded ( GTK_TREE_VIEW ( priv -> tree_view ), path ) )
+		    gtk_tree_path_down ( path );
 		else
-		    gtk_tree_path_next (path);
+		    gtk_tree_path_next ( path );
 
-		result = gtk_tree_model_get_iter ( model,
-						   iter,
-						   path );
+		result = gtk_tree_model_get_iter ( model, iter, path );
 
 		/* if result is FALSE, perhaps we are on the end of the children list... */
-		if (!result
+		if ( !result
 		    &&
-		    gtk_tree_path_get_depth (path) > 1)
+		    gtk_tree_path_get_depth ( path ) > 1 )
 		{
-		    gtk_tree_path_up (path);
-		    gtk_tree_path_next (path);
-		    result = gtk_tree_model_get_iter ( model,
-						       iter,
-						       path );
+		    gtk_tree_path_up ( path );
+		    gtk_tree_path_next ( path );
+		    result = gtk_tree_model_get_iter ( model, iter, path );
 		}
 
 		/* check if we are not on a separator */
-		if (result)
+		if ( result )
 		    gtk_tree_model_get ( model,
-					 iter,
-					 COMBOFIX_COL_SEPARATOR, &separator,
-					 -1 );
+					    iter,
+					    COMBOFIX_COL_SEPARATOR, &separator,
+					    -1 );
 		else
 		    separator = 0;
 	    }
-	    while (separator);
+	    while ( separator );
 	    break;
 
 	case COMBOFIX_UP:
 	    do
 	    {
-		result = gtk_tree_path_prev (path);
+		result = gtk_tree_path_prev ( path );
 
-		if (result)
+		if ( result )
 		{
 		    /* there is a prev path, but now, if we are on a parent, go to the last child,
 		     * else, stay there */
-		    result = gtk_tree_model_get_iter ( model,
-						       iter,
-						       path );
+		    result = gtk_tree_model_get_iter ( model, iter, path );
 
 		    if ( result
-			 &&
-			 gtk_tree_model_iter_has_child ( model,
-							 iter)
-			 &&
-			 gtk_tree_view_row_expanded ( GTK_TREE_VIEW (combofix -> tree_view),
-						      path ))
+			    &&
+			    gtk_tree_model_iter_has_child ( model, iter )
+			    &&
+			    gtk_tree_view_row_expanded ( GTK_TREE_VIEW ( priv -> tree_view ), path ) )
 		    {
 			/* there is some children, go to the last one */
 			gint i;
 
-			gtk_tree_path_down (path);
+			gtk_tree_path_down ( path );
 
-			for ( i=0 ; i<gtk_tree_model_iter_n_children ( model, iter ) - 1 ; i++ )
-			    gtk_tree_path_next (path);
+			for ( i = 0 ; i < gtk_tree_model_iter_n_children ( model, iter ) - 1 ; i++ )
+			    gtk_tree_path_next ( path );
 
-			result = gtk_tree_model_get_iter ( model,
-							   iter,
-							   path );
+			result = gtk_tree_model_get_iter ( model, iter, path );
 		    }
 		}
 		else
@@ -1695,35 +1679,32 @@ static gboolean gtk_combofix_move_selection_one_step ( GtkComboFix *combofix,
 		    /* there is no prev path, if we are not on the toplevel, go to the
 		     * parent */
 
-		    if ( gtk_tree_path_get_depth (path) > 1)
+		    if ( gtk_tree_path_get_depth ( path ) > 1 )
 		    {
-			gtk_tree_path_up (path);
-			result = gtk_tree_model_get_iter ( model,
-							   iter,
-							   path );
+                gtk_tree_path_up ( path );
+                result = gtk_tree_model_get_iter ( model, iter, path );
 		    }
 		}
 		/* check if we are not on a separator */
-		if (result)
+		if ( result )
 		    gtk_tree_model_get ( model,
-					 iter,
-					 COMBOFIX_COL_SEPARATOR, &separator,
-					 -1 );
+					    iter,
+					    COMBOFIX_COL_SEPARATOR, &separator,
+					    -1 );
 		else
 		    separator = 0;
 	    }
-	    while (separator);
+	    while ( separator );
 	    break;
     }
 
-    gtk_tree_path_free (path);
+    gtk_tree_path_free ( path );
 
     /* if result is FALSE, iter was changed so set it to its initial value */
-    if (!result)
-	gtk_tree_model_get_iter ( model,
-				  iter,
-				  saved_path );
-    gtk_tree_path_free (saved_path);
+    if ( !result )
+        gtk_tree_model_get_iter ( model, iter, saved_path );
+
+    gtk_tree_path_free ( saved_path );
 
     return result;
 }
@@ -1746,10 +1727,13 @@ static gint gtk_combofix_default_sort_func ( GtkTreeModel *model_sort,
                         GtkTreeIter *iter_2,
                         GtkComboFix *combofix )
 {
+    GtkComboFixPrivate *priv = combofix -> priv;
     gint list_number_1;
     gint list_number_2;
     gchar *string_1;
     gchar *string_2;
+    gchar *cmp_string_1;
+    gchar *cmp_string_2;
     gint return_value = 0;
     gboolean separator_1;
     gboolean separator_2;
@@ -1767,37 +1751,30 @@ static gint gtk_combofix_default_sort_func ( GtkTreeModel *model_sort,
 			 COMBOFIX_COL_SEPARATOR, &separator_2,
 			 -1 );
 
-    if ( combofix -> mixed_sort == FALSE )
+    if ( priv -> mixed_sort == FALSE )
 	    return_value = list_number_1 - list_number_2;
 
-    if (!return_value)
+    if ( return_value == 0 )
     {
-	if (separator_1)
-	    return_value = 1;
-	else
-	    if (separator_2)
-		    return_value = -1;
-	    else
-	    {
-            gchar *cmp_string_1;
-            gchar *cmp_string_2;
-
-            if ( string_1 == NULL )
-                return -1;
-            if ( string_2 == NULL )
-                return 1;
-
-            cmp_string_1 = g_utf8_collate_key (string_1, -1);
-            cmp_string_2 = g_utf8_collate_key (string_2, -1);
-            return_value = g_ascii_strcasecmp ( cmp_string_1,
-                                cmp_string_2 );
-            g_free (cmp_string_1);
-            g_free (cmp_string_2);
-	    }
+        if ( separator_1 )
+            return 1;
+        if ( separator_2 )
+            return -1;
+
+        if ( string_1 == NULL )
+            return -1;
+        if ( string_2 == NULL )
+            return 1;
+
+        cmp_string_1 = g_utf8_collate_key ( string_1, -1 );
+        cmp_string_2 = g_utf8_collate_key ( string_2, -1 );
+        return_value = g_ascii_strcasecmp ( cmp_string_1, cmp_string_2 );
+
+        g_free ( cmp_string_1 );
+        g_free ( cmp_string_2 );
     }
-
-    g_free (string_1);
-    g_free (string_2);
+    g_free ( string_1 );
+    g_free ( string_2 );
 
     return return_value;
 }
@@ -1830,6 +1807,30 @@ static gboolean gtk_combofix_separator_func ( GtkTreeModel *model,
 }
 
 
+void gtk_combofix_dialog ( gchar *text, gchar *hint )
+{
+    GtkWidget *dialog;
+
+    gchar *tmp_str;
+
+    tmp_str = g_strconcat ( g_markup_printf_escaped (
+                        "<span size=\"larger\" weight=\"bold\">%s</span>\n\n", hint ),
+                        text, NULL );
+
+    dialog = gtk_message_dialog_new ( NULL, 
+                        GTK_DIALOG_DESTROY_WITH_PARENT,
+                        GTK_MESSAGE_WARNING, GTK_BUTTONS_CLOSE,
+                        "%s", tmp_str );
+    gtk_label_set_markup ( GTK_LABEL ( GTK_MESSAGE_DIALOG (dialog)->label ), tmp_str );
+
+    g_free ( tmp_str );
+
+    gtk_window_set_modal ( GTK_WINDOW ( dialog ), TRUE );
+    gtk_dialog_run (GTK_DIALOG (dialog));
+    gtk_widget_destroy ( dialog );
+}
+
+
 /* Local Variables: */
 /* c-basic-offset: 4 */
 /* End: */
diff --git a/src/gtk_combofix.h b/src/gtk_combofix.h
index d40ee6d..bdb013b 100644
--- a/src/gtk_combofix.h
+++ b/src/gtk_combofix.h
@@ -33,7 +33,7 @@ extern "C" {
 #endif /* __cplusplus */
 
 
-
+#define GTK_TYPE_COMBOFIX             ( gtk_combofix_get_type ( ) )
 #define GTK_COMBOFIX(obj) GTK_CHECK_CAST(obj, gtk_combofix_get_type(), GtkComboFix )
 #define GTK_COMBOFIX_CLASS(klass) GTK_CHECK_CLASS_CAST( klass, gtk_combofix_get_type(), GtkComboFixClass )
 #define GTK_IS_COMBOFIX(obj) GTK_CHECK_TYPE ( obj, gtk_combofix_get_type() )
@@ -41,6 +41,7 @@ extern "C" {
 
 typedef struct _GtkComboFix GtkComboFix;
 typedef struct _GtkComboFixClass GtkComboFixClass;
+typedef struct _GtkComboFixPrivate GtkComboFixPrivate;
 
 
 /* structure of the ComboFix */
@@ -50,39 +51,8 @@ struct _GtkComboFix
 
     /* entry of the combofix */
     GtkWidget *entry;
-
-    /* TRUE if the entry content must belong to the list  */
-    gboolean force;
-
-    /* 0 to show all the items */
-    gint max_items;
-
-    /* TRUE for case sensitive (in that case, the first entry give the case) */
-    gboolean case_sensitive;
-
-    /* TRUE keep the completion, FALSE take the selection */
-    gboolean enter_function;
-
-    /* TRUE mix the different list, FALSE separate them */
-    gboolean mixed_sort;
-
     /* *** private entries *** */
-
-    /* the tree_store is 5 columns :
-     * COMBOFIX_COL_VISIBLE_STRING (a string) : what we see in the combofix
-     * COMBOFIX_COL_REAL_STRING (a string) : what we set in the entry when selecting something
-     * COMBOFIX_COL_VISIBLE (a boolean) : if that line has to be showed
-     * COMBOFIX_COL_LIST_NUMBER (a int) : the number of the list 1, 2 ou 3 (CREDIT DEBIT SPECIAL
-     * COMBOFIX_COL_SEPARATOR TRUE if this is a separator */
-    GtkTreeStore *store;
-    GtkTreeModel *model_filter;
-    GtkTreeModel *model_sort;
-    GtkWidget *tree_view;
-
-    gint visible_items;
-    GtkWidget *popup;
-    /* automatic sorting */
-    gint auto_sort;
+    GtkComboFixPrivate *GSEAL (priv);
 };
 
 struct _GtkComboFixClass
@@ -91,142 +61,30 @@ struct _GtkComboFixClass
 };
 
 
+/* construction */
 guint gtk_combofix_get_type ( void );
+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
- *
- * \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_complex ( GSList *list );
-
-
-/**
- * set the text in the combofix without showing the popup or
- * doing any check
- *
- * \param combofix
- * \param text
- *
- * \return
- * */
-void gtk_combofix_set_text ( GtkComboFix *combofix,
-			     const gchar *text );
-
-
-/**
- * get the text in the combofix
- *
- * \param combofix
- *
- * \return a const gchar
- * */
+/* text */
 const gchar *gtk_combofix_get_text ( GtkComboFix *combofix );
-
-
-/**
- * set the flag to force/unforce the text in the entry
- * if force is set, the value in the entry must belong to the list
- *
- * \param combofix
- * \param value
- *
- * \return
- * */
-void gtk_combofix_set_force_text ( GtkComboFix *combofix,
-				   gboolean value );
-
-/**
- * set the maximum items viewable in the popup,
- * if there is more items corresponding to the entry than that number,
- * the popup is not showed
- *
- * \param combofix
- * \param max_items
- *
- * \return
- * */
-void gtk_combofix_set_max_items ( GtkComboFix *combofix,
-				  gint max_items );
-
-/**
- * set if the list has to be automatickly sorted or not
- *
- * \param combofix
- * \param auto_sort TRUE for automatic sort
- *
- * \return
- * */
-void gtk_combofix_set_sort ( GtkComboFix *combofix,
-			     gboolean auto_sort );
-
-/**
- * set if the completion is case sensitive or not
- *
- * \param combofix
- * \param case_sensitive TRUE or FALSE
- *
- * \return
- * */
-void gtk_combofix_set_case_sensitive ( GtkComboFix *combofix,
-				       gboolean case_sensitive );
-
-/**
- * set the function of the enter key
- * either take the current selection and set it in the entry (FALSE)
- * either keep the current completion and close the popup (TRUE)
- *
- * \param combofix
- * \param enter_function TRUE or FALSE
- *
- * \return
- * */
-void gtk_combofix_set_enter_function ( GtkComboFix *combofix,
-				       gboolean  enter_function );
-
-/**
- * set for the complex combofix if the different list have to
- * be mixed or separate
- *
- * \param combofix
- * \param mixed_sort TRUE or FALSE
- *
- * \return
- * */
-void gtk_combofix_set_mixed_sort ( GtkComboFix *combofix,
-				   gboolean mixed_sort );
-
-/**
- * show or hide the popup
- *
- * \param combofix
- * \param show TRUE to show the popup
- *
- * \return
- * */
-void gtk_combofix_view_list ( GtkComboFix *combofix,
-			      gboolean show );
-
-
-/**
- * change the list of an existing combofix
- *
- * \param combofix
- * \param list the new list
- *
- * \return TRUE if ok, FALSE if problem
- * */
-gboolean gtk_combofix_set_list ( GtkComboFix *combofix,
-				 GSList *list );
-
+void gtk_combofix_set_text ( GtkComboFix *combofix, const gchar *text );
+void gtk_combofix_set_force_text ( GtkComboFix *combofix, gboolean value );
+void
 gtk_combofix_set_case_sensitive ( GtkComboFix *combofix, gboolean case_sensitive );
+
+/* popup */
+gboolean gtk_combofix_show_popup ( GtkComboFix *combofix );
+gboolean gtk_combofix_hide_popup ( GtkComboFix *combofix );
+
+/* list of items */
+gboolean gtk_combofix_set_list ( GtkComboFix *combofix, GSList *list );
+void gtk_combofix_set_max_items ( GtkComboFix *combofix, gint max_items );
+void gtk_combofix_set_mixed_sort ( GtkComboFix *combofix, gboolean mixed_sort );
+void gtk_combofix_set_sort ( GtkComboFix *combofix, gboolean auto_sort );
+
+/* set callback */
+void gtk_combofix_set_selection_callback ( GtkComboFix *combofix,
+						GCallback func,
+					    gpointer data );
 
 #ifdef __cplusplus
 }
diff --git a/src/import.c b/src/import.c
index ecfdc20..da64908 100644
--- a/src/import.c
+++ b/src/import.c
@@ -3705,7 +3705,7 @@ GtkWidget * gsb_import_associations_gere_tiers ( void )
     gtk_table_attach ( GTK_TABLE ( table ), label, 0, 1, 0, 1,
                         GTK_SHRINK | GTK_FILL, 0, 0, 0 );
 
-    entry = gtk_combofix_new_complex (
+    entry = gtk_combofix_new (
                         gsb_data_payee_get_name_and_report_list());
     gtk_combofix_set_text ( GTK_COMBOFIX (entry), "" );
     gtk_combofix_set_force_text ( GTK_COMBOFIX (entry),FALSE );
@@ -3713,8 +3713,6 @@ GtkWidget * gsb_import_associations_gere_tiers ( void )
                         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 (vbox_main), "payee", entry );
@@ -4094,9 +4092,11 @@ gboolean gsb_import_associations_check_add_button ( GObject * main_widget )
     payee_widget = g_object_get_data ( main_widget, "payee" );
     if ( payee_widget )
     {
-    const gchar * content = gtk_combofix_get_text ( GTK_COMBOFIX ( payee_widget ) );
-    if ( ! content || ! strlen(content) )
-        sensitive = FALSE;
+        const gchar *content;
+
+        content = gtk_combofix_get_text ( GTK_COMBOFIX ( payee_widget ) );
+        if ( !content || ! strlen ( content ) )
+            sensitive = FALSE;
     }
 
     search_string_widget = g_object_get_data ( main_widget, "Search_string" );
diff --git a/src/metatree.c b/src/metatree.c
index da730d7..37fa48d 100644
--- a/src/metatree.c
+++ b/src/metatree.c
@@ -1831,7 +1831,7 @@ gboolean find_destination_blob ( MetatreeInterface * iface, GtkTreeModel * model
     liste_combofix = g_slist_append ( liste_combofix, liste_division_debit );
     liste_combofix = g_slist_append ( liste_combofix, liste_division_credit );
 
-    combofix = gtk_combofix_new_complex (liste_combofix);
+    combofix = gtk_combofix_new ( liste_combofix );
     gtk_combofix_set_force_text ( GTK_COMBOFIX (combofix), TRUE );
     gtk_box_pack_start ( GTK_BOX ( hbox ), combofix, TRUE, TRUE, 0 );
 
diff --git a/src/navigation.c b/src/navigation.c
index e41a24f..d7e9974 100644
--- a/src/navigation.c
+++ b/src/navigation.c
@@ -1164,7 +1164,7 @@ gboolean gsb_gui_navigation_select_line ( GtkTreeSelection *selection,
                         NULL,
                         gtk_notebook_get_current_page ( GTK_NOTEBOOK ( account_page ) ),
                         NULL );
-	    gsb_form_show ( FALSE );
+	    //~ gsb_form_show ( FALSE );
 
 	    buffer_last_account = account_number;
 
diff --git a/src/tiers_onglet.c b/src/tiers_onglet.c
index 5c355d9..daba184 100644
--- a/src/tiers_onglet.c
+++ b/src/tiers_onglet.c
@@ -996,14 +996,12 @@ static GtkWidget *gsb_assistant_payees_page_2 ( GtkWidget *assistant )
 	g_free ( texte );
 	gtk_box_pack_start ( GTK_BOX(paddingbox), label, FALSE, FALSE, 6 );
 
-    entry = gtk_combofix_new_complex ( gsb_data_payee_get_name_and_report_list());
+    entry = gtk_combofix_new ( gsb_data_payee_get_name_and_report_list ( ) );
     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_box_pack_start ( GTK_BOX(paddingbox), entry, FALSE, FALSE, 6 );
     g_object_set_data ( G_OBJECT (assistant), "payee", entry );
     paddingbox = new_paddingbox_with_title ( page, TRUE, _("Enter the new payee"));


hooks/post-receive
-- 
grisbi


More information about the cvs mailing list