r22799 - gnucash/trunk/src - Drop goffice dependency from our html engine
Geert Janssens
gjanssens at code.gnucash.org
Thu Feb 21 11:51:21 EST 2013
Author: gjanssens
Date: 2013-02-21 11:51:20 -0500 (Thu, 21 Feb 2013)
New Revision: 22799
Trac: http://svn.gnucash.org/trac/changeset/22799
Removed:
gnucash/trunk/src/html/gnc-html-graph-gog-extras.h
gnucash/trunk/src/html/gnc-html-graph-gog-webkit.c
gnucash/trunk/src/html/gnc-html-graph-gog-webkit.h
gnucash/trunk/src/html/gnc-html-graph-gog.c
gnucash/trunk/src/html/gnc-html-graph-gog.h
Modified:
gnucash/trunk/src/gnome-utils/Makefile.am
gnucash/trunk/src/gnome-utils/gnc-gnome-utils.c
gnucash/trunk/src/html/Makefile.am
gnucash/trunk/src/html/gnc-html-webkit.c
gnucash/trunk/src/html/gnc-html.i
Log:
Drop goffice dependency from our html engine
Modified: gnucash/trunk/src/gnome-utils/Makefile.am
===================================================================
--- gnucash/trunk/src/gnome-utils/Makefile.am 2013-02-21 11:27:56 UTC (rev 22798)
+++ gnucash/trunk/src/gnome-utils/Makefile.am 2013-02-21 16:51:20 UTC (rev 22799)
@@ -20,7 +20,6 @@
${GNOME_KEYRING_CFLAGS} \
${GUILE_INCS} \
${QOF_CFLAGS} \
- ${GOFFICE_CFLAGS} \
${LIBGDA_CFLAGS} \
${GTK_MAC_CFLAGS}
Modified: gnucash/trunk/src/gnome-utils/gnc-gnome-utils.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-gnome-utils.c 2013-02-21 11:27:56 UTC (rev 22798)
+++ gnucash/trunk/src/gnome-utils/gnc-gnome-utils.c 2013-02-21 16:51:20 UTC (rev 22799)
@@ -30,8 +30,6 @@
#endif
#include <libxml/xmlIO.h>
-//#include "gnc-html-graph-gog.h"
-
#include "assistant-gconf-setup.h"
#include "gnc-gconf-utils.h"
#include "gnc-gnome-utils.h"
Modified: gnucash/trunk/src/html/Makefile.am
===================================================================
--- gnucash/trunk/src/html/Makefile.am 2013-02-21 11:27:56 UTC (rev 22798)
+++ gnucash/trunk/src/html/Makefile.am 2013-02-21 16:51:20 UTC (rev 22799)
@@ -17,31 +17,25 @@
${GUILE_INCS} \
${GTK_CFLAGS} \
${GNOME_CFLAGS} \
- ${WEBKIT_CFLAGS} \
- ${GOFFICE_CFLAGS}
+ ${WEBKIT_CFLAGS}
libgncmod_html_la_SOURCES = \
gncmod-html.c \
gnc-html.c \
gnc-html-history.c \
- gnc-html-graph-gog.c \
gnc-html-factory.c \
gnc-html-webkit.c \
- gnc-html-graph-gog-webkit.c \
swig-gnc-html.c
gncincludedir = ${GNC_INCLUDE_DIR}
gncinclude_HEADERS = \
- gnc-html-graph-gog.h \
gnc-html-history.h \
gnc-html.h \
gnc-html-p.h \
gnc-html-factory.h \
gnc-html-webkit.h \
gnc-html-extras.h \
- gnc-html-webkit-p.h \
- gnc-html-graph-gog-webkit.h \
- gnc-html-graph-gog-extras.h
+ gnc-html-webkit-p.h
libgncmod_html_la_LDFLAGS = -avoid-version
@@ -57,7 +51,6 @@
${GLIB_LIBS} \
${DB_LIBS} \
${QOF_LIBS} \
- ${GOFFICE_LIBS} \
${GUILE_LIBS} \
${REGEX_LIBS}
Deleted: gnucash/trunk/src/html/gnc-html-graph-gog-extras.h
===================================================================
--- gnucash/trunk/src/html/gnc-html-graph-gog-extras.h 2013-02-21 11:27:56 UTC (rev 22798)
+++ gnucash/trunk/src/html/gnc-html-graph-gog-extras.h 2013-02-21 16:51:20 UTC (rev 22799)
@@ -1,33 +0,0 @@
-/********************************************************************
- * gnc-html-graph-gog-extras.h -- display html with gnc special *
- * tags *
- * Copyright (C) 2000 Bill Gribble <grib at billgribble.com> *
- * Copyright (C) 2009 Phil Longstaff <plongstaff at rogers.com> *
- * *
- * This program is free software; you can redistribute it and/or *
- * modify it under the terms of the GNU General Public License as *
- * published by the Free Software Foundation; either version 2 of *
- * the License, or (at your option) any later version. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact: *
- * *
- * Free Software Foundation Voice: +1-617-542-5942 *
- * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
- * Boston, MA 02110-1301, USA gnu at gnu.org *
-\********************************************************************/
-
-#ifndef GNC_HTML_GRAPH_GOG_EXTRAS_H
-#define GNC_HTML_GRAPH_GOG_EXTRAS_H 1
-
-#define GNC_CHART_PIE "gnc-guppi-pie"
-#define GNC_CHART_BAR "gnc-guppi-bar"
-#define GNC_CHART_LINE "gnc-guppi-line"
-#define GNC_CHART_SCATTER "gnc-guppi-scatter"
-
-#endif /* GNC_HTML_GRAPH_GOG_EXTRAS_H */
Deleted: gnucash/trunk/src/html/gnc-html-graph-gog-webkit.c
===================================================================
--- gnucash/trunk/src/html/gnc-html-graph-gog-webkit.c 2013-02-21 11:27:56 UTC (rev 22798)
+++ gnucash/trunk/src/html/gnc-html-graph-gog-webkit.c 2013-02-21 16:51:20 UTC (rev 22799)
@@ -1,487 +0,0 @@
-/********************************************************************
- * gnc-html-graph-gog_webkit.c -- GNC/HTML Graphing support via GOG *
- * *
- * Copyright (C) 2005 Joshua Sled <jsled at asynchronous.org> *
- * Copyright (C) 2009 Phil Longstaff <plongstaff at rogers.com> *
- * *
- * This program is free software; you can redistribute it and/or *
- * modify it under the terms of the GNU General Public License as *
- * published by the Free Software Foundation; either version 2 of *
- * the License, or (at your option) any later version. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact: *
- * *
- * Free Software Foundation Voice: +1-617-542-5942 *
- * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
- * Boston, MA 02110-1301, USA gnu at gnu.org *
- ********************************************************************/
-
-#include "config.h"
-
-#include <gtk/gtk.h>
-#include <webkit/webkit.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include "gnc-locale-utils.h"
-#include "gnc-html-graph-gog.h"
-#include "gnc-html-graph-gog-webkit.h"
-#include "gnc-html-graph-gog-extras.h"
-#include "gnc-html.h"
-#include "gnc-engine.h"
-
-/**
- * TODO:
- * - scatter-plot marker selection
- * - series-color, piecharts (hard, not really supported by GOG)
- * and scatters (or drop feature)
- * - title-string freeing (fixmes)
- * - general graph cleanup
- **/
-
-/* indicates the debugging module that this .o belongs to. */
-#undef G_LOG_DOMAIN
-#define G_LOG_DOMAIN "gnc.html.graph.gog.webkit"
-static QofLogModule log_module = GNC_MOD_HTML;
-
-static int handle_piechart( GncHtml* html, gpointer eb, gpointer d );
-static int handle_barchart( GncHtml* html, gpointer eb, gpointer d );
-static int handle_linechart( GncHtml* html, gpointer eb, gpointer d );
-static int handle_scatter( GncHtml* html, gpointer eb, gpointer d );
-
-static double * read_doubles(const char * string, int nvalues);
-
-void
-gnc_html_graph_gog_webkit_init( void )
-{
- gnc_html_graph_gog_init();
-
- gnc_html_register_object_handler( GNC_CHART_PIE, handle_piechart );
- gnc_html_register_object_handler( GNC_CHART_BAR, handle_barchart );
- gnc_html_register_object_handler( GNC_CHART_SCATTER, handle_scatter );
- gnc_html_register_object_handler( GNC_CHART_LINE, handle_linechart );
-}
-
-static double *
-read_doubles(const char * string, int nvalues)
-{
- int n;
- gchar *next;
- double * retval = g_new0(double, nvalues);
-
- // guile is going to (puts ...) the elements of the double array
- // together. In non-POSIX locales, that will be in a format that
- // the locale-specific sscanf will not be able to parse.
- gnc_push_locale(LC_NUMERIC, "C");
- {
- for (n = 0; n < nvalues; n++)
- {
- retval[n] = strtod(string, &next);
- string = next;
- }
- }
- gnc_pop_locale(LC_NUMERIC);
-
- return retval;
-}
-
-static char **
-read_strings(const char * string, int nvalues)
-{
- int n;
- int choffset = 0;
- int accum = 0;
- char ** retval = g_new0(char *, nvalues);
- char thischar;
- const char * inptr = string;
- int escaped = FALSE;
-
- for (n = 0; n < nvalues; n++)
- {
- retval[n] = g_new0(char, strlen(string + accum) + 1);
- retval[n][0] = 0;
- choffset = 0;
- while ((thischar = *inptr) != 0)
- {
- if (thischar == '\\')
- {
- escaped = TRUE;
- inptr++;
- }
- else if ((thischar != ' ') || escaped)
- {
- retval[n][choffset] = thischar;
- retval[n][choffset+1] = 0;
- choffset++;
- escaped = FALSE;
- inptr++;
- }
- else
- {
- /* an unescaped space */
- escaped = FALSE;
- inptr++;
- break;
- }
- }
- accum += choffset;
- /* printf("retval[%d] = '%s'\n", n, retval[n]); */
- }
-
- return retval;
-}
-
-static int
-get_int_value( gchar** str, const gchar* name )
-{
- gchar* p;
- gchar* tag_name;
- int val = -1;
-
- tag_name = g_strdup_printf( "%s=", name );
- p = g_strstr_len( *str, -1, tag_name );
- if ( p != NULL )
- {
- val = atoi( p + strlen( tag_name ) );
- *str = p + strlen( tag_name );
- }
- g_free( tag_name );
-
- return val;
-}
-
-static int
-get_int_param( gchar** str, const gchar* name )
-{
- gchar* p;
- gchar* tag_string;
- int val = -1;
-
- tag_string = g_strdup_printf( "<param name=\"%s\" value=\"", name );
- p = g_strstr_len( *str, -1, tag_string );
- if ( p != NULL )
- {
- val = atoi( p + strlen( tag_string ) );
- *str = p + strlen( tag_string );
- }
- g_free( tag_string );
-
- return val;
-}
-
-static gchar*
-get_string_param( gchar** str, const gchar* name )
-{
- gchar* p;
- gchar* p_end;
- gchar* tag_string;
- gchar* val = NULL;
-
- tag_string = g_strdup_printf( "<param name=\"%s\" value=\"", name );
- p = g_strstr_len( *str, -1, tag_string );
- if ( p != NULL )
- {
- p += strlen( tag_string );
- p_end = g_strstr_len( p, -1, "\">\n" );
- val = g_strndup( p, (p_end - p) );
- *str = p_end + strlen( "\">\n" );
- }
- g_free( tag_string );
-
- return val;
-}
-
-static gchar*
-convert_pixbuf_to_base64_string( GdkPixbuf* pixbuf )
-{
- gchar* pixel_buffer;
- gsize pixel_buffer_size;
- GError* error = NULL;
- gchar* base64_buf;
-
- if ( !gdk_pixbuf_save_to_buffer( pixbuf, &pixel_buffer, &pixel_buffer_size, "png",
- &error, NULL ) )
- {
- PERR( "Unable to save pixbuf to buffer: %s\n", error->message );
- return NULL;
- }
-
- base64_buf = g_base64_encode( (guchar *)pixel_buffer, pixel_buffer_size );
- g_free( pixel_buffer );
- return base64_buf;
-}
-
-/*
- * Handle the following parameters:
- * title: text
- * subtitle: text
- * datasize: (length data), sscanf( .., %d, (int)&datasize )
- * data: (foreach (lambda (datum) (push datum) (push " ")) data)
- * colors: string; space-seperated?
- * labels: string; space-seperated?
- * slice_urls_[123]: ?
- * legend_urls_[123]: ?
- */
-static gboolean
-handle_piechart( GncHtml* html, gpointer eb, gpointer d )
-{
- gchar* object_info = (gchar*)eb;
- gchar** pResult = (gchar**)d;
- GncHtmlPieChartInfo pieChartInfo;
- GdkPixbuf* pixbuf;
- gchar* temp_str;
- gchar* base64_buf;
-
- pieChartInfo.width = get_int_value( &object_info, "width" );
- pieChartInfo.height = get_int_value( &object_info, "height" );
- pieChartInfo.title = get_string_param( &object_info, "title" );
- pieChartInfo.subtitle = get_string_param( &object_info, "subtitle" );
- pieChartInfo.datasize = get_int_param( &object_info, "datasize" );
- temp_str = get_string_param( &object_info, "data" );
- if ( temp_str != NULL )
- {
- pieChartInfo.data = read_doubles( temp_str, pieChartInfo.datasize );
- g_free( temp_str );
- }
- temp_str = get_string_param( &object_info, "colors" );
- if ( temp_str != NULL )
- {
- pieChartInfo.colors = read_strings( temp_str, pieChartInfo.datasize );
- g_free( temp_str );
- }
- temp_str = get_string_param( &object_info, "labels" );
- if ( temp_str != NULL )
- {
- pieChartInfo.labels = read_strings( temp_str, pieChartInfo.datasize );
- g_free( temp_str );
- }
-
- pixbuf = gnc_html_graph_gog_create_piechart( &pieChartInfo );
- if ( pieChartInfo.title != NULL ) g_free( (gchar*)pieChartInfo.title );
- if ( pieChartInfo.subtitle != NULL ) g_free( (gchar*)pieChartInfo.subtitle );
-
- base64_buf = convert_pixbuf_to_base64_string( pixbuf );
- if ( base64_buf == NULL )
- {
- return FALSE;
- }
-
- *pResult = g_strdup_printf( "<img src=\"data:image/png;base64,%s \" alt=\"Cannot display piechart\"/>", base64_buf );
- g_free( base64_buf );
-
- g_debug("piechart rendered.");
- return TRUE;
-}
-
-/**
- * data_rows:int
- * data_cols:int
- * data:doubles[], data_rows*data_cols
- * x_axis_label:string
- * y_axis_label:string
- * row_labels:string[]
- * col_labels:string[]
- * col_colors:string[]
- * rotate_row_labels:boolean
- * stacked:boolean
- **/
-static gboolean
-handle_barchart( GncHtml* html, gpointer eb, gpointer d )
-{
- gchar* object_info = (gchar*)eb;
- gchar** pResult = (gchar**)d;
- GncHtmlBarChartInfo barChartInfo;
- GdkPixbuf* pixbuf;
- gchar* temp_str;
- gchar* base64_buf;
-
- barChartInfo.width = get_int_value( &object_info, "width" );
- barChartInfo.height = get_int_value( &object_info, "height" );
- barChartInfo.title = get_string_param( &object_info, "title" );
- barChartInfo.subtitle = get_string_param( &object_info, "subtitle" );
- barChartInfo.data_rows = get_int_param( &object_info, "data_rows" );
- barChartInfo.data_cols = get_int_param( &object_info, "data_cols" );
- temp_str = get_string_param( &object_info, "data" );
- if ( temp_str != NULL )
- {
- barChartInfo.data = read_doubles( temp_str, barChartInfo.data_rows * barChartInfo.data_cols );
- g_free( temp_str );
- }
- barChartInfo.x_axis_label = get_string_param( &object_info, "x_axis_label" );
- barChartInfo.y_axis_label = get_string_param( &object_info, "y_axis_label" );
- temp_str = get_string_param( &object_info, "col_colors" );
- if ( temp_str != NULL )
- {
- barChartInfo.col_colors = read_strings( temp_str, barChartInfo.data_cols );
- g_free( temp_str );
- }
- temp_str = get_string_param( &object_info, "row_labels" );
- if ( temp_str != NULL )
- {
- barChartInfo.row_labels = read_strings( temp_str, barChartInfo.data_rows );
- g_free( temp_str );
- }
- temp_str = get_string_param( &object_info, "col_labels" );
- if ( temp_str != NULL )
- {
- barChartInfo.col_labels = read_strings( temp_str, barChartInfo.data_cols );
- g_free( temp_str );
- }
- barChartInfo.rotate_row_labels = get_int_param( &object_info, "rotate_row_labels" );
- barChartInfo.stacked = get_int_param( &object_info, "stacked" );
-
- pixbuf = gnc_html_graph_gog_create_barchart( &barChartInfo );
- if ( barChartInfo.title != NULL ) g_free( (gchar*)barChartInfo.title );
- if ( barChartInfo.subtitle != NULL ) g_free( (gchar*)barChartInfo.subtitle );
- if ( barChartInfo.x_axis_label != NULL ) g_free( (gchar*)barChartInfo.x_axis_label );
- if ( barChartInfo.y_axis_label != NULL ) g_free( (gchar*)barChartInfo.y_axis_label );
-
- base64_buf = convert_pixbuf_to_base64_string( pixbuf );
- if ( base64_buf == NULL )
- {
- return FALSE;
- }
-
- *pResult = g_strdup_printf( "<img src=\"data:image/png;base64,%s \" alt=\"Cannot display barchart\"/>", base64_buf );
-
- g_debug("barchart rendered.");
- return TRUE;
-}
-
-
-/**
- * data_rows:int
- * data_cols:int
- * data:doubles[], data_rows*data_cols
- * x_axis_label:string
- * y_axis_label:string
- * row_labels:string[]
- * col_labels:string[]
- * col_colors:string[]
- * rotate_row_labels:boolean
- * stacked:boolean
- * markers:boolean
- * major_grid:boolean
- * minor_grid:boolean
- **/
-static gboolean
-handle_linechart( GncHtml* html, gpointer eb, gpointer d )
-{
- gchar* object_info = (gchar*)eb;
- gchar** pResult = (gchar**)d;
- GncHtmlLineChartInfo lineChartInfo;
- GdkPixbuf* pixbuf;
- gchar* temp_str;
- gchar* base64_buf;
-
- lineChartInfo.width = get_int_value( &object_info, "width" );
- lineChartInfo.height = get_int_value( &object_info, "height" );
- lineChartInfo.title = get_string_param( &object_info, "title" );
- lineChartInfo.subtitle = get_string_param( &object_info, "subtitle" );
- lineChartInfo.data_rows = get_int_param( &object_info, "data_rows" );
- lineChartInfo.data_cols = get_int_param( &object_info, "data_cols" );
- temp_str = get_string_param( &object_info, "data" );
- if ( temp_str != NULL )
- {
- lineChartInfo.data = read_doubles( temp_str, lineChartInfo.data_rows * lineChartInfo.data_cols );
- g_free( temp_str );
- }
- lineChartInfo.x_axis_label = get_string_param( &object_info, "x_axis_label" );
- lineChartInfo.y_axis_label = get_string_param( &object_info, "y_axis_label" );
- temp_str = get_string_param( &object_info, "col_colors" );
- if ( temp_str != NULL )
- {
- lineChartInfo.col_colors = read_strings( temp_str, lineChartInfo.data_cols );
- g_free( temp_str );
- }
- temp_str = get_string_param( &object_info, "row_labels" );
- if ( temp_str != NULL )
- {
- lineChartInfo.row_labels = read_strings( temp_str, lineChartInfo.data_rows );
- g_free( temp_str );
- }
- temp_str = get_string_param( &object_info, "col_labels" );
- if ( temp_str != NULL )
- {
- lineChartInfo.col_labels = read_strings( temp_str, lineChartInfo.data_cols );
- g_free( temp_str );
- }
- lineChartInfo.rotate_row_labels = get_int_param( &object_info, "rotate_row_labels" );
- lineChartInfo.stacked = get_int_param( &object_info, "stacked" );
- lineChartInfo.markers = get_int_param( &object_info, "markers" );
- lineChartInfo.major_grid = get_int_param( &object_info, "major_grid" );
- lineChartInfo.minor_grid = get_int_param( &object_info, "minor_grid" );
- lineChartInfo.line_width = get_int_param( &object_info, "line_width" );
-
- pixbuf = gnc_html_graph_gog_create_linechart( &lineChartInfo );
- if ( lineChartInfo.title != NULL ) g_free( (gchar*)lineChartInfo.title );
- if ( lineChartInfo.subtitle != NULL ) g_free( (gchar*)lineChartInfo.subtitle );
- if ( lineChartInfo.x_axis_label != NULL ) g_free( (gchar*)lineChartInfo.x_axis_label );
- if ( lineChartInfo.y_axis_label != NULL ) g_free( (gchar*)lineChartInfo.y_axis_label );
-
- base64_buf = convert_pixbuf_to_base64_string( pixbuf );
- if ( base64_buf == NULL )
- {
- return FALSE;
- }
-
- *pResult = g_strdup_printf( "<img src=\"data:image/png;base64,%s \" alt=\"Cannot display linechart\"/>", base64_buf );
-
- g_debug("linechart rendered.");
- return TRUE;
-}
-
-
-static gboolean
-handle_scatter( GncHtml* html, gpointer eb, gpointer d )
-{
- gchar* object_info = (gchar*)eb;
- gchar** pResult = (gchar**)d;
- GncHtmlScatterPlotInfo scatterPlotInfo;
- GdkPixbuf* pixbuf;
- gchar* temp_str;
- gchar* base64_buf;
-
- scatterPlotInfo.width = get_int_value( &object_info, "width" );
- scatterPlotInfo.height = get_int_value( &object_info, "height" );
- scatterPlotInfo.title = get_string_param( &object_info, "title" );
- scatterPlotInfo.subtitle = get_string_param( &object_info, "subtitle" );
- scatterPlotInfo.x_axis_label = get_string_param( &object_info, "x_axis_label" );
- scatterPlotInfo.y_axis_label = get_string_param( &object_info, "y_axis_label" );
- scatterPlotInfo.marker_str = get_string_param( &object_info, "marker" );
- scatterPlotInfo.color_str = get_string_param( &object_info, "color" );
- scatterPlotInfo.datasize = get_int_param( &object_info, "datasize" );
- temp_str = get_string_param( &object_info, "x_data" );
- if ( temp_str != NULL )
- {
- scatterPlotInfo.xData = read_doubles( temp_str, scatterPlotInfo.datasize );
- g_free( temp_str );
- }
- temp_str = get_string_param( &object_info, "y_data" );
- if ( temp_str != NULL )
- {
- scatterPlotInfo.yData = read_doubles( temp_str, scatterPlotInfo.datasize );
- g_free( temp_str );
- }
-
- pixbuf = gnc_html_graph_gog_create_scatterplot( &scatterPlotInfo );
- if ( scatterPlotInfo.title != NULL ) g_free( (gchar*)scatterPlotInfo.title );
- if ( scatterPlotInfo.subtitle != NULL ) g_free( (gchar*)scatterPlotInfo.subtitle );
-
- base64_buf = convert_pixbuf_to_base64_string( pixbuf );
- if ( base64_buf == NULL )
- {
- return FALSE;
- }
-
- *pResult = g_strdup_printf( "<img src=\"data:image/png;base64,%s \" alt=\"Cannot display scatterplot\"/>", base64_buf );
-
- g_debug("scatterplot rendered.");
- return TRUE;
-}
Deleted: gnucash/trunk/src/html/gnc-html-graph-gog-webkit.h
===================================================================
--- gnucash/trunk/src/html/gnc-html-graph-gog-webkit.h 2013-02-21 11:27:56 UTC (rev 22798)
+++ gnucash/trunk/src/html/gnc-html-graph-gog-webkit.h 2013-02-21 16:51:20 UTC (rev 22799)
@@ -1,30 +0,0 @@
-/********************************************************************
- * gnc-html_graph_gog_webkit.h -- display html with gnc special *
- * tags *
- * Copyright (C) 2000 Bill Gribble <grib at billgribble.com> *
- * Copyright (C) 2009 Phil Longstaff <plongstaff at rogers.com> *
- * *
- * This program is free software; you can redistribute it and/or *
- * modify it under the terms of the GNU General Public License as *
- * published by the Free Software Foundation; either version 2 of *
- * the License, or (at your option) any later version. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact: *
- * *
- * Free Software Foundation Voice: +1-617-542-5942 *
- * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
- * Boston, MA 02110-1301, USA gnu at gnu.org *
-\********************************************************************/
-
-#ifndef GNC_HTML_GRAPH_GOG_WEBKIT_H
-#define GNC_HTML_GRAPH_GOG_WEBKIT_H 1
-
-void gnc_html_graph_gog_webkit_init( void );
-
-#endif /* GNC_HTML_GRAPH_GOG_WEBKIT_H */
Deleted: gnucash/trunk/src/html/gnc-html-graph-gog.c
===================================================================
--- gnucash/trunk/src/html/gnc-html-graph-gog.c 2013-02-21 11:27:56 UTC (rev 22798)
+++ gnucash/trunk/src/html/gnc-html-graph-gog.c 2013-02-21 16:51:20 UTC (rev 22799)
@@ -1,564 +0,0 @@
-/********************************************************************
- * gnc-html-graph-gog.c -- GNC/HTML Graphing support via GOG *
- * *
- * Copyright (C) 2005 Joshua Sled <jsled at asynchronous.org> *
- * *
- * This program is free software; you can redistribute it and/or *
- * modify it under the terms of the GNU General Public License as *
- * published by the Free Software Foundation; either version 2 of *
- * the License, or (at your option) any later version. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact: *
- * *
- * Free Software Foundation Voice: +1-617-542-5942 *
- * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
- * Boston, MA 02110-1301, USA gnu at gnu.org *
- ********************************************************************/
-
-#include "config.h"
-
-#include <gtk/gtk.h>
-#include <string.h>
-
-#include "gnc-html-graph-gog.h"
-#include "gnc-html.h"
-#include "gnc-engine.h"
-#include <goffice/goffice.h>
-#include <goffice/graph/gog-chart.h>
-#include <goffice/graph/gog-graph.h>
-#include <goffice/graph/gog-object.h>
-#include <goffice/graph/gog-renderer.h>
-
-/* everything inside the following #ifndef can be safely removed when gnucash
-requires libgoffice >= 0.7.5, the contents of the #else block must stay. */
-#ifndef GOG_TYPE_GRAPH
-# define GOG_TYPE_GRAPH GOG_GRAPH_TYPE
-# define GO_TYPE_PLUGIN_LOADER_MODULE GO_PLUGIN_LOADER_MODULE_TYPE
-# define GOG_TYPE_RENDERER GOG_RENDERER_TYPE
-# include <goffice/graph/gog-style.h>
-# define GOStyle GogStyle
-# define go_styled_object_get_style gog_styled_object_get_style
-# define GO_STYLED_OBJECT GOG_STYLED_OBJECT
-# define GO_STYLE_FILL_PATTERN GOG_FILL_STYLE_PATTERN
-# define go_style_set_text_angle gog_style_set_text_angle
-#else
-# 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>
-#include <goffice/utils/go-color.h>
-#include <goffice/utils/go-marker.h>
-#include <goffice/graph/gog-data-set.h>
-#include <goffice/data/go-data-simple.h>
-#include <goffice/app/go-plugin.h>
-#include <goffice/app/go-plugin-loader-module.h>
-
-/**
- * TODO:
- * - scatter-plot marker selection
- * - series-color, piecharts (hard, not really supported by GOG)
- * and scatters (or drop feature)
- * - title-string freeing (fixmes)
- * - general graph cleanup
- **/
-
-#undef G_LOG_DOMAIN
-#define G_LOG_DOMAIN "gnc.html.graph.gog"
-
-static gboolean create_basic_plot_elements(const char *plot_type, GogObject **out_graph, GogObject **out_chart, GogPlot **out_plot);
-
-static void set_chart_titles(GogObject *chart, const char *title, const char* sub_title);
-static void set_chart_axis_labels(GogObject *chart, const char *x_axis_label, const char* y_axis_label);
-
-void
-gnc_html_graph_gog_init( void )
-{
- static gboolean initialized = FALSE;
-
- if ( !initialized )
- {
- g_debug( "init gog graphing" );
-
- libgoffice_init();
-
- /* Initialize plugins manager */
- go_plugins_init( NULL, NULL, NULL, NULL, TRUE, GO_TYPE_PLUGIN_LOADER_MODULE );
-
- initialized = TRUE;
- }
-}
-
-static GdkPixbuf*
-create_graph_pixbuf( GogObject *graph, int width, int height )
-{
- GogRenderer *renderer;
-
- GdkPixbuf *buf;
-
- // Note that this shouldn't be necessary as per discussion with Jody...
- // ... but it is because we don't embed in a control which passes the
- // update requests back to the graph widget, a-la the foo-canvas that
- // gnumeric uses. We probably _should_ do something like that, though.
- gog_object_update (GOG_OBJECT (graph));
-
- renderer = GOG_RENDERER(g_object_new( GOG_TYPE_RENDERER, "model", graph, NULL ));
- gog_renderer_update( renderer, width, height );
- buf = gog_renderer_get_pixbuf( renderer );
- g_object_set_data_full( G_OBJECT(buf), "renderer", renderer, g_object_unref );
-
- g_object_set_data_full( G_OBJECT(buf), "graph", graph, g_object_unref );
- return buf;
-}
-
-static gboolean
-create_basic_plot_elements(const char *plot_type_name,
- GogObject **out_graph,
- GogObject **out_chart,
- GogPlot **out_plot)
-{
- *out_graph = g_object_new(GOG_TYPE_GRAPH, NULL);
- *out_chart = gog_object_add_by_name(*out_graph, "Chart", NULL);
- *out_plot = gog_plot_new_by_name(plot_type_name);
- if (!*out_plot)
- {
- // FIXME - log betterer; should probably use GError?
- g_warning("gog: unable to load %s plugin", plot_type_name);
- return FALSE;
- }
- gog_object_add_by_name(*out_chart, "Plot", GOG_OBJECT(*out_plot) );
- return TRUE;
-}
-
-static void
-set_chart_titles(GogObject *chart, const char *title, const char* sub_title)
-{
- gchar *my_sub_title, *total_title;
- GOData *title_scalar;
- GogObject *tmp;
-
- if (sub_title)
- my_sub_title = g_strdup_printf("%s(%s)", title ? " " : "", sub_title);
- else
- my_sub_title = g_strdup("");
-
- total_title = g_strdup_printf("%s%s", title ? title : "", my_sub_title);
-
- tmp = gog_object_add_by_name(chart, "Title", NULL);
- title_scalar = go_data_scalar_str_new(total_title, TRUE);
- gog_dataset_set_dim(GOG_DATASET(tmp), 0, title_scalar, NULL);
-
- g_free(my_sub_title);
-}
-
-static void
-set_chart_axis_labels(GogObject *chart, const char *x_axis_label, const char* y_axis_label)
-{
- if (x_axis_label != NULL)
- {
- GogObject *xaxis, *label;
- GOData *data;
- xaxis = gog_object_get_child_by_role(chart, gog_object_find_role_by_name(chart, "X-Axis"));
- label = gog_object_add_by_name(xaxis, "Label", NULL);
- data = go_data_scalar_str_new(x_axis_label, FALSE);
- gog_dataset_set_dim(GOG_DATASET(label), 0, data, NULL);
- }
-
- if (y_axis_label != NULL)
- {
- GogObject *yaxis, *label;
- GOData *data;
- yaxis = gog_object_get_child_by_role(chart, gog_object_find_role_by_name(chart, "Y-Axis"));
- label = gog_object_add_by_name(yaxis, "Label", NULL);
- data = go_data_scalar_str_new(y_axis_label, FALSE);
- gog_dataset_set_dim(GOG_DATASET(label), 0, data, NULL);
- }
-}
-
-/*
- * Handle the following parameters:
- * title: text
- * subtitle: text
- * datasize: (length data), sscanf( .., %d, (int)&datasize )
- * data: (foreach (lambda (datum) (push datum) (push " ")) data)
- * colors: string; space-seperated?
- * labels: string; space-seperated?
- * slice_urls_[123]: ?
- * legend_urls_[123]: ?
- */
-GdkPixbuf*
-gnc_html_graph_gog_create_piechart( GncHtmlPieChartInfo* info )
-{
- GogObject *graph, *chart;
- GogPlot *plot;
- GogSeries *series;
- GOData *labelData, *sliceData;
- GdkPixbuf* pixbuf;
-
- if ( !create_basic_plot_elements( "GogPiePlot", &graph, &chart, &plot ) )
- {
- return NULL;
- }
- 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 );
- gog_series_set_dim( series, 0, labelData, NULL );
- go_data_emit_changed( GO_DATA(labelData) );
-
- sliceData = go_data_vector_val_new( info->data, info->datasize, NULL );
- gog_series_set_dim( series, 1, sliceData, NULL );
- go_data_emit_changed( GO_DATA(sliceData) );
-
- // fixme: colors
- set_chart_titles( chart, info->title, info->subtitle );
-
- pixbuf = create_graph_pixbuf( graph, info->width, info->height );
-
- return pixbuf;
-}
-
-/**
- * data_rows:int
- * data_cols:int
- * data:doubles[], data_rows*data_cols
- * x_axis_label:string
- * y_axis_label:string
- * row_labels:string[]
- * col_labels:string[]
- * col_colors:string[]
- * rotate_row_labels:boolean
- * stacked:boolean
- **/
-GdkPixbuf*
-gnc_html_graph_gog_create_barchart( GncHtmlBarChartInfo* info )
-{
- GogObject *graph, *chart;
- GogPlot *plot;
- GogSeries *series;
- GOStyle *style;
- GOData *label_data, *slice_data;
- char *bar_type = "normal";
- int bar_overlap = 0 /*percent*/; // seperate bars; no overlap.
- GdkPixbuf* pixbuf;
-
- if ( !create_basic_plot_elements( "GogBarColPlot", &graph, &chart, &plot ) )
- {
- return FALSE;
- }
- gog_object_add_by_name( chart, "Legend", NULL );
-
- if ( info->stacked )
- {
- // when stacked, we want the bars on _top_ of eachother.
- bar_type = "stacked";
- bar_overlap = 100 /*percent*/;
- }
-
- g_object_set( G_OBJECT(plot),
- //"vary_style_by_element", TRUE,
- "type", bar_type,
- "overlap_percentage", bar_overlap,
- NULL);
- label_data = go_data_vector_str_new( (gchar const * const *)info->row_labels, info->data_rows, NULL );
- {
- // foreach row:
- // series = row
- GdkColor color;
- int i;
- for ( i = 0; i < info->data_cols; i++ )
- {
- GError *err = NULL;
-
- series = gog_plot_new_series( plot );
- gog_object_set_name( GOG_OBJECT(series), info->col_labels[i], &err );
- if ( err != NULL )
- {
- g_warning( "error setting name [%s] on series [%d]: [%s]",
- info->col_labels[i], i, err->message);
- }
-
- g_object_ref( label_data );
- gog_series_set_dim( series, 0, label_data, NULL );
- go_data_emit_changed( GO_DATA(label_data) );
-
- slice_data = go_data_vector_val_new( info->data + (i * info->data_rows), info->data_rows, NULL );
- gog_series_set_dim( series, 1, slice_data, NULL );
- go_data_emit_changed( GO_DATA(slice_data) );
-
- style = go_styled_object_get_style( GO_STYLED_OBJECT(series) );
- 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, GO_COLOR_FROM_GDK(color) );
- }
- else
- {
- g_warning( "cannot parse color [%s]", info->col_colors[i] );
- }
- }
- }
-
- if ( info->rotate_row_labels )
- {
- GogObject *object = gog_object_get_child_by_role(
- chart, gog_object_find_role_by_name( chart, "X-Axis" ) );
- style = go_styled_object_get_style( GO_STYLED_OBJECT(object) );
- go_style_set_text_angle( style, 90.0 );
- }
-
- set_chart_titles( chart, info->title, info->subtitle );
- set_chart_axis_labels( chart, info->x_axis_label, info->y_axis_label );
-
- // we need to do this twice for the barchart... :p
- gog_object_update( GOG_OBJECT(graph) );
-
- pixbuf = create_graph_pixbuf( graph, info->width, info->height );
- g_debug( "barchart rendered." );
-
- return pixbuf;
-}
-
-
-/**
- * data_rows:int
- * data_cols:int
- * data:doubles[], data_rows*data_cols
- * x_axis_label:string
- * y_axis_label:string
- * row_labels:string[]
- * col_labels:string[]
- * col_colors:string[]
- * rotate_row_labels:boolean
- * stacked:boolean
- * markers:boolean
- * major_grid:boolean
- * minor_grid:boolean
- **/
-GdkPixbuf*
-gnc_html_graph_gog_create_linechart( GncHtmlLineChartInfo* info )
-{
- GogObject *graph, *chart;
- GogPlot *plot;
- GogSeries *series;
- GOStyle *style;
- GOData *label_data, *slice_data;
- gchar* line_type = "normal";
- GdkPixbuf* pixbuf;
-
- if ( !create_basic_plot_elements( "GogLinePlot", &graph, &chart, &plot ) )
- {
- return NULL;
- }
- gog_object_add_by_name( chart, "Legend", NULL );
-
- if ( info->stacked )
- {
- // when stacked, we want the lines on _top_ of eachother.
- line_type = "stacked";
- }
-
- g_object_set( G_OBJECT(plot),
- "vary_style_by_element", FALSE,
- "type", line_type,
- "default-style-has-markers", info->markers,
- NULL);
- label_data = go_data_vector_str_new( (gchar const * const *)info->row_labels, info->data_rows, NULL );
- {
- // foreach row:
- // series = row
- GdkColor color;
- int i;
- for ( i = 0; i < info->data_cols; i++ )
- {
- GError *err = NULL;
-
- series = gog_plot_new_series( plot );
- gog_object_set_name( GOG_OBJECT(series), info->col_labels[i], &err );
- if ( err != NULL )
- {
- g_warning( "error setting name [%s] on series [%d]: [%s]",
- info->col_labels[i], i, err->message );
- }
-
- g_object_ref( label_data );
- gog_series_set_dim( series, 0, label_data, NULL );
- go_data_emit_changed( GO_DATA(label_data) );
-
- slice_data = go_data_vector_val_new( info->data + (i * info->data_rows), info->data_rows, NULL );
- gog_series_set_dim( series, 1, slice_data, NULL );
- go_data_emit_changed( GO_DATA(slice_data) );
-
- style = go_styled_object_get_style( GO_STYLED_OBJECT(series) );
- style->fill.type = GO_STYLE_FILL_PATTERN;
- if ( gdk_color_parse( info->col_colors[i], &color ) )
- {
- style->line.width = info->line_width;
- style->line.auto_color = FALSE;
- style->line.color = GO_COLOR_FROM_GDK(color);
- }
- else
- {
- g_warning( "cannot parse color [%s]", info->col_colors[i] );
- }
- }
- }
-
- if ( info->rotate_row_labels )
- {
- GogObject *object = gog_object_get_child_by_role(
- chart, gog_object_find_role_by_name( chart, "X-Axis" ) );
- style = go_styled_object_get_style( GO_STYLED_OBJECT(object) );
- go_style_set_text_angle( style, 90.0 );
- }
-
- if ( info->major_grid || info->minor_grid )
- {
- GogObject *object;
-
- object = gog_object_get_child_by_role( chart,
- gog_object_find_role_by_name( chart, "Y-Axis" ) );
- if ( info->major_grid )
- {
- gog_object_add_by_name( GOG_OBJECT(object), "MajorGrid", NULL );
- }
- if ( info->minor_grid )
- {
- gog_object_add_by_name( GOG_OBJECT (object), "MinorGrid", NULL );
- }
- }
-
- set_chart_titles( chart, info->title, info->subtitle );
- set_chart_axis_labels( chart, info->x_axis_label, info->y_axis_label );
-
- // we need to do this twice for the linechart... :p
- gog_object_update( GOG_OBJECT(graph) );
-
- pixbuf = create_graph_pixbuf( graph, info->width, info->height );
- g_debug( "linechart rendered." );
-
- return pixbuf;
-}
-
-GdkPixbuf*
-gnc_html_graph_gog_create_scatterplot( GncHtmlScatterPlotInfo* info )
-{
- GogObject *graph, *chart;
- GogPlot *plot;
- GogSeries *series;
- GOData *sliceData;
- GOStyle *style;
- gboolean fill = FALSE;
-
- if ( !create_basic_plot_elements( "GogXYPlot", &graph, &chart, &plot ) )
- {
- return NULL;
- }
-
- series = gog_plot_new_series( plot );
- style = go_styled_object_get_style( GO_STYLED_OBJECT(series) );
-
- sliceData = go_data_vector_val_new( info->xData, info->datasize, NULL );
- gog_series_set_dim( series, 0, sliceData, NULL );
- go_data_emit_changed( GO_DATA(sliceData) );
-
- sliceData = go_data_vector_val_new( info->yData, info->datasize, NULL );
- gog_series_set_dim( series, 1, sliceData, NULL );
- go_data_emit_changed( GO_DATA(sliceData) );
-
- /* set marker shape */
- if ( info->marker_str != NULL )
- {
- GOMarkerShape shape;
-
- if ( g_str_has_prefix( info->marker_str, "filled ") )
- {
- fill = TRUE;
- info->marker_str += 7;
- }
- shape = go_marker_shape_from_str( info->marker_str );
- if ( shape != GO_MARKER_NONE )
- {
- style->marker.auto_shape = FALSE;
- go_marker_set_shape( style->marker.mark, shape );
- }
- else
- {
- g_warning( "cannot parse marker shape [%s]", info->marker_str );
- }
- }
-
- /* set marker and line colors */
- if ( info->color_str != NULL )
- {
- GdkColor color;
- if ( gdk_color_parse( info->color_str, &color ) )
- {
- style->marker.auto_outline_color = FALSE;
- go_marker_set_outline_color( style->marker.mark, GO_COLOR_FROM_GDK(color) );
- style->line.auto_color = FALSE;
- style->line.color = GO_COLOR_FROM_GDK(color);
- }
- else
- {
- g_warning( "cannot parse color [%s]", info->color_str );
- }
- }
-
- /* set marker fill colors */
- if ( fill )
- {
- style->marker.auto_fill_color = style->marker.auto_outline_color;
- go_marker_set_fill_color( style->marker.mark,
- go_marker_get_outline_color( style->marker.mark ) );
- }
- else
- {
- GOStyle *chart_style = go_styled_object_get_style( GO_STYLED_OBJECT(chart) );
-
- if ( chart_style->fill.type == GO_STYLE_FILL_PATTERN
- && chart_style->fill.pattern.pattern == GO_PATTERN_SOLID )
- {
- style->marker.auto_fill_color = FALSE;
- go_marker_set_fill_color( style->marker.mark, chart_style->fill.pattern.back );
- }
- else if ( chart_style->fill.type == GO_STYLE_FILL_PATTERN
- && chart_style->fill.pattern.pattern == GO_PATTERN_FOREGROUND_SOLID )
- {
- style->marker.auto_fill_color = FALSE;
- go_marker_set_fill_color( style->marker.mark, chart_style->fill.pattern.fore );
- }
- else
- {
- g_warning( "fill color of markers can only be set like a solid fill "
- "pattern of the chart" );
- }
- }
-
- set_chart_titles( chart, info->title, info->subtitle );
- set_chart_axis_labels( chart, info->x_axis_label, info->y_axis_label );
-
- // And twice for the scatter, too... :p
- gog_object_update( GOG_OBJECT(graph) );
-
- return create_graph_pixbuf( graph, info->width, info->height );
-}
Deleted: gnucash/trunk/src/html/gnc-html-graph-gog.h
===================================================================
--- gnucash/trunk/src/html/gnc-html-graph-gog.h 2013-02-21 11:27:56 UTC (rev 22798)
+++ gnucash/trunk/src/html/gnc-html-graph-gog.h 2013-02-21 16:51:20 UTC (rev 22799)
@@ -1,101 +0,0 @@
-/********************************************************************
- * gnc-html_graph_gog.h -- display html with gnc special *
- * tags *
- * Copyright (C) 2000 Bill Gribble <grib at billgribble.com> *
- * Copyright (C) 2009 Phil Longstaff <plongstaff at rogers.com> *
- * *
- * This program is free software; you can redistribute it and/or *
- * modify it under the terms of the GNU General Public License as *
- * published by the Free Software Foundation; either version 2 of *
- * the License, or (at your option) any later version. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact: *
- * *
- * Free Software Foundation Voice: +1-617-542-5942 *
- * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
- * Boston, MA 02110-1301, USA gnu at gnu.org *
-\********************************************************************/
-
-#ifndef GNC_HTML_GRAPH_GOG_H
-#define GNC_HTML_GRAPH_GOG_H 1
-
-typedef struct
-{
- gint width;
- gint height;
- const gchar* title;
- const gchar* subtitle;
- gint datasize;
- gdouble* data;
- gchar** labels;
- gchar** colors;
-} GncHtmlPieChartInfo;
-
-typedef struct
-{
- gint width;
- gint height;
- const gchar* title;
- const gchar* subtitle;
- gint data_rows;
- gint data_cols;
- gdouble* data;
- gchar** col_labels;
- gchar** row_labels;
- gchar** col_colors;
- const gchar* x_axis_label;
- const gchar* y_axis_label;
- gboolean rotate_row_labels;
- gboolean stacked;
-} GncHtmlBarChartInfo;
-
-typedef struct
-{
- gint width;
- gint height;
- const gchar* title;
- const gchar* subtitle;
- gint data_rows;
- gint data_cols;
- gdouble* data;
- gchar** col_labels;
- gchar** row_labels;
- gchar** col_colors;
- gboolean rotate_row_labels;
- gboolean stacked;
- gboolean markers;
- gboolean major_grid;
- gboolean minor_grid;
- const gchar* x_axis_label;
- const gchar* y_axis_label;
- gint line_width;
-} GncHtmlLineChartInfo;
-
-typedef struct
-{
- gint width;
- gint height;
- const gchar* title;
- const gchar* subtitle;
- const gchar* x_axis_label;
- const gchar* y_axis_label;
- gint datasize;
- gdouble* xData;
- gdouble* yData;
- const gchar* marker_str;
- const gchar* color_str;
-} GncHtmlScatterPlotInfo;
-
-void gnc_html_graph_gog_init( void );
-GdkPixbuf* gnc_html_graph_gog_create_piechart( GncHtmlPieChartInfo* info );
-GdkPixbuf* gnc_html_graph_gog_create_barchart( GncHtmlBarChartInfo* info );
-GdkPixbuf* gnc_html_graph_gog_create_linechart( GncHtmlLineChartInfo* info );
-GdkPixbuf* gnc_html_graph_gog_create_scatterplot( GncHtmlScatterPlotInfo* info );
-
-#endif /* GNC_HTML_GRAPH_GOG_H */
Modified: gnucash/trunk/src/html/gnc-html-webkit.c
===================================================================
--- gnucash/trunk/src/html/gnc-html-webkit.c 2013-02-21 11:27:56 UTC (rev 22798)
+++ gnucash/trunk/src/html/gnc-html-webkit.c 2013-02-21 16:51:20 UTC (rev 22799)
@@ -47,7 +47,6 @@
#include "gnc-html.h"
#include "gnc-html-webkit.h"
#include "gnc-html-history.h"
-#include "gnc-html-graph-gog-webkit.h"
#include "print-session.h"
G_DEFINE_TYPE(GncHtmlWebkit, gnc_html_webkit, GNC_TYPE_HTML )
@@ -202,9 +201,6 @@
html_class->print = impl_webkit_print;
html_class->cancel = impl_webkit_cancel;
html_class->set_parent = impl_webkit_set_parent;
-
- // Initialize graphing support
- gnc_html_graph_gog_webkit_init();
}
static void
Modified: gnucash/trunk/src/html/gnc-html.i
===================================================================
--- gnucash/trunk/src/html/gnc-html.i 2013-02-21 11:27:56 UTC (rev 22798)
+++ gnucash/trunk/src/html/gnc-html.i 2013-02-21 16:51:20 UTC (rev 22799)
@@ -22,7 +22,6 @@
%newobject gnc_build_url;
%include "gnc-html-extras.h"
-%include "gnc-html-graph-gog-extras.h"
%init {
@@ -47,11 +46,6 @@
SET_ENUM("URL-TYPE-PRICE");
SET_ENUM("URL-TYPE-OTHER");
- SET_ENUM("GNC-CHART-PIE");
- SET_ENUM("GNC-CHART-BAR");
- SET_ENUM("GNC-CHART-LINE");
- SET_ENUM("GNC-CHART-SCATTER");
-
#undefine SET_ENUM
}
More information about the gnucash-changes
mailing list