[grisbi-cvs] grisbi/src affichage.c, 1.161, 1.162 affichage_liste.c, 1.108, 1.109 classement_echeances.c, 1.9, 1.10 gsb_data_transaction.c, 1.65, 1.66 gsb_data_transaction.h, 1.29, 1.30 gsb_file_config.c, 1.76, 1.77 gsb_file_load.c, 1.181, 1.182 gsb_file_save.c, 1.131, 1.132 gsb_transactions_list.c, 1.171, 1.172 parametres.c, 1.196, 1.197 structures.h, 1.227, 1.228 traitement_variables.c, 1.173, 1.174 traitement_variables.h, 1.16, 1.17 transaction_list.c, 1.41, 1.42 transaction_list.h, 1.7, 1.8

Pierre Biava pbiava at users.sourceforge.net
Sun Jun 14 21:02:22 CEST 2009


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

Modified Files:
	affichage.c affichage_liste.c classement_echeances.c 
	gsb_data_transaction.c gsb_data_transaction.h 
	gsb_file_config.c gsb_file_load.c gsb_file_save.c 
	gsb_transactions_list.c parametres.c structures.h 
	traitement_variables.c traitement_variables.h 
	transaction_list.c transaction_list.h 
Log Message:
Adding : highlights the transaction that gives the balance today

Index: structures.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/structures.h,v
retrieving revision 1.227
retrieving revision 1.228
diff -u -d -r1.227 -r1.228
--- structures.h	3 Apr 2009 19:42:11 -0000	1.227
+++ structures.h	14 Jun 2009 19:02:20 -0000	1.228
@@ -37,36 +37,37 @@
 /* la partie configurée pendant le fonctionnement de grisbi */
 struct {
     time_t modification_fichier;
-    gint is_archive;		/** TRUE if the file is an archive, FALSE else */
+    gint is_archive;                /** TRUE if the file is an archive, FALSE else */
     gint equilibrage;
     gint r_modifiable;
 
     /* files and backup part */
     gint dernier_fichier_auto;
-    gint sauvegarde_auto;             /* utilisé pour enregistrer le fichier automatiquementà la fermeture */
-    gint sauvegarde_demarrage;        /* utilisé pour enregistrer le fichier s'il s'est bien ouvert */
-    gint make_backup;			/* TRUE for create a backup when save file */
-    gint make_backup_every_minutes;	/* TRUE to make backup every x mn */
-    gint make_backup_nb_minutes;	/* the number of minutes we want to make a backup */
+    gint sauvegarde_auto;           /* utilisé pour enregistrer le fichier automatiquementà la fermeture */
+    gint sauvegarde_demarrage;      /* utilisé pour enregistrer le fichier s'il s'est bien ouvert */
+    gint make_backup;               /* TRUE for create a backup when save file */
+    gint make_backup_every_minutes; /* TRUE to make backup every x mn */
+    gint make_backup_nb_minutes;    /* the number of minutes we want to make a backup */
 
-    gboolean debug_mode;		/* TRUE in debug mode, FALSE for normale mode */
-    gint entree;   			 /* si etat.entree = 1, la touche entrée finit l'opération */ 
+    gboolean debug_mode;            /* TRUE in debug mode, FALSE for normale mode */
+    gint entree;                    /* si etat.entree = 1, la touche entrée finit l'opération */ 
     gint alerte_mini;
     gint formulaire_toujours_affiche;
-    gint alerte_permission;   /* à un si le message d'alerte s'affiche */
-    gint fichier_deja_ouvert;   /* à un si lors de l'ouverture, le fichier semblait déjà ouvert */
-    gint force_enregistrement;    /* à un si on force l'enregistrement */
-    gint show_transaction_selected_in_form;	/* TRUE will show the selected transaction in the form */
-    gint affichage_exercice_automatique;	/* automatic fyear :0 to set according to the date, 2 according to value date */
+    gint alerte_permission;                 /* à un si le message d'alerte s'affiche */
+    gint fichier_deja_ouvert;               /* à un si lors de l'ouverture, le fichier semblait déjà ouvert */
+    gint force_enregistrement;              /* à un si on force l'enregistrement */
+    gint show_transaction_selected_in_form; /* TRUE will show the selected transaction in the form */
+    gint show_transaction_gives_balance;    /* TRUE si on visualise l'opération qui donne le solde du jour */
+    gint affichage_exercice_automatique;    /* automatic fyear :0 to set according to the date, 2 according to value date */
     gboolean limit_completion_to_current_account;   /** Limit payee *
-						     completion to
-						     current account,
-						     or do a full
-						     search. */
-    gint crypt_file;   /* TRUE if we want to crypt the file */
-    gint compress_file;  /* TRUE if we want to compress the grisbi file */
-    gint compress_backup;  /* TRUE if we want to compress the backup */
-    gint full_screen;		/* 1 to full screen, 0 else */
+                            completion to
+                            current account,
+                            or do a full
+                            search. */
+    gint crypt_file;        /* TRUE if we want to crypt the file */
+    gint compress_file;     /* TRUE if we want to compress the grisbi file */
+    gint compress_backup;   /* TRUE if we want to compress the backup */
+    gint full_screen;       /* 1 to full screen, 0 else */
 
     /* archive stuff */
     gint check_for_archival; /* TRUE if we want to check the number of non archived transactions at the opening */
@@ -79,14 +80,14 @@
     gint en_train_de_sauvegarder;
     gint en_train_de_charger;
     gint utilise_logo;
-    gint display_grisbi_title;   /* selection du titre principal de grisbi */
+    gint display_grisbi_title;      /* selection du titre principal de grisbi */
 
-    gint utilise_fonte_listes;		/* TRUE to use a custom font for the lists */
-    gchar *font_string;			/* contain the description of the font, or NULL */
+    gint utilise_fonte_listes;      /* TRUE to use a custom font for the lists */
+    gchar *font_string;             /* contain the description of the font, or NULL */
     
-    gint display_toolbar;	/** Display mode of toolbar. */
-    gboolean show_toolbar;		/** Show toolbar or not.  */
-    gboolean show_headings_bar;	/** Show headings bar or not. */
+    gint display_toolbar;           /** Display mode of toolbar. */
+    gboolean show_toolbar;          /** Show toolbar or not.  */
+    gboolean show_headings_bar;     /** Show headings bar or not. */
     gboolean show_closed_accounts;
 
     gboolean automatic_separator; /* TRUE if do automatic separator */
@@ -99,18 +100,18 @@
     gint display_message_ofx_security;
 
     /* import rules */
-    gint get_extract_number_for_check; /* TRUE if Extracting a number and save it in the field No Cheque/Virement */
+    gint get_extract_number_for_check;          /* TRUE if Extracting a number and save it in the field No Cheque/Virement */
     gint get_fusion_import_planed_transactions; /* TRUE if merge transactions imported with planned transactions */
-    gint get_categorie_for_payee;   /* TRUE to automatically retrieve the category of the payee if it exists */
-    gint get_fyear_by_value_date;	/* TRUE to get the fyear by value date, FALSE by date */
+    gint get_categorie_for_payee;               /* TRUE to automatically retrieve the category of the payee if it exists */
+    gint get_fyear_by_value_date;               /* TRUE to get the fyear by value date, FALSE by date */
 
     /* combofix configuration */
-    gint combofix_mixed_sort;  /* TRUE for no separation between the categories */
-    gint combofix_max_item;    /* maximum number of items we want before showing the popup */
-    gint combofix_case_sensitive;  /* TRUE if case sensitive */
-    gint combofix_enter_select_completion; /* TRUE if enter close the popup and keep what is in the entry (else, select the current item in the list) */
-    gint combofix_force_payee;   /* TRUE if no new item can be appended in the payee combofix */
-    gint combofix_force_category;   /* TRUE if no new item can be appended in the category and budget combofix */
+    gint combofix_mixed_sort;                /* TRUE for no separation between the categories */
+    gint combofix_max_item;                 /* maximum number of items we want before showing the popup */
+    gint combofix_case_sensitive;           /* TRUE if case sensitive */
+    gint combofix_enter_select_completion;  /* TRUE if enter close the popup and keep what is in the entry (else, select the current item in the list) */
+    gint combofix_force_payee;              /* TRUE if no new item can be appended in the payee combofix */
+    gint combofix_force_category;           /* TRUE if no new item can be appended in the category and budget combofix */
     
     /* Various commands */
     gchar * browser_command;
@@ -127,19 +128,18 @@
     gint largeur_colonne_etat;
 
     /* variables sur l'échéancier */
-    gint affichage_commentaire_echeancier;     /* à 1 si le commentaire est affiché */
+    gint affichage_commentaire_echeancier;      /* à 1 si le commentaire est affiché */
 
     /* Tips */
     gint last_tip; 
     gint show_tip; 
 
-    gchar * csv_separator;	/** CSV separator to use while parsing
-				 * a CSV file. */
+    gchar * csv_separator;          /** CSV separator to use while parsing a CSV file. */
     gboolean csv_skipped_lines [ CSV_MAX_TOP_LINES ]; /** Contains a
-						       * pointer to
-						       * skipped lines
-						       * in CSV
-						       * preview. */
+                            * pointer to
+                            * skipped lines
+                            * in CSV
+                            * preview. */
 } etat;
 
 

Index: gsb_data_transaction.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_transaction.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- gsb_data_transaction.c	11 Jun 2009 21:13:31 -0000	1.65
+++ gsb_data_transaction.c	14 Jun 2009 19:02:20 -0000	1.66
@@ -98,10 +98,13 @@
 
 
 /*START_STATIC*/
-static void gsb_data_transaction_delete_all_transactions ();
+static gint classement_sliste_transaction_par_date ( struct_transaction *transaction_1,
+                        struct_transaction *transaction_2 );
+static void gsb_data_transaction_delete_all_transactions ( void );
 static  void gsb_data_transaction_free ( struct_transaction *transaction);
-static gint gsb_data_transaction_get_last_white_number (void);
-static struct_transaction *gsb_data_transaction_get_transaction_by_no ( gint transaction_number );
+static gint gsb_data_transaction_get_last_white_number ( void );
+static struct_transaction *gsb_data_transaction_get_transaction_by_no (
+                        gint transaction_number );
 static gboolean gsb_data_transaction_save_transaction_pointer ( gpointer transaction );
 /*END_STATIC*/
 
@@ -503,7 +506,7 @@
     transaction = gsb_data_transaction_get_transaction_by_no ( transaction_number);
 
     if ( !transaction )
-	return NULL;
+    return NULL;
 
     return transaction -> date;
 }
@@ -2300,7 +2303,7 @@
 /**
  * Delete all transactions and free memory used by them
  */
-void gsb_data_transaction_delete_all_transactions ()
+void gsb_data_transaction_delete_all_transactions ( void )
 {
     if ( complete_transactions_list )
     {
@@ -2542,3 +2545,63 @@
 
 
 
+/**
+ * retourne la dernière opération à ou immédiatement avant la date du jour
+ *
+ * \param 
+ *
+ * \return transaction_number;
+ * */
+gint gsb_data_transaction_get_last_transaction_before_today_day ( gint no_account )
+{
+    gint transaction_number = 0;
+    gint res;
+    GDate *date_jour = g_date_new ( );
+    GSList *tmp_list;
+    struct_transaction *transaction;
+
+    g_date_set_time_t (date_jour, time (NULL));
+
+    tmp_list = g_slist_sort ( transactions_list,
+                    ( GCompareFunc ) classement_sliste_transaction_par_date ) ;
+    while (tmp_list)
+    {
+        transaction = tmp_list -> data;
+
+        if ( transaction -> account_number == no_account )
+        {
+            res = g_date_compare ( transaction -> date, date_jour );
+            if ( res == 0 )
+                return transaction -> transaction_number;
+            else if ( res == 1 )
+                return transaction_number;
+            else
+                transaction_number = transaction -> transaction_number;
+        }
+        tmp_list = tmp_list -> next;
+    }
+    
+    return transaction_number;
+}
+
+/**
+ * Fonction de comparaison de deux opérations par date puis par numéro
+ *
+ * */
+gint classement_sliste_transaction_par_date ( struct_transaction *transaction_1,
+                        struct_transaction *transaction_2 )
+{
+    gint transaction_number_1;
+    gint transaction_number_2;
+    gint res;
+
+    transaction_number_1 = transaction_1 -> transaction_number;
+    transaction_number_2 = transaction_2 -> transaction_number;
+
+    res = g_date_compare ( gsb_data_transaction_get_date ( transaction_number_1 ),
+                        gsb_data_transaction_get_date ( transaction_number_2 ) );
+    if ( res == 0 )
+        return ( transaction_number_1 < transaction_number_2 ? -1: 1 );
+    else
+        return res;
+}

Index: traitement_variables.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/traitement_variables.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- traitement_variables.h	18 Oct 2008 09:49:52 -0000	1.16
+++ traitement_variables.h	14 Jun 2009 19:02:20 -0000	1.17
@@ -2,52 +2,57 @@
 #define _TRAITEMENT_VARIABLES_H (1)
 
 /* background color */
-#define BG_COLOR_1_RED		55000
-#define BG_COLOR_1_GREEN  	55000
-#define BG_COLOR_1_BLUE  	65535
+#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
+#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      0
+#define BG_COLOR_TODAY_GREEN    65535
+#define BG_COLOR_TODAY_BLUE     15000
 
 /* text color */
-#define TEXT_COLOR_1_RED	0
-#define TEXT_COLOR_1_GREEN	0
-#define TEXT_COLOR_1_BLUE	0
+#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
+#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
+#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
+#define UNSENSITIVE_SCHEDULED_COLOR_RED     50000
+#define UNSENSITIVE_SCHEDULED_COLOR_GREEN   50000
+#define UNSENSITIVE_SCHEDULED_COLOR_BLUE    50000
 
 /* empty entry in form color */
-#define EMPTY_ENTRY_COLOR_RED	50000
-#define EMPTY_ENTRY_COLOR_GREEN	50000
-#define EMPTY_ENTRY_COLOR_BLUE	50000
+#define EMPTY_ENTRY_COLOR_RED   50000
+#define EMPTY_ENTRY_COLOR_GREEN 50000
+#define EMPTY_ENTRY_COLOR_BLUE  50000
 
 /* archive background color */
-#define COLOR_ARCHIVE_BG_RED	15000
-#define COLOR_ARCHIVE_BG_GREEN	30000
-#define COLOR_ARCHIVE_BG_BLUE	10000
+#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
+#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
+#define CALENDAR_ENTRY_COLOR_RED    65535
+#define CALENDAR_ENTRY_COLOR_GREEN  0
+#define CALENDAR_ENTRY_COLOR_BLUE   0
 
 
 /* START_INCLUDE_H */

Index: parametres.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/parametres.c,v
retrieving revision 1.196
retrieving revision 1.197
diff -u -d -r1.196 -r1.197
--- parametres.c	24 May 2009 07:44:40 -0000	1.196
+++ parametres.c	14 Jun 2009 19:02:20 -0000	1.197
@@ -120,10 +120,6 @@
                         GTK_POLICY_NEVER,
                         GTK_POLICY_AUTOMATIC );
     tree_view = gtk_tree_view_new();
-    //~ g_signal_connect ( G_OBJECT ( tree_view ),
-                        //~ "destroy",
-                        //~ G_CALLBACK ( gtk_widget_destroyed ),
-                        //~ &tree_view );
     gtk_tree_view_set_model ( GTK_TREE_VIEW (tree_view),
                         GTK_TREE_MODEL ( preference_tree_model ) );
     g_object_unref ( G_OBJECT(preference_tree_model) );
@@ -240,23 +236,12 @@
     /* Create List & Tree for topics */
     tree = create_preferences_tree();
     hpaned = gtk_hpaned_new();
-    //~ g_signal_connect ( G_OBJECT (hpaned ),
-                        //~ "destroy",
-                        //~ G_CALLBACK (gtk_widget_destroyed),
-                        //~ &hpaned );
     gtk_paned_add1 ( GTK_PANED(hpaned), tree );
     hbox = gtk_hbox_new ( FALSE, 0 );
     gtk_paned_add2 ( GTK_PANED (hpaned), hbox );
 
-    //~ gtk_box_pack_start ( GTK_BOX ( hbox ), gtk_label_new ( "  " ),
-                        //~ FALSE, FALSE, 0 ); /* FIXME: ugly! */
-
     /* Frame for preferences */
     preference_frame = GTK_NOTEBOOK ( gtk_notebook_new () );
-    //~ g_signal_connect ( G_OBJECT (preference_frame ), 
-                        //~ "destroy",
-                        //~ G_CALLBACK ( gtk_widget_destroyed),
-                        //~ &preference_frame );
     gtk_notebook_set_show_border ( preference_frame, FALSE );
     gtk_notebook_set_show_tabs  ( preference_frame, FALSE );
     gtk_notebook_set_scrollable ( preference_frame, TRUE );
@@ -679,45 +664,25 @@
     /* Automatically load last file on startup? */
     button = gsb_automem_checkbutton_new (_("Automatically load last file on startup"),
                         &(etat.dernier_fichier_auto), NULL, NULL );
-    //~ g_signal_connect ( G_OBJECT ( button ), 
-                        //~ "destroy",
-                        //~ G_CALLBACK ( gtk_widget_destroyed ),
-                        //~ &button );
     gtk_box_pack_start ( GTK_BOX ( paddingbox ), button, FALSE, FALSE, 0 );
 
     button = gsb_automem_checkbutton_new (_("Automatically save on exit"),
                         &(etat.sauvegarde_auto), NULL, NULL);
-    //~ g_signal_connect ( G_OBJECT ( button ), 
-                        //~ "destroy",
-                        //~ G_CALLBACK ( gtk_widget_destroyed ),
-                        //~ &button );
     gtk_box_pack_start ( GTK_BOX ( paddingbox ), button, FALSE, FALSE, 0 );
 
     /* Warn if file is used by someone else? */
     button = gsb_automem_checkbutton_new ( _("Force saving of locked files"),
                         &(etat.force_enregistrement), NULL, NULL );
-    //~ g_signal_connect ( G_OBJECT ( button ), 
-                        //~ "destroy",
-                        //~ G_CALLBACK ( gtk_widget_destroyed ),
-                        //~ &button );
     gtk_box_pack_start ( GTK_BOX ( paddingbox ), button, FALSE, FALSE, 0 );
 
     /* crypt the grisbi file */
     button = gsb_automem_checkbutton_new ( _("Encrypt Grisbi file"),
                         &(etat.crypt_file), G_CALLBACK (gsb_gui_encryption_toggled), NULL);
-    //~ g_signal_connect ( G_OBJECT ( button ), 
-                        //~ "destroy",
-                        //~ G_CALLBACK ( gtk_widget_destroyed ),
-                        //~ &button );
     gtk_box_pack_start ( GTK_BOX ( paddingbox ), button, FALSE, FALSE, 0 );
 
     /* Compression level of files */
     button = gsb_automem_checkbutton_new ( _("Compress Grisbi file"),
                         &(etat.compress_file), NULL, NULL );
-    //~ g_signal_connect ( G_OBJECT ( button ),
-                        //~ "destroy",
-                        //~ G_CALLBACK ( gtk_widget_destroyed ),
-                        //~ &button );
     gtk_box_pack_start ( GTK_BOX ( paddingbox ), button, FALSE, FALSE, 0 );
 
     /* Memorize last opened files in menu */
@@ -729,10 +694,6 @@
 
     button = gsb_automem_spin_button_new ( &(nb_max_derniers_fichiers_ouverts),
                         G_CALLBACK ( affiche_derniers_fichiers_ouverts ), NULL );
-    //~ g_signal_connect ( G_OBJECT ( button ),
-                        //~ "destroy",
-                        //~ G_CALLBACK ( gtk_widget_destroyed ),
-                        //~ &button );
     gtk_box_pack_start ( GTK_BOX ( hbox ), button, FALSE, FALSE, 0 );
 
     /* Backups */
@@ -741,28 +702,16 @@
     /* Compression level of backups */
     button = gsb_automem_checkbutton_new ( _("Compress Grisbi backup"),
                         &(etat.compress_backup), NULL, NULL );
-    //~ g_signal_connect ( G_OBJECT ( button ), 
-                        //~ "destroy",
-                        //~ G_CALLBACK ( gtk_widget_destroyed ),
-                        //~ &button );
     gtk_box_pack_start ( GTK_BOX ( paddingbox ), button, FALSE, FALSE, 0 );
 
     /* Backup at each opening? */
     button = gsb_automem_checkbutton_new ( _("Make a backup copy after opening files"),
                         &(etat.sauvegarde_demarrage), NULL, NULL);
-    //~ g_signal_connect ( G_OBJECT ( button ), 
-                        //~ "destroy",
-                        //~ G_CALLBACK ( gtk_widget_destroyed ),
-                        //~ &button );
     gtk_box_pack_start ( GTK_BOX ( paddingbox ), button, FALSE, FALSE, 0 );
 
     /* Automatic backup ? */
     button = gsb_automem_checkbutton_new (_("Make a backup copy before saving files"),
                         &etat.make_backup, NULL, NULL);
-    //~ g_signal_connect ( G_OBJECT ( button ),
-                        //~ "destroy",
-                        //~ G_CALLBACK ( gtk_widget_destroyed ),
-                        //~ &button );
     gtk_box_pack_start ( GTK_BOX ( paddingbox ), button, FALSE, FALSE, 0 );
 
     /* Automatic backup every x minutes */
@@ -772,10 +721,6 @@
     button = gsb_automem_checkbutton_new (_("Make a backup copy every "),
                         &etat.make_backup_every_minutes,
                         G_CALLBACK (gsb_file_automatic_backup_start), NULL);
-    //~ g_signal_connect ( G_OBJECT ( button ),
-                        //~ "destroy",
-                        //~ G_CALLBACK ( gtk_widget_destroyed ),
-                        //~ &button );
     gtk_box_pack_start ( GTK_BOX (hbox), button, FALSE, FALSE, 0 );
 
     button = gsb_automem_spin_button_new ( &etat.make_backup_nb_minutes,
@@ -966,11 +911,6 @@
                         _("Warn/Execute the scheduled transactions of the month"),
                         &execute_scheduled_of_month,
                         NULL, NULL );
-    /* commenté provisoirement pour supprimer un plantage sous windows */
-    //~ g_signal_connect ( G_OBJECT (button),
-                        //~ "destroy",
-                        //~ G_CALLBACK ( gtk_widget_destroyed),
-                        //~ &button );
 
     hbox = gtk_hbox_new ( FALSE, 0);
     gtk_box_pack_start ( GTK_BOX (vbox_pref), hbox, FALSE, FALSE, 0);
@@ -980,10 +920,6 @@
     gtk_box_pack_start ( GTK_BOX (hbox), label, FALSE, FALSE, 0 );
 
     entry = gsb_automem_spin_button_new ( &nb_days_before_scheduled, NULL, NULL );
-    //~ g_signal_connect ( G_OBJECT (entry),
-                        //~ "destroy",
-                        //~ G_CALLBACK ( gtk_widget_destroyed),
-                        //~ &entry );
     gtk_box_pack_start ( GTK_BOX (hbox), entry, FALSE, FALSE, 0 );
 
     return vbox_pref;

Index: traitement_variables.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/traitement_variables.c,v
retrieving revision 1.173
retrieving revision 1.174
diff -u -d -r1.173 -r1.174
--- traitement_variables.c	10 May 2009 13:06:56 -0000	1.173
+++ traitement_variables.c	14 Jun 2009 19:02:20 -0000	1.174
@@ -1,8 +1,8 @@
 /* ************************************************************************** */
 /*                                                                            */
-/*     Copyright (C)	2000-2008 Cédric Auger (cedric at grisbi.org)	    	  */
-/*			2003-2008 Benjamin Drieu (bdrieu at april.org)	    				  */
-/* 			http://www.grisbi.org				    						  */
+/*     Copyright (C)    2000-2008 Cédric Auger (cedric at grisbi.org)            */
+/*          2003-2008 Benjamin Drieu (bdrieu at april.org)                       */
+/*          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      */
@@ -95,6 +95,7 @@
 
 /** 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;
@@ -104,6 +105,7 @@
 
 /** colors in the transactions list */
 GdkColor couleur_fond[2];
+GdkColor couleur_jour;
 GdkColor couleur_grise;
 GdkColor archive_background_color;
 GdkColor couleur_selection;
@@ -185,11 +187,11 @@
 
     if ( modif )
     {
-	if ( ! etat.modification_fichier )
-	{
-	    etat.modification_fichier = time ( NULL );
-	    gsb_gui_sensitive_menu_item ( "FileMenu", "Save", NULL, TRUE );
-	}
+    if ( ! etat.modification_fichier )
+    {
+        etat.modification_fichier = time ( NULL );
+        gsb_gui_sensitive_menu_item ( "FileMenu", "Save", NULL, TRUE );
+    }
     }
     else
     {
@@ -297,13 +299,14 @@
     /* 	on initialise la liste des labels des titres de colonnes */
     if ( !liste_labels_titres_colonnes_liste_ope )
     {
-	i=0;
-	while ( labels_titres_colonnes_liste_ope[i] )
-	{
-	    liste_labels_titres_colonnes_liste_ope = g_slist_append ( liste_labels_titres_colonnes_liste_ope,
-								      labels_titres_colonnes_liste_ope[i] );
-	    i++;
-	}
+    i=0;
+    while ( labels_titres_colonnes_liste_ope[i] )
+    {
+        liste_labels_titres_colonnes_liste_ope = g_slist_append (
+                                    liste_labels_titres_colonnes_liste_ope,
+                                    labels_titres_colonnes_liste_ope[i] );
+        i++;
+    }
     }
 
     /* init default combofix values */
@@ -320,9 +323,9 @@
 
     /* defaut value for width of columns */
     for ( i = 0 ; i < CUSTOM_MODEL_VISIBLE_COLUMNS ; i++ )
-	transaction_col_width[i] = transaction_col_width_init[i];
+    transaction_col_width[i] = transaction_col_width_init[i];
      for ( i = 0 ; i < SCHEDULER_COL_VISIBLE_COLUMNS ; i++ )
-	scheduler_col_width[i] = scheduler_col_width_init[i];
+    scheduler_col_width[i] = scheduler_col_width_init[i];
     
 
     navigation_tree_view = NULL;
@@ -334,6 +337,7 @@
     /* 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;
@@ -345,8 +349,8 @@
     /* remove the timeout if necessary */
     if (id_timeout)
     {
-	g_source_remove (id_timeout);
-	id_timeout = 0;
+    g_source_remove (id_timeout);
+    id_timeout = 0;
     }
 
 }
@@ -375,6 +379,11 @@
     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;
@@ -479,33 +488,33 @@
 void menus_sensitifs ( gboolean sensitif )
 {
     gchar * items[] = {
-	menu_name ( "FileMenu",		"Save",			NULL ),
-	menu_name ( "FileMenu",		"SaveAs",		NULL ),
-	menu_name ( "FileMenu",		"DebugFile",		NULL ),
-	menu_name ( "FileMenu",		"Obfuscate",		NULL ),
-	menu_name ( "FileMenu",		"DebugMode",		NULL ),
-	menu_name ( "FileMenu",		"ExportFile",		NULL ),
-	menu_name ( "FileMenu",		"CreateArchive",	NULL ),
-	menu_name ( "FileMenu",		"ExportArchive",	NULL ),
-	menu_name ( "FileMenu",		"Close",		NULL ),
-	menu_name ( "EditMenu",		"NewTransaction",	NULL ),
-	menu_name ( "EditMenu",		"RemoveTransaction",	NULL ),
-	menu_name ( "EditMenu",		"CloneTransaction",	NULL ),
-	menu_name ( "EditMenu",		"EditTransaction",	NULL ),
-	menu_name ( "EditMenu",		"ConvertToScheduled",	NULL ),
-	menu_name ( "EditMenu",		"MoveToAnotherAccount",	NULL ),
-	menu_name ( "EditMenu",		"Preferences",		NULL ),
-	menu_name ( "EditMenu",		"RemoveAccount",	NULL ),
-	menu_name ( "EditMenu",		"NewAccount",		NULL ),
-	menu_name ( "ViewMenu",		"ShowTransactionForm",	NULL ),
-	menu_name ( "ViewMenu",		"ShowGrid",		NULL ),
-	menu_name ( "ViewMenu",		"ShowReconciled",	NULL ),
-	menu_name ( "ViewMenu",		"ShowClosed",		NULL ),
-	menu_name ( "ViewMenu",		"ShowOneLine",		NULL ),
-	menu_name ( "ViewMenu",		"ShowTwoLines",		NULL ),
-	menu_name ( "ViewMenu",		"ShowThreeLines",	NULL ),
-	menu_name ( "ViewMenu",		"ShowFourLines",	NULL ),
-	NULL,
+    menu_name ( "FileMenu",     "Save",                 NULL ),
+    menu_name ( "FileMenu",     "SaveAs",               NULL ),
+    menu_name ( "FileMenu",     "DebugFile",            NULL ),
+    menu_name ( "FileMenu",     "Obfuscate",            NULL ),
+    menu_name ( "FileMenu",     "DebugMode",            NULL ),
+    menu_name ( "FileMenu",     "ExportFile",           NULL ),
+    menu_name ( "FileMenu",     "CreateArchive",        NULL ),
+    menu_name ( "FileMenu",     "ExportArchive",        NULL ),
+    menu_name ( "FileMenu",     "Close",                NULL ),
+    menu_name ( "EditMenu",     "NewTransaction",       NULL ),
+    menu_name ( "EditMenu",     "RemoveTransaction",    NULL ),
+    menu_name ( "EditMenu",     "CloneTransaction",     NULL ),
+    menu_name ( "EditMenu",     "EditTransaction",      NULL ),
+    menu_name ( "EditMenu",     "ConvertToScheduled",   NULL ),
+    menu_name ( "EditMenu",     "MoveToAnotherAccount", NULL ),
+    menu_name ( "EditMenu",     "Preferences",          NULL ),
+    menu_name ( "EditMenu",     "RemoveAccount",        NULL ),
+    menu_name ( "EditMenu",     "NewAccount",           NULL ),
+    menu_name ( "ViewMenu",     "ShowTransactionForm",  NULL ),
+    menu_name ( "ViewMenu",     "ShowGrid",             NULL ),
+    menu_name ( "ViewMenu",     "ShowReconciled",       NULL ),
+    menu_name ( "ViewMenu",     "ShowClosed",           NULL ),
+    menu_name ( "ViewMenu",     "ShowOneLine",          NULL ),
+    menu_name ( "ViewMenu",     "ShowTwoLines",         NULL ),
+    menu_name ( "ViewMenu",     "ShowThreeLines",       NULL ),
+    menu_name ( "ViewMenu",     "ShowFourLines",        NULL ),
+    NULL,
     };
     gchar ** tmp = items;
 
@@ -513,8 +522,8 @@
 
     while ( *tmp )
     {
-	gsb_gui_sensitive_menu_item_from_string ( *tmp, sensitif );
-	tmp++;
+    gsb_gui_sensitive_menu_item_from_string ( *tmp, sensitif );
+    tmp++;
     }
 
     /* As this function may only be called when a new account is
@@ -532,27 +541,24 @@
 void initialise_tab_affichage_ope ( void )
 {
     gint tab[TRANSACTION_LIST_ROWS_NB][CUSTOM_MODEL_VISIBLE_COLUMNS] = {
-	{ ELEMENT_CHQ, ELEMENT_DATE, ELEMENT_PARTY, ELEMENT_MARK, ELEMENT_DEBIT, ELEMENT_CREDIT, ELEMENT_BALANCE },
-	{0, 0, ELEMENT_CATEGORY, 0, ELEMENT_TYPE, ELEMENT_AMOUNT, 0 },
-	{0, 0, ELEMENT_NOTES, 0, 0, 0, 0 },
-	{0, 0, 0, 0, 0, 0, 0 }
+    { ELEMENT_CHQ, ELEMENT_DATE, ELEMENT_PARTY, ELEMENT_MARK, ELEMENT_DEBIT, ELEMENT_CREDIT, ELEMENT_BALANCE },
+    {0, 0, ELEMENT_CATEGORY, 0, ELEMENT_TYPE, ELEMENT_AMOUNT, 0 },
+    {0, 0, ELEMENT_NOTES, 0, 0, 0, 0 },
+    {0, 0, 0, 0, 0, 0, 0 }
     };
     gint i, j;
 
     devel_debug (NULL);
 
     for ( i = 0 ; i<TRANSACTION_LIST_ROWS_NB ; i++ )
-	for ( j = 0 ; j<CUSTOM_MODEL_VISIBLE_COLUMNS ; j++ )
-	    tab_affichage_ope[i][j] = tab[i][j];
+    for ( j = 0 ; j<CUSTOM_MODEL_VISIBLE_COLUMNS ; j++ )
+        tab_affichage_ope[i][j] = tab[i][j];
 
     /* by default, the display of lines is 1, 1-2, 1-2-4 */
     display_one_line = 0;
     display_two_lines = 0;
     display_three_lines = 1;
 }
-
-
-  
 /* Local Variables: */
 /* c-basic-offset: 4 */
 /* End: */

Index: gsb_transactions_list.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_transactions_list.c,v
retrieving revision 1.171
retrieving revision 1.172
diff -u -d -r1.171 -r1.172
--- gsb_transactions_list.c	14 Jun 2009 07:13:58 -0000	1.171
+++ gsb_transactions_list.c	14 Jun 2009 19:02:20 -0000	1.172
@@ -219,20 +219,22 @@
 void gsb_transactions_list_update_tree_view ( gint account_number,
                         gboolean keep_selected_transaction )
 {
-    gint selected_transaction;
+    gint selected_transaction = 0;
 
     /* called sometimes with gsb_gui_navigation_get_current_account, so check we are on an account */
-    if (account_number == -1)
-	return;
+    if ( account_number == -1 )
+        return;
 
-    if (keep_selected_transaction)
-        selected_transaction = transaction_list_select_get ();
-    transaction_list_filter (account_number);
+    if ( keep_selected_transaction )
+        selected_transaction = transaction_list_select_get ( );
+    transaction_list_filter ( account_number );
     transaction_list_sort ();
     transaction_list_colorize ();
-    transaction_list_set_balances ();
-    if (keep_selected_transaction)
-        transaction_list_select (selected_transaction);
+    if ( etat.show_transaction_gives_balance )
+        transaction_list_set_color_jour ( account_number );
+    transaction_list_set_balances ( );
+    if ( keep_selected_transaction )
+        transaction_list_select ( selected_transaction );
 }
 
 
@@ -617,26 +619,17 @@
      * else it's because we execute a scheduled transaction and all
      * of that stuff will be done when we will show the account */
     if (update_tree_view
-	&&
-	gsb_gui_navigation_get_current_account () == account_number
-	&&
-	!gsb_data_transaction_get_mother_transaction_number (transaction_number))
+     &&
+     gsb_gui_navigation_get_current_account () == account_number
+     &&
+     !gsb_data_transaction_get_mother_transaction_number (transaction_number))
     {
-	gint selected_transaction;
-
-	/* we cannot use update_tree_view here because re-filter the model will close
-	 * all the opened splits */
-	selected_transaction = transaction_list_select_get ();
-	transaction_list_sort ();
-	transaction_list_colorize ();
-	transaction_list_set_balances ();
-	transaction_list_select (selected_transaction);
-
-    gsb_data_account_colorize_current_balance ( account_number );
+        gsb_transactions_list_update_tree_view ( account_number, TRUE );
+        gsb_data_account_colorize_current_balance ( account_number );
 
-	/* if it's a mother, open the expander */
-	if (gsb_data_transaction_get_split_of_transaction (transaction_number))
-	    gsb_transactions_list_switch_expander (transaction_number);
+        /* if it's a mother, open the expander */
+        if (gsb_data_transaction_get_split_of_transaction (transaction_number))
+            gsb_transactions_list_switch_expander (transaction_number);
     }
 
     /* on réaffichera l'accueil */
@@ -1223,68 +1216,73 @@
 
     switch ( ev -> keyval )
     {
-	case GDK_Return :		/* entrée */
-	case GDK_KP_Enter :
-	case GDK_Tab :
+    case GDK_Return :   /* entrée */
+    case GDK_KP_Enter :
+    case GDK_Tab :
 
-	    gsb_transactions_list_edit_transaction (gsb_data_account_get_current_transaction_number (account_number));
-	    break;
+        gsb_transactions_list_edit_transaction (
+                        gsb_data_account_get_current_transaction_number ( account_number ) );
+        break;
 
-	case GDK_Up :		/* touches flèche haut */
-	case GDK_KP_Up :
+    case GDK_Up :       /* touches flèche haut */
+    case GDK_KP_Up :
 
-	    transaction_list_select_up (TRUE);
-	    break;
+        transaction_list_select_up (TRUE);
+        break;
 
-	case GDK_Down :		/* touches flèche bas */
-	case GDK_KP_Down :
+    case GDK_Down :     /* touches flèche bas */
+    case GDK_KP_Down :
 
-	    transaction_list_select_down (TRUE);
-	    break;
+        transaction_list_select_down (TRUE);
+        break;
 
-	case GDK_Delete:		/*  del  */
-	    gsb_transactions_list_delete_transaction (gsb_data_account_get_current_transaction_number (account_number), TRUE);
-	    break;
+    case GDK_Delete:    /*  del  */
+        gsb_transactions_list_delete_transaction (
+                        gsb_data_account_get_current_transaction_number ( account_number ),
+                        TRUE );
+        break;
 
-	case GDK_P:			/* touche P */
-	case GDK_p:			/* touche p */
+    case GDK_P:         /* touche P */
+    case GDK_p:         /* touche p */
 
-	    if ( ( ev -> state & GDK_CONTROL_MASK ) == GDK_CONTROL_MASK )
-		gsb_transactions_list_switch_mark (gsb_data_account_get_current_transaction_number (account_number));
-	    break;
+        if ( ( ev -> state & GDK_CONTROL_MASK ) == GDK_CONTROL_MASK )
+        gsb_transactions_list_switch_mark (
+                        gsb_data_account_get_current_transaction_number ( account_number ) );
+        break;
 
-	case GDK_r:			/* touche r */
-	case GDK_R:			/* touche R */
+    case GDK_r:         /* touche r */
+    case GDK_R:         /* touche R */
 
-	    if ( ( ev -> state & GDK_CONTROL_MASK ) == GDK_CONTROL_MASK )
-		gsb_transactions_list_switch_R_mark (gsb_data_account_get_current_transaction_number (account_number));
-	    break;
+        if ( ( ev -> state & GDK_CONTROL_MASK ) == GDK_CONTROL_MASK )
+        gsb_transactions_list_switch_R_mark (
+                        gsb_data_account_get_current_transaction_number ( account_number ) );
+        break;
 
-    case GDK_t:			/* touche t */
-    case GDK_T:			/* touche T */
+    case GDK_t:         /* touche t */
+    case GDK_T:         /* touche T */
         transaction_list_select ( -1 );
         break;
 
-	case GDK_space:
-	    transaction_number = gsb_data_account_get_current_transaction_number (account_number);
-	    if ( transaction_number > 0)
-	    {
-		if (etat.equilibrage)
-		{
-		    /* we are reconciling, so mark/unmark the transaction */
-		    gsb_transactions_list_switch_mark (transaction_number);
-		    transaction_list_select_down (FALSE);
-		}
-		else
-		    /* space open/close a split */
-		    gsb_transactions_list_switch_expander (transaction_number);
-	    }
-	    break;
+    case GDK_space:
+        transaction_number = gsb_data_account_get_current_transaction_number ( account_number );
+        if ( transaction_number > 0 )
+        {
+        if ( etat.equilibrage )
+        {
+            /* we are reconciling, so mark/unmark the transaction */
+            gsb_transactions_list_switch_mark ( transaction_number );
+            transaction_list_select_down ( FALSE );
+        }
+        else
+            /* space open/close a split */
+            gsb_transactions_list_switch_expander ( transaction_number );
+        }
+        break;
 
-	case GDK_Left:
-	    /* if we press left, give back the focus to the tree at left */
-	    gtk_widget_grab_focus (navigation_tree_view);
-	    break;
+    case GDK_Left:
+        /* if we press left, give back the focus to the tree at left */
+        gtk_widget_grab_focus ( navigation_tree_view );
+        break;
     }
 
     return TRUE;
@@ -2676,7 +2674,7 @@
  * \return
  * */
 void gsb_transactions_list_splitted_to_scheduled ( gint transaction_number,
-						   gint scheduled_number )
+                        gint scheduled_number )
 {
     GSList *list_tmp_transactions;
     list_tmp_transactions = gsb_data_transaction_get_transactions_list ();

Index: gsb_data_transaction.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_transaction.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- gsb_data_transaction.h	21 May 2009 21:58:55 -0000	1.29
+++ gsb_data_transaction.h	14 Jun 2009 19:02:20 -0000	1.30
@@ -49,6 +49,7 @@
 gsb_real gsb_data_transaction_get_exchange_rate ( gint transaction_number );
 gint gsb_data_transaction_get_financial_year_number ( gint transaction_number );
 gint gsb_data_transaction_get_last_number (void);
+gint gsb_data_transaction_get_last_transaction_before_today_day ( gint no_account );
 gint gsb_data_transaction_get_marked_transaction ( gint transaction_number );
 const gchar *gsb_data_transaction_get_method_of_payment_content ( gint transaction_number );
 gint gsb_data_transaction_get_method_of_payment_number ( gint transaction_number );

Index: affichage.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/affichage.c,v
retrieving revision 1.161
retrieving revision 1.162
diff -u -d -r1.161 -r1.162
--- affichage.c	7 Jun 2009 22:18:31 -0000	1.161
+++ affichage.c	14 Jun 2009 19:02:19 -0000	1.162
@@ -60,7 +60,7 @@
 static gboolean change_toolbar_display_mode ( GtkRadioButton *button );
 static gboolean modification_logo_accueil ( );
 static gboolean preferences_switch_headings_bar ( GtkWidget *toggle_button,
-					   gpointer null );
+                        gpointer null );
 static  gboolean preferences_view_color_changed ( GtkWidget *color_button,
                         GtkWidget *combobox );
 static  gboolean preferences_view_color_combobox_changed ( GtkWidget *combobox,
@@ -81,11 +81,13 @@
 extern GdkColor archive_background_color;
 extern GdkColor calendar_entry_color;
 extern GdkColor couleur_fond[2];
+extern GdkColor couleur_jour;
 extern GdkColor couleur_grise;
 extern GdkColor couleur_selection;
 extern GdkColor default_archive_background_color;
 extern GdkColor default_calendar_entry_color;
 extern GdkColor default_couleur_fond[2];
+extern GdkColor default_couleur_jour;
 extern GdkColor default_couleur_grise;
 extern GdkColor default_couleur_selection;
 extern GdkColor default_split_background;
@@ -746,7 +748,7 @@
  * \return FALSE
  * */
 gboolean preferences_switch_headings_bar ( GtkWidget *toggle_button,
-					   gpointer null )
+                        gpointer null )
 {
     gsb_gui_update_show_headings ();
     return FALSE;
@@ -769,42 +771,43 @@
     GtkCellRenderer *renderer;
 
     struct config_color {
-	gchar *name;
-	GdkColor *color;
-	GdkColor *default_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 of transaction's text"), &text_color[0], &default_text_color[0]},
-	{ N_("Text of unfinished splitted transaction"), &text_color[1], &default_text_color[1]},
-	{ N_("Children of splitted 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 },
-	{ NULL, 0, 0},
+    { 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 splitted transaction"), &text_color[1], &default_text_color[1]},
+    { N_("Children of splitted 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 },
+    { 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 );
+                        G_TYPE_STRING,
+                        G_TYPE_POINTER,
+                        G_TYPE_POINTER );
     /* fill the store */
     for ( i = 0 ; config_colors[i].name != NULL ; i++ )
     {
-	GtkTreeIter iter;
+    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);
+    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 */
@@ -813,8 +816,8 @@
     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);
+                        "text", 0,
+                        NULL);
     return combobox;
 }
 

Index: classement_echeances.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/classement_echeances.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- classement_echeances.c	18 Feb 2007 12:37:14 -0000	1.9
+++ classement_echeances.c	14 Jun 2009 19:02:20 -0000	1.10
@@ -1,10 +1,10 @@
 /* ************************************************************************** */
 /*                                  classement_echeances.c                    */
 /*                                                                            */
-/*     Copyright (C)	2000-2003 Cédric Auger (cedric at grisbi.org)	      */
-/*			2003-2004 Benjamin Drieu (bdrieu at april.org)	      */
-/*			2003-2004 Alain Portal (aportal at univ-montp2.fr)	      */
-/* 			http://www.grisbi.org				      */
+/*     Copyright (C)    2000-2003 Cédric Auger (cedric at grisbi.org)           */
+/*          2003-2004 Benjamin Drieu (bdrieu at april.org)                       */
+/*          2003-2004 Alain Portal (aportal at univ-montp2.fr)                   */
+/*          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      */
@@ -41,7 +41,7 @@
 
 
 /* ************************************************************************* */
-/* Classement de deux échéances d'opérations par date                        */
+/* Classement de deux échéances d'opérations par date                        */
 /* ************************************************************************* */
 gint classement_sliste_echeance_par_date ( gint scheduled_number_1, 
 					   gint scheduled_number_2 )

Index: affichage_liste.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/affichage_liste.c,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -d -r1.108 -r1.109
--- affichage_liste.c	10 May 2009 13:06:56 -0000	1.108
+++ affichage_liste.c	14 Jun 2009 19:02:20 -0000	1.109
@@ -1,9 +1,9 @@
 /* ************************************************************************** */
 /*  ce fichier contient les paramètres de l'affichage de la liste d'opé       */
 /*                                                                            */
-/*     Copyright (C)	2000-2008 Cédric Auger (cedric at grisbi.org)            */
-/*			2008 Benjamin Drieu (bdrieu at april.org)                            */
-/* 			http://www.grisbi.org                                             */
+/*     Copyright (C)    2000-2008 Cédric Auger (cedric at grisbi.org)            */
+/*          2008 Benjamin Drieu (bdrieu at april.org)                            */
+/*          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      */
@@ -41,13 +41,15 @@
 #include "./gtk_combofix.h"
 #include "./gsb_data_form.h"
 #include "./include.h"
+#include "./erreur.h"
 /*END_INCLUDE*/
 
 /*START_STATIC*/
 static  gboolean display_mode_button_changed ( GtkWidget *button,
-					      gint *line_ptr );
+                        gint *line_ptr );
 static gboolean gsb_transactions_list_display_change_max_items ( GtkWidget *entry,
-							  gpointer null );
+                        gpointer null );
+static void gsb_transactions_list_display_show_gives_balance ( void );
 static gboolean gsb_transactions_list_display_update_combofix ( void );
 /*END_STATIC*/
 
@@ -90,106 +92,113 @@
     GtkWidget * vbox_pref, *label, *paddingbox;
     GtkWidget *hbox, *vbox_label, *vbox_buttons;
     gchar *display_mode_lines_text [] = {
-	_("In one line visible, show the lines"),
-	_("In two lines visibles, show the lines"),
-	_("In three lines visibles, show the lines"),
+    _("In one line visible, show the lines"),
+    _("In two lines visibles, show the lines"),
+    _("In three lines visibles, show the lines"),
     };
     gchar *line_1 [] = {
-	"1", "2", "3", "4",
-	NULL };
+    "1", "2", "3", "4",
+    NULL };
     gchar *line_2 [] = {
-	"1-2", "1-3", "1-4", "2-3", "2-4", "3-4",
-	NULL };
+    "1-2", "1-3", "1-4", "2-3", "2-4", "3-4",
+    NULL };
     gchar *line_3 [] = {
-	"1-2-3", "1-2-4", "1-3-4", "2-3-4",
-	NULL };
+    "1-2-3", "1-2-4", "1-3-4", "2-3-4",
+    NULL };
     gint i;
 
-	vbox_pref = new_vbox_with_title_and_icon ( _("Transaction list behavior"),
-			"transaction-list.png" );
+    vbox_pref = new_vbox_with_title_and_icon ( _("Transaction list behavior"),
+                        "transaction-list.png" );
 
-	/* heading and boxes for layout */
-	paddingbox = new_paddingbox_with_title (vbox_pref, FALSE,
-			_("Display modes"));
+    /* heading and boxes for layout */
+    paddingbox = new_paddingbox_with_title ( vbox_pref, FALSE, _( "Display modes" ) );
 
-	hbox = gtk_hbox_new ( FALSE, 5);
-	vbox_label = gtk_vbox_new ( TRUE, 5);
-	vbox_buttons = gtk_vbox_new ( TRUE, 5);
-	gtk_box_pack_start ( GTK_BOX ( paddingbox ), hbox, FALSE, FALSE, 0 );
+    hbox = gtk_hbox_new ( FALSE, 5);
+    vbox_label = gtk_vbox_new ( TRUE, 5);
+    vbox_buttons = gtk_vbox_new ( TRUE, 5);
+    gtk_box_pack_start ( GTK_BOX ( paddingbox ), hbox, FALSE, FALSE, 0 );
 
     /* fill the table */
     for (i=0 ; i<3 ; i++)
     {
-	gint j;
-	GtkWidget *button;
-	gchar **text_line = NULL;
-	gint position = 0;
+    gint j;
+    GtkWidget *button;
+    gchar **text_line = NULL;
+    gint position = 0;
 
-	/* set the line title */
-	label = gtk_label_new ( COLON(display_mode_lines_text[i]));
-	gtk_misc_set_alignment (GTK_MISC (label), 0, 1);
-	gtk_label_set_justify ( GTK_LABEL (label), GTK_JUSTIFY_RIGHT );
-	gtk_box_pack_start ( GTK_BOX (vbox_label), label, FALSE, FALSE, 0);
+    /* set the line title */
+    label = gtk_label_new ( COLON(display_mode_lines_text[i]));
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 1);
+    gtk_label_set_justify ( GTK_LABEL (label), GTK_JUSTIFY_RIGHT );
+    gtk_box_pack_start ( GTK_BOX (vbox_label), label, FALSE, FALSE, 0);
 
-	switch (i)
-	{
-	    case 0:
-		text_line = line_1;
-		position = display_one_line;
-		break;
-	    case 1:
-		text_line = line_2;
-		position = display_two_lines;
-		break;
-	    case 2:
-		text_line = line_3;
-		position = display_three_lines;
-		break;
-	}
+    switch (i)
+    {
+        case 0:
+        text_line = line_1;
+        position = display_one_line;
+        break;
+        case 1:
+        text_line = line_2;
+        position = display_two_lines;
+        break;
+        case 2:
+        text_line = line_3;
+        position = display_three_lines;
+        break;
+    }
 
-	button = gtk_combo_box_new_text ();
-	g_signal_connect ( G_OBJECT (button), "changed",
-			G_CALLBACK (display_mode_button_changed),
-			GINT_TO_POINTER (i));
-	gtk_box_pack_start ( GTK_BOX (vbox_buttons), button, FALSE, FALSE, 0);
+    button = gtk_combo_box_new_text ();
+    g_signal_connect ( G_OBJECT (button), "changed",
+            G_CALLBACK (display_mode_button_changed),
+            GINT_TO_POINTER (i));
+    gtk_box_pack_start ( GTK_BOX (vbox_buttons), button, FALSE, FALSE, 0);
 
-	j=0;
-	while (text_line[j])
-	{
-	    gtk_combo_box_append_text (GTK_COMBO_BOX (button), text_line[j]);
-	    j++;
-	}
-	gtk_combo_box_set_active ( GTK_COMBO_BOX (button), position);
+    j=0;
+    while (text_line[j])
+    {
+        gtk_combo_box_append_text (GTK_COMBO_BOX (button), text_line[j]);
+        j++;
+    }
+    gtk_combo_box_set_active ( GTK_COMBO_BOX (button), position);
     }
 
 
-	/* pack vboxes in hbox */
-	gtk_box_pack_start ( GTK_BOX ( hbox ), vbox_label, FALSE, FALSE, 0 );
-	gtk_box_pack_start ( GTK_BOX ( hbox ), vbox_buttons, FALSE, FALSE, 0 );
+    /* pack vboxes in hbox */
+    gtk_box_pack_start ( GTK_BOX ( hbox ), vbox_label, FALSE, FALSE, 0 );
+    gtk_box_pack_start ( GTK_BOX ( hbox ), vbox_buttons, FALSE, FALSE, 0 );
 
 
     /* do we show the content of the selected transaction in the form for
      * each selection ? */
     gtk_box_pack_start ( GTK_BOX ( paddingbox ),
-			 gsb_automem_checkbutton_new (_("Use simple click to select transactions"),
-						      &etat.show_transaction_selected_in_form,
-						      NULL, NULL ),
-			 FALSE, FALSE, 0 );
+                        gsb_automem_checkbutton_new (
+                        _("Use simple click to select transactions"),
+                        &etat.show_transaction_selected_in_form,
+                        NULL, NULL ),
+                        FALSE, FALSE, 0 );
 
+    gtk_box_pack_start ( GTK_BOX ( paddingbox ),
+                        gsb_automem_checkbutton_new (
+                        _("Highlights the transaction that gives the balance today"),
+                        &etat.show_transaction_gives_balance,
+                        G_CALLBACK ( gsb_transactions_list_display_show_gives_balance ), NULL ),
+                        FALSE, FALSE, 0 );
 
     /* Account distinction */
     paddingbox = new_paddingbox_with_title (vbox_pref, FALSE, 
-					    _("Account differentiation"));
+                        _("Account differentiation"));
 
     gtk_box_pack_start ( GTK_BOX ( paddingbox ),
-			 gsb_automem_checkbutton_new (_("Remember display settings for each account separately"),
-						      &etat.retient_affichage_par_compte,
-						      NULL, NULL ),
-			 FALSE, FALSE, 0 );
+                        gsb_automem_checkbutton_new (
+                        _("Remember display settings for each account separately"),
+                        &etat.retient_affichage_par_compte,
+                        NULL, NULL ),
+                        FALSE, FALSE, 0 );
 
     if ( !gsb_data_account_get_accounts_amount () )
     {
-	gtk_widget_set_sensitive ( vbox_pref, FALSE );
+        gtk_widget_set_sensitive ( vbox_pref, FALSE );
     }
 
     return ( vbox_pref );
@@ -205,7 +214,7 @@
  * \return FALSE
  * */
 static gboolean display_mode_button_changed ( GtkWidget *button,
-					      gint *line_ptr )
+                        gint *line_ptr )
 {
     gint line = GPOINTER_TO_INT (line_ptr);
 
@@ -245,7 +254,7 @@
  * \return TRUE : the line should be showed, FALSE : the line must be hidden
  * */
 gboolean display_mode_check_line ( gint line_in_transaction,
-				   gint visibles_lines )
+                        gint visibles_lines )
 {
     switch (visibles_lines)
     {
@@ -579,7 +588,7 @@
  * \return FALSE
  * */
 gboolean gsb_transactions_list_display_change_max_items ( GtkWidget *entry,
-							  gpointer null )
+                        gpointer null )
 {
     etat.combofix_max_item = utils_str_atoi ( gtk_entry_get_text (GTK_ENTRY (entry)));
     gsb_transactions_list_display_update_combofix ();
@@ -587,7 +596,17 @@
     return FALSE;
 }
 
-							
+
+
+void gsb_transactions_list_display_show_gives_balance ( void )
+{
+    gint account_number;
+
+    account_number = gsb_gui_navigation_get_current_account ( );
+    devel_debug_int ( account_number);
+    if ( account_number != -1 )
+        gsb_transactions_list_update_tree_view ( account_number, TRUE );
+}
 /* Local Variables: */
 /* c-basic-offset: 4 */
 /* End: */

Index: gsb_file_load.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_load.c,v
retrieving revision 1.181
retrieving revision 1.182
diff -u -d -r1.181 -r1.182
--- gsb_file_load.c	12 Jun 2009 19:06:56 -0000	1.181
+++ gsb_file_load.c	14 Jun 2009 19:02:20 -0000	1.182
@@ -154,6 +154,7 @@
 extern GdkColor archive_background_color;
 extern GdkColor calendar_entry_color;
 extern GdkColor couleur_fond[2];
+extern GdkColor couleur_jour;
 extern GdkColor couleur_grise;
 extern GdkColor couleur_selection;
 extern gint display_one_line;
@@ -1040,6 +1041,24 @@
     }
 
     else if ( !strcmp ( attribute_names[i],
+                        "Couleur_jour_red" ))
+    {
+        couleur_jour.red = utils_str_atoi (attribute_values[i]);
+    }
+
+    else if ( !strcmp ( attribute_names[i],
+                        "Couleur_jour_green" ))
+    {
+        couleur_jour.green = utils_str_atoi (attribute_values[i]);
+    }
+
+    else if ( !strcmp ( attribute_names[i],
+                        "Couleur_jour_blue" ))
+    {
+        couleur_jour.blue = utils_str_atoi (attribute_values[i]);
+    }
+
+    else if ( !strcmp ( attribute_names[i],
                         "Background_scheduled_red" ))
     {
         couleur_grise.red = utils_str_atoi (attribute_values[i]);

Index: transaction_list.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/transaction_list.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- transaction_list.h	7 Jun 2009 22:18:31 -0000	1.7
+++ transaction_list.h	14 Jun 2009 19:02:20 -0000	1.8
@@ -18,6 +18,7 @@
 gboolean transaction_list_remove_transaction ( gint transaction_number );
 void transaction_list_set ( GtkTreeIter *iter, ... );
 void transaction_list_set_balances ( void );
+void transaction_list_set_color_jour ( gint account_number );
 gboolean transaction_list_show_toggle_mark ( gboolean show );
 gboolean transaction_list_update_cell ( gint cell_col,
 					gint cell_line );

Index: gsb_file_save.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_save.c,v
retrieving revision 1.131
retrieving revision 1.132
diff -u -d -r1.131 -r1.132
--- gsb_file_save.c	10 Jun 2009 21:31:43 -0000	1.131
+++ gsb_file_save.c	14 Jun 2009 19:02:20 -0000	1.132
@@ -135,6 +135,7 @@
 extern GdkColor calendar_entry_color;
 extern gchar *copy_old_filename;
 extern GdkColor couleur_fond[2];
+extern GdkColor couleur_jour;
 extern GdkColor couleur_grise;
 extern GdkColor couleur_selection;
 extern gint display_one_line;
@@ -740,60 +741,66 @@
 
     /* 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\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",
-	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_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 );
+                        "\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",
+    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 );
 
     /* append the new string to the file content
      * and return the new iterator */

Index: transaction_list.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/transaction_list.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- transaction_list.c	7 Jun 2009 22:18:31 -0000	1.41
+++ transaction_list.c	14 Jun 2009 19:02:20 -0000	1.42
@@ -61,7 +61,7 @@
 /*START_STATIC*/
 static  void transaction_list_append_child ( gint transaction_number );
 static  CustomRecord *transaction_list_create_record ( gint transaction_number,
-						      gint line_in_transaction );
+                        gint line_in_transaction );
 static gint transaction_list_get_last_line ( gint nb_rows );
 static  gboolean transaction_list_update_white_child ( CustomRecord *white_record );
 /*END_STATIC*/
@@ -69,6 +69,7 @@
 /*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;
@@ -1167,7 +1168,7 @@
  * \return FALSE : problem, nothing done ; TRUE : ok
  * */
 gboolean transaction_list_update_column ( gint column,
-					  GValue *value )
+                        GValue *value )
 {
     gint i;
     GtkTreeIter iter;
@@ -1263,7 +1264,7 @@
  * \return FALSE : problem, nothing done ; TRUE : ok
  * */
 gboolean transaction_list_update_cell ( gint cell_col,
-					gint cell_line )
+                        gint cell_line )
 {
     gint element_number;
     gint column_element_split;
@@ -1781,7 +1782,7 @@
  * \return NULL if problem, or the newly allocated record
  * */
 static CustomRecord *transaction_list_create_record ( gint transaction_number,
-						      gint line_in_transaction )
+                        gint line_in_transaction )
 {
     gint column;
     CustomRecord *newrecord;
@@ -2033,3 +2034,46 @@
     return TRUE;
 }
 
+
+/**
+ * colorise avec un fond vert la ligne qui correspond à la date du jour
+ *
+ * \param 
+ *
+ * \return
+ * */
+void transaction_list_set_color_jour ( gint account_number )
+{
+    gint i;
+    gint number_jour;
+    gint transaction_number;
+    CustomList *custom_list;
+
+    devel_debug (NULL);
+
+    number_jour = gsb_data_transaction_get_last_transaction_before_today_day (
+                        account_number );
+    if ( number_jour <= 1 )
+        return;
+
+    custom_list = transaction_model_get_model ();
+    g_return_if_fail ( custom_list != NULL );
+
+    for (i=0 ; i < custom_list -> num_visibles_rows ; i++)
+    {
+        CustomRecord *record;
+
+        record = custom_list -> visibles_rows[i];
+
+        if (record -> what_is_line == IS_TRANSACTION)
+        {
+            transaction_number = gsb_data_transaction_get_transaction_number (
+                        record -> transaction_pointer);
+            if ( number_jour == transaction_number )
+            {
+                /* set the color of the row */
+                record -> row_bg = &couleur_jour;
+            }            
+        }
+    }
+}

Index: gsb_file_config.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_config.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -d -r1.76 -r1.77
--- gsb_file_config.c	23 May 2009 19:25:10 -0000	1.76
+++ gsb_file_config.c	14 Jun 2009 19:02:20 -0000	1.77
@@ -102,9 +102,9 @@
     config = g_key_file_new ();
     
     result = g_key_file_load_from_file ( config,
-					 filename,
-					 G_KEY_FILE_KEEP_COMMENTS,
-					 NULL );
+                        filename,
+                        G_KEY_FILE_KEEP_COMMENTS,
+                        NULL );
     /* if key_file couldn't load the conf, it's because it's the last
      * conf (HOME or xml) or no conf... try the HOME conf and the xml conf */
[...984 lines suppressed...]
-	etat.browser_command = g_strdup ( "/usr/bin/firefox" );
+    etat.browser_command = g_strdup ( "/usr/bin/firefox" );
     }
     else if ( g_file_test ( "/usr/bin/iceweasel", G_FILE_TEST_EXISTS ) )
     {
-	etat.browser_command = g_strdup ( "/usr/bin/iceweasel" );
+    etat.browser_command = g_strdup ( "/usr/bin/iceweasel" );
     }
     else if ( g_file_test ( "/usr/bin/opera", G_FILE_TEST_EXISTS ) )
     {
-	etat.browser_command = g_strdup ( "/usr/bin/opera" );
+    etat.browser_command = g_strdup ( "/usr/bin/opera" );
     }
     else if ( g_file_test ( "/usr/bin/mozilla", G_FILE_TEST_EXISTS ) )
     {
-	etat.browser_command = g_strdup ( "/usr/bin/mozilla" );
+    etat.browser_command = g_strdup ( "/usr/bin/mozilla" );
     }
     else
     {



More information about the cvs mailing list