r18311 - gnucash/trunk/src/html - Fix bug 594048 - gnucash will not compile with most recent goffice versions
Phil Longstaff
plongstaff at code.gnucash.org
Fri Sep 11 19:18:38 EDT 2009
Author: plongstaff
Date: 2009-09-11 19:18:38 -0400 (Fri, 11 Sep 2009)
New Revision: 18311
Trac: http://svn.gnucash.org/trac/changeset/18311
Modified:
gnucash/trunk/src/html/gnc-html-graph-gog.c
Log:
Fix bug 594048 - gnucash will not compile with most recent goffice versions
Patch by Jean Brefort
Modified: gnucash/trunk/src/html/gnc-html-graph-gog.c
===================================================================
--- gnucash/trunk/src/html/gnc-html-graph-gog.c 2009-09-11 16:48:13 UTC (rev 18310)
+++ gnucash/trunk/src/html/gnc-html-graph-gog.c 2009-09-11 23:18:38 UTC (rev 18311)
@@ -59,6 +59,9 @@
# include <goffice/utils/go-style.h>
# include <goffice/utils/go-styled-object.h>
#endif
+#ifndef GO_COLOR_FROM_GDK
+# define GO_COLOR_FROM_GDK GDK_TO_UINT
+#endif
#include <goffice/graph/gog-styled-object.h>
#include <goffice/graph/gog-plot.h>
#include <goffice/graph/gog-series.h>
@@ -233,8 +236,13 @@
}
gog_object_add_by_name( chart, "Legend", NULL );
+#ifdef GO_COLOR_BLACK
+ GOG_STYLED_OBJECT(graph)->style->line.width = 5;
+ GOG_STYLED_OBJECT(graph)->style->line.color = GO_COLOR_BLACK;
+#else
GOG_STYLED_OBJECT(graph)->style->outline.width = 5;
GOG_STYLED_OBJECT(graph)->style->outline.color = RGBA_BLACK;
+#endif
series = gog_plot_new_series( plot );
labelData = go_data_vector_str_new( (gchar const * const *)info->labels, info->datasize, NULL );
@@ -321,7 +329,7 @@
style->fill.type = GO_STYLE_FILL_PATTERN;
if( gdk_color_parse( info->col_colors[i], &color ) ) {
style->fill.auto_back = FALSE;
- go_pattern_set_solid( &style->fill.pattern, GDK_TO_UINT(color) );
+ go_pattern_set_solid( &style->fill.pattern, GO_COLOR_FROM_GDK(color) );
} else {
g_warning( "cannot parse color [%s]", info->col_colors[i] );
}
@@ -417,7 +425,7 @@
style->fill.type = GO_STYLE_FILL_PATTERN;
if( gdk_color_parse( info->col_colors[i], &color ) ) {
style->fill.auto_back = FALSE;
- go_pattern_set_solid( &style->fill.pattern, GDK_TO_UINT(color) );
+ go_pattern_set_solid( &style->fill.pattern, GO_COLOR_FROM_GDK(color) );
} else {
g_warning( "cannot parse color [%s]", info->col_colors[i] );
}
@@ -503,9 +511,9 @@
GdkColor color;
if( gdk_color_parse( info->color_str, &color ) ) {
style->marker.auto_outline_color = FALSE;
- go_marker_set_outline_color( style->marker.mark, GDK_TO_UINT(color) );
+ go_marker_set_outline_color( style->marker.mark, GO_COLOR_FROM_GDK(color) );
style->line.auto_color = FALSE;
- style->line.color = GDK_TO_UINT(color);
+ style->line.color = GO_COLOR_FROM_GDK(color);
} else {
g_warning( "cannot parse color [%s]", info->color_str );
}
More information about the gnucash-changes
mailing list