[grisbi-cvs] [SCM] grisbi branch, master, updated. upstream_version_0_9_2-13-g4d6245b

Pierre Biava nobody at users.sourceforge.net
Sun Jun 12 18:32:51 CEST 2011


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  4d6245bf8daf7ac781d1cfb481f7ca772aede862 (commit)
       via  ae1c306e8db3a6a716ca54511096246d4bede95e (commit)
       via  f8b57544a0856e0265205241dc0ac8c4117031f4 (commit)
       via  21135716a78093071f4a7e08122e6a3ac7ec3651 (commit)
      from  f18ffbbb12795bd51adfa76fcd06f3897fdc7945 (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 4d6245bf8daf7ac781d1cfb481f7ca772aede862
Author: pbiava <pierre.biava at nerim.net>
Date:   Sun Jun 12 18:23:48 2011 +0200

    Removal of global variables of color and adding the file gsb_color.c and gsb_color.h

commit ae1c306e8db3a6a716ca54511096246d4bede95e
Author: pbiava <pierre.biava at nerim.net>
Date:   Sun Jun 12 18:12:44 2011 +0200

    Standardizing the color lists Grisbi

commit f8b57544a0856e0265205241dc0ac8c4117031f4
Author: pbiava <pierre.biava at nerim.net>
Date:   Sat Jun 11 12:12:34 2011 +0200

    removal of the display of the build date for the stable versions of Grisbi

commit 21135716a78093071f4a7e08122e6a3ac7ec3651
Author: pbiava <pierre.biava at nerim.net>
Date:   Sat Jun 11 12:03:41 2011 +0200

    add gsb_colors files

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

Changes:
diff --git a/src/Makefile.am b/src/Makefile.am
index 25e21c5..7cc4096 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -43,7 +43,7 @@ libgrisbi_la_SOURCES = \
 	file_obfuscate_qif.c	\
 	go-charmap-sel.c	\
 	go-optionmenu.c		\
-    grisbi_osx.c \
+	grisbi_osx.c \
 	gsb_account.c		\
 	gsb_account_property.c	\
 	gsb_archive_config.c	\
@@ -58,6 +58,7 @@ libgrisbi_la_SOURCES = \
 	gsb_automem.c		\
 	gsb_bank.c		\
 	gsb_category.c		\
+	gsb_color.c		\
 	gsb_combo_box.c		\
 	gsb_calendar.c		\
 	gsb_calendar_entry.c	\
@@ -76,7 +77,7 @@ libgrisbi_la_SOURCES = \
 	gsb_data_fyear.c	\
 	gsb_data_import_rule.c	\
 	gsb_data_mix.c		\
-    gsb_data_partial_balance.c   \
+	gsb_data_partial_balance.c   \
 	gsb_data_payee.c	\
 	gsb_data_payment.c		\
 	gsb_data_print_config.c		\
@@ -152,35 +153,35 @@ libgrisbi_la_SOURCES = \
 	utils_operations.c	\
 	utils_str.c		\
 	bet_config.c \
-    bet_data.c \
-    bet_data_finance.c \
-    bet_finance_ui.c \
-    bet_future.c \
-    bet_hist.c \
+	bet_data.c \
+	bet_data_finance.c \
+	bet_finance_ui.c \
+	bet_future.c \
+	bet_hist.c \
 	bet_tab.c	\
 	accueil.h		\
 	affichage.h		\
 	affichage_liste.h	\
-    bet_config.h \
-    bet_data.h \
-    bet_data_finance.h \
-    bet_finance_ui.h \
-    bet_future.h \
-    bet_hist.h \
-    bet_tab.h  \
+	bet_config.h \
+	bet_data.h \
+	bet_data_finance.h \
+	bet_finance_ui.h \
+	bet_future.h \
+	bet_hist.h \
+	bet_tab.h  \
 	categories_onglet.h	\
 	classement_echeances.h	\
-    csv_parse.h             \
+	csv_parse.h             \
 	custom_list.h		\
 	erreur.h		\
-    etats_affiche.h         \
-    etats_csv.h             \
-    etats_html.h            \
-    export.h                \
-    export_csv.h            \
-    go-charmap-sel.h        \
-    go-optionmenu.h         \
-    grisbi_osx.h \
+	etats_affiche.h         \
+	etats_csv.h             \
+	etats_html.h            \
+	export.h                \
+	export_csv.h            \
+	go-charmap-sel.h        \
+	go-optionmenu.h         \
+	grisbi_osx.h \
 	gsb_account.h		\
 	gsb_account_property.h	\
 	gsb_archive_config.h	\
@@ -195,10 +196,11 @@ libgrisbi_la_SOURCES = \
 	gsb_automem.h		\
 	gsb_bank.h		\
 	gsb_category.h		\
+	gsb_color.h		\
 	gsb_combo_box.h		\
 	gsb_calendar.h		\
 	gsb_calendar_entry.h	\
-    gsb_currency.h		\
+	gsb_currency.h		\
 	gsb_currency_config.h	\
 	gsb_currency_link_config.h	\
 	gsb_data_account.h	\
@@ -213,7 +215,7 @@ libgrisbi_la_SOURCES = \
 	gsb_data_fyear.h	\
 	gsb_data_import_rule.h	\
 	gsb_data_mix.h		\
-    gsb_data_partial_balance.h   \
+	gsb_data_partial_balance.h   \
 	gsb_data_payee.h	\
 	gsb_data_payment.h		\
 	gsb_data_print_config.h		\
@@ -241,14 +243,14 @@ libgrisbi_la_SOURCES = \
 	gsb_locale.h	\
 	gsb_payment_method.h	\
 	gsb_payment_method_config.h	\
-    gsb_plugins.h           \
+	gsb_plugins.h           \
 	gsb_real.h		\
 	gsb_reconcile.h		\
 	gsb_reconcile_config.h	\
 	gsb_reconcile_list.h	\
 	gsb_reconcile_sort_config.h	\
 	gsb_report.h		\
-    gsb_status.h            \
+	gsb_status.h            \
 	gsb_select_icon.h 	\
 	gsb_scheduler.h		\
 	gsb_scheduler_list.h	\
@@ -271,11 +273,11 @@ libgrisbi_la_SOURCES = \
 	imputation_budgetaire.h	\
 	include.h		\
 	menu.h			\
-    meta_budgetary.h        \
-    meta_categories.h       \
-    meta_payee.h            \
-    metatree.h              \
-    mouse.h                 \
+	meta_budgetary.h        \
+	meta_categories.h       \
+	meta_payee.h            \
+	metatree.h              \
+	mouse.h                 \
 	navigation.h		\
 	parametres.h		\
 	parse_cmdline.h		\
diff --git a/src/accueil.c b/src/accueil.c
index 7edf2ea..dd60b77 100644
--- a/src/accueil.c
+++ b/src/accueil.c
@@ -33,6 +33,7 @@
 #include "dialog.h"
 #include "fenetre_principale.h"
 #include "gsb_automem.h"
+#include "gsb_color.h"
 #include "gsb_data_account.h"
 #include "gsb_data_currency.h"
 #include "gsb_data_partial_balance.h"
@@ -88,16 +89,6 @@ static void update_soldes_minimaux ( gboolean force );
 /*END_STATIC*/
 
 /*START_EXTERN*/
-extern GdkColor couleur_bleue;
-extern GdkColor couleur_jaune;
-extern GdkColor couleur_nom_compte_normal;
-extern GdkColor couleur_nom_compte_prelight;
-extern GdkColor couleur_solde_alarme_orange_normal;
-extern GdkColor couleur_solde_alarme_orange_prelight;
-extern GdkColor couleur_solde_alarme_rouge_normal;
-extern GdkColor couleur_solde_alarme_rouge_prelight;
-extern GdkColor couleur_solde_alarme_verte_normal;
-extern GdkColor couleur_solde_alarme_verte_prelight;
 extern GtkWidget *form_transaction_part;
 extern gsb_real null_real;
 extern GSList *scheduled_transactions_taken;
@@ -774,8 +765,8 @@ GtkStyle *gsb_main_page_get_default_label_style ( )
 
     /* Initialisation du style « Nom du compte » */
     style_label = gtk_style_copy ( gtk_widget_get_style ( label ) );
-    style_label -> fg[GTK_STATE_NORMAL] = couleur_nom_compte_normal;
-    style_label ->fg[GTK_STATE_PRELIGHT] = couleur_nom_compte_prelight;
+    style_label -> fg[GTK_STATE_NORMAL] = *( gsb_color_get_couleur ( "couleur_nom_compte_normal" ) );
+    style_label ->fg[GTK_STATE_PRELIGHT] = *( gsb_color_get_couleur ( "couleur_nom_compte_prelight" ) );
     gtk_widget_destroy ( label );
 
     return style_label;
@@ -875,21 +866,27 @@ void gsb_main_page_affiche_ligne_du_compte ( GtkWidget *pTable,
     if ( gsb_real_cmp ( gsb_data_account_get_marked_balance (account_number),
                 gsb_data_account_get_mini_balance_wanted (account_number)) != -1)
     {
-        pStyleLabelSoldePointe->fg[GTK_STATE_NORMAL] = couleur_solde_alarme_verte_normal;
-        pStyleLabelSoldePointe->fg[GTK_STATE_PRELIGHT] = couleur_solde_alarme_verte_prelight;
+            pStyleLabelSoldePointe->fg[GTK_STATE_NORMAL] = *( gsb_color_get_couleur (
+                        "couleur_solde_alarme_verte_normal" ) );
+            pStyleLabelSoldePointe->fg[GTK_STATE_PRELIGHT] = *( gsb_color_get_couleur (
+                        "couleur_solde_alarme_verte_prelight" ) );
     }
     else
     {
         if ( gsb_real_cmp ( gsb_data_account_get_marked_balance (account_number),
                 gsb_data_account_get_mini_balance_authorized (account_number)) != -1 )
         {
-        pStyleLabelSoldePointe->fg[GTK_STATE_NORMAL] = couleur_solde_alarme_orange_normal;
-        pStyleLabelSoldePointe->fg[GTK_STATE_PRELIGHT] = couleur_solde_alarme_orange_prelight;
+            pStyleLabelSoldePointe->fg[GTK_STATE_NORMAL] = *( gsb_color_get_couleur (
+                        "couleur_solde_alarme_orange_normal" ) );
+            pStyleLabelSoldePointe->fg[GTK_STATE_PRELIGHT] = *( gsb_color_get_couleur (
+                        "couleur_solde_alarme_orange_prelight" ) );
         }
         else
         {
-        pStyleLabelSoldePointe->fg[GTK_STATE_NORMAL] = couleur_solde_alarme_rouge_normal;
-        pStyleLabelSoldePointe->fg[GTK_STATE_PRELIGHT] = couleur_solde_alarme_rouge_prelight;
+            pStyleLabelSoldePointe->fg[GTK_STATE_NORMAL] = *( gsb_color_get_couleur (
+                        "couleur_solde_alarme_rouge_normal" ) );
+            pStyleLabelSoldePointe->fg[GTK_STATE_PRELIGHT] = *( gsb_color_get_couleur (
+                        "couleur_solde_alarme_rouge_prelight" ) );
         }
     }
     gtk_widget_set_style ( pLabel, pStyleLabelSoldePointe );
@@ -928,21 +925,27 @@ void gsb_main_page_affiche_ligne_du_compte ( GtkWidget *pTable,
     if ( gsb_real_cmp ( gsb_data_account_get_current_balance (account_number),
                 gsb_data_account_get_mini_balance_wanted (account_number)) != -1)
     {
-        pStyleLabelSoldeCourant->fg[GTK_STATE_NORMAL] = couleur_solde_alarme_verte_normal;
-        pStyleLabelSoldeCourant->fg[GTK_STATE_PRELIGHT] = couleur_solde_alarme_verte_prelight;
+        pStyleLabelSoldeCourant->fg[GTK_STATE_NORMAL] = *( gsb_color_get_couleur (
+                        "couleur_solde_alarme_verte_normal" ) );
+        pStyleLabelSoldeCourant->fg[GTK_STATE_PRELIGHT] = *( gsb_color_get_couleur (
+                        "couleur_solde_alarme_verte_prelight" ) );;
     }
     else
     {
         if ( gsb_real_cmp ( gsb_data_account_get_current_balance (account_number),
                 gsb_data_account_get_mini_balance_authorized (account_number)) != -1 )
         {
-        pStyleLabelSoldeCourant->fg[GTK_STATE_NORMAL] = couleur_solde_alarme_orange_normal;
-        pStyleLabelSoldeCourant->fg[GTK_STATE_PRELIGHT] = couleur_solde_alarme_orange_prelight;
+            pStyleLabelSoldeCourant->fg[GTK_STATE_NORMAL] = *( gsb_color_get_couleur (
+                        "couleur_solde_alarme_orange_normal" ) );
+            pStyleLabelSoldeCourant->fg[GTK_STATE_PRELIGHT] = *( gsb_color_get_couleur (
+                        "couleur_solde_alarme_orange_prelight" ) );
         }
         else
         {
-        pStyleLabelSoldeCourant->fg[GTK_STATE_NORMAL] = couleur_solde_alarme_rouge_normal;
-        pStyleLabelSoldeCourant->fg[GTK_STATE_PRELIGHT] = couleur_solde_alarme_rouge_prelight;
+            pStyleLabelSoldeCourant->fg[GTK_STATE_NORMAL] = *( gsb_color_get_couleur (
+                        "couleur_solde_alarme_rouge_normal" ) );
+            pStyleLabelSoldeCourant->fg[GTK_STATE_PRELIGHT] = *( gsb_color_get_couleur (
+                        "couleur_solde_alarme_rouge_prelight" ) );
         }
     }
     gtk_widget_set_style ( pLabel, pStyleLabelSoldeCourant );
@@ -1263,11 +1266,11 @@ void update_liste_echeances_manuelles_accueil ( gboolean force )
 	style_label = gtk_style_copy ( gtk_widget_get_style (label));
 	gtk_widget_destroy (label);
 
-	style_label->fg[GTK_STATE_PRELIGHT] = couleur_jaune;
-	style_label->fg[GTK_STATE_NORMAL] = couleur_bleue;
-	style_label->fg[GTK_STATE_INSENSITIVE] = couleur_bleue;
-	style_label->fg[GTK_STATE_SELECTED] = couleur_bleue;
-	style_label->fg[GTK_STATE_ACTIVE] = couleur_bleue;
+	style_label->fg[GTK_STATE_PRELIGHT] = *( gsb_color_get_couleur ( "couleur_jaune" ) );
+	style_label->fg[GTK_STATE_NORMAL] = *( gsb_color_get_couleur ( "couleur_bleue" ) );
+	style_label->fg[GTK_STATE_INSENSITIVE] = *( gsb_color_get_couleur ( "couleur_bleue" ) );
+	style_label->fg[GTK_STATE_SELECTED] = *( gsb_color_get_couleur ( "couleur_bleue" ) );
+	style_label->fg[GTK_STATE_ACTIVE] = *( gsb_color_get_couleur ( "couleur_bleue" ) );
 
 
 	pointeur_liste = g_slist_sort_with_data ( scheduled_transactions_to_take,
diff --git a/src/affichage.c b/src/affichage.c
index 64d00ab..548635d 100644
--- a/src/affichage.c
+++ b/src/affichage.c
@@ -30,27 +30,28 @@
 
 /*START_INCLUDE*/
 #include "affichage.h"
-#include "utils_file_selection.h"
+#include "accueil.h"
+#include "custom_list.h"
+#include "fenetre_principale.h"
 #include "gsb_automem.h"
+#include "gsb_color.h"
 #include "gsb_data_account.h"
+#include "gsb_dirs.h"
 #include "gsb_file.h"
-#include "navigation.h"
-#include "fenetre_principale.h"
-#include "accueil.h"
 #include "gsb_scheduler_list.h"
 #include "gsb_select_icon.h"
 #include "main.h"
-#include "traitement_variables.h"
-#include "utils_str.h"
-#include "utils.h"
+#include "navigation.h"
 #include "parametres.h"
-#include "transaction_list.h"
-#include "utils_font.h"
 #include "structures.h"
-#include "custom_list.h"
+#include "traitement_variables.h"
+#include "transaction_list.h"
+#include "utils.h"
 #include "utils_buttons.h"
+#include "utils_file_selection.h"
+#include "utils_font.h"
+#include "utils_str.h"
 #include "erreur.h"
-#include "gsb_dirs.h"
 /*END_INCLUDE*/
 
 /*START_STATIC*/
@@ -81,33 +82,9 @@ static void update_fonte_listes ( gchar *fontname,
 /*START_EXTERN*/
 extern gchar *adresse_commune;
 extern gchar *adresse_secondaire;
-extern GdkColor archive_background_color;
-extern GdkColor calendar_entry_color;
-extern GdkColor couleur_bet_division;
-extern GdkColor couleur_bet_future;
-extern GdkColor couleur_bet_solde;
-extern GdkColor couleur_bet_transfert;
-extern GdkColor couleur_fond[2];
-extern GdkColor couleur_grise;
-extern GdkColor couleur_jour;
-extern GdkColor couleur_selection;
-extern GdkColor default_archive_background_color;
-extern GdkColor default_calendar_entry_color;
-extern GdkColor default_couleur_bet_division;
-extern GdkColor default_couleur_bet_future;
-extern GdkColor default_couleur_bet_solde;
-extern GdkColor default_couleur_bet_transfert;
-extern GdkColor default_couleur_fond[2];
-extern GdkColor default_couleur_grise;
-extern GdkColor default_couleur_jour;
-extern GdkColor default_couleur_selection;
-extern GdkColor default_split_background;
-extern GdkColor default_text_color[2];
 extern GtkWidget *fenetre_preferences;
 extern GtkWidget *hbox_title;
 extern GtkWidget *logo_accueil;
-extern GdkColor split_background;
-extern GdkColor text_color[2];
 extern gchar *titre_fichier;
 /*END_EXTERN*/
 
@@ -236,7 +213,7 @@ GtkWidget * onglet_display_fonts ( void )
     hbox = gtk_hbox_new ( FALSE, 10 );
     gtk_box_pack_start ( GTK_BOX ( vbox ), hbox, FALSE, FALSE, 10 );
 
-    color_combobox = preferences_view_create_color_combobox ();
+    color_combobox = gsb_color_create_color_combobox ( );
     gtk_box_pack_start ( GTK_BOX (hbox),
 			 color_combobox,
 			 FALSE, FALSE, 0);
@@ -794,76 +771,6 @@ gboolean preferences_switch_headings_bar ( GtkWidget *toggle_button,
 
 
 /**
- * create a list of customable colors
- *
- * \param
- *
- * \return a GtkComboBox
- * */
-static GtkWidget *preferences_view_create_color_combobox (void)
-{
-    GtkWidget *combobox;
-    GtkListStore *store;
-    gint i;
-    GtkCellRenderer *renderer;
-
-    struct config_color {
-    gchar *name;
-    GdkColor *color;
-    GdkColor *default_color;
-
-    } config_colors[] = {
-    { N_("Transaction list background 1"), &couleur_fond[0], &default_couleur_fond[0]},
-    { N_("Transaction list background 2"), &couleur_fond[1], &default_couleur_fond[1]},
-    { N_("Color for the operation that gives the balance today"), &couleur_jour, &default_couleur_jour},
-    { N_("Color of transaction's text"), &text_color[0], &default_text_color[0]},
-    { N_("Text of unfinished split transaction"), &text_color[1], &default_text_color[1]},
-    { N_("Children of split transaction"), &split_background, &default_split_background},
-    { N_("Selection color"), &couleur_selection, &default_couleur_selection},
-    { N_("Background of non selectable scheduled transactions"), &couleur_grise, &default_couleur_grise},
-    { N_("Archive color"), &archive_background_color, &default_archive_background_color},
-    { N_("Background of invalid date entry"), &calendar_entry_color, &default_calendar_entry_color },
-    { N_("Background of bet division"), &couleur_bet_division, &default_couleur_bet_division },
-    { N_("Background of bet futur"), &couleur_bet_future, &default_couleur_bet_future },
-    { N_("Background of bet solde"), &couleur_bet_solde, &default_couleur_bet_solde },
-    { N_("Background of bet transfer"), &couleur_bet_transfert, &default_couleur_bet_transfert },
-    { NULL, 0, 0},
-    };
-
-    /* the store contains the name of the color we can modify and
-     * a pointer to the corresponding variable */
-    store = gtk_list_store_new ( 3,
-                        G_TYPE_STRING,
-                        G_TYPE_POINTER,
-                        G_TYPE_POINTER );
-    /* fill the store */
-    for ( i = 0 ; config_colors[i].name != NULL ; i++ )
-    {
-    GtkTreeIter iter;
-
-    gtk_list_store_append ( GTK_LIST_STORE (store),
-                        &iter );
-    gtk_list_store_set ( GTK_LIST_STORE (store),
-                        &iter,
-                        0, _(config_colors[i].name),
-                        1, config_colors[i].color,
-                        2, config_colors[i].default_color,
-                        -1);
-    }
-
-    /* create the combobox */
-    combobox = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store));
-
-    renderer = gtk_cell_renderer_text_new ();
-    gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combobox), renderer, TRUE);
-    gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combobox), renderer,
-                        "text", 0,
-                        NULL);
-    return combobox;
-}
-
-
-/**
  * called when the color combobox changed,
  * update the GtkColorButton with the color of the combobox
  *
diff --git a/src/affichage_liste.c b/src/affichage_liste.c
index 8ff2cd8..538f711 100644
--- a/src/affichage_liste.c
+++ b/src/affichage_liste.c
@@ -33,6 +33,7 @@
 #include "custom_list.h"
 #include "fenetre_principale.h"
 #include "gsb_automem.h"
+#include "gsb_color.h"
 #include "gsb_data_account.h"
 #include "gsb_data_form.h"
 #include "gsb_file.h"
@@ -105,8 +106,6 @@ static gint start_drag_row;
 
 
 /*START_EXTERN*/
-extern GdkColor couleur_grise;
-extern GdkColor couleur_selection;
 extern gchar *tips_col_liste_operations[CUSTOM_MODEL_VISIBLE_COLUMNS];
 extern gchar *titres_colonnes_liste_operations[CUSTOM_MODEL_VISIBLE_COLUMNS];
 extern gint transaction_col_width[CUSTOM_MODEL_VISIBLE_COLUMNS];
@@ -1388,14 +1387,14 @@ void gsb_transaction_list_config_button_set_normal_color ( GtkWidget *toggle_but
 {
     if ( normal )
     {
-        gtk_widget_modify_bg ( toggle_button, GTK_STATE_NORMAL, &couleur_grise );
-        gtk_widget_modify_bg ( toggle_button, GTK_STATE_PRELIGHT, &couleur_grise );
+        gtk_widget_modify_bg ( toggle_button, GTK_STATE_NORMAL, gsb_color_get_couleur ( "couleur_grise" ) );
+        gtk_widget_modify_bg ( toggle_button, GTK_STATE_PRELIGHT, gsb_color_get_couleur ( "couleur_grise" ) );
     }
     else
     {
-        gtk_widget_modify_bg ( toggle_button, GTK_STATE_NORMAL, &couleur_selection );
-        gtk_widget_modify_bg ( toggle_button, GTK_STATE_ACTIVE, &couleur_selection );
-        gtk_widget_modify_bg ( toggle_button, GTK_STATE_PRELIGHT, &couleur_selection );
+        gtk_widget_modify_bg ( toggle_button, GTK_STATE_NORMAL, gsb_color_get_couleur ( "couleur_selection" ) );
+        gtk_widget_modify_bg ( toggle_button, GTK_STATE_ACTIVE, gsb_color_get_couleur ( "couleur_selection" ) );
+        gtk_widget_modify_bg ( toggle_button, GTK_STATE_PRELIGHT, gsb_color_get_couleur ( "couleur_selection" ) );
     }
 }
 
diff --git a/src/bet_finance_ui.c b/src/bet_finance_ui.c
index 256e792..e3e8a99 100644
--- a/src/bet_finance_ui.c
+++ b/src/bet_finance_ui.c
@@ -35,6 +35,7 @@
 #include "export_csv.h"
 #include "fenetre_principale.h"
 #include "gsb_automem.h"
+#include "gsb_color.h"
 #include "gsb_combo_box.h"
 #include "gsb_currency.h"
 #include "gsb_data_account.h"
@@ -86,7 +87,6 @@ static void bet_finance_fill_amortization_ligne ( GtkTreeModel *model,
 static void bet_finance_fill_data_ligne ( GtkTreeModel *model,
                         struct_echeance *s_echeance,
                         const gchar *unit );
-static gboolean bet_finance_list_set_background_color ( GtkWidget *tree_view, gint color_column );
 static void bet_finance_spin_button_fees_changed ( GtkSpinButton *spinbutton, GtkWidget *page );
 static void bet_finance_spin_button_taux_changed ( GtkSpinButton *spinbutton, GtkWidget *page );
 static void bet_finance_switch_amortization_initial_date ( GtkWidget *button, GtkWidget *tree_view );
@@ -100,9 +100,6 @@ static void bet_finance_update_simulator_toolbar ( void );
 
 /*START_EXTERN*/
 extern GtkWidget *account_page;
-extern GdkColor calendar_entry_color;
-extern GdkColor couleur_fond[2];
-extern GdkColor couleur_selection;
 /*END_EXTERN*/
 
 /* notebook pour la simulation de crédits */
@@ -772,7 +769,7 @@ void bet_finance_calculer_clicked ( GtkButton *button, GtkWidget *widget )
         }
     }
 
-    bet_finance_list_set_background_color ( tree_view, BET_FINANCE_BACKGROUND_COLOR );
+    utils_set_tree_view_background_color ( tree_view, BET_FINANCE_BACKGROUND_COLOR );
     path = gtk_tree_path_new_first ( );
     gtk_tree_view_scroll_to_cell ( GTK_TREE_VIEW ( tree_view ), path, NULL, TRUE, 0.0, 0.0 );
     gtk_tree_selection_select_path ( gtk_tree_view_get_selection ( GTK_TREE_VIEW ( tree_view ) ), path );
@@ -901,43 +898,6 @@ void bet_finance_fill_data_ligne ( GtkTreeModel *model,
 
 
 /**
- * set the background colors of the list
- *
- * \param tree_view
- *
- * \return FALSE
- * */
-gboolean bet_finance_list_set_background_color ( GtkWidget *tree_view, gint color_column )
-{
-    GtkTreeModel *model;
-    GtkTreeIter iter;
-
-    if ( !tree_view )
-        return FALSE;
-
-    model = gtk_tree_view_get_model ( GTK_TREE_VIEW ( tree_view ));
-
-    if ( gtk_tree_model_get_iter_first ( GTK_TREE_MODEL ( model ), &iter ) )
-    {
-        gint current_color = 0;
-
-        do
-        {
-            gtk_tree_store_set ( GTK_TREE_STORE ( model ),
-                        &iter,
-                        color_column, &couleur_fond[current_color],
-                        -1 );
-
-            current_color = !current_color;
-        }
-        while ( gtk_tree_model_iter_next ( GTK_TREE_MODEL ( model ), &iter ) );
-    }
-
-    return FALSE;
-}
-
-
-/**
  *
  *
  *
@@ -1464,7 +1424,7 @@ void bet_finance_fill_amortization_array ( GtkWidget *menu_item,
         s_amortissement -> capital_du -= s_amortissement -> principal;
     }
 
-    bet_finance_list_set_background_color ( tree_view, BET_AMORTIZATION_BACKGROUND_COLOR );
+    utils_set_tree_view_background_color ( tree_view, BET_AMORTIZATION_BACKGROUND_COLOR );
     path = gtk_tree_path_new_first ( );
     gtk_tree_view_scroll_to_cell ( GTK_TREE_VIEW ( tree_view ), path, NULL, TRUE, 0.0, 0.0 );
     gtk_tree_selection_select_path ( gtk_tree_view_get_selection ( GTK_TREE_VIEW ( tree_view ) ), path );
@@ -1762,7 +1722,7 @@ void bet_finance_ui_update_amortization_tab ( gint account_number )
     g_date_free ( date );
     g_date_free ( last_paid_date );
 
-    bet_finance_list_set_background_color ( tree_view, BET_AMORTIZATION_BACKGROUND_COLOR );
+    utils_set_tree_view_background_color ( tree_view, BET_AMORTIZATION_BACKGROUND_COLOR );
     path = gtk_tree_path_new_first ( );
     gtk_tree_view_scroll_to_cell ( GTK_TREE_VIEW ( tree_view ), path, NULL, TRUE, 0.0, 0.0 );
     gtk_tree_selection_select_path ( gtk_tree_view_get_selection ( GTK_TREE_VIEW ( tree_view ) ), path );
@@ -2099,7 +2059,7 @@ gboolean bet_finance_capital_entry_changed ( GtkWidget *entry, GtkWidget *page
     {
 	    /* the entry is not valid, make it red */
 		gtk_widget_modify_base ( entry, GTK_STATE_NORMAL,
-                        &calendar_entry_color );
+                        gsb_color_get_couleur ( "entry_error_color" ) );
     }
 
     return FALSE;
diff --git a/src/bet_hist.c b/src/bet_hist.c
index 16f067f..d1958d7 100644
--- a/src/bet_hist.c
+++ b/src/bet_hist.c
@@ -34,6 +34,7 @@
 #include "bet_data.h"
 #include "bet_tab.h"
 #include "fenetre_principale.h"
+#include "gsb_color.h"
 #include "gsb_data_account.h"
 #include "gsb_data_currency.h"
 #include "gsb_data_fyear.h"
@@ -104,8 +105,6 @@ static gboolean bet_historical_set_full_sub_div ( GtkTreeModel *model, GtkTreeIt
 
 /*START_EXTERN*/
 extern GtkWidget *account_page;
-extern GdkColor couleur_fond[2];
-extern GdkColor couleur_selection;
 extern gsb_real null_real;
 /*END_EXTERN*/
 
@@ -1651,7 +1650,8 @@ gboolean bet_historical_set_background_color ( GtkWidget *tree_view )
         {
             gtk_tree_store_set ( GTK_TREE_STORE ( model ),
                         &iter,
-                        SPP_HISTORICAL_BACKGROUND_COLOR, &couleur_fond[current_color],
+                        SPP_HISTORICAL_BACKGROUND_COLOR,
+                        gsb_color_get_couleur_with_indice ( "couleur_fond", current_color ),
                         -1 );
             current_color = !current_color;
 
@@ -1664,7 +1664,8 @@ gboolean bet_historical_set_background_color ( GtkWidget *tree_view )
                 {
                     gtk_tree_store_set ( GTK_TREE_STORE ( model ),
                         &fils_iter,
-                        SPP_HISTORICAL_BACKGROUND_COLOR, &couleur_fond[current_color],
+                        SPP_HISTORICAL_BACKGROUND_COLOR,
+                        gsb_color_get_couleur_with_indice ( "couleur_fond", current_color ),
                         -1 );
                     current_color = !current_color;
                 }
diff --git a/src/bet_tab.c b/src/bet_tab.c
index 0f737a5..d66366d 100644
--- a/src/bet_tab.c
+++ b/src/bet_tab.c
@@ -40,6 +40,7 @@
 #include "fenetre_principale.h"
 #include "gsb_automem.h"
 #include "gsb_calendar_entry.h"
+#include "gsb_color.h"
 #include "gsb_data_account.h"
 #include "gsb_data_budget.h"
 #include "gsb_data_category.h"
@@ -149,12 +150,6 @@ static gboolean bet_array_update_average_column ( GtkTreeModel *model,
 
 /*START_EXTERN*/
 extern GtkWidget *account_page;
-extern GdkColor couleur_bet_division;
-extern GdkColor couleur_bet_future;
-extern GdkColor couleur_selection;
-extern GdkColor couleur_bet_solde;
-extern GdkColor couleur_bet_transfert;
-extern GdkColor couleur_fond[2];
 extern gint mise_a_jour_liste_echeances_auto_accueil;
 extern gsb_real null_real;
 extern const gdouble prev_month_max;
@@ -472,7 +467,7 @@ void bet_array_refresh_estimate_tab ( gint account_number )
                         SPP_ESTIMATE_TREE_BALANCE_COLUMN, str_current_balance,
                         SPP_ESTIMATE_TREE_AMOUNT_COLUMN, str_amount,
                         SPP_ESTIMATE_TREE_BALANCE_COLOR, color_str,
-                        SPP_ESTIMATE_TREE_BACKGROUND_COLOR, &couleur_bet_solde,
+                        SPP_ESTIMATE_TREE_BACKGROUND_COLOR, gsb_color_get_couleur ( "couleur_bet_solde" ),
                         -1);
 
     g_value_unset ( &date_value );
@@ -2087,36 +2082,37 @@ gboolean bet_array_list_set_background_color ( GtkWidget *tree_view )
 
                 gtk_tree_store_set ( GTK_TREE_STORE ( model ),
                         &iter,
-                        SPP_ESTIMATE_TREE_BACKGROUND_COLOR, &couleur_fond[current_color],
+                        SPP_ESTIMATE_TREE_BACKGROUND_COLOR,
+                        gsb_color_get_couleur_with_indice ( "couleur_fond", current_color ),
                         -1 );
                 current_color = !current_color;
                 break;
             case SPP_ORIGIN_HISTORICAL:
                 gtk_tree_store_set ( GTK_TREE_STORE ( model ),
                         &iter,
-                        SPP_ESTIMATE_TREE_BACKGROUND_COLOR, &couleur_bet_division,
-                        SPP_ESTIMATE_TREE_COLOR_STRING, gdk_color_to_string ( &couleur_bet_division ),
+                        SPP_ESTIMATE_TREE_BACKGROUND_COLOR, gsb_color_get_couleur ( "couleur_bet_division" ),
+                        SPP_ESTIMATE_TREE_COLOR_STRING, gsb_color_get_couleur_to_string ( "couleur_bet_division" ),
                         -1 );
                 break;
             case SPP_ORIGIN_FUTURE:
                 gtk_tree_store_set ( GTK_TREE_STORE ( model ),
                         &iter,
-                        SPP_ESTIMATE_TREE_BACKGROUND_COLOR, &couleur_bet_future,
-                        SPP_ESTIMATE_TREE_COLOR_STRING, gdk_color_to_string ( &couleur_bet_future ),
+                        SPP_ESTIMATE_TREE_BACKGROUND_COLOR, gsb_color_get_couleur ( "couleur_bet_future" ),
+                        SPP_ESTIMATE_TREE_COLOR_STRING, gsb_color_get_couleur_to_string ( "couleur_bet_future" ),
                         -1 );
                 break;
             case SPP_ORIGIN_ACCOUNT:
                 gtk_tree_store_set ( GTK_TREE_STORE ( model ),
                         &iter,
-                        SPP_ESTIMATE_TREE_BACKGROUND_COLOR, &couleur_bet_transfert,
-                        SPP_ESTIMATE_TREE_COLOR_STRING, gdk_color_to_string ( &couleur_bet_transfert ),
+                        SPP_ESTIMATE_TREE_BACKGROUND_COLOR, gsb_color_get_couleur ( "couleur_bet_transfert" ),
+                        SPP_ESTIMATE_TREE_COLOR_STRING, gsb_color_get_couleur_to_string ( "&couleur_bet_transfert" ),
                         -1 );
                 break;
             case SPP_ORIGIN_SOLDE:
                 gtk_tree_store_set ( GTK_TREE_STORE ( model ),
                         &iter,
-                        SPP_ESTIMATE_TREE_BACKGROUND_COLOR, &couleur_bet_solde,
-                        SPP_ESTIMATE_TREE_COLOR_STRING, gdk_color_to_string ( &couleur_bet_solde ),
+                        SPP_ESTIMATE_TREE_BACKGROUND_COLOR, gsb_color_get_couleur ( "couleur_bet_solde" ),
+                        SPP_ESTIMATE_TREE_COLOR_STRING, gsb_color_get_couleur_to_string ( "couleur_bet_solde" ),
                         -1 );
             }
         }
@@ -2938,7 +2934,7 @@ gboolean bet_array_shows_balance_at_beginning_of_month ( GtkTreeModel *tab_model
                         SPP_ESTIMATE_TREE_DESC_COLUMN, str_description,
                         SPP_ESTIMATE_TREE_AMOUNT_COLUMN, str_amount,
                         SPP_ESTIMATE_TREE_BALANCE_COLOR, NULL,
-                        SPP_ESTIMATE_TREE_BACKGROUND_COLOR, &couleur_bet_solde,
+                        SPP_ESTIMATE_TREE_BACKGROUND_COLOR, gsb_color_get_couleur ( "couleur_bet_solde" ),
                         -1);
 
         g_value_unset ( &date_value );
diff --git a/src/categories_onglet.c b/src/categories_onglet.c
index 92d1be4..3cf826b 100644
--- a/src/categories_onglet.c
+++ b/src/categories_onglet.c
@@ -83,7 +83,6 @@ struct metatree_hold_position *category_hold_position;
 
 
 /*START_EXTERN*/
-extern GdkColor couleur_selection;
 /*END_EXTERN*/
 
 
@@ -112,7 +111,15 @@ GtkWidget *categories_create_list ( void )
     /* set the color of selected row */
     utils_set_tree_view_selection_and_text_color ( arbre_categ );
 
+    /* Create model */
     categ_tree_model = gtk_tree_store_new ( META_TREE_NUM_COLUMNS, META_TREE_COLUMN_TYPES );
+    gtk_tree_sortable_set_sort_column_id ( GTK_TREE_SORTABLE(categ_tree_model),
+					   META_TREE_TEXT_COLUMN, GTK_SORT_ASCENDING );
+    gtk_tree_sortable_set_sort_func ( GTK_TREE_SORTABLE(categ_tree_model),
+				      META_TREE_TEXT_COLUMN, metatree_sort_column,
+				      NULL, NULL );
+    g_object_set_data ( G_OBJECT (categ_tree_model), "metatree-interface",
+			category_interface );
 
     /* We create the main vbox */
     vbox = gtk_vbox_new ( FALSE, 5 );
@@ -124,7 +131,6 @@ GtkWidget *categories_create_list ( void )
     gtk_box_pack_start ( GTK_BOX ( vbox ), category_toolbar, FALSE, FALSE, 0 );
 
     /* création de l'arbre principal */
-
     scroll_window = gtk_scrolled_window_new ( NULL, NULL );
     gtk_scrolled_window_set_policy ( GTK_SCROLLED_WINDOW ( scroll_window ),
 				     GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC );
@@ -133,15 +139,6 @@ GtkWidget *categories_create_list ( void )
     gtk_box_pack_start ( GTK_BOX ( vbox ), scroll_window, TRUE, TRUE, 0 );
     gtk_widget_show ( scroll_window );
 
-    /* Create model */
-    gtk_tree_sortable_set_sort_column_id ( GTK_TREE_SORTABLE(categ_tree_model),
-					   META_TREE_TEXT_COLUMN, GTK_SORT_ASCENDING );
-    gtk_tree_sortable_set_sort_func ( GTK_TREE_SORTABLE(categ_tree_model),
-				      META_TREE_TEXT_COLUMN, metatree_sort_column,
-				      NULL, NULL );
-    g_object_set_data ( G_OBJECT (categ_tree_model), "metatree-interface",
-			category_interface );
-
     /* Create container + TreeView */
     gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (arbre_categ), TRUE);
     gtk_tree_view_enable_model_drag_source(GTK_TREE_VIEW(arbre_categ),
@@ -162,6 +159,7 @@ GtkWidget *categories_create_list ( void )
     column = gtk_tree_view_column_new_with_attributes (_("Category"), cell,
 						       "text", META_TREE_TEXT_COLUMN,
 						       "weight", META_TREE_FONT_COLUMN,
+                               "cell-background-gdk", META_TREE_BACKGROUND_COLOR,
 						       NULL);
     gtk_tree_view_append_column ( GTK_TREE_VIEW ( arbre_categ ),
 				  GTK_TREE_VIEW_COLUMN ( column ) );
@@ -171,6 +169,7 @@ GtkWidget *categories_create_list ( void )
     column = gtk_tree_view_column_new_with_attributes (_("Account"), cell,
 						       "text", META_TREE_ACCOUNT_COLUMN,
 						       "weight", META_TREE_FONT_COLUMN,
+                               "cell-background-gdk", META_TREE_BACKGROUND_COLOR,
 						       NULL);
     gtk_tree_view_append_column ( GTK_TREE_VIEW ( arbre_categ ),
 				  GTK_TREE_VIEW_COLUMN ( column ) );
@@ -181,6 +180,7 @@ GtkWidget *categories_create_list ( void )
 						       "text", META_TREE_BALANCE_COLUMN,
 						       "weight", META_TREE_FONT_COLUMN,
 						       "xalign", META_TREE_XALIGN_COLUMN,
+                               "cell-background-gdk", META_TREE_BACKGROUND_COLOR,
 						       NULL);
     gtk_tree_view_column_set_alignment ( column, 1.0 );
     gtk_tree_view_append_column ( GTK_TREE_VIEW ( arbre_categ ),
@@ -191,6 +191,11 @@ GtkWidget *categories_create_list ( void )
 
     /* Connect to signals */
     g_signal_connect ( G_OBJECT ( arbre_categ ),
+                        "row-collapsed",
+                        G_CALLBACK ( division_column_collapsed ),
+                        NULL );
+
+    g_signal_connect ( G_OBJECT ( arbre_categ ),
                         "row-expanded",
                         G_CALLBACK ( division_column_expanded ),
                         NULL );
@@ -324,12 +329,17 @@ void categories_fill_list ( void )
             gtk_tree_view_expand_to_path ( GTK_TREE_VIEW ( arbre_categ ), ancestor );
             gtk_tree_path_free (ancestor );
         }
+        /* on colorise les lignes du tree_view */
+        utils_set_tree_view_background_color ( arbre_categ, META_TREE_BACKGROUND_COLOR );
         selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW ( arbre_categ ) );
         gtk_tree_selection_select_path ( selection, category_hold_position -> path );
         gtk_tree_view_scroll_to_cell ( GTK_TREE_VIEW ( arbre_categ ),
                         category_hold_position -> path,
                         NULL, TRUE, 0.5, 0.5 );
     }
+    else
+        /* on colorise les lignes du tree_view */
+        utils_set_tree_view_background_color ( arbre_categ, META_TREE_BACKGROUND_COLOR );
 }
 
 
diff --git a/src/gsb_calendar_entry.c b/src/gsb_calendar_entry.c
index 048d34b..215e686 100644
--- a/src/gsb_calendar_entry.c
+++ b/src/gsb_calendar_entry.c
@@ -38,6 +38,7 @@
 
 /*START_INCLUDE*/
 #include "gsb_calendar_entry.h"
+#include "gsb_color.h"
 #include "gsb_form_widget.h"
 #include "structures.h"
 #include "utils_dates.h"
@@ -68,7 +69,6 @@ static void gsb_calendar_entry_step_date ( GtkWidget *entry,
 
 
 /*START_EXTERN*/
-extern GdkColor calendar_entry_color;
 /*END_EXTERN*/
 
 #define ENTRY_NORMAL 0
@@ -185,15 +185,15 @@ gboolean gsb_calendar_entry_set_color ( GtkWidget *entry,
 
     if (normal_color)
     {
-	gtk_widget_modify_base ( entry, 
+	gtk_widget_modify_base ( entry,
 				 GTK_STATE_NORMAL,
 				 NULL );
     }
     else
     {
-	gtk_widget_modify_base ( entry, 
+	gtk_widget_modify_base ( entry,
 				 GTK_STATE_NORMAL,
-				 &calendar_entry_color );
+				 gsb_color_get_couleur ( "entry_error_color" ) );
     }
 
     return FALSE;
diff --git a/src/gsb_color.c b/src/gsb_color.c
new file mode 100644
index 0000000..a054a69
--- /dev/null
+++ b/src/gsb_color.c
@@ -0,0 +1,582 @@
+/* ************************************************************************** */
+/*                                                                            */
+/*     Copyright (C)    2000-2008 Cédric Auger (cedric at grisbi.org)            */
+/*          2003-2009 Benjamin Drieu (bdrieu at april.org)                       */
+/*          2008-2011 Pierre Biava (grisbi at pierre.biava.name)                 */
+/*          http://www.grisbi.org                                             */
+/*                                                                            */
+/*  This program is free software; you can redistribute it and/or modify      */
+/*  it under the terms of the GNU General Public License as published by      */
+/*  the Free Software Foundation; either version 2 of the License, or         */
+/*  (at your option) any later version.                                       */
+/*                                                                            */
+/*  This program is distributed in the hope that it will be useful,           */
+/*  but WITHOUT ANY WARRANTY; without even the implied warranty of            */
+/*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             */
+/*  GNU General Public License for more details.                              */
+/*                                                                            */
+/*  You should have received a copy of the GNU General Public License         */
+/*  along with this program; if not, write to the Free Software               */
+/*  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
+/*                                                                            */
+/* ************************************************************************** */
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <glib/gi18n.h>
+
+ /*START_INCLUDE*/
+#include "gsb_color.h"
+#include "erreur.h"
+/*END_INCLUDE*/
+
+/*START_STATIC*/
+/*END_STATIC*/
+
+/*START_EXTERN*/
+/*END_EXTERN*/
+
+
+/* Couleurs de base */
+static GdkColor couleur_bleue;
+
+static GdkColor couleur_grise;
+static GdkColor default_couleur_grise;
+
+static GdkColor couleur_jaune;
+
+/* Couleurs des tree_view */
+static GdkColor archive_background_color;
+static GdkColor default_archive_background_color;
+
+static GdkColor couleur_fond[2];
+static GdkColor default_couleur_fond[2];
+
+static GdkColor couleur_jour;
+static GdkColor default_couleur_jour;
+
+static GdkColor couleur_selection;
+static GdkColor default_couleur_selection;
+
+static GdkColor split_background;
+static GdkColor default_split_background;
+
+static GdkColor text_color[2];
+static GdkColor default_text_color[2];
+
+/* Couleur des entry en erreur */
+static GdkColor entry_error_color;
+static GdkColor default_entry_error_color;
+
+/* colors of the amounts in the first page */
+GdkColor couleur_nom_compte_normal;
+GdkColor couleur_nom_compte_prelight;
+
+GdkColor couleur_solde_alarme_orange_normal;
+GdkColor couleur_solde_alarme_orange_prelight;
+
+GdkColor couleur_solde_alarme_rouge_normal;
+GdkColor couleur_solde_alarme_rouge_prelight;
+
+GdkColor couleur_solde_alarme_verte_normal;
+GdkColor couleur_solde_alarme_verte_prelight;
+
+/* colors for the balance estimate module */
+GdkColor couleur_bet_division;
+GdkColor default_couleur_bet_division;
+
+GdkColor couleur_bet_future;
+GdkColor default_couleur_bet_future;
+
+GdkColor couleur_bet_solde;
+GdkColor default_couleur_bet_solde;
+
+GdkColor couleur_bet_transfert;
+GdkColor default_couleur_bet_transfert;
+
+
+/**
+ * initialize the default colors for grisbi
+ *
+ * \param
+ *
+ * \return
+ * */
+void gsb_color_initialise_couleurs_par_defaut ( void )
+{
+    devel_debug (NULL);
+
+    /* définition des couleurs paramétrables */
+
+    /* colors of the background */
+    if ( !gdk_color_parse ( "#D6D8D6D8FFFF", &default_couleur_fond[0] ) )
+        notice_debug ("default_couleur_fond[0] en erreur");
+
+    if ( !gdk_color_parse ( "#FFFFFFFFFFFF", &default_couleur_fond[1] ) )
+        notice_debug ("default_couleur_fond[1] en erreur");
+
+    /* colors of the text */
+    if ( !gdk_color_parse ( "#000", &default_text_color[0] ) )
+        notice_debug ("default_default_text_color[0] en erreur");
+
+    if ( !gdk_color_parse ( "#FFFF00000000", &default_text_color[1] ) )
+        notice_debug ("default_text_color[1] en erreur");
+
+    /* color of today */
+    if ( !gdk_color_parse ( "#D8D8D8D8D8D8", &default_couleur_jour ) )
+        notice_debug ("default_couleur_jour en erreur");
+
+    /* selection color */
+    if ( !gdk_color_parse ( "#F6189C409C40", &default_couleur_selection ) )
+        notice_debug ("default_couleur_selection en erreur");
+
+    /* color of the non selectable transactions on scheduler */
+    if ( !gdk_color_parse ( "#C350C350C350", &default_couleur_grise ) )
+        notice_debug ("default_couleur_grise en erreur");
+
+    /* set the archive background color */
+    if ( !gdk_color_parse ( "#3A9875302710", &default_archive_background_color ) )
+        notice_debug ("default_archive_background_color en erreur");
+
+    /* color for split children */
+    if ( !gdk_color_parse ( "#EFEFC5C5C5C5", &default_split_background ) )
+        notice_debug ("default_split_background en erreur");
+
+    /* color for wrong entry */
+    if ( !gdk_color_parse ( "#FFFF00000000", &default_entry_error_color ) )
+        notice_debug ("default_entry_error_color en erreur");
+
+    /* colors of the background bet divisions */
+    if ( !gdk_color_parse ( "#FC26FFFF82BA", &default_couleur_bet_division ) )
+        notice_debug ("default_couleur_bet_division en erreur");
+
+    /* colors of the background bet future data */
+    if ( !gdk_color_parse ( "#7C55C7478C44", &default_couleur_bet_future ) )
+        notice_debug ("default_couleur_bet_future en erreur");
+
+    /* colors of the background bet solde data */
+    if ( !gdk_color_parse ( "#090EFFFFEBAB", &default_couleur_bet_solde ) )
+        notice_debug ("default_couleur_bet_solde en erreur");
+
+    /* colors of the background bet transfert data */
+    if ( !gdk_color_parse ( "#EA8392F6EA34", &default_couleur_bet_transfert ) )
+        notice_debug ("default_couleur_bet_transfert en erreur");
+
+    /* Initialisation des couleurs non paramétrables */
+
+    /* Initialisation des couleurs des différents labels */
+    if ( !gdk_color_parse ( "#00007FFF0000", &couleur_solde_alarme_verte_normal ) )
+        notice_debug ("couleur_solde_alarme_verte_normal en erreur");
+
+    if ( !gdk_color_parse ( "#0000E6650000", &couleur_solde_alarme_verte_prelight ) )
+        notice_debug ("couleur_solde_alarme_verte_prelight en erreur");
+
+    if ( !gdk_color_parse ( "#E66599990000", &couleur_solde_alarme_orange_normal ) )
+        notice_debug ("couleur_solde_alarme_orange_normal en erreur");
+
+    if ( !gdk_color_parse ( "#FFFFCCCC0000", &couleur_solde_alarme_orange_prelight ) )
+        notice_debug ("couleur_solde_alarme_orange_prelight en erreur");
+
+    if ( !gdk_color_parse ( "#999900000000", &couleur_solde_alarme_rouge_normal ) )
+        notice_debug ("couleur_solde_alarme_rouge_normal en erreur");
+
+    if ( !gdk_color_parse ( "#FFFF00000000", &couleur_solde_alarme_rouge_prelight ) )
+        notice_debug ("couleur_solde_alarme_rouge_prelight en erreur");
+
+    if ( !gdk_color_parse ( "#000", &couleur_nom_compte_normal ) )
+        notice_debug ("couleur_nom_compte_normal en erreur");
+
+    if ( !gdk_color_parse ( "#9C289C289C28", &couleur_nom_compte_prelight ) )
+        notice_debug ("couleur_nom_compte_prelight en erreur");
+
+    /* blue color */
+    if ( !gdk_color_parse ( "#1F41F4FFF", &couleur_bleue ) )
+        notice_debug ("couleur_bleue en erreur");
+
+    /* yellow color */
+    if ( !gdk_color_parse ( "#C567FFFF0000", &couleur_jaune ) )
+        notice_debug ("couleur_jaune en erreur");
+}
+
+
+/**
+ * retourne la couleur demandée.
+ *
+ * \param gchar couleur
+ *
+ * \return a GdkColor
+ * */
+GdkColor *gsb_color_get_couleur ( gchar *couleur )
+{
+    if ( strcmp ( couleur, "couleur_bleue" ) == 0 )
+        return &couleur_bleue;
+    else if ( strcmp ( couleur, "couleur_grise" ) == 0 )
+        return &couleur_grise;
+    else if ( strcmp ( couleur, "couleur_jaune" ) == 0 )
+        return &couleur_jaune;
+    else if ( strcmp ( couleur, "archive_background_color" ) == 0 )
+        return &archive_background_color;
+    else if ( strcmp ( couleur, "couleur_jour" ) == 0 )
+        return &couleur_jour;
+    else if ( strcmp ( couleur, "couleur_selection" ) == 0 )
+        return &couleur_selection;
+    else if ( strcmp ( couleur, "split_background" ) == 0 )
+        return &split_background;
+    else if ( strcmp ( couleur, "entry_error_color" ) == 0 )
+        return &entry_error_color;
+    else if ( strcmp ( couleur, "couleur_nom_compte_normal" ) == 0 )
+        return &couleur_nom_compte_normal;
+    else if ( strcmp ( couleur, "couleur_nom_compte_prelight" ) == 0 )
+        return &couleur_nom_compte_prelight;
+    else if ( strcmp ( couleur, "couleur_solde_alarme_orange_normal" ) == 0 )
+        return &couleur_solde_alarme_orange_normal;
+    else if ( strcmp ( couleur, "couleur_solde_alarme_orange_prelight" ) == 0 )
+        return &couleur_solde_alarme_orange_prelight;
+    else if ( strcmp ( couleur, "couleur_solde_alarme_rouge_normal" ) == 0 )
+        return &couleur_solde_alarme_rouge_normal;
+    else if ( strcmp ( couleur, "couleur_solde_alarme_rouge_prelight" ) == 0 )
+        return &couleur_solde_alarme_rouge_prelight;
+    else if ( strcmp ( couleur, "couleur_solde_alarme_verte_normal" ) == 0 )
+        return &couleur_solde_alarme_verte_normal;
+    else if ( strcmp ( couleur, "couleur_solde_alarme_verte_prelight" ) == 0 )
+        return &couleur_solde_alarme_verte_prelight;
+    else if ( strcmp ( couleur, "couleur_bet_division" ) == 0 )
+        return &couleur_bet_division;
+    else if ( strcmp ( couleur, "couleur_bet_future" ) == 0 )
+        return &couleur_bet_future;
+    else if ( strcmp ( couleur, "couleur_bet_solde" ) == 0 )
+        return &couleur_bet_solde;
+    else if ( strcmp ( couleur, "couleur_bet_transfert" ) == 0 )
+        return &couleur_bet_transfert;
+
+    return NULL;
+}
+
+
+/**
+ * set the colors
+ *
+ * \param gchar couleur
+ * \param gchar composante de la couleur (ref, green, blue)
+ *
+ * \return TRUE
+ * */
+gboolean gsb_color_set_couleur ( gchar *couleur,
+                        gchar *component,
+                        gint value )
+{
+    GdkColor *color;
+
+    color = gsb_color_get_couleur ( couleur );
+
+    if ( color == NULL )
+        return FALSE;
+
+    if ( strcmp ( component, "red" ) == 0 )
+        color -> red = value;
+    else if ( strcmp ( component, "green" ) == 0 )
+        color -> green = value;
+    else if ( strcmp ( component, "blue" ) == 0 )
+        color -> blue = value;
+
+    return TRUE;
+}
+
+
+/**
+ * retourne la couleur demandée.
+ *
+ * \param gchar couleur
+ *
+ * \return textual specification of color in the hexadecimal form #rrrrggggbbbb
+ * */
+gchar *gsb_color_get_couleur_to_string ( gchar *couleur )
+{
+    GdkColor *color;
+    gchar *string;
+
+    color = gsb_color_get_couleur ( couleur );
+    string = gdk_color_to_string ( color );
+
+    return string;
+}
+
+
+/**
+ * retourne la couleur demandée.
+ *
+ *\param gchar couleur
+ *\param gint indice du tableau
+ *
+ * */
+GdkColor *gsb_color_get_couleur_with_indice ( gchar *couleur,
+                        gint indice )
+{
+
+    if ( strcmp ( couleur, "couleur_fond" ) == 0 )
+        return &couleur_fond[indice];
+    else if ( strcmp ( couleur, "text_color" ) == 0 )
+        return &text_color[indice];
+
+    return &couleur_fond[0];
+}
+
+
+/**
+ * set the colors
+ *
+ * \param gchar couleur
+ * \param gint indice du tableau
+ * \param gchar composante de la couleur (ref, green, blue)
+ *
+ * \return TRUE
+ * */
+gboolean gsb_color_set_couleur_with_indice ( gchar *couleur,
+                        gint indice,
+                        gchar *component,
+                        gint value )
+{
+    GdkColor *color;
+
+    color = gsb_color_get_couleur_with_indice ( couleur, indice );
+
+    if ( color == NULL )
+        return FALSE;
+
+    if ( strcmp ( component, "red" ) == 0 )
+        color -> red = value;
+    else if ( strcmp ( component, "green" ) == 0 )
+        color -> green = value;
+    else if ( strcmp ( component, "blue" ) == 0 )
+        color -> blue = value;
+
+    return TRUE;
+}
+
+
+/**
+ * initialize the colors used in grisbi
+ *
+ * \param
+ *
+ * \return
+ * */
+void gsb_color_set_colors_to_default ( void )
+{
+    /* colors of the background */
+    couleur_fond[0] = default_couleur_fond[0];
+    couleur_fond[1] = default_couleur_fond[1];
+
+    /* colors of the text */
+    text_color[0] = default_text_color[0];
+    text_color[1] = default_text_color[1];
+
+    /* color of today */
+    couleur_jour = default_couleur_jour;
+
+    /* selection color */
+    couleur_selection = default_couleur_selection;
+
+    /* color of the non selectable transactions on scheduler */
+    couleur_grise = default_couleur_grise;
+
+    /* set the archive background color */
+    archive_background_color = default_archive_background_color;
+
+    /* color for split children */
+    split_background = default_split_background;
+
+    /* color for wrong entry */
+    entry_error_color = default_entry_error_color;
+
+    /* colors of the background bet divisions */
+    couleur_bet_division = default_couleur_bet_division;
+
+    /* colors of the background bet future data */
+    couleur_bet_future = default_couleur_bet_future;
+
+    /* colors of the background bet solde data */
+    couleur_bet_solde = default_couleur_bet_solde;
+
+    /* colors of the background bet transfert data */
+    couleur_bet_transfert = default_couleur_bet_transfert;
+}
+
+/**
+ * create a list of customable colors
+ *
+ * \param
+ *
+ * \return a GtkComboBox
+ * */
+GtkWidget *gsb_color_create_color_combobox ( void )
+{
+    GtkWidget *combobox;
+    GtkListStore *store;
+    gint i;
+    GtkCellRenderer *renderer;
+
+    struct config_color {
+    gchar *name;
+    GdkColor *color;
+    GdkColor *default_color;
+
+    } config_colors[] = {
+    { N_("Transaction list background 1"), &couleur_fond[0], &default_couleur_fond[0]},
+    { N_("Transaction list background 2"), &couleur_fond[1], &default_couleur_fond[1]},
+    { N_("Color for the operation that gives the balance today"), &couleur_jour, &default_couleur_jour},
+    { N_("Color of transaction's text"), &text_color[0], &default_text_color[0]},
+    { N_("Text of unfinished split transaction"), &text_color[1], &default_text_color[1]},
+    { N_("Children of split transaction"), &split_background, &default_split_background},
+    { N_("Selection color"), &couleur_selection, &default_couleur_selection},
+    { N_("Background of non selectable scheduled transactions"), &couleur_grise, &default_couleur_grise},
+    { N_("Archive color"), &archive_background_color, &default_archive_background_color},
+    { N_("Background of invalid date entry"), &entry_error_color, &default_entry_error_color },
+    { N_("Background of bet division"), &couleur_bet_division, &default_couleur_bet_division },
+    { N_("Background of bet futur"), &couleur_bet_future, &default_couleur_bet_future },
+    { N_("Background of bet solde"), &couleur_bet_solde, &default_couleur_bet_solde },
+    { N_("Background of bet transfer"), &couleur_bet_transfert, &default_couleur_bet_transfert },
+    { NULL, 0, 0},
+    };
+
+    /* the store contains the name of the color we can modify and
+     * a pointer to the corresponding variable */
+    store = gtk_list_store_new ( 3,
+                        G_TYPE_STRING,
+                        G_TYPE_POINTER,
+                        G_TYPE_POINTER );
+    /* fill the store */
+    for ( i = 0 ; config_colors[i].name != NULL ; i++ )
+    {
+    GtkTreeIter iter;
+
+    gtk_list_store_append ( GTK_LIST_STORE (store),
+                        &iter );
+    gtk_list_store_set ( GTK_LIST_STORE (store),
+                        &iter,
+                        0, _(config_colors[i].name),
+                        1, config_colors[i].color,
+                        2, config_colors[i].default_color,
+                        -1);
+    }
+
+    /* create the combobox */
+    combobox = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store));
+
+    renderer = gtk_cell_renderer_text_new ();
+    gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combobox), renderer, TRUE);
+    gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combobox), renderer,
+                        "text", 0,
+                        NULL);
+    return combobox;
+}
+
+
+/**
+ * construit la chaine de sauvegarde des couleurs de Grisbi
+ *
+ *
+ * \return new_string;
+ * */
+gchar *gsb_color_get_strings_to_save ( void )
+{
+    gchar *new_string = NULL;
+
+    /* save the general informations */
+    new_string = g_markup_printf_escaped ( "\t<Color\n"
+                        "\t\tBackground_color_0_red=\"%d\"\n"
+                        "\t\tBackground_color_0_green=\"%d\"\n"
+                        "\t\tBackground_color_0_blue=\"%d\"\n"
+                        "\t\tBackground_color_1_red=\"%d\"\n"
+                        "\t\tBackground_color_1_green=\"%d\"\n"
+                        "\t\tBackground_color_1_blue=\"%d\"\n"
+                        "\t\tCouleur_jour_red=\"%d\"\n"
+                        "\t\tCouleur_jour_green=\"%d\"\n"
+                        "\t\tCouleur_jour_blue=\"%d\"\n"
+                        "\t\tBackground_scheduled_red=\"%d\"\n"
+                        "\t\tBackground_scheduled_green=\"%d\"\n"
+                        "\t\tBackground_scheduled_blue=\"%d\"\n"
+                        "\t\tBackground_archive_red=\"%d\"\n"
+                        "\t\tBackground_archive_green=\"%d\"\n"
+                        "\t\tBackground_archive_blue=\"%d\"\n"
+                        "\t\tSelection_red=\"%d\"\n"
+                        "\t\tSelection_green=\"%d\"\n"
+                        "\t\tSelection_blue=\"%d\"\n"
+                        "\t\tBackground_split_red=\"%d\"\n"
+                        "\t\tBackground_split_green=\"%d\"\n"
+                        "\t\tBackground_split_blue=\"%d\"\n"
+                        "\t\tText_color_0_red=\"%d\"\n"
+                        "\t\tText_color_0_green=\"%d\"\n"
+                        "\t\tText_color_0_blue=\"%d\"\n"
+                        "\t\tText_color_1_red=\"%d\"\n"
+                        "\t\tText_color_1_green=\"%d\"\n"
+                        "\t\tText_color_1_blue=\"%d\"\n"
+                        "\t\tEntry_error_color_red=\"%d\"\n"
+                        "\t\tEntry_error_color_green=\"%d\"\n"
+                        "\t\tEntry_error_color_blue=\"%d\"\n"
+                        "\t\tCouleur_bet_division_red=\"%d\"\n"
+                        "\t\tCouleur_bet_division_green=\"%d\"\n"
+                        "\t\tCouleur_bet_division_blue=\"%d\"\n"
+                        "\t\tCouleur_bet_future_red=\"%d\"\n"
+                        "\t\tCouleur_bet_future_green=\"%d\"\n"
+                        "\t\tCouleur_bet_future_blue=\"%d\"\n"
+                        "\t\tCouleur_bet_solde_red=\"%d\"\n"
+                        "\t\tCouleur_bet_solde_green=\"%d\"\n"
+                        "\t\tCouleur_bet_solde_blue=\"%d\"\n"
+                        "\t\tCouleur_bet_transfert_red=\"%d\"\n"
+                        "\t\tCouleur_bet_transfert_green=\"%d\"\n"
+                        "\t\tCouleur_bet_transfert_blue=\"%d\" />\n",
+
+    couleur_fond[0].red,
+    couleur_fond[0].green,
+    couleur_fond[0].blue,
+    couleur_fond[1].red,
+    couleur_fond[1].green,
+    couleur_fond[1].blue,
+    couleur_jour.red,
+    couleur_jour.green,
+    couleur_jour.blue,
+    couleur_grise.red,
+    couleur_grise.green,
+    couleur_grise.blue,
+    archive_background_color.red,
+    archive_background_color.green,
+    archive_background_color.blue,
+    couleur_selection.red,
+    couleur_selection.green,
+    couleur_selection.blue,
+    split_background.red,
+    split_background.green,
+    split_background.blue,
+    text_color[0].red,
+    text_color[0].green,
+    text_color[0].blue,
+    text_color[1].red,
+    text_color[1].green,
+    text_color[1].blue,
+    entry_error_color.red,
+    entry_error_color.green,
+    entry_error_color.blue,
+    couleur_bet_division.red,
+    couleur_bet_division.green,
+    couleur_bet_division.blue,
+    couleur_bet_future.red,
+    couleur_bet_future.green,
+    couleur_bet_future.blue,
+    couleur_bet_solde.red,
+    couleur_bet_solde.green,
+    couleur_bet_solde.blue,
+    couleur_bet_transfert.red,
+    couleur_bet_transfert.green,
+    couleur_bet_transfert.blue );
+
+    return new_string;
+}
+
+
+/* Local Variables: */
+/* c-basic-offset: 4 */
+/* End: */
diff --git a/src/gsb_color.h b/src/gsb_color.h
new file mode 100644
index 0000000..e27ea70
--- /dev/null
+++ b/src/gsb_color.h
@@ -0,0 +1,28 @@
+#ifndef _GSB_COLOR_H
+#define _GSB_COLOR_H (1)
+
+#include <glib.h>
+#include <gtk/gtk.h>
+
+/* START_INCLUDE_H */
+/* END_INCLUDE_H */
+
+
+/* START_DECLARATION */
+GtkWidget *gsb_color_create_color_combobox ( void );
+void gsb_color_initialise_couleurs_par_defaut ( void );
+GdkColor *gsb_color_get_couleur ( gchar *couleur );
+gchar *gsb_color_get_couleur_to_string ( gchar *couleur );
+GdkColor *gsb_color_get_couleur_with_indice ( gchar *couleur,
+                        gint indice );
+gchar *gsb_color_get_strings_to_save ( void );
+gboolean gsb_color_set_couleur ( gchar *couleur,
+                        gchar *component,
+                        gint value );
+gboolean gsb_color_set_couleur_with_indice ( gchar *couleur,
+                        gint indice,
+                        gchar *component,
+                        gint value );
+void gsb_color_set_colors_to_default ( void );
+/* END_DECLARATION */
+#endif
diff --git a/src/gsb_currency.c b/src/gsb_currency.c
index 0ce4e83..de26730 100644
--- a/src/gsb_currency.c
+++ b/src/gsb_currency.c
@@ -38,19 +38,20 @@
 #include "gsb_currency.h"
 #include "dialog.h"
 #include "gsb_autofunc.h"
+#include "gsb_color.h"
+#include "gsb_currency_config.h"
 #include "gsb_data_account.h"
 #include "gsb_data_currency.h"
 #include "gsb_data_currency_link.h"
+#include "gsb_data_form.h"
 #include "gsb_data_transaction.h"
+#include "gsb_dirs.h"
 #include "gsb_form_widget.h"
 #include "gsb_real.h"
-#include "utils.h"
 #include "structures.h"
+#include "utils.h"
 #include "utils_files.h"
-#include "gsb_data_form.h"
-#include "gsb_currency_config.h"
 #include "erreur.h"
-#include "gsb_dirs.h"
 /*END_INCLUDE*/
 
 /*START_STATIC*/
@@ -105,7 +106,6 @@ static gsb_real current_exchange_fees;
 
 
 /*START_EXTERN*/
-extern GdkColor calendar_entry_color;
 extern GtkWidget *combo_devise_totaux_categ;
 extern GtkWidget *combo_devise_totaux_ib;
 extern GtkWidget *combo_devise_totaux_tiers;
@@ -998,7 +998,7 @@ gboolean gsb_currency_select_double_amount ( GtkWidget *entry_1,
     {
         /* the entry is not valid, make it red */
         gtk_widget_modify_base ( entry_1, GTK_STATE_NORMAL,
-                        &calendar_entry_color );
+                        gsb_color_get_couleur ( "entry_error_color" ) );
         return FALSE;
     }
     valide = gsb_form_widget_get_valide_amout_entry (
@@ -1012,7 +1012,7 @@ gboolean gsb_currency_select_double_amount ( GtkWidget *entry_1,
     {
         /* the entry is not valid, make it red */
         gtk_widget_modify_base ( entry_2, GTK_STATE_NORMAL,
-                        &calendar_entry_color );
+                        gsb_color_get_couleur ( "entry_error_color" ) );
         return FALSE;
     }
 
diff --git a/src/gsb_file_load.c b/src/gsb_file_load.c
index 35db44e..ff93058 100644
--- a/src/gsb_file_load.c
+++ b/src/gsb_file_load.c
@@ -42,6 +42,7 @@
 #include "gsb_assistant_archive.h"
 #include "gsb_assistant_first.h"
 #include "gsb_calendar.h"
+#include "gsb_color.h"
 #include "gsb_currency_config.h"
 #include "gsb_data_account.h"
 #include "gsb_data_archive.h"
@@ -169,17 +170,7 @@ extern gchar *adresse_commune;
 extern gchar *adresse_secondaire;
 extern gint affichage_echeances;
 extern gint affichage_echeances_perso_nb_libre;
-extern GdkColor archive_background_color;
 extern gint bet_array_col_width[BET_ARRAY_COLUMNS];
-extern GdkColor calendar_entry_color;
-extern GdkColor couleur_bet_division;
-extern GdkColor couleur_bet_future;
-extern GdkColor couleur_bet_solde;
-extern GdkColor couleur_bet_transfert;
-extern GdkColor couleur_fond[2];
-extern GdkColor couleur_grise;
-extern GdkColor couleur_jour;
-extern GdkColor couleur_selection;
 extern gint display_one_line;
 extern gint display_three_lines;
 extern gint display_two_lines;
@@ -190,9 +181,7 @@ extern gint no_devise_totaux_categ;
 extern gint no_devise_totaux_ib;
 extern gint no_devise_totaux_tiers;
 extern gsb_real null_real;
-extern GdkColor split_background;
 extern gint tab_affichage_ope[TRANSACTION_LIST_ROWS_NB][CUSTOM_MODEL_VISIBLE_COLUMNS];
-extern GdkColor text_color[2];
 extern gchar *titre_fichier;
 extern gint transaction_col_align[CUSTOM_MODEL_VISIBLE_COLUMNS];
 extern gint transaction_col_width[CUSTOM_MODEL_VISIBLE_COLUMNS];
@@ -1144,262 +1133,219 @@ void gsb_file_load_color_part ( const gchar **attribute_names,
     /*     we test at the beginning if the attribute_value is NULL, if yes, */
     /*        go to the next */
 
-    if ( !strcmp (attribute_values[i],
-                        "(null)"))
+    if ( !strcmp (attribute_values[i], "(null)") )
     {
         /* Nothing */
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Background_color_0_red" ))
+    else if ( !strcmp ( attribute_names[i], "Background_color_0_red" ) )
     {
-        couleur_fond[0].red = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur_with_indice ( "couleur_fond", 0, "red", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Background_color_0_green" ))
+    else if ( !strcmp ( attribute_names[i], "Background_color_0_green" ) )
     {
-        couleur_fond[0].green = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur_with_indice ( "couleur_fond", 0, "green", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Background_color_0_blue" ))
+    else if ( !strcmp ( attribute_names[i], "Background_color_0_blue" ) )
     {
-        couleur_fond[0].blue = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur_with_indice ( "couleur_fond", 0, "blue", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Background_color_1_red" ))
+    else if ( !strcmp ( attribute_names[i], "Background_color_1_red" ) )
     {
-        couleur_fond[1].red = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur_with_indice ( "couleur_fond", 1, "red", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Background_color_1_green" ))
+    else if ( !strcmp ( attribute_names[i], "Background_color_1_green" ) )
     {
-        couleur_fond[1].green = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur_with_indice ( "couleur_fond", 1, "green", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Background_color_1_blue" ))
+    else if ( !strcmp ( attribute_names[i], "Background_color_1_blue" ) )
     {
-        couleur_fond[1].blue = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur_with_indice ( "couleur_fond", 1, "blue", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Couleur_jour_red" ))
+    else if ( !strcmp ( attribute_names[i], "Couleur_jour_red" ) )
     {
-        couleur_jour.red = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur ( "couleur_jour", "red", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Couleur_jour_green" ))
+    else if ( !strcmp ( attribute_names[i], "Couleur_jour_green" ) )
     {
-        couleur_jour.green = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur ( "couleur_jour", "green", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Couleur_jour_blue" ))
+    else if ( !strcmp ( attribute_names[i], "Couleur_jour_blue" ) )
     {
-        couleur_jour.blue = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur ( "couleur_jour", "blue", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Background_scheduled_red" ))
+    else if ( !strcmp ( attribute_names[i], "Background_scheduled_red" ) )
     {
-        couleur_grise.red = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur ( "couleur_grise", "red", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Background_scheduled_green" ))
+    else if ( !strcmp ( attribute_names[i], "Background_scheduled_green" ) )
     {
-        couleur_grise.green = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur ( "couleur_grise", "green", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Background_scheduled_blue" ))
+    else if ( !strcmp ( attribute_names[i], "Background_scheduled_blue" ) )
     {
-        couleur_grise.blue = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur ( "couleur_grise", "blue", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Background_archive_red" ))
+    else if ( !strcmp ( attribute_names[i], "Background_archive_red" ) )
     {
-        archive_background_color.red = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur ( "archive_background_color", "red", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Background_archive_green" ))
+    else if ( !strcmp ( attribute_names[i], "Background_archive_green" ) )
     {
-        archive_background_color.green = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur ( "archive_background_color", "green", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Background_archive_blue" ))
+    else if ( !strcmp ( attribute_names[i], "Background_archive_blue" ) )
     {
-        archive_background_color.blue = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur ( "archive_background_color", "blue", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Selection_red" ))
+    else if ( !strcmp ( attribute_names[i], "Selection_red" ) )
     {
-        couleur_selection.red = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur ( "couleur_selection", "red", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Selection_green" ))
+    else if ( !strcmp ( attribute_names[i], "Selection_green" ) )
     {
-        couleur_selection.green = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur ( "couleur_selection", "green", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Selection_blue" ))
+    else if ( !strcmp ( attribute_names[i], "Selection_blue" ) )
     {
-        couleur_selection.blue = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur ( "couleur_selection", "blue", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Background_split_red" ))
+    else if ( !strcmp ( attribute_names[i], "Background_split_red" ) )
     {
-        split_background.red = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur ( "split_background", "red", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Background_split_green" ))
+    else if ( !strcmp ( attribute_names[i], "Background_split_green" ) )
     {
-        split_background.green = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur ( "split_background", "green", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Background_split_blue" ))
+    else if ( !strcmp ( attribute_names[i], "Background_split_blue" ) )
     {
-        split_background.blue = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur ( "split_background", "blue", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Text_color_0_red" ))
+    else if ( !strcmp ( attribute_names[i], "Text_color_0_red" ) )
     {
-        text_color[0].red = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur_with_indice ( "text_color", 0, "red", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Text_color_0_green" ))
+    else if ( !strcmp ( attribute_names[i], "Text_color_0_green" ) )
     {
-        text_color[0].green = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur_with_indice ( "text_color", 0, "green", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Text_color_0_blue" ))
+    else if ( !strcmp ( attribute_names[i], "Text_color_0_blue" ) )
     {
-        text_color[0].blue = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur_with_indice ( "text_color", 0, "blue", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Text_color_1_red" ))
+    else if ( !strcmp ( attribute_names[i], "Text_color_1_red" ) )
     {
-        text_color[1].red = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur_with_indice ( "text_color", 1, "red", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Text_color_1_green" ))
+    else if ( !strcmp ( attribute_names[i], "Text_color_1_green" ) )
     {
-        text_color[1].green = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur_with_indice ( "text_color", 1, "green", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Text_color_1_blue" ))
+    else if ( !strcmp ( attribute_names[i], "Text_color_1_blue" ) )
     {
-        text_color[1].blue = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur_with_indice ( "text_color", 1, "blue", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Calendar_entry_red" ))
+    else if ( !strcmp ( attribute_names[i], "Entry_error_color_red" ) )
     {
-        calendar_entry_color.red = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur ( "entry_error_color", "red", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Calendar_entry_green" ))
+    else if ( !strcmp ( attribute_names[i], "Entry_error_color_green" ) )
     {
-        calendar_entry_color.green = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur ( "entry_error_color", "green", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Calendar_entry_blue" ))
+    else if ( !strcmp ( attribute_names[i], "Entry_error_color_blue" ) )
     {
-        calendar_entry_color.blue = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur ( "entry_error_color", "blue", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Couleur_bet_division_red" ))
+    else if ( !strcmp ( attribute_names[i], "Couleur_bet_division_red" ) )
     {
-        couleur_bet_division.red = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur ( "couleur_bet_division", "red", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Couleur_bet_division_green" ))
+    else if ( !strcmp ( attribute_names[i], "Couleur_bet_division_green" ) )
     {
-        couleur_bet_division.green = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur ( "couleur_bet_division", "green", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Couleur_bet_division_blue" ))
+    else if ( !strcmp ( attribute_names[i], "Couleur_bet_division_blue" ) )
     {
-        couleur_bet_division.blue = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur ( "couleur_bet_division", "blue", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Couleur_bet_future_red" ))
+    else if ( !strcmp ( attribute_names[i], "Couleur_bet_future_red" ) )
     {
-        couleur_bet_future.red = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur ( "couleur_bet_future", "red", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Couleur_bet_future_green" ))
+    else if ( !strcmp ( attribute_names[i], "Couleur_bet_future_green" ) )
     {
-        couleur_bet_future.green = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur ( "couleur_bet_future", "green", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Couleur_bet_future_blue" ))
+    else if ( !strcmp ( attribute_names[i], "Couleur_bet_future_blue" ) )
     {
-        couleur_bet_future.blue = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur ( "couleur_bet_future", "blue", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Couleur_bet_solde_red" ))
+    else if ( !strcmp ( attribute_names[i], "Couleur_bet_solde_red" ) )
     {
-        couleur_bet_solde.red = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur ( "couleur_bet_solde", "red", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Couleur_bet_solde_green" ))
+    else if ( !strcmp ( attribute_names[i], "Couleur_bet_solde_green" ) )
     {
-        couleur_bet_solde.green = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur ( "couleur_bet_solde", "green", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Couleur_bet_solde_blue" ))
+    else if ( !strcmp ( attribute_names[i], "Couleur_bet_solde_blue" ) )
     {
-        couleur_bet_solde.blue = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur ( "couleur_bet_solde", "blue", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Couleur_bet_transfert_red" ))
+    else if ( !strcmp ( attribute_names[i], "Couleur_bet_transfert_red" ) )
     {
-        couleur_bet_transfert.red = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur ( "couleur_bet_transfert", "red", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Couleur_bet_transfert_green" ))
+    else if ( !strcmp ( attribute_names[i], "Couleur_bet_transfert_green" ) )
     {
-        couleur_bet_transfert.green = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur ( "couleur_bet_transfert", "green", utils_str_atoi ( attribute_values[i] ) );
     }
 
-    else if ( !strcmp ( attribute_names[i],
-                        "Couleur_bet_transfert_blue" ))
+    else if ( !strcmp ( attribute_names[i], "Couleur_bet_transfert_blue" ) )
     {
-        couleur_bet_transfert.blue = utils_str_atoi (attribute_values[i]);
+        gsb_color_set_couleur ( "couleur_bet_transfert", "blue", utils_str_atoi ( attribute_values[i] ) );
     }
 
     i++;
diff --git a/src/gsb_file_save.c b/src/gsb_file_save.c
index f77ac05..00ee99c 100644
--- a/src/gsb_file_save.c
+++ b/src/gsb_file_save.c
@@ -46,6 +46,7 @@
 #include "bet_data.h"
 #include "bet_data_finance.h"
 #include "dialog.h"
+#include "gsb_color.h"
 #include "gsb_data_account.h"
 #include "gsb_data_archive.h"
 #include "gsb_data_bank.h"
@@ -151,17 +152,7 @@ extern gchar *adresse_commune;
 extern gchar *adresse_secondaire;
 extern gint affichage_echeances;
 extern gint affichage_echeances_perso_nb_libre;
-extern GdkColor archive_background_color;
 extern gint bet_array_col_width[BET_ARRAY_COLUMNS];
-extern GdkColor calendar_entry_color;
-extern GdkColor couleur_bet_division;
-extern GdkColor couleur_bet_future;
-extern GdkColor couleur_bet_solde;
-extern GdkColor couleur_bet_transfert;
-extern GdkColor couleur_fond[2];
-extern GdkColor couleur_grise;
-extern GdkColor couleur_jour;
-extern GdkColor couleur_selection;
 extern gint display_one_line;
 extern gint display_three_lines;
 extern gint display_two_lines;
@@ -169,9 +160,7 @@ extern gint no_devise_totaux_categ;
 extern gint no_devise_totaux_ib;
 extern gint no_devise_totaux_tiers;
 extern gint scheduler_col_width[SCHEDULER_COL_VISIBLE_COLUMNS];
-extern GdkColor split_background;
 extern gint tab_affichage_ope[TRANSACTION_LIST_ROWS_NB][CUSTOM_MODEL_VISIBLE_COLUMNS];
-extern GdkColor text_color[2];
 extern gchar *titre_fichier;
 extern gint transaction_col_align[CUSTOM_MODEL_VISIBLE_COLUMNS];
 extern gint transaction_col_width[CUSTOM_MODEL_VISIBLE_COLUMNS];
@@ -867,97 +856,10 @@ gulong gsb_file_save_color_part ( gulong iterator,
 {
     gchar *new_string;
 
-    /* save the general informations */
-    new_string = g_markup_printf_escaped ( "\t<Color\n"
-                        "\t\tBackground_color_0_red=\"%d\"\n"
-                        "\t\tBackground_color_0_green=\"%d\"\n"
-                        "\t\tBackground_color_0_blue=\"%d\"\n"
-                        "\t\tBackground_color_1_red=\"%d\"\n"
-                        "\t\tBackground_color_1_green=\"%d\"\n"
-                        "\t\tBackground_color_1_blue=\"%d\"\n"
-                        "\t\tCouleur_jour_red=\"%d\"\n"
-                        "\t\tCouleur_jour_green=\"%d\"\n"
-                        "\t\tCouleur_jour_blue=\"%d\"\n"
-                        "\t\tBackground_scheduled_red=\"%d\"\n"
-                        "\t\tBackground_scheduled_green=\"%d\"\n"
-                        "\t\tBackground_scheduled_blue=\"%d\"\n"
-                        "\t\tBackground_archive_red=\"%d\"\n"
-                        "\t\tBackground_archive_green=\"%d\"\n"
-                        "\t\tBackground_archive_blue=\"%d\"\n"
-                        "\t\tSelection_red=\"%d\"\n"
-                        "\t\tSelection_green=\"%d\"\n"
-                        "\t\tSelection_blue=\"%d\"\n"
-                        "\t\tBackground_split_red=\"%d\"\n"
-                        "\t\tBackground_split_green=\"%d\"\n"
-                        "\t\tBackground_split_blue=\"%d\"\n"
-                        "\t\tText_color_0_red=\"%d\"\n"
-                        "\t\tText_color_0_green=\"%d\"\n"
-                        "\t\tText_color_0_blue=\"%d\"\n"
-                        "\t\tText_color_1_red=\"%d\"\n"
-                        "\t\tText_color_1_green=\"%d\"\n"
-                        "\t\tText_color_1_blue=\"%d\"\n"
-                        "\t\tCalendar_entry_red=\"%d\"\n"
-                        "\t\tCalendar_entry_green=\"%d\"\n"
-                        "\t\tCalendar_entry_blue=\"%d\"\n"
-                        "\t\tCouleur_bet_division_red=\"%d\"\n"
-                        "\t\tCouleur_bet_division_green=\"%d\"\n"
-                        "\t\tCouleur_bet_division_blue=\"%d\"\n"
-                        "\t\tCouleur_bet_future_red=\"%d\"\n"
-                        "\t\tCouleur_bet_future_green=\"%d\"\n"
-                        "\t\tCouleur_bet_future_blue=\"%d\"\n"
-                        "\t\tCouleur_bet_solde_red=\"%d\"\n"
-                        "\t\tCouleur_bet_solde_green=\"%d\"\n"
-                        "\t\tCouleur_bet_solde_blue=\"%d\"\n"
-                        "\t\tCouleur_bet_transfert_red=\"%d\"\n"
-                        "\t\tCouleur_bet_transfert_green=\"%d\"\n"
-                        "\t\tCouleur_bet_transfert_blue=\"%d\" />\n",
-
-    couleur_fond[0].red,
-    couleur_fond[0].green,
-    couleur_fond[0].blue,
-    couleur_fond[1].red,
-    couleur_fond[1].green,
-    couleur_fond[1].blue,
-    couleur_jour.red,
-    couleur_jour.green,
-    couleur_jour.blue,
-    couleur_grise.red,
-    couleur_grise.green,
-    couleur_grise.blue,
-    archive_background_color.red,
-    archive_background_color.green,
-    archive_background_color.blue,
-    couleur_selection.red,
-    couleur_selection.green,
-    couleur_selection.blue,
-    split_background.red,
-    split_background.green,
-    split_background.blue,
-    text_color[0].red,
-    text_color[0].green,
-    text_color[0].blue,
-    text_color[1].red,
-    text_color[1].green,
-    text_color[1].blue,
-    calendar_entry_color.red,
-    calendar_entry_color.green,
-    calendar_entry_color.blue,
-    couleur_bet_division.red,
-    couleur_bet_division.green,
-    couleur_bet_division.blue,
-    couleur_bet_future.red,
-    couleur_bet_future.green,
-    couleur_bet_future.blue,
-    couleur_bet_solde.red,
-    couleur_bet_solde.green,
-    couleur_bet_solde.blue,
-    couleur_bet_transfert.red,
-    couleur_bet_transfert.green,
-    couleur_bet_transfert.blue );
+    new_string = gsb_color_get_strings_to_save ( );
 
     /* append the new string to the file content
      * and return the new iterator */
-
     return gsb_file_save_append_part ( iterator,
 				       l b_file_save_append_part ( iterator,  ;  ue=\"%d\" />\n",    BLE_COLUMNS];  ute_values[i] ) );   ;     ),  ÿ%Èÿ         "!«Òƒ+          ò§«Òƒ+  @
&Èÿ         °
&Èÿ  ó(«Òƒ+  Ȥ¬Òƒ+  è4Ì҃+                          ’ÈӃ+  °
&Èÿ  €0êӃ+          Àÿ%Èÿ         þ%Èÿ  ë=«Òƒ+  6                    è     è!     è!     @
&Èÿ  °
&Èÿ  xÔÇӃ+          À &Èÿ          "!«Òƒ+          >«Òƒ+  @
&Èÿ  ð «Òƒ+  
&Èÿ         ÀÏ+ԃ+  ó(«Òƒ+   À+ԃ+  ØÄ+ԃ+  ¨É+ԃ+  Ȥ¬Òƒ+          xÔÇӃ+          À &Èÿ          ÿ%Èÿ  ë=«Òƒ+  à!     à!     @
&Èÿ  °
&Èÿ  ȝ§Óƒ+           &Èÿ         "!«Òƒ+          >«Òƒ+  @
&Èÿ  ð «Òƒ+  
&Èÿ  p
&Èÿ  h
&Èÿ  ;Ì҃+  Œp˜        °
&Èÿ  ó(«Òƒ+  Ȥ¬Òƒ+                   &Èÿ         p &Èÿ  ë=«Òƒ+          G       H   I       J   K           M   N   O       P   @
&Èÿ  °
&Èÿ  HU~Ӄ+          @&Èÿ         "!«Òƒ+          >«Òƒ+  @
&Èÿ         0Ï+ԃ+  ó(«Òƒ+   àÇӃ+   ‰[Ӄ+   À+ԃ+  ØÄ+ԃ+  ¨É+ԃ+  Ȥ¬Òƒ+          HU~Ӄ+          @&Èÿ         €&Èÿ  ë=«Òƒ+  8U~Ӄ+          @&Èÿ         °&Èÿ  ë=«Òƒ+  (U~Ӄ+          @&Èÿ         à&Èÿ  ë=«Òƒ+  U~Ӄ+          @&Èÿ         &Èÿ  ë=«Òƒ+  	       ¨Î+ԃ+  ó(«Òƒ+         ¨É+ԃ+  ü%Èÿ          ŠØ[Ӄ+  æ'«Òƒ+         ØÄ+ԃ+  °&Èÿ          yØ[Ӄ+  æ'«Òƒ+          À+ԃ+  à&Èÿ          ZØ[Ӄ+  æ'«Òƒ+  ؄[Ӄ+   àÇӃ+   ‰[Ӄ+   À+ԃ+  ØäÇӃ+  ØÄ+ԃ+  ¨É+ԃ+  Ȥ¬Òƒ+          àÍYӃ+          `&Èÿ         0&Èÿ  ë=«Òƒ+  #   %       '       )       *   -   .   0   3       5   6   7   8   :   <   =   @
&Èÿ  °
&Èÿ  p&Ӄ+          €&Èÿ          "!«Òƒ+                 8ïÇӃ+  ó(«Òƒ+  ØäÇӃ+   éÇӃ+  Ȥ¬Òƒ+                          c   f   Mò҃+  °
&Èÿ  p&Ӄ+          €&Èÿ          P&Èÿ  ë=«Òƒ+  Ó%°•æ§ìš‹wqÒ-øÒ êÓïs¨Ó,~9„×u]ÞÓ	4Q ÷U^Qʉ§ ¶uª¹ñìò*ēv´â÷҃+          ð&Èÿ  FðŽÔƒ+  FðŽÔƒ+         ?5õ҃+         °&Èÿ  &Èÿ  Ð&Èÿ  Mò҃+  æ'«Òƒ+  è4Ì҃+  0
&Èÿ  BðŽÔƒ+   &Èÿ  
&Èÿ  õÌÌ҃+  °
&Èÿ          ÿÿÿÿÿÿÿÿBðŽÔƒ+          ¸
&Èÿ  ë=«Ò            ength_calculated,
 				       file_content,
diff --git a/src/gsb_form.c b/src/gsb_form.c
index d4fae49..ba89778 100644
--- a/src/gsb_form.c
+++ b/src/gsb_form.c
@@ -108,7 +108,6 @@ static gboolean gsb_form_validate_form_transaction ( gint transaction_number,
 /*END_STATIC*/
 
 /*START_EXTERN*/
-extern GdkColor calendar_entry_color;
 extern gint mise_a_jour_liste_comptes_accueil;
 extern gsb_real null_real;
 /*END_EXTERN*/
diff --git a/src/gsb_form_widget.c b/src/gsb_form_widget.c
index 094740e..f257cbf 100644
--- a/src/gsb_form_widget.c
+++ b/src/gsb_form_widget.c
@@ -37,6 +37,7 @@
 /*START_INCLUDE*/
 #include "gsb_form_widget.h"
 #include "gsb_calendar_entry.h"
+#include "gsb_color.h"
 #include "gsb_currency.h"
 #include "gsb_data_account.h"
 #include "gsb_data_budget.h"
@@ -61,7 +62,6 @@ static gboolean gsb_form_widget_can_focus ( gint element_number );
 /*END_STATIC*/
 
 /*START_EXTERN*/
-extern GdkColor calendar_entry_color;
 extern GtkWidget *form_button_cancel;
 extern GtkWidget *form_button_valid;
 /*END_EXTERN*/
@@ -961,7 +961,7 @@ gboolean gsb_form_widget_amount_entry_changed ( GtkWidget *entry,
     {
 	    /* the entry is not valid, make it red */
 		gtk_widget_modify_base ( entry, GTK_STATE_NORMAL,
-                        &calendar_entry_color );
+                        gsb_color_get_couleur ( "entry_error_color" ) );
     }
 
     return FALSE;
@@ -1231,7 +1231,7 @@ gboolean gsb_form_widget_amount_entry_validate ( gint element_number )
     else
     {
         /* the entry is not valid, make it red */
-        gtk_widget_modify_base ( entry, GTK_STATE_NORMAL, &calendar_entry_color );
+        gtk_widget_modify_base ( entry, GTK_STATE_NORMAL, gsb_color_get_couleur ( "entry_error_color" ) );
         return_value = FALSE;
     }
 
diff --git a/src/gsb_reconcile.c b/src/gsb_reconcile.c
index e369934..f18871b 100644
--- a/src/gsb_reconcile.c
+++ b/src/gsb_reconcile.c
@@ -39,7 +39,8 @@
 /*START_INCLUDE*/
 #include "gsb_reconcile.h"
 #include "dialog.h"
-#include "utils_dates.h"
+#include "fenetre_principale.h"
+#include "gsb_color.h"
 #include "gsb_calendar_entry.h"
 #include "gsb_data_account.h"
 #include "gsb_data_reconcile.h"
@@ -47,19 +48,19 @@
 #include "gsb_file.h"
 #include "gsb_form.h"
 #include "gsb_form_widget.h"
-#include "navigation.h"
-#include "fenetre_principale.h"
 #include "gsb_real.h"
 #include "gsb_reconcile_list.h"
 #include "gsb_scheduler_list.h"
 #include "gsb_transactions_list.h"
-#include "utils_editables.h"
+#include "menu.h"
+#include "navigation.h"
+#include "structures.h"
 #include "traitement_variables.h"
-#include "utils_str.h"
 #include "transaction_list.h"
 #include "transaction_list_sort.h"
-#include "structures.h"
-#include "menu.h"
+#include "utils_dates.h"
+#include "utils_editables.h"
+#include "utils_str.h"
 /*END_INCLUDE*/
 
 /*START_STATIC*/
@@ -74,7 +75,6 @@ static void gsb_reconcile_sensitive ( gboolean sensitive );
 /*END_STATIC*/
 
 /*START_EXTERN*/
-extern GdkColor calendar_entry_color;
 extern GtkWidget *label_last_statement;
 extern gint mise_a_jour_liste_comptes_accueil;
 extern GtkWidget * reconcile_panel;
@@ -785,8 +785,7 @@ gboolean gsb_reconcile_update_amounts ( GtkWidget *entry,
         else
         {
             /* the entry is not valid, make it red */
-            gtk_widget_modify_base ( entry, GTK_STATE_NORMAL,
-                            &calendar_entry_color );
+            gtk_widget_modify_base ( entry, GTK_STATE_NORMAL, gsb_color_get_couleur ( "entry_error_color" ) );
             return FALSE;
         }
     }
diff --git a/src/gsb_scheduler_list.c b/src/gsb_scheduler_list.c
index c692e77..369eebd 100644
--- a/src/gsb_scheduler_list.c
+++ b/src/gsb_scheduler_list.c
@@ -43,6 +43,7 @@
 #include "fenetre_principale.h"
 #include "gsb_automem.h"
 #include "gsb_calendar.h"
+#include "gsb_color.h"
 #include "gsb_data_account.h"
 #include "gsb_data_category.h"
 #include "gsb_data_currency.h"
@@ -120,13 +121,9 @@ static gboolean popup_scheduled_view_mode_menu ( GtkWidget *button );
 /*START_EXTERN*/
 extern gint affichage_echeances;
 extern gint affichage_echeances_perso_nb_libre;
-extern GdkColor couleur_fond[2];
-extern GdkColor couleur_grise;
-extern GdkColor couleur_selection;
 extern struct conditional_message delete_msg[];
 extern gint mise_a_jour_liste_echeances_manuelles_accueil;
 extern gsb_real null_real;
-extern GdkColor split_background;
 /*END_EXTERN*/
 
 
@@ -1045,7 +1042,7 @@ gboolean gsb_scheduler_list_append_new_scheduled ( gint scheduled_number,
         {
             gtk_tree_store_set ( GTK_TREE_STORE ( tree_model_scheduler_list ),
                         &iter,
-                        SCHEDULER_COL_NB_BACKGROUND, &split_background,
+                        SCHEDULER_COL_NB_BACKGROUND, gsb_color_get_couleur ( "split_background" ),
                         -1 );
         }
         else
@@ -1409,13 +1406,14 @@ gboolean gsb_scheduler_list_set_background_color ( GtkWidget *tree_view )
         if ( virtual_transaction )
             gtk_tree_store_set ( store,
                         &iter,
-                        SCHEDULER_COL_NB_BACKGROUND, &couleur_grise,
+                        SCHEDULER_COL_NB_BACKGROUND, gsb_color_get_couleur ( "couleur_grise" ),
                         -1 );
         else
         {
             gtk_tree_store_set ( store,
                         &iter,
-                        SCHEDULER_COL_NB_BACKGROUND, &couleur_fond[current_color],
+                        SCHEDULER_COL_NB_BACKGROUND,
+                        gsb_color_get_couleur_with_indice ( "couleur_fond", current_color ),
                         -1 );
             current_color = !current_color;
         }
diff --git a/src/help.c b/src/help.c
index 315552e..521ffb0 100644
--- a/src/help.c
+++ b/src/help.c
@@ -167,7 +167,8 @@ NULL};
     version_to_string = get_gtk_run_version ( );
     compiled_time = gsb_date_get_compiled_time ( );
 
-    comments = g_strconcat ( _("Personal finance manager for everyone\n"),
+    if ( IS_DEVELOPMENT_VERSION == 1 )
+        comments = g_strconcat ( _("Personal finance manager for everyone\n"),
                         plugins,
                         "\nVersion de GTK : ",
                         version_to_string,
@@ -179,6 +180,13 @@ NULL};
                         " ",
                         __TIME__,
                         NULL );
+    else
+        comments = g_strconcat ( _("Personal finance manager for everyone\n"),
+                        plugins,
+                        "\nVersion de GTK : ",
+                        version_to_string,
+                        NULL );
+
     /* Logo */
     logo = gsb_select_icon_get_logo_pixbuf ( );
     if (logo == NULL )
diff --git a/src/imputation_budgetaire.c b/src/imputation_budgetaire.c
index 81d195f..bd3edaa 100644
--- a/src/imputation_budgetaire.c
+++ b/src/imputation_budgetaire.c
@@ -83,7 +83,6 @@ static gboolean sortie_edit_budgetary_line = FALSE;
 static struct metatree_hold_position *budgetary_hold_position;
 
 /*START_EXTERN*/
-extern GdkColor couleur_selection;
 /*END_EXTERN*/
 
 
@@ -165,6 +164,7 @@ GtkWidget *budgetary_lines_create_list ( void )
     column = gtk_tree_view_column_new_with_attributes (_("Budgetary line"), cell,
 						       "text", META_TREE_TEXT_COLUMN,
 						       "weight", META_TREE_FONT_COLUMN,
+                               "cell-background-gdk", META_TREE_BACKGROUND_COLOR,
 						       NULL);
     gtk_tree_view_append_column ( GTK_TREE_VIEW ( budgetary_line_tree ),
 				  GTK_TREE_VIEW_COLUMN ( column ) );
@@ -174,6 +174,7 @@ GtkWidget *budgetary_lines_create_list ( void )
     column = gtk_tree_view_column_new_with_attributes (_("Account"), cell,
 						       "text", META_TREE_ACCOUNT_COLUMN,
 						       "weight", META_TREE_FONT_COLUMN,
+                               "cell-background-gdk", META_TREE_BACKGROUND_COLOR,
 						       NULL);
     gtk_tree_view_append_column ( GTK_TREE_VIEW ( budgetary_line_tree ),
 				  GTK_TREE_VIEW_COLUMN ( column ) );
@@ -184,6 +185,7 @@ GtkWidget *budgetary_lines_create_list ( void )
 						       "text", META_TREE_BALANCE_COLUMN,
 						       "weight", META_TREE_FONT_COLUMN,
 						       "xalign", META_TREE_XALIGN_COLUMN,
+                               "cell-background-gdk", META_TREE_BACKGROUND_COLOR,
 						       NULL);
     gtk_tree_view_column_set_alignment ( column, 1.0 );
     gtk_tree_view_append_column ( GTK_TREE_VIEW ( budgetary_line_tree ),
@@ -194,6 +196,11 @@ GtkWidget *budgetary_lines_create_list ( void )
 
     /* Connect to signals */
     g_signal_connect ( G_OBJECT ( budgetary_line_tree ),
+                        "row-collapsed",
+                        G_CALLBACK ( division_column_collapsed ),
+                        NULL );
+
+    g_signal_connect ( G_OBJECT ( budgetary_line_tree ),
                         "row-expanded",
                         G_CALLBACK ( division_column_expanded ),
                         NULL );
@@ -328,12 +335,17 @@ void budgetary_lines_fill_list ( void )
             gtk_tree_view_expand_to_path ( GTK_TREE_VIEW ( budgetary_line_tree ), ancestor );
             gtk_tree_path_free (ancestor );
         }
+        /* on colorise les lignes du tree_view */
+        utils_set_tree_view_background_color ( budgetary_line_tree, META_TREE_BACKGROUND_COLOR );
         selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW ( budgetary_line_tree ) );
         gtk_tree_selection_select_path ( selection, budgetary_hold_position -> path );
         gtk_tree_view_scroll_to_cell ( GTK_TREE_VIEW ( budgetary_line_tree ),
                         budgetary_hold_position -> path,
                         NULL, TRUE, 0.5, 0.5 );
     }
+    else
+        /* on colorise les lignes du tree_view */
+        utils_set_tree_view_background_color ( budgetary_line_tree, META_TREE_BACKGROUND_COLOR );
 }
 
 
diff --git a/src/main.c b/src/main.c
index 9089145..9c23503 100644
--- a/src/main.c
+++ b/src/main.c
@@ -39,6 +39,7 @@
 #include "accueil.h"
 #include "dialog.h"
 #include "gsb_assistant_first.h"
+#include "gsb_color.h"
 #include "gsb_data_account.h"
 #include "gsb_dirs.h"
 #include "gsb_file.h"
@@ -452,7 +453,7 @@ gboolean gsb_grisbi_init_app ( void )
     g_free (string);
 
     /* initialisation of the variables */
-    initialisation_couleurs_listes ();
+    gsb_color_initialise_couleurs_par_defaut ( );
     init_variables ();
     register_import_formats ();
 
diff --git a/src/metatree.c b/src/metatree.c
index c5a6bef..d9bc0a8 100644
--- a/src/metatree.c
+++ b/src/metatree.c
@@ -48,9 +48,11 @@
 #include "imputation_budgetaire.h"
 #include "navigation.h"
 #include "structures.h"
+#include "tiers_onglet.h"
 #include "traitement_variables.h"
 #include "transaction_list.h"
 #include "transaction_list_select.h"
+#include "utils.h"
 #include "utils_dates.h"
 #include "utils_str.h"
 #include "erreur.h"
@@ -1102,10 +1104,36 @@ gboolean division_column_expanded  ( GtkTreeView * treeview, GtkTreeIter * iter,
 	    list_tmp_transactions = list_tmp_transactions -> next;
 	}
     }
+
+    /* on colorise les lignes du tree_view */
+    utils_set_tree_view_background_color ( GTK_WIDGET ( treeview ), META_TREE_BACKGROUND_COLOR );
+
     return FALSE;
 }
 
 
+/**
+ * callback when collapse a row
+ *
+ * \param treeview
+ * \param iter
+ * \param tree_path
+ * \param user_data not used
+ *
+ * \return FALSE
+ *
+ */
+gboolean division_column_collapsed  ( GtkTreeView *treeview,
+                        GtkTreeIter *iter,
+                        GtkTreePath *tree_path,
+                        gpointer user_data )
+{
+    /* on colorise les lignes du tree_view */
+    utils_set_tree_view_background_color ( GTK_WIDGET ( treeview ), META_TREE_BACKGROUND_COLOR );
+
+    return FALSE;
+}
+
 
 /**
  * \todo Document this
@@ -1260,13 +1288,14 @@ gboolean division_drag_data_received ( GtkTreeDragDest *drag_dest,
 
     if ( dest_path && selection_data )
     {
-	GtkTreeModel * model;
-	GtkTreePath * orig_path;
-	gchar * name;
-	gint no_dest_division, no_dest_sub_division, no_orig_division, no_orig_sub_division;
-	enum meta_tree_row_type orig_type;
-	MetatreeInterface * iface;
-	gint transaction_number;
+        GtkWidget *tree_view = NULL;
+        GtkTreeModel *model;
+        GtkTreePath *orig_path;
+        gchar *name;
+        gint no_dest_division, no_dest_sub_division, no_orig_division, no_orig_sub_division;
+        enum meta_tree_row_type orig_type;
+        MetatreeInterface * iface;
+        gint transaction_number;
 
 	/* get the orig_path */
 	gtk_tree_get_row_drag_data (selection_data, &model, &orig_path);
@@ -1321,6 +1350,21 @@ gboolean division_drag_data_received ( GtkTreeDragDest *drag_dest,
 	    default:
 		break;
 	}
+        /* on colorise les lignes du tree_view */
+        switch ( iface -> content )
+        {
+            case 0:
+                tree_view = payees_get_tree_view ( );
+            break;
+            case 1:
+                tree_view = categories_get_tree_view ( );
+            break;
+            case 2:
+                tree_view = budgetary_lines_get_tree_view ( );
+            break;
+        }
+        utils_set_tree_view_background_color ( tree_view, META_TREE_BACKGROUND_COLOR );
+
     }
 
     return FALSE;
@@ -1638,14 +1682,17 @@ gboolean division_node_maybe_expand ( GtkTreeModel *model,
  */
 void expand_arbre_division ( GtkWidget *bouton, gint depth )
 {
-    GtkTreeView * tree_view = g_object_get_data ( G_OBJECT(bouton), "tree-view" );
-    GtkTreeModel * model;
+    GtkTreeView *tree_view = g_object_get_data ( G_OBJECT(bouton), "tree-view" );
+    GtkTreeModel *model;
     
     if ( tree_view )
     {
-	gtk_tree_view_collapse_all ( tree_view );
-	model = gtk_tree_view_get_model ( tree_view );
-	gtk_tree_model_foreach ( model, division_node_maybe_expand, GINT_TO_POINTER ( depth ) );
+        gtk_tree_view_collapse_all ( tree_view );
+        model = gtk_tree_view_get_model ( tree_view );
+        gtk_tree_model_foreach ( model, division_node_maybe_expand, GINT_TO_POINTER ( depth ) );
+
+        /* on colorise les lignes du tree_view */
+        utils_set_tree_view_background_color ( GTK_WIDGET ( tree_view ), META_TREE_BACKGROUND_COLOR );
     }
 }
 
diff --git a/src/metatree.h b/src/metatree.h
index fe4c9fb..00452cc 100644
--- a/src/metatree.h
+++ b/src/metatree.h
@@ -86,8 +86,9 @@ enum meta_tree_columns {
     META_TREE_FONT_COLUMN,
     META_TREE_XALIGN_COLUMN,
     META_TREE_DATE_COLUMN,
+    META_TREE_BACKGROUND_COLOR,
     META_TREE_NUM_COLUMNS,
-}; 
+};
 
 enum meta_tree_row_type {
     META_TREE_DIV,
@@ -99,7 +100,7 @@ enum meta_tree_row_type {
 
 #define META_TREE_COLUMN_TYPES G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, \
 				 G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, \
-				 G_TYPE_INT, G_TYPE_FLOAT, G_TYPE_POINTER
+				 G_TYPE_INT, G_TYPE_FLOAT, G_TYPE_POINTER, GDK_TYPE_COLOR
 
 
 /*START_DECLARATION*/
@@ -108,6 +109,10 @@ gboolean division_activated ( GtkTreeView * treeview, GtkTreePath * path,
                         GtkTreeViewColumn * col, gpointer userdata );
 gboolean division_column_expanded  ( GtkTreeView * treeview, GtkTreeIter * iter, 
                         GtkTreePath * tree_path, gpointer user_data ) ;
+gboolean division_column_collapsed  ( GtkTreeView *treeview,
+                        GtkTreeIter *iter,
+                        GtkTreePath *tree_path,
+                        gpointer user_data );
 gboolean division_drag_data_received ( GtkTreeDragDest * drag_dest, GtkTreePath * dest_path,
                         GtkSelectionData * selection_data );
 gboolean division_row_drop_possible ( GtkTreeDragDest * drag_dest, GtkTreePath * dest_path,
diff --git a/src/print_transactions_list.c b/src/print_transactions_list.c
index ad35d79..cb67f8d 100644
--- a/src/print_transactions_list.c
+++ b/src/print_transactions_list.c
@@ -37,6 +37,7 @@
 #include "gsb_autofunc.h"
 #include "gsb_automem.h"
 #include "gsb_calendar_entry.h"
+#include "gsb_color.h"
 #include "gsb_data_print_config.h"
 #include "gsb_data_transaction.h"
 #include "utils.h"
@@ -77,8 +78,6 @@ static GtkWidget * print_transactions_list_layout_config ( GtkPrintOperation * o
 
 
 /*START_EXTERN*/
-extern GdkColor archive_background_color;
-extern GdkColor couleur_fond[2];
 extern gchar *titres_colonnes_liste_operations[CUSTOM_MODEL_VISIBLE_COLUMNS];
 extern gint transaction_col_width[CUSTOM_MODEL_VISIBLE_COLUMNS];
 /*END_EXTERN*/
@@ -803,30 +802,38 @@ static void print_transactions_list_draw_background ( CustomRecord *record,
 						      gint line_position )
 {
     if (!gsb_data_print_config_get_draw_background ())
-	return;
+        return;
 
     if (record -> what_is_line == IS_ARCHIVE)
     {
-	cairo_rectangle (cr, 0, line_position, page_width, size_row + 2*gsb_data_print_config_get_draw_lines ());
-	cairo_set_source_rgb (cr, (gdouble) archive_background_color.red/65535, (gdouble) archive_background_color.green/65535, (gdouble) archive_background_color.blue/65535);
+        GdkColor *color;
+
+        color = gsb_color_get_couleur ( "archive_background_color" );
+        cairo_rectangle ( cr, 0, line_position, page_width, size_row + 2*gsb_data_print_config_get_draw_lines ( ) );
+        cairo_set_source_rgb ( cr,
+                        (gdouble) color -> red/65535,
+                        (gdouble) color -> green/65535,
+                        (gdouble) color -> blue/65535 );
     }
     else
     {
-	if (color_bg)
-	{
-	    CustomList *custom_list = transaction_model_get_model ();
-	    cairo_rectangle (cr, 0, line_position, page_width, custom_list -> nb_rows_by_transaction * size_row + 2*gsb_data_print_config_get_draw_lines ());
-	    cairo_set_source_rgb (cr, (gdouble) couleur_fond[0].red/65535, (gdouble) couleur_fond[0].green/65535, (gdouble) couleur_fond[0].blue/65535);
-	}
-	else
-	{
-	    CustomList *custom_list = transaction_model_get_model ();
-	    cairo_rectangle (cr, 0, line_position, page_width, custom_list -> nb_rows_by_transaction * size_row + 2*gsb_data_print_config_get_draw_lines ());
-	    cairo_set_source_rgb (cr, (gdouble) couleur_fond[1].red/65535, (gdouble) couleur_fond[1].green/65535, (gdouble) couleur_fond[1].blue/65535);
-	}
+        CustomList *custom_list = transaction_model_get_model ( );
+        GdkColor *color;
+
+        if ( color_bg )
+            color = gsb_color_get_couleur_with_indice ( "couleur_fond", 0 );
+        else
+            color = gsb_color_get_couleur_with_indice ( "couleur_fond", 1 );
+
+        cairo_rectangle (cr, 0, line_position, page_width,
+                        custom_list -> nb_rows_by_transaction * size_row + 2*gsb_data_print_config_get_draw_lines ( ) );
+        cairo_set_source_rgb (cr,
+                        (gdouble) color -> red/65535,
+                        (gdouble) color -> green/65535,
+                        (gdouble) color -> blue/65535 );
     }
-    cairo_fill (cr);
-    cairo_set_source_rgb (cr, 0.0, 0.0, 0.0);
+    cairo_fill ( cr );
+    cairo_set_source_rgb ( cr, 0.0, 0.0, 0.0 );
 }
 
 /**
diff --git a/src/tiers_onglet.c b/src/tiers_onglet.c
index 7fa557d..91875ea 100644
--- a/src/tiers_onglet.c
+++ b/src/tiers_onglet.c
@@ -120,7 +120,6 @@ static struct metatree_hold_position *payee_hold_position;
 static struct conditional_message *overwrite_payee;
 
 /*START_EXTERN*/
-extern GdkColor couleur_selection;
 extern GSList *liste_associations_tiers;
 /*END_EXTERN*/
 
@@ -212,6 +211,7 @@ GtkWidget *payees_create_list ( void )
     column = gtk_tree_view_column_new_with_attributes (_("Payees"), cell,
 						       "text", META_TREE_TEXT_COLUMN,
 						       "weight", META_TREE_FONT_COLUMN,
+                               "cell-background-gdk", META_TREE_BACKGROUND_COLOR,
 						       NULL);
     gtk_tree_view_append_column ( GTK_TREE_VIEW ( payee_tree ),
 				  GTK_TREE_VIEW_COLUMN ( column ) );
@@ -221,6 +221,7 @@ GtkWidget *payees_create_list ( void )
     column = gtk_tree_view_column_new_with_attributes (_("Account"), cell,
 						       "text", META_TREE_ACCOUNT_COLUMN,
 						       "weight", META_TREE_FONT_COLUMN,
+                               "cell-background-gdk", META_TREE_BACKGROUND_COLOR,
 						       NULL);
     gtk_tree_view_append_column ( GTK_TREE_VIEW ( payee_tree ),
 				  GTK_TREE_VIEW_COLUMN ( column ) );
@@ -231,6 +232,7 @@ GtkWidget *payees_create_list ( void )
 						       "text", META_TREE_BALANCE_COLUMN,
 						       "weight", META_TREE_FONT_COLUMN,
 						       "xalign", META_TREE_XALIGN_COLUMN,
+                               "cell-background-gdk", META_TREE_BACKGROUND_COLOR,
 						       NULL);
     gtk_tree_view_append_column ( GTK_TREE_VIEW ( payee_tree ),
 				  GTK_TREE_VIEW_COLUMN ( column ) );
@@ -240,6 +242,11 @@ GtkWidget *payees_create_list ( void )
 
     /* Connect to signals */
     g_signal_connect ( G_OBJECT ( payee_tree ),
+                        "row-collapsed",
+                        G_CALLBACK ( division_column_collapsed ),
+                        NULL );
+
+    g_signal_connect ( G_OBJECT ( payee_tree ),
                         "row-expanded",
                         G_CALLBACK ( division_column_expanded ),
                         NULL );
@@ -533,12 +540,18 @@ void payees_fill_list ( void )
             gtk_tree_view_expand_to_path ( GTK_TREE_VIEW ( payee_tree ), ancestor );
             gtk_tree_path_free (ancestor );
         }
+        /* on colorise les lignes du tree_view */
+        utils_set_tree_view_background_color ( payee_tree, META_TREE_BACKGROUND_COLOR );
         selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW ( payee_tree ) );
         gtk_tree_selection_select_path ( selection, payee_hold_position -> path );
         gtk_tree_view_scroll_to_cell ( GTK_TREE_VIEW ( payee_tree ),
                         payee_hold_position -> path,
                         NULL, TRUE, 0.5, 0.5 );
     }
+    else
+        /* on colorise les lignes du tree_view */
+        utils_set_tree_view_background_color ( payee_tree, META_TREE_BACKGROUND_COLOR );
+
     g_object_unref ( G_OBJECT ( payee_tree_model ) );
 
     gsb_status_stop_wait ( FALSE );
diff --git a/src/traitement_variables.c b/src/traitement_variables.c
index a522ea0..ae8463b 100644
--- a/src/traitement_variables.c
+++ b/src/traitement_variables.c
@@ -41,6 +41,7 @@
 #include "custom_list.h"
 #include "fenetre_principale.h"
 #include "gsb_calendar.h"
+#include "gsb_color.h"
 #include "gsb_currency.h"
 #include "gsb_data_account.h"
 #include "gsb_data_archive.h"
@@ -88,99 +89,6 @@ static void initialise_number_separators ( void );
 static void initialise_tab_affichage_ope ( void );
 /*END_STATIC*/
 
-/* background color */
-#define BG_COLOR_1_RED      55000
-#define BG_COLOR_1_GREEN    55000
-#define BG_COLOR_1_BLUE     65535
-
-#define BG_COLOR_2_RED      65535
-#define BG_COLOR_2_GREEN    65535
-#define BG_COLOR_2_BLUE     65535
-
-/* couleur du jour */
-#define BG_COLOR_TODAY_RED      55512
-#define BG_COLOR_TODAY_GREEN    55512
-#define BG_COLOR_TODAY_BLUE     55512
-
-/* text color */
-#define TEXT_COLOR_1_RED    0
-#define TEXT_COLOR_1_GREEN  0
-#define TEXT_COLOR_1_BLUE   0
-
-#define TEXT_COLOR_2_RED    65535
-#define TEXT_COLOR_2_GREEN  0
-#define TEXT_COLOR_2_BLUE   0
-
-/* selection color */
-#define SELECTION_COLOR_RED     63000
-#define SELECTION_COLOR_GREEN   40000
-#define SELECTION_COLOR_BLUE    40000
-
-/* scheduler color */
-#define UNSENSITIVE_SCHEDULED_COLOR_RED     50000
-#define UNSENSITIVE_SCHEDULED_COLOR_GREEN   50000
-#define UNSENSITIVE_SCHEDULED_COLOR_BLUE    50000
-
-/* archive background color */
-#define COLOR_ARCHIVE_BG_RED    15000
-#define COLOR_ARCHIVE_BG_GREEN  30000
-#define COLOR_ARCHIVE_BG_BLUE   10000
-
-/* children of splitted transaction color */
-#define BREAKDOWN_BACKGROUND_COLOR_RED      61423
-#define BREAKDOWN_BACKGROUND_COLOR_GREEN    50629
-#define BREAKDOWN_BACKGROUND_COLOR_BLUE     50629
-
-/* calendar entry color (when wrong date) */
-#define CALENDAR_ENTRY_COLOR_RED    65535
-#define CALENDAR_ENTRY_COLOR_GREEN  0
-#define CALENDAR_ENTRY_COLOR_BLUE   0
-
-
-/** defaults colors in the transactions list */
-GdkColor default_couleur_fond[2];
-GdkColor default_couleur_jour;
-GdkColor default_couleur_grise;
-GdkColor default_archive_background_color;
-GdkColor default_couleur_selection;
-GdkColor default_split_background;
-GdkColor default_text_color[2];
-GdkColor default_calendar_entry_color;
-
-/** colors in the transactions list */
-GdkColor couleur_fond[2];
-GdkColor couleur_jour;
-GdkColor couleur_grise;
-GdkColor archive_background_color;
-GdkColor couleur_selection;
-GdkColor split_background;
-GdkColor text_color[2];
-GdkColor calendar_entry_color;
-
-/* colors of the amounts in the first page */
-GdkColor couleur_solde_alarme_verte_normal;
-GdkColor couleur_solde_alarme_verte_prelight;
-GdkColor couleur_solde_alarme_orange_normal;
-GdkColor couleur_solde_alarme_orange_prelight;
-GdkColor couleur_solde_alarme_rouge_normal;
-GdkColor couleur_solde_alarme_rouge_prelight;
-GdkColor couleur_nom_compte_normal;
-GdkColor couleur_nom_compte_prelight;
-
-GdkColor couleur_bleue;
-GdkColor couleur_jaune;
-
-/* colors for the balance estimate modul */
-GdkColor couleur_bet_division;
-GdkColor default_couleur_bet_division;
-GdkColor couleur_bet_future;
-GdkColor default_couleur_bet_future;
-GdkColor couleur_bet_solde;
-GdkColor default_couleur_bet_solde;
-GdkColor couleur_bet_transfert;
-GdkColor default_couleur_bet_transfert;
-
-
 gchar *nom_fichier_comptes = NULL;
 
 gchar *titre_fichier = NULL;
@@ -381,16 +289,7 @@ void init_variables ( void )
     gsb_form_scheduler_free_list ();
 
     /* set colors to default */
-    couleur_fond[0] = default_couleur_fond[0];
-    couleur_fond[1] = default_couleur_fond[1];
-    couleur_jour = default_couleur_jour;
-    couleur_grise = default_couleur_grise;
-    archive_background_color = default_archive_background_color;
-    couleur_selection = default_couleur_selection;
-    split_background = default_split_background;
-    text_color[0] = default_text_color[0];
-    text_color[1] = default_text_color[1];
-    calendar_entry_color = default_calendar_entry_color;
+    gsb_color_set_colors_to_default ( );
 
     /* divers */
     etat.add_archive_in_total_balance = TRUE;   /* add the archived transactions by default */
@@ -426,162 +325,6 @@ void free_variables ( void )
     gsb_gui_navigation_free_pages_list ( );
 }
 
-/**
- * initialize the colors used in grisbi
- *
- * \param
- *
- * \return
- * */
-void initialisation_couleurs_listes ( void )
-{
-    devel_debug (NULL);
-
-    /* colors of the background */
-    default_couleur_fond[0].red = BG_COLOR_1_RED;
-    default_couleur_fond[0].green = BG_COLOR_1_GREEN;
-    default_couleur_fond[0].blue = BG_COLOR_1_BLUE;
-
-    default_couleur_fond[1].red = BG_COLOR_2_RED;
-    default_couleur_fond[1].green = BG_COLOR_2_GREEN;
-    default_couleur_fond[1].blue = BG_COLOR_2_BLUE;
-
-    /* color of today */
-    default_couleur_jour.red = BG_COLOR_TODAY_RED;
-    default_couleur_jour.green = BG_COLOR_TODAY_GREEN;
-    default_couleur_jour.blue = BG_COLOR_TODAY_BLUE;
-
-    /* colors of the text */
-    default_text_color[0].red = TEXT_COLOR_1_RED;
-    default_text_color[0].green = TEXT_COLOR_1_GREEN;
-    default_text_color[0].blue = TEXT_COLOR_1_BLUE;
-
-    default_text_color[1].red = TEXT_COLOR_2_RED;
-    default_text_color[1].green = TEXT_COLOR_2_GREEN;
-    default_text_color[1].blue = TEXT_COLOR_2_BLUE;
-
-    /* selection color */
-    default_couleur_selection.red = SELECTION_COLOR_RED;
-    default_couleur_selection.green = SELECTION_COLOR_GREEN;
-    default_couleur_selection.blue = SELECTION_COLOR_BLUE;
-
-    /* color of the non selectable transactions on scheduler */
-    default_couleur_grise.red = UNSENSITIVE_SCHEDULED_COLOR_RED;
-    default_couleur_grise.green = UNSENSITIVE_SCHEDULED_COLOR_GREEN;
-    default_couleur_grise.blue = UNSENSITIVE_SCHEDULED_COLOR_BLUE;
-    default_couleur_grise.pixel = 0;
-
-    /* set the archive background color */
-    default_archive_background_color.red = COLOR_ARCHIVE_BG_RED;
-    default_archive_background_color.green = COLOR_ARCHIVE_BG_GREEN;
-    default_archive_background_color.blue = COLOR_ARCHIVE_BG_BLUE;
-    default_archive_background_color.pixel = 0;
-
-    /* color for split children */
-    default_split_background.red = BREAKDOWN_BACKGROUND_COLOR_RED;
-    default_split_background.green = BREAKDOWN_BACKGROUND_COLOR_GREEN;
-    default_split_background.blue = BREAKDOWN_BACKGROUND_COLOR_BLUE;
-    default_split_background.pixel = 0;
-
-    /* color for wrong entry in calendar entry */
-    default_calendar_entry_color.red = CALENDAR_ENTRY_COLOR_RED;
-    default_calendar_entry_color.green = CALENDAR_ENTRY_COLOR_GREEN;
-    default_calendar_entry_color.blue = CALENDAR_ENTRY_COLOR_BLUE;
-    default_calendar_entry_color.pixel = 0;
-
-    /* Initialisation des couleurs des différents labels */
-    /* Pourra être intégré à la configuration générale */
-    couleur_solde_alarme_verte_normal.red =     0.00 * 65535 ;
-    couleur_solde_alarme_verte_normal.green =   0.50 * 65535 ;
-    couleur_solde_alarme_verte_normal.blue =    0.00 * 65535 ;
-    couleur_solde_alarme_verte_normal.pixel = 1;
-
-    couleur_solde_alarme_verte_prelight.red =   0.00 * 65535 ;
-    couleur_solde_alarme_verte_prelight.green = 0.90 * 65535 ;
-    couleur_solde_alarme_verte_prelight.blue =  0.00 * 65535 ;
-    couleur_solde_alarme_verte_prelight.pixel = 1;
-
-
-    couleur_solde_alarme_orange_normal.red =     0.90 * 65535 ;
-    couleur_solde_alarme_orange_normal.green =   0.60 * 65535 ;
-    couleur_solde_alarme_orange_normal.blue =    0.00 * 65535 ;
-    couleur_solde_alarme_orange_normal.pixel = 1;
-
-    couleur_solde_alarme_orange_prelight.red =   1.00 * 65535 ;
-    couleur_solde_alarme_orange_prelight.green = 0.80 * 65535 ;
-    couleur_solde_alarme_orange_prelight.blue =  0.00 * 65535 ;
-    couleur_solde_alarme_orange_prelight.pixel = 1;
-
-
-    couleur_solde_alarme_rouge_normal.red =     0.60 * 65535 ;
-    couleur_solde_alarme_rouge_normal.green =   0.00 * 65535 ;
-    couleur_solde_alarme_rouge_normal.blue =    0.00 * 65535 ;
-    couleur_solde_alarme_rouge_normal.pixel = 1;
-
-    couleur_solde_alarme_rouge_prelight.red =   1.00 * 65535 ;
-    couleur_solde_alarme_rouge_prelight.green = 0.00 * 65535 ;
-    couleur_solde_alarme_rouge_prelight.blue =  0.00 * 65535 ;
-    couleur_solde_alarme_rouge_prelight.pixel = 1;
-
-
-    couleur_nom_compte_normal.red =     0.00 * 65535 ;
-    couleur_nom_compte_normal.green =   0.00 * 65535 ;
-    couleur_nom_compte_normal.blue =    0.00 * 65535 ;
-    couleur_nom_compte_normal.pixel = 1;
-
-    couleur_nom_compte_prelight.red =   0.61 * 65535 ;
-    couleur_nom_compte_prelight.green = 0.61 * 65535 ;
-    couleur_nom_compte_prelight.blue =  0.61 * 65535 ;
-    couleur_nom_compte_prelight.pixel = 1;
-
-    couleur_bleue.red = 500;
-    couleur_bleue.green = 500;
-    couleur_bleue.blue = 65535;
-    couleur_bleue.pixel = 1;
-
-
-    couleur_jaune.red = 50535;
-    couleur_jaune.green = 65535;
-    couleur_jaune.blue = 0;
-    couleur_jaune.pixel = 1;
-
-    /* colors of the background bet divisions */
-    couleur_bet_division.red = 64550;
-    couleur_bet_division.green = 65535;
-    couleur_bet_division.blue = 33466;
-
-    default_couleur_bet_division.red = 64550;
-    default_couleur_bet_division.green = 65535;
-    default_couleur_bet_division.blue = 33466;
-
-    /* colors of the background bet future data */
-    couleur_bet_future.red = 31829;
-    couleur_bet_future.green = 51015;
-    couleur_bet_future.blue = 35908;
-
-    default_couleur_bet_future.red = 31829;
-    default_couleur_bet_future.green = 51015;
-    default_couleur_bet_future.blue =  35908;
-
-    /* colors of the background bet solde data */
-    couleur_bet_solde.red = 2318;
-    couleur_bet_solde.green = 65535;
-    couleur_bet_solde.blue = 60331;
-
-    default_couleur_bet_solde.red = 2318;
-    default_couleur_bet_solde.green = 65535;
-    default_couleur_bet_solde.blue =  60331;
-
-    /* colors of the background bet transfert data */
-    couleur_bet_transfert.red = 31829;
-    couleur_bet_transfert.green = 51015;
-    couleur_bet_transfert.blue = 35908;
-
-    default_couleur_bet_transfert.red = 60035;
-    default_couleur_bet_transfert.green = 37622;
-    default_couleur_bet_transfert.blue =  59956;
-}
-/*****************************************************************************************************/
 
 /*****************************************************************************************************/
 /* si grise = 1 ; grise tous les menus qui doivent l'être quand aucun fichier n'est en mémoire */
diff --git a/src/traitement_variables.h b/src/traitement_variables.h
index 40488ad..5f223c3 100644
--- a/src/traitement_variables.h
+++ b/src/traitement_variables.h
@@ -10,7 +10,6 @@
 /*START_DECLARATION*/
 void free_variables ( void );
 void init_variables ( void );
-void initialisation_couleurs_listes ( void );
 void initialise_largeur_colonnes_tab_affichage_ope ( gint type_operation, const gchar *description );
 void menus_sensitifs ( gboolean sensitif );
 void menus_view_sensitifs ( gboolean sensitif );
diff --git a/src/transaction_list.c b/src/transaction_list.c
index 247c7d7..3e70a78 100644
--- a/src/transaction_list.c
+++ b/src/transaction_list.c
@@ -42,6 +42,7 @@
 #include "affichage_liste.h"
 #include "custom_list.h"
 #include "dialog.h"
+#include "gsb_color.h"
 #include "gsb_data_account.h"
 #include "gsb_data_archive.h"
 #include "gsb_data_archive_store.h"
@@ -68,17 +69,12 @@ static gboolean transaction_list_update_white_child ( CustomRecord *white_record
 /*END_STATIC*/
 
 /*START_EXTERN*/
-extern GdkColor archive_background_color;
-extern GdkColor couleur_fond[2];
-extern GdkColor couleur_jour;
 extern gint display_one_line;
 extern gint display_three_lines;
 extern gint display_two_lines;
 extern gsb_real null_real;
 extern GSList *orphan_child_transactions;
-extern GdkColor split_background;
 extern gint tab_affichage_ope[TRANSACTION_LIST_ROWS_NB][CUSTOM_MODEL_VISIBLE_COLUMNS];
-extern GdkColor text_color[2];
 /*END_EXTERN*/
 
 
@@ -157,7 +153,7 @@ void transaction_list_append_transaction ( gint transaction_number )
 	white_record = g_malloc0 (sizeof (CustomRecord));
 	white_record -> transaction_pointer = gsb_data_transaction_get_pointer_of_transaction (white_line_number);
 	white_record -> what_is_line = IS_TRANSACTION;
-	white_record -> row_bg = &split_background;
+	white_record -> row_bg = gsb_color_get_couleur ( "split_background" );
 
 	/* as we append just now the white line, there are no child split, so the total is 0 */
 	amount_string = gsb_real_get_string_with_currency (null_real,
@@ -244,7 +240,7 @@ void transaction_list_append_transaction ( gint transaction_number )
             newrecord[i] -> has_expander = TRUE;
             white_record -> mother_row = newrecord[i];
             /* set the color of the mother */
-            mother_text_color = &text_color[1];
+            mother_text_color = gsb_color_get_couleur_with_indice ( "text_color", 1 );
             newrecord[i] -> text_color = mother_text_color;
 	    }
 
@@ -351,7 +347,7 @@ void transaction_list_append_archive ( gint archive_store_number )
     newrecord -> transaction_pointer = gsb_data_archive_store_get_structure (
                         archive_store_number);
     newrecord -> what_is_line = IS_ARCHIVE;
-    newrecord -> row_bg = &archive_background_color;
+    newrecord -> row_bg = gsb_color_get_couleur ( "archive_background_color" );
 
     /* save the newrecord pointer */
     custom_list->rows[pos] = newrecord;
@@ -856,7 +852,8 @@ void transaction_list_colorize (void)
             {
                 /* set the color of the mother */
                 for (j=0 ; j<TRANSACTION_LIST_ROWS_NB ; j++)
-                    record -> transaction_records[j] -> text_color = &text_color[0];
+                    record -> transaction_records[j] -> text_color =
+                                                            gsb_color_get_couleur_with_indice ( "text_color", 0 );
             }
 
         }
@@ -868,7 +865,7 @@ void transaction_list_colorize (void)
 	    }
 
 	    /* set the color of the row */
-	    record -> row_bg = &couleur_fond[current_color];
+	    record -> row_bg = gsb_color_get_couleur_with_indice ( "couleur_fond", current_color );
 	}
     }
 }
@@ -1050,7 +1047,7 @@ gboolean transaction_list_update_transaction ( gint transaction_number )
 	white_record -> transaction_pointer = gsb_data_transaction_get_pointer_of_transaction (
                         white_line_number);
 	white_record -> what_is_line = IS_TRANSACTION;
-	white_record -> row_bg = &split_background;
+	white_record -> row_bg = gsb_color_get_couleur ( "split_background" );
 
 	/* as we append just now the white line, there are no child split, so the total is 0 */
 	amount_string = gsb_real_get_string_with_currency (null_real,
@@ -1822,7 +1819,7 @@ static void transaction_list_append_child ( gint transaction_number )
     white_record -> filtered_pos = pos;
 
     /* set the color */
-    newrecord -> row_bg = &split_background;
+    newrecord -> row_bg = gsb_color_get_couleur ( "split_background" );
 
     /* we can now save the new number of children and the new children rows into their mothers */
     for (i=0 ; i < TRANSACTION_LIST_ROWS_NB ; i++)
@@ -1914,7 +1911,7 @@ static CustomRecord *transaction_list_create_record ( gint transaction_number,
     newrecord -> line_in_transaction = line_in_transaction;
     newrecord -> checkbox_visible_reconcile = line_in_transaction == 0 ? 1 : 0;
     newrecord -> checkbox_active = gsb_data_transaction_get_marked_transaction (transaction_number) != 0;
-    newrecord -> text_color = &text_color[0];
+    newrecord -> text_color = gsb_color_get_couleur_with_indice ( "text_color", 0 );
 
     return newrecord;
 }
@@ -1970,12 +1967,12 @@ static gboolean transaction_list_update_white_child ( CustomRecord *white_record
 	white_record -> visible_col[2] = g_strdup_printf ( _("Total : %s (variance : %s)"),
 							   amount_string,
 							   variance_string );
-	mother_text_color = &text_color[1];
+	mother_text_color = gsb_color_get_couleur_with_indice ( "text_color", 1 );
     }
     else
     {
 	white_record -> visible_col[2] = NULL;
-	mother_text_color = &text_color[0];
+	mother_text_color = gsb_color_get_couleur_with_indice ( "text_color", 0 );
     }
 
     /* set the color of the mother */
@@ -2110,7 +2107,7 @@ void transaction_list_set_color_jour ( gint account_number )
                     /* colorize the record */
                     for (j=0 ; j < custom_list -> nb_rows_by_transaction ; j++)
                     {
-                        record -> row_bg = &couleur_jour;
+                        record -> row_bg = gsb_color_get_couleur ( "couleur_jour" );
                         i--;
                         if ( i >= 0 )
                             record = custom_list -> visibles_rows[i];
diff --git a/src/transaction_list_select.c b/src/transaction_list_select.c
index 8979667..af83f85 100644
--- a/src/transaction_list_select.c
+++ b/src/transaction_list_select.c
@@ -35,6 +35,7 @@
 
 /*START_INCLUDE*/
 #include "transaction_list_select.h"
+#include "gsb_color.h"
 #include "gsb_data_account.h"
 #include "gsb_data_transaction.h"
 #include "menu.h"
@@ -48,7 +49,6 @@ static gboolean transaction_list_select_record ( CustomRecord *record );
 /*END_STATIC*/
 
 /*START_EXTERN*/
-extern GdkColor couleur_selection;
 /*END_EXTERN*/
 
 
@@ -506,7 +506,7 @@ static gboolean transaction_list_select_record ( CustomRecord *record )
     for (i=0 ; i < custom_list -> nb_rows_by_transaction ; i++)
     {
 	record -> row_bg_save = record -> row_bg;
-	record -> row_bg = &couleur_selection;
+	record -> row_bg = gsb_color_get_couleur ( "couleur_selection" );
 
 	/* inform the world that the row has changed */
 	iter.user_data = record;
diff --git a/src/utils.c b/src/utils.c
index 28814e6..11456a5 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -31,8 +31,8 @@
 #include <glib/gi18n.h>
 
 /*START_INCLUDE*/
-#include "utils.h"
-#include "dialog.h"
+ #include "dialog.h"
+#include "gsb_color.h"
 #include "gsb_data_account.h"
 #include "gsb_file_config.h"
 #include "structures.h"
@@ -49,8 +49,6 @@
 
 
 /*START_EXTERN*/
-extern GdkColor couleur_selection;
-extern GdkColor text_color[2];
 /*END_EXTERN*/
 
 
@@ -544,11 +542,90 @@ void lance_mailer ( const gchar *uri )
  * */
 void utils_set_tree_view_selection_and_text_color ( GtkWidget *tree_view )
 {
-    gtk_widget_modify_base ( tree_view, GTK_STATE_SELECTED, &couleur_selection );
-    gtk_widget_modify_base ( tree_view, GTK_STATE_ACTIVE, &couleur_selection );
+    gtk_widget_modify_base ( tree_view, GTK_STATE_SELECTED, gsb_color_get_couleur ( "couleur_selection" ) );
+    gtk_widget_modify_base ( tree_view, GTK_STATE_ACTIVE, gsb_color_get_couleur ( "couleur_selection" ) );
 
-    gtk_widget_modify_text ( tree_view, GTK_STATE_SELECTED, &text_color[0] );
-    gtk_widget_modify_text ( tree_view, GTK_STATE_ACTIVE, &text_color[0] );
+    gtk_widget_modify_text ( tree_view, GTK_STATE_SELECTED, gsb_color_get_couleur_with_indice ( "text_color", 0 ) );
+    gtk_widget_modify_text ( tree_view, GTK_STATE_ACTIVE, gsb_color_get_couleur_with_indice ( "text_color", 0 ) );
+}
+
+
+/**
+ * set the background colors of the list
+ *
+ * \param tree_view
+ * \param n° de colonne
+ *
+ * \return FALSE
+ * */
+gboolean utils_set_tree_view_background_color ( GtkWidget *tree_view, gint color_column )
+{
+    GtkTreeModel *model;
+    GtkTreeIter iter;
+
+    if ( !tree_view )
+        return FALSE;
+
+    model = gtk_tree_view_get_model ( GTK_TREE_VIEW ( tree_view ) );
+
+    if ( gtk_tree_model_get_iter_first ( GTK_TREE_MODEL ( model ), &iter ) )
+    {
+        gint current_color = 0;
+        GtkTreeIter fils_iter;
+        GtkTreePath *path;
+
+        do
+        {
+            gtk_tree_store_set ( GTK_TREE_STORE ( model ),
+                        &iter,
+                        color_column, gsb_color_get_couleur_with_indice ( "couleur_fond", current_color ),
+                        -1 );
+
+            current_color = !current_color;
+            path = gtk_tree_model_get_path ( model, &iter );
+
+            if ( gtk_tree_model_iter_children ( GTK_TREE_MODEL ( model ), &fils_iter, &iter )
+             &&
+             gtk_tree_view_row_expanded ( GTK_TREE_VIEW ( tree_view ), path ) )
+            {
+                GtkTreeIter third_iter;
+
+                do
+                {
+                    gtk_tree_store_set ( GTK_TREE_STORE ( model ),
+                                &fils_iter,
+                                color_column, gsb_color_get_couleur_with_indice ( "couleur_fond", current_color ),
+                                -1 );
+
+                    current_color = !current_color;
+                    gtk_tree_path_free ( path );
+                    path = gtk_tree_model_get_path ( model, &fils_iter );
+
+                    if ( gtk_tree_model_iter_children ( GTK_TREE_MODEL ( model ), &third_iter, &fils_iter )
+                     &&
+                     gtk_tree_view_row_expanded ( GTK_TREE_VIEW ( tree_view ), path ) )
+                    {
+                        do
+                        {
+                            gtk_tree_store_set ( GTK_TREE_STORE ( model ),
+                                        &third_iter,
+                                        color_column, gsb_color_get_couleur_with_indice ( "couleur_fond", current_color ),
+                                        -1 );
+
+                            current_color = !current_color;
+                        }
+                        while ( gtk_tree_model_iter_next ( GTK_TREE_MODEL ( model ), &third_iter ) );
+                    }
+                }
+                while ( gtk_tree_model_iter_next ( GTK_TREE_MODEL ( model ), &fils_iter ) );
+            }
+
+            gtk_tree_path_free ( path );
+        }
+        while ( gtk_tree_model_iter_next ( GTK_TREE_MODEL ( model ), &iter ) );
+    }
+
+    return FALSE;
 }
 
 
diff --git a/src/utils.h b/src/utils.h
index f5c1879..954b024 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -9,7 +9,8 @@
 
 /* START_DECLARATION */
 gboolean assert_account_loaded ();
-gboolean desensitive_widget ( gpointer object, GtkWidget *widget );
+gboolean desensitive_widget ( gpointer object,
+                        GtkWidget *widget );
 gchar *get_gtk_run_version ( void );
 void lance_mailer ( const gchar *uri );
 gboolean lance_navigateur_web ( const gchar *url );
@@ -19,16 +20,21 @@ gboolean met_en_normal ( GtkWidget *event_box,
 gboolean met_en_prelight ( GtkWidget *event_box,
                         GdkEventMotion *event,
                         gpointer pointeur );
-GtkWidget *new_paddingbox_with_title (GtkWidget * parent, gboolean fill, const gchar *title);
-GtkWidget *new_vbox_with_title_and_icon ( gchar * title,
-                        gchar * image_filename);
-gboolean radio_set_active_linked_widgets ( GtkWidget * widget );
-void register_button_as_linked ( GtkWidget * widget, GtkWidget * linked );
+GtkWidget *new_paddingbox_with_title (GtkWidget *parent,
+                        gboolean fill,
+                        const gchar *title);
+GtkWidget *new_vbox_with_title_and_icon ( gchar *title,
+                        gchar *image_filename);
+gboolean radio_set_active_linked_widgets ( GtkWidget *widget );
+void register_button_as_linked ( GtkWidget *widget,
+                        GtkWidget *linked );
 gboolean sens_desensitive_pointeur ( GtkWidget *bouton,
                         GtkWidget *widget );
 gboolean sensitive_widget ( gpointer object,
                         GtkWidget *widget );
 void update_gui ( void );
 void utils_set_tree_view_selection_and_text_color ( GtkWidget *tree_view );
+gboolean utils_set_tree_view_background_color ( GtkWidget *tree_view,
+                        gint color_column );
 /* END_DECLARATION */
 #endif


hooks/post-receive
-- 
grisbi


More information about the cvs mailing list