[grisbi-cvs] [SCM] grisbi branch, master, updated. upstream_version_0_9_5-112-g910541b

Pierre Biava nobody at users.sourceforge.net
Mon Aug 20 21:25:11 CEST 2012


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  910541bb755550dd69d4467a89bf2524d0a7a0ab (commit)
      from  273106f83eee218f2eb9edde9d47807d58e68cc2 (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 910541bb755550dd69d4467a89bf2524d0a7a0ab
Author: pbiava <pierre.biava at nerim.net>
Date:   Mon Aug 20 21:23:02 2012 +0200

    Minor corrections in the interface of grisbi

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

Changes:
diff --git a/src/accueil.c b/src/accueil.c
index 8baa563..058ecdd 100644
--- a/src/accueil.c
+++ b/src/accueil.c
@@ -997,7 +997,12 @@ gint affiche_soldes_partiels ( GtkWidget *table,
         partial_number = gsb_data_partial_balance_get_number ( liste -> data );
         kind = gsb_data_partial_balance_get_kind ( partial_number );
 
-        if ( ( kind == type_compte
+        if ( kind == -1 )
+        {
+            liste = liste -> next;
+            continue;
+        }
+        else if ( ( kind == type_compte
          || ( kind < GSB_TYPE_LIABILITIES && type_compte < GSB_TYPE_LIABILITIES ) )
          &&
          gsb_data_partial_balance_get_currency ( partial_number ) == currency_number )
@@ -1087,44 +1092,47 @@ void affiche_solde_des_comptes ( GtkWidget *table,
                         gsb_real solde_global_pointe )
 {
     GtkWidget *label;
-    gchar *tmpstr;
+    gchar *tmp_str;
 
     /* on commence par une ligne vide */
     label = gtk_label_new ( chaine_espace );
     gtk_size_group_add_widget ( GTK_SIZE_GROUP ( size_group_accueil ), label );
     gtk_misc_set_alignment ( GTK_MISC ( label ), MISC_RIGHT, MISC_VERT_CENTER );
-	gtk_table_attach_defaults ( GTK_TABLE ( table ), label, 0, 1, i, i+1 );
-	gtk_widget_show ( label );
+    gtk_table_attach_defaults ( GTK_TABLE ( table ), label, 0, 1, i, i+1 );
+    gtk_widget_show ( label );
     i ++;
 
-	/* Première colonne */
+    /* Première colonne */
+    label = gtk_label_new ( NULL );
     if ( nb_comptes == 1 )
-        label = gtk_label_new ( _("Global balance: ") );
+        tmp_str = g_strconcat ("<span weight=\"bold\">", _("Global balance: "), "</span>", NULL );
     else if ( conf.pluriel_final )
-        label = gtk_label_new ( ("Soldes finaux: ") );
+        tmp_str = g_strconcat ("<span weight=\"bold\">", _("Soldes finaux: "), "</span>", NULL );
     else
-        label = gtk_label_new ( _("Global balances: ") );
-	gtk_misc_set_alignment ( GTK_MISC ( label ), MISC_LEFT, MISC_VERT_CENTER );
+        tmp_str = g_strconcat ("<span weight=\"bold\">", _("Global balances: "), "</span>", NULL );
+    gtk_label_set_markup ( GTK_LABEL ( label ), tmp_str );
+    g_free ( tmp_str );
+
+    gtk_misc_set_alignment ( GTK_MISC ( label ), MISC_LEFT, MISC_VERT_CENTER );
     gtk_size_group_add_widget ( GTK_SIZE_GROUP ( size_group_accueil ), label );
-	gtk_table_attach_defaults ( GTK_TABLE ( table ), label, 0, 1, i, i+1 );
-	gtk_widget_show ( label );
+    gtk_table_attach_defaults ( GTK_TABLE ( table ), label, 0, 1, i, i+1 );
+    gtk_widget_show ( label );
 
-	/* Deuxième colonne : elle contient le solde total pointé des comptes */
-	tmpstr = utils_real_get_string_with_currency (solde_global_pointe,
-								    currency_number, TRUE);
-	label = gtk_label_new ( tmpstr );
-	g_free ( tmpstr );
-	gtk_misc_set_alignment ( GTK_MISC ( label ), MISC_RIGHT, MISC_VERT_CENTER );
-	gtk_table_attach_defaults ( GTK_TABLE ( table ), label, 1, 2, i, i+1 );
-	gtk_widget_show ( label );
+    /* Deuxième colonne : elle contient le solde total pointé des comptes */
+    tmp_str = utils_real_get_string_with_currency ( solde_global_pointe, currency_number, TRUE );
+    label = gtk_label_new ( tmp_str );
+    g_free ( tmp_str );
+    gtk_misc_set_alignment ( GTK_MISC ( label ), MISC_RIGHT, MISC_VERT_CENTER );
+    gtk_table_attach_defaults ( GTK_TABLE ( table ), label, 1, 2, i, i+1 );
+    gtk_widget_show ( label );
 
-	/* Troisième colonne : elle contient le solde total courant des comptes */
-	tmpstr = utils_real_get_string_with_currency (solde_global_courant, currency_number, TRUE);
-	label = gtk_label_new ( tmpstr );
-	g_free ( tmpstr );
-	gtk_misc_set_alignment ( GTK_MISC ( label ), MISC_RIGHT, MISC_VERT_CENTER );
-	gtk_table_attach_defaults ( GTK_TABLE ( table ), label, 2, 3, i, i+1 );
-	gtk_widget_show ( label );
+    /* Troisième colonne : elle contient le solde total courant des comptes */
+    tmp_str = utils_real_get_string_with_currency ( solde_global_courant, currency_number, TRUE );
+    label = gtk_label_new ( tmp_str );
+    g_free ( tmp_str );
+    gtk_misc_set_alignment ( GTK_MISC ( label ), MISC_RIGHT, MISC_VERT_CENTER );
+    gtk_table_attach_defaults ( GTK_TABLE ( table ), label, 2, 3, i, i+1 );
+    gtk_widget_show ( label );
 }
 
 /**
diff --git a/src/gsb_data_partial_balance.c b/src/gsb_data_partial_balance.c
index 33beb8c..314aea3 100644
--- a/src/gsb_data_partial_balance.c
+++ b/src/gsb_data_partial_balance.c
@@ -36,6 +36,7 @@
 /*START_INCLUDE*/
 #include "gsb_data_partial_balance.h"
 #include "dialog.h"
+#include "gsb_color.h"
 #include "gsb_currency_config.h"
 #include "gsb_currency.h"
 #include "gsb_data_account.h"
@@ -1081,9 +1082,16 @@ gchar *gsb_data_partial_balance_get_marked_balance ( gint partial_balance_number
     g_strfreev ( tab );
 
     if ( partial_balance -> colorise && solde.mantissa < 0 )
-        string = g_strdup_printf ( "<span color=\"red\">%s</span>",
+    {
+        gchar *color;
+
+        color = gsb_color_get_couleur_to_string ( "couleur_solde_alarme_rouge_normal" );
+        string = g_strdup_printf ( "<span color=\"%s\">%s</span>",
+                        color,
                         utils_real_get_string_with_currency (
                         solde, partial_balance -> currency, TRUE ) );
+        g_free ( color );
+    }
     else
         string = utils_real_get_string_with_currency (
                         solde, partial_balance -> currency, TRUE );
@@ -1164,9 +1172,16 @@ gchar *gsb_data_partial_balance_get_current_balance ( gint partial_balance_numbe
     solde = gsb_data_partial_balance_get_current_amount ( partial_balance_number );
 
     if ( partial_balance -> colorise && solde.mantissa < 0 )
-        string = g_strdup_printf ( "<span color=\"red\">%s</span>",
+    {
+        gchar *color;
+
+        color = gsb_color_get_couleur_to_string ( "couleur_solde_alarme_rouge_normal" );
+        string = g_strdup_printf ( "<span color=\"%s\">%s</span>",
+                        color,
                         utils_real_get_string_with_currency (
                         solde, partial_balance -> currency, TRUE ) );
+        g_free ( color );
+    }
     else
         string = utils_real_get_string_with_currency (
                         solde, partial_balance -> currency, TRUE );


hooks/post-receive
-- 
grisbi


More information about the cvs mailing list