mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Derek Atkin's patch making it possible to disable guppi support.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3496 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
21
configure.in
21
configure.in
@@ -283,9 +283,13 @@ AC_CHECK_LIB(gtkhtml, gtk_html_new,
|
||||
GHTTP_LIBS=`$GNOME_CONFIG --libs ghttp`
|
||||
GHTTP_CFLAGS=`$GNOME_CONFIG --cflags ghttp`
|
||||
|
||||
# Note: this doesn't croak if GHTTP_LIBS is empty! (e.g. on RH6.2)
|
||||
AC_CHECK_LIB(ghttp, ghttp_request_new,
|
||||
GNOMEBUILDLIBS="${GNOMEBUILDLIBS} ghttp"
|
||||
AC_DEFINE(HAVE_LIBGHTTP),
|
||||
AC_DEFINE(HAVE_LIBGHTTP)
|
||||
if test "x$GHTTP_LIBS" = "x" ; then
|
||||
GHTTP_LIBS=-lghttp
|
||||
fi,
|
||||
AC_MSG_ERROR([Cannot find ghttp. See the README for more info.]),
|
||||
$GHTTP_LIBS)
|
||||
|
||||
@@ -299,6 +303,20 @@ AC_SUBST(GHTTP_CFLAGS)
|
||||
### --------------------------------------------------------------------------
|
||||
### guppi
|
||||
|
||||
AC_ARG_ENABLE( guppi,
|
||||
[ --disable-guppi compile without guppi support],
|
||||
if test $enableval = no; then
|
||||
USE_GUPPI=0
|
||||
else
|
||||
USE_GUPPI=1
|
||||
fi,
|
||||
USE_GUPPI=1 )
|
||||
|
||||
if test $USE_GUPPI = 0; then
|
||||
AC_MSG_WARN([Compiling without guppi support])
|
||||
else
|
||||
AC_DEFINE(USE_GUPPI)
|
||||
|
||||
## Things guppi needs (actually are these guppi dependencies or gtkhtml's?)
|
||||
|
||||
# LAME: if you ask gnome-config for the zvt libs, it doesn't include
|
||||
@@ -329,6 +347,7 @@ LIBGUPPI_CHECK
|
||||
AC_SUBST(GUPPI_LIBS)
|
||||
AC_SUBST(GUPPI_CFLAGS)
|
||||
|
||||
fi
|
||||
|
||||
### --------------------------------------------------------------------------
|
||||
### XIM
|
||||
|
||||
@@ -24,7 +24,9 @@
|
||||
|
||||
#include <gnome.h>
|
||||
#include <glib.h>
|
||||
#ifdef USE_GUPPI
|
||||
#include <libguppitank/guppi-tank.h>
|
||||
#endif
|
||||
|
||||
#include "gnc-html-embedded.h"
|
||||
#include "mainwindow-account-tree.h"
|
||||
@@ -98,6 +100,7 @@ free_strings(char ** strings, int nstrings) {
|
||||
}
|
||||
|
||||
|
||||
#ifdef USE_GUPPI
|
||||
/********************************************************************
|
||||
* gnc_html_embedded_piechart
|
||||
* create a Guppi piechart from an HTML <object> block
|
||||
@@ -392,6 +395,7 @@ gnc_html_embedded_scatter(int w, int h, GHashTable * params) {
|
||||
|
||||
return rv;
|
||||
}
|
||||
#endif /* USE_GUPPI */
|
||||
|
||||
/********************************************************************
|
||||
* gnc_html_embedded_account_tree
|
||||
|
||||
@@ -28,7 +28,9 @@
|
||||
#include <unistd.h>
|
||||
#include <gtkhtml/gtkhtml.h>
|
||||
#include <gtkhtml/gtkhtml-embedded.h>
|
||||
#ifdef USE_GUPPI
|
||||
#include <libguppitank/guppi-tank.h>
|
||||
#endif
|
||||
#include <gnome.h>
|
||||
#include <regex.h>
|
||||
#include <glib.h>
|
||||
@@ -549,6 +551,7 @@ gnc_html_url_requested_cb(GtkHTML * html, char * url,
|
||||
}
|
||||
|
||||
|
||||
#ifdef USE_GUPPI
|
||||
static void
|
||||
gnc_html_guppi_print_cb(GtkHTMLEmbedded * eb, GnomePrintContext * pc,
|
||||
gpointer data) {
|
||||
@@ -567,6 +570,7 @@ gnc_html_guppi_redraw_cb(GtkHTMLEmbedded * eb,
|
||||
gpointer data) {
|
||||
/* nothing special to do */
|
||||
}
|
||||
#endif /* USE_GUPPI */
|
||||
|
||||
/********************************************************************
|
||||
* gnc_html_object_requested_cb - called when an applet needs to be
|
||||
@@ -580,8 +584,10 @@ gnc_html_object_requested_cb(GtkHTML * html, GtkHTMLEmbedded * eb,
|
||||
int retval = FALSE;
|
||||
|
||||
if(!strcmp(eb->classid, "gnc-guppi-pie")) {
|
||||
#ifdef USE_GUPPI
|
||||
widg = gnc_html_embedded_piechart(eb->width, eb->height,
|
||||
eb->params);
|
||||
#endif /* USE_GUPPI */
|
||||
if(widg) {
|
||||
gtk_widget_show_all(widg);
|
||||
gtk_container_add(GTK_CONTAINER(eb), widg);
|
||||
@@ -590,8 +596,10 @@ gnc_html_object_requested_cb(GtkHTML * html, GtkHTMLEmbedded * eb,
|
||||
retval = TRUE;
|
||||
}
|
||||
else if(!strcmp(eb->classid, "gnc-guppi-bar")) {
|
||||
#ifdef USE_GUPPI
|
||||
widg = gnc_html_embedded_barchart(eb->width, eb->height,
|
||||
eb->params);
|
||||
#endif /* USE_GUPPI */
|
||||
if(widg) {
|
||||
gtk_widget_show_all(widg);
|
||||
gtk_container_add(GTK_CONTAINER(eb), widg);
|
||||
@@ -600,8 +608,10 @@ gnc_html_object_requested_cb(GtkHTML * html, GtkHTMLEmbedded * eb,
|
||||
retval = TRUE;
|
||||
}
|
||||
else if(!strcmp(eb->classid, "gnc-guppi-scatter")) {
|
||||
#ifdef USE_GUPPI
|
||||
widg = gnc_html_embedded_scatter(eb->width, eb->height,
|
||||
eb->params);
|
||||
#endif /* USE_GUPPI */
|
||||
if(widg) {
|
||||
gtk_widget_show_all(widg);
|
||||
gtk_container_add(GTK_CONTAINER(eb), widg);
|
||||
@@ -620,7 +630,7 @@ gnc_html_object_requested_cb(GtkHTML * html, GtkHTMLEmbedded * eb,
|
||||
retval = TRUE;
|
||||
}
|
||||
|
||||
#if 0
|
||||
#if 0 && defined(USE_GUPPI)
|
||||
if(widg) {
|
||||
gtk_signal_connect(GTK_OBJECT(eb), "draw_gdk",
|
||||
GTK_SIGNAL_FUNC(gnc_html_guppi_redraw_cb),
|
||||
|
||||
@@ -27,7 +27,9 @@
|
||||
#include <gnome.h>
|
||||
#include <gtkhtml/gtkhtml.h>
|
||||
#include <guile/gh.h>
|
||||
#ifdef USE_GUPPI
|
||||
#include <libguppitank/guppi-tank.h>
|
||||
#endif
|
||||
#include <popt.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -208,8 +210,10 @@ gnucash_ui_init(void)
|
||||
gtk_widget_set_default_colormap (gdk_rgb_get_cmap ());
|
||||
gtk_widget_set_default_visual (gdk_rgb_get_visual ());
|
||||
|
||||
#ifdef USE_GUPPI
|
||||
/* initialize guppi */
|
||||
guppi_tank_init();
|
||||
#endif
|
||||
|
||||
app = gnome_app_new("GnuCash", "GnuCash");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user