gnucash maint: Bug 707243 - Hard-coded font colors in account tree?

Geert Janssens gjanssens at code.gnucash.org
Fri Aug 29 17:22:10 EDT 2014


Updated	 via  https://github.com/Gnucash/gnucash/commit/c9af8269 (commit)
	from  https://github.com/Gnucash/gnucash/commit/5db0cb98 (commit)



commit c9af8269fac031b1e90f144daad3d7ef9ac30f15
Author: Geert Janssens <janssens-geert at telenet.be>
Date:   Fri Aug 29 22:48:16 2014 +0200

    Bug 707243 - Hard-coded font colors in account tree?

diff --git a/src/gnome-utils/gnc-tree-model-account.c b/src/gnome-utils/gnc-tree-model-account.c
index c3627ab..b37bd56 100644
--- a/src/gnome-utils/gnc-tree-model-account.c
+++ b/src/gnome-utils/gnc-tree-model-account.c
@@ -124,7 +124,7 @@ gnc_tree_model_account_update_color (gpointer gsettings, gchar *key, gpointer us
     model = user_data;
     priv = GNC_TREE_MODEL_ACCOUNT_GET_PRIVATE(model);
     use_red = gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL, GNC_PREF_NEGATIVE_IN_RED);
-    priv->negative_color = use_red ? "red" : "black";
+    priv->negative_color = use_red ? "red" : NULL;
 }
 /************************************************************/
 /*               g_object required functions                */
@@ -205,7 +205,7 @@ gnc_tree_model_account_init (GncTreeModelAccount *model)
     priv = GNC_TREE_MODEL_ACCOUNT_GET_PRIVATE(model);
     priv->book = NULL;
     priv->root = NULL;
-    priv->negative_color = red ? "red" : "black";
+    priv->negative_color = red ? "red" : NULL;
 
     gnc_prefs_register_cb(GNC_PREFS_GROUP_GENERAL, GNC_PREF_NEGATIVE_IN_RED,
                           gnc_tree_model_account_update_color,
@@ -562,7 +562,7 @@ gnc_tree_model_account_set_color(GncTreeModelAccount *model,
     if (negative)
         g_value_set_static_string (value, priv->negative_color);
     else
-        g_value_set_static_string (value, "black");
+        g_value_set_static_string (value, NULL);
 }
 
 static gchar *
diff --git a/src/gnome-utils/gnc-tree-model-owner.c b/src/gnome-utils/gnc-tree-model-owner.c
index e88003f..e37df19 100644
--- a/src/gnome-utils/gnc-tree-model-owner.c
+++ b/src/gnome-utils/gnc-tree-model-owner.c
@@ -123,7 +123,7 @@ gnc_tree_model_owner_update_color (gpointer gsettings, gchar *key, gpointer user
     model = user_data;
     priv = GNC_TREE_MODEL_OWNER_GET_PRIVATE(model);
     use_red = gnc_prefs_get_bool(GNC_PREFS_GROUP_GENERAL, GNC_PREF_NEGATIVE_IN_RED);
-    priv->negative_color = use_red ? "red" : "black";
+    priv->negative_color = use_red ? "red" : NULL;
 }
 /************************************************************/
 /*               g_object required functions                */
@@ -205,7 +205,7 @@ gnc_tree_model_owner_init (GncTreeModelOwner *model)
     priv->book       = NULL;
     priv->owner_list = NULL;
     priv->owner_type = GNC_OWNER_NONE;
-    priv->negative_color = red ? "red" : "black";
+    priv->negative_color = red ? "red" : NULL;
 
     gnc_prefs_register_cb(GNC_PREFS_GROUP_GENERAL, GNC_PREF_NEGATIVE_IN_RED,
                           gnc_tree_model_owner_update_color,
@@ -528,7 +528,7 @@ gnc_tree_model_owner_set_color(GncTreeModelOwner *model,
     if (negative)
         g_value_set_static_string (value, priv->negative_color);
     else
-        g_value_set_static_string (value, "black");
+        g_value_set_static_string (value, NULL);
 }
 
 static void



Summary of changes:
 src/gnome-utils/gnc-tree-model-account.c | 6 +++---
 src/gnome-utils/gnc-tree-model-owner.c   | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)



More information about the gnucash-changes mailing list