[grisbi-cvs] [SCM] grisbi branch, master, updated. upstream_version_0_9_3-12-g1b17fad
Pierre Biava
nobody at users.sourceforge.net
Sat Aug 27 08:04:41 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 1b17fad431713a61a4f56b75a34632d8321edbb9 (commit)
from 9f0b4f44b2994747cd5434534a6ffd40ec96be4f (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 1b17fad431713a61a4f56b75a34632d8321edbb9
Author: pbiava <pierre.biava at nerim.net>
Date: Tue Aug 23 22:38:09 2011 +0200
Adding the color of the day in the budgetary module
-----------------------------------------------------------------------
Changes:
diff --git a/src/bet_tab.c b/src/bet_tab.c
index bd8648d..f3c3c64 100644
--- a/src/bet_tab.c
+++ b/src/bet_tab.c
@@ -2069,6 +2069,7 @@ gboolean bet_array_list_set_background_color ( GtkWidget *tree_view )
{
GtkTreeModel *model;
GtkTreeIter iter;
+ gboolean absent = TRUE;
if ( !tree_view )
return FALSE;
@@ -2077,6 +2078,7 @@ gboolean bet_array_list_set_background_color ( GtkWidget *tree_view )
if ( gtk_tree_model_get_iter_first ( GTK_TREE_MODEL ( model ), &iter ) )
{
+ GtkTreeIter *prev = NULL;
gint origine;
gint current_color = 0;
@@ -2086,6 +2088,7 @@ gboolean bet_array_list_set_background_color ( GtkWidget *tree_view )
&iter,
SPP_ESTIMATE_TREE_ORIGIN_DATA, &origine,
-1 );
+
switch ( origine )
{
case SPP_ORIGIN_TRANSACTION:
@@ -2116,7 +2119,7 @@ gboolean bet_array_list_set_background_color ( GtkWidget *tree_view )
gtk_tree_store_set ( GTK_TREE_STORE ( model ),
&iter,
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" ),
+ SPP_ESTIMATE_TREE_COLOR_STRING, gsb_color_get_couleur_to_string ( "couleur_bet_transfert" ),
-1 );
break;
case SPP_ORIGIN_SOLDE:
@@ -2126,6 +2129,36 @@ gboolean bet_array_list_set_background_color ( GtkWidget *tree_view )
SPP_ESTIMATE_TREE_COLOR_STRING, gsb_color_get_couleur_to_string ( "couleur_bet_solde" ),
-1 );
}
+
+ /* gestion de la date du jour */
+ if ( conf.show_transaction_gives_balance && absent )
+ {
+ GValue date_value = {0,};
+ GDate* date;
+ GDate *date_jour;
+
+ date_jour = gdate_today ( );
+ gtk_tree_model_get_value ( model,
+ &iter,
+ SPP_ESTIMATE_TREE_SORT_DATE_COLUMN, &date_value );
+ date = g_value_get_boxed ( &date_value );
+ if ( g_date_compare ( date, date_jour ) > 0 )
+ {
+ absent = FALSE;
+ gtk_tree_store_set ( GTK_TREE_STORE ( model ),
+ prev,
+ SPP_ESTIMATE_TREE_BACKGROUND_COLOR, gsb_color_get_couleur ( "couleur_jour" ),
+ SPP_ESTIMATE_TREE_COLOR_STRING, gsb_color_get_couleur_to_string ( "couleur_jour" ),
+ -1 );
+ }
+
+ g_date_free ( date_jour );
+ g_value_unset ( &date_value );
+ if ( prev )
+ gtk_tree_iter_free ( prev );
+
+ prev = gtk_tree_iter_copy ( &iter );
+ }
}
while ( gtk_tree_model_iter_next ( GTK_TREE_MODEL ( model ), &iter ) );
}
hooks/post-receive
--
grisbi
More information about the cvs
mailing list