r19349 - gnucash/trunk/src/gnome-utils - Bug #623842 - Reseting of Color Tabs to default color wrong.

Geert Janssens gjanssens at code.gnucash.org
Thu Jul 8 15:16:34 EDT 2010


Author: gjanssens
Date: 2010-07-08 15:16:33 -0400 (Thu, 08 Jul 2010)
New Revision: 19349
Trac: http://svn.gnucash.org/trac/changeset/19349

Modified:
   gnucash/trunk/src/gnome-utils/dialog-account.c
   gnucash/trunk/src/gnome-utils/gnc-main-window.c
Log:
Bug #623842 - Reseting of Color Tabs to default color wrong.

Modified: gnucash/trunk/src/gnome-utils/dialog-account.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-account.c	2010-07-07 15:11:25 UTC (rev 19348)
+++ gnucash/trunk/src/gnome-utils/dialog-account.c	2010-07-08 19:16:33 UTC (rev 19349)
@@ -372,6 +372,9 @@
     /* gdk_color_to_string requires gtk >= 2.12 */
     string = g_strdup_printf("#%04X%04X%04X", color.red, color.green, color.blue);
 #endif
+    if (safe_strcmp (string, DEFAULT_COLOR) == 0)
+	string = "Not Set";
+
     old_string = xaccAccountGetColor (account);
     if (safe_strcmp (string, old_string) != 0)
         xaccAccountSetColor (account, string);

Modified: gnucash/trunk/src/gnome-utils/gnc-main-window.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-main-window.c	2010-07-07 15:11:25 UTC (rev 19348)
+++ gnucash/trunk/src/gnome-utils/gnc-main-window.c	2010-07-08 19:16:33 UTC (rev 19349)
@@ -1992,6 +1992,11 @@
         gtk_widget_modify_bg(event_box, GTK_STATE_NORMAL, &tab_color);
         gtk_widget_modify_bg(event_box, GTK_STATE_ACTIVE, &tab_color);
     }
+    else
+    {
+        gtk_widget_modify_bg(event_box, GTK_STATE_NORMAL, NULL);
+        gtk_widget_modify_bg(event_box, GTK_STATE_ACTIVE, NULL);
+    }
     g_free(color_string);
     LEAVE("done");
 }
@@ -2604,6 +2609,11 @@
         gtk_widget_modify_bg(event_box, GTK_STATE_NORMAL, &tab_color);
         gtk_widget_modify_bg(event_box, GTK_STATE_ACTIVE, &tab_color);
     }
+    else
+    {
+        gtk_widget_modify_bg(event_box, GTK_STATE_NORMAL, NULL);
+        gtk_widget_modify_bg(event_box, GTK_STATE_ACTIVE, NULL);
+    }
 
     text = gnc_plugin_page_get_page_long_name(page);
     if (text)



More information about the gnucash-changes mailing list