[grisbi-cvs] [SCM] grisbi branch, master, updated. upstream_version_0_7_3-90-ga137ef8

Pierre Biava nobody at users.sourceforge.net
Tue Oct 19 22:09:36 CEST 2010


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

The branch, master has been updated
       via  a137ef8a12c5ec82812cdc3801c709de4dd8fecf (commit)
       via  9ca4bab7842f98ee3325edd78873cea43f98ffbc (commit)
      from  b373423bdd5b8fa1f827cb88cfaf76e563ada92a (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 a137ef8a12c5ec82812cdc3801c709de4dd8fecf
Author: pbiava <pierre.biava at nerim.net>
Date:   Tue Oct 19 21:33:41 2010 +0200

    fixed bug 1146: add Negative transactions display in red in Scheduler and minor correction

commit 9ca4bab7842f98ee3325edd78873cea43f98ffbc
Author: pbiava <pierre.biava at nerim.net>
Date:   Tue Oct 19 20:49:38 2010 +0200

    Fixed a bug in the recent files displayed

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

Changes:
diff --git a/src/bet_tab.c b/src/bet_tab.c
index fe2f33b..967925a 100644
--- a/src/bet_tab.c
+++ b/src/bet_tab.c
@@ -434,7 +434,10 @@ void bet_array_refresh_estimate_tab ( gint account_number )
     if ( current_balance.mantissa < 0 )
         color_str = "red";
     else
+    {
+        g_free ( color_str );
         color_str = NULL;
+    }
 
     /* set the titles of tabs module budget */
     title = g_strdup_printf (
diff --git a/src/gsb_file.c b/src/gsb_file.c
index c1fac86..d6b9e25 100644
--- a/src/gsb_file.c
+++ b/src/gsb_file.c
@@ -1082,15 +1082,8 @@ void gsb_file_append_name_to_opened_list ( gchar * path_fichier )
 						    ( ++nb_derniers_fichiers_ouverts ) * sizeof ( gpointer ) );
         tab_noms_derniers_fichiers_ouverts[nb_derniers_fichiers_ouverts-1] = dernier;
     }
-    else
-    {
-        nb_derniers_fichiers_ouverts = 1;
-        nb_max_derniers_fichiers_ouverts = 1;
-        tab_noms_derniers_fichiers_ouverts = g_malloc0 (  sizeof ( gpointer ) );
-    }   
-printf ("phase 4\n");
+
     tab_noms_derniers_fichiers_ouverts[0] = my_strdup ( real_name );
-printf ("phase 5\n");
 
     affiche_derniers_fichiers_ouverts();
     g_free ( real_name );
diff --git a/src/gsb_scheduler_list.c b/src/gsb_scheduler_list.c
index 9bf86fb..cd21a9f 100644
--- a/src/gsb_scheduler_list.c
+++ b/src/gsb_scheduler_list.c
@@ -356,7 +356,17 @@ void gsb_scheduler_list_create_list_columns ( GtkWidget *tree_view )
 		       "xalign",
 		       col_justs[i], NULL );
 
-	scheduler_list_column[i] = gtk_tree_view_column_new_with_attributes ( scheduler_titles[i],
+    if ( i == 6 )
+        scheduler_list_column[i] = gtk_tree_view_column_new_with_attributes ( scheduler_titles[i],
+									      cell_renderer,
+									      "text", i,
+									      "cell-background-gdk", SCHEDULER_COL_NB_BACKGROUND,
+                                          "foreground", SCHEDULER_COL_NB_AMOUNT_COLOR,
+									      "font-desc", SCHEDULER_COL_NB_FONT,
+									      NULL );
+
+    else
+        scheduler_list_column[i] = gtk_tree_view_column_new_with_attributes ( scheduler_titles[i],
 									      cell_renderer,
 									      "text", i,
 									      "cell-background-gdk", SCHEDULER_COL_NB_BACKGROUND,
@@ -1041,13 +1051,24 @@ gboolean gsb_scheduler_list_fill_transaction_row ( GtkTreeStore *store,
                         GtkTreeIter *iter,
                         const gchar *line[SCHEDULER_COL_VISIBLE_COLUMNS] )
 {
+    gchar *color_str = NULL;
     gint i;
 
+    if ( g_utf8_strchr ( line[COL_NB_AMOUNT], -1, '-' ) )
+        color_str = "red";
+    else
+    {
+        g_free ( color_str );
+        color_str = NULL;
+    }
+
     for ( i=0 ; i<SCHEDULER_COL_VISIBLE_COLUMNS ; i++ )
-	gtk_tree_store_set ( GTK_TREE_STORE ( store ),
-			     iter,
-			     i, line[i],
-			     -1 );
+    {
+        if ( i == 6 )
+            gtk_tree_store_set ( store, iter, i, line[i], SCHEDULER_COL_NB_AMOUNT_COLOR, color_str, -1 );
+        else
+            gtk_tree_store_set ( store, iter, i, line[i], -1 );
+    }
 
     return FALSE;
 }


hooks/post-receive
-- 
grisbi


More information about the cvs mailing list