From ae41252ddd61e384b113d43c503ff5ed9015b120 Mon Sep 17 00:00:00 2001 From: Dave Peticolas Date: Fri, 7 Dec 2001 08:49:57 +0000 Subject: [PATCH] Work on report/report-gnome module. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6267 57a11ea4-9604-0410-9ed3-97b8803252fd --- configure.in | 1 + src/Makefile.am | 21 +++--- src/README.modules | 1 + src/app-utils/test/Makefile.am | 2 + src/business/business-gnome/Makefile.am | 2 +- .../business-gnome/gw-business-gnome-spec.scm | 6 +- src/gnc-ui.h | 1 - src/gnome-utils/gnc-gui-query.h | 1 + src/gnome-utils/gw-gnome-utils-spec.scm | 7 ++ src/gnome/Makefile.am | 10 +-- src/gnome/gw-gnc-spec.scm | 18 ++--- src/report/Makefile.am | 14 +++- .../locale-specific/us/test/Makefile.am | 13 ++-- src/report/report-gnome/.cvsignore | 2 + src/report/report-gnome/Makefile.am | 62 ++++++++++++++++++ src/report/report-gnome/gncmod-report-gnome.c | 65 +++++++++++++++++++ .../report-gnome/gw-report-gnome-spec.scm | 54 +++++++++++++++ .../report-gnome}/window-report.c | 38 ++++------- .../report-gnome}/window-report.h | 0 src/report/report-system/test/Makefile.am | 2 + src/report/standard-reports/test/Makefile.am | 2 + src/report/stylesheets/test/Makefile.am | 2 + src/report/utility-reports/test/Makefile.am | 2 + src/scm/main.scm | 1 + src/tax/us/test/Makefile.am | 2 + 25 files changed, 265 insertions(+), 64 deletions(-) create mode 100644 src/report/report-gnome/.cvsignore create mode 100644 src/report/report-gnome/Makefile.am create mode 100644 src/report/report-gnome/gncmod-report-gnome.c create mode 100644 src/report/report-gnome/gw-report-gnome-spec.scm rename src/{gnome => report/report-gnome}/window-report.c (97%) rename src/{gnome => report/report-gnome}/window-report.h (100%) diff --git a/configure.in b/configure.in index 6b71c474fc..07b4a2fa6d 100644 --- a/configure.in +++ b/configure.in @@ -839,6 +839,7 @@ AC_OUTPUT( src/register/register-gnome/Makefile src/register/register-gnome/test/Makefile src/report/Makefile + src/report/report-gnome/Makefile src/report/report-system/test/Makefile src/report/report-system/Makefile src/report/standard-reports/test/Makefile diff --git a/src/Makefile.am b/src/Makefile.am index 0940fe1c64..e13b6fb778 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,25 +1,24 @@ -DIST_SUBDIRS = \ +NONGUI_SUBDIRS = \ doc \ pixmaps \ - bin - -NONGUI_SUBDIRS = \ core-utils \ gnc-module \ test-core \ engine \ backend \ - report \ scm \ - quotes + quotes \ + bin -GUI_SUBDIRS = \ +GUI_SUBDIRS_1 = \ network-utils \ calculation \ tax \ app-utils \ gnome-utils \ - app-file \ + app-file + +GUI_SUBDIRS_2 = \ import-export \ dialog-account \ register \ @@ -28,10 +27,12 @@ GUI_SUBDIRS = \ business \ optional +DIST_SUBDIRS = $(NONGUI_SUBDIRS) $(GUI_SUBDIRS_1) report $(GUI_SUBDIRS_2) + if GNUCASH_ENABLE_GUI -SUBDIRS = $(DIST_SUBDIRS) $(NONGUI_SUBDIRS) $(GUI_SUBDIRS) +SUBDIRS = $(DIST_SUBDIRS) else -SUBDIRS = $(DIST_SUBDIRS) $(NONGUI_SUBDIRS) +SUBDIRS = $(NONGUI_SUBDIRS) report endif noinst_HEADERS = \ diff --git a/src/README.modules b/src/README.modules index 664544c830..3111855703 100644 --- a/src/README.modules +++ b/src/README.modules @@ -44,6 +44,7 @@ report/utility-reports the multicolumn view, the iframe report, etc. report/locale-specific-reports reports that should only be loaded in certain locales. subdir per locale. report/stylesheets predefined style sheet templates +report/report-gnome Gnome gui for displaying reports. app-utils utils for the gnucash app framework (component mgr, cmd line processing, gettext stuff, etc) diff --git a/src/app-utils/test/Makefile.am b/src/app-utils/test/Makefile.am index a3a6466d48..7810cfffbb 100644 --- a/src/app-utils/test/Makefile.am +++ b/src/app-utils/test/Makefile.am @@ -12,7 +12,9 @@ GNC_TEST_DEPS := \ --guile-load-dir ${G_WRAP_MODULE_DIR} \ --guile-load-dir ${top_srcdir}/lib \ --guile-load-dir ${top_srcdir}/src/scm \ + --guile-load-dir ${top_srcdir}/src/gnome-utils \ --guile-load-dir ${top_srcdir}/src/gnome \ + --library-dir ${top_srcdir}/src/gnome-utils \ --library-dir ${top_srcdir}/src/gnome TESTS_ENVIRONMENT := \ diff --git a/src/business/business-gnome/Makefile.am b/src/business/business-gnome/Makefile.am index b2eca9c155..89562cfacc 100644 --- a/src/business/business-gnome/Makefile.am +++ b/src/business/business-gnome/Makefile.am @@ -94,7 +94,7 @@ gw-business-gnome.scm gw-business-gnome.c gw-business-gnome.h: .scm-links gw-bus (set! %load-path (cons \"${PWD}\" %load-path)) \ (set! %load-path (cons \"../business-core\" %load-path)) \ (set! %load-path (cons \"../../engine\" %load-path)) \ - (set! %load-path (cons \"../../gnome\" %load-path)) \ + (set! %load-path (cons \"../../gnome-utils\" %load-path)) \ (primitive-load \"./gw-business-gnome-spec.scm\") \ (gw:generate-module \"gw-business-gnome\")" diff --git a/src/business/business-gnome/gw-business-gnome-spec.scm b/src/business/business-gnome/gw-business-gnome-spec.scm index a91f5b69cc..8c106885a1 100644 --- a/src/business/business-gnome/gw-business-gnome-spec.scm +++ b/src/business/business-gnome/gw-business-gnome-spec.scm @@ -8,7 +8,7 @@ :use-module (g-wrap)) (use-modules (g-wrapped gw-business-core-spec)) -(use-modules (g-wrapped gw-gnc-spec)) +(use-modules (g-wrapped gw-gnome-utils-spec)) (let ((mod (gw:new-module "gw-business-gnome"))) (define (standard-c-call-gen result func-call-code) @@ -35,8 +35,8 @@ (gw:module-depends-on mod "gw-runtime") (gw:module-depends-on mod "gw-business-core") (gw:module-depends-on mod "gw-engine") - (gw:module-depends-on mod "gw-gnc") - + (gw:module-depends-on mod "gw-gnome-utils") + (gw:module-set-guile-module! mod '(g-wrapped gw-business-gnome)) (gw:module-set-declarations-ccodegen! diff --git a/src/gnc-ui.h b/src/gnc-ui.h index ce60232da4..0ab5d21917 100644 --- a/src/gnc-ui.h +++ b/src/gnc-ui.h @@ -74,7 +74,6 @@ GNCVerifyResult gnc_ok_cancel_dialog_parented(gncUIWidget parent, void gnc_warning_dialog_parented(gncUIWidget parent, const char *message); gboolean gnc_verify_dialog(const char *message, gboolean yes_is_default); -void gnc_error_dialog(const char *message); int gnc_choose_radio_option_dialog_parented (gncUIWidget parent, const char *title, diff --git a/src/gnome-utils/gnc-gui-query.h b/src/gnome-utils/gnc-gui-query.h index d40b8aa80a..b13f985440 100644 --- a/src/gnome-utils/gnc-gui-query.h +++ b/src/gnome-utils/gnc-gui-query.h @@ -28,6 +28,7 @@ void gnc_info_dialog_parented(GtkWindow *parent, const char *message); void gnc_warning_dialog(const char *message); +void gnc_error_dialog(const char *message); void gnc_error_dialog_parented(GtkWindow *parent, const char *message); #endif diff --git a/src/gnome-utils/gw-gnome-utils-spec.scm b/src/gnome-utils/gw-gnome-utils-spec.scm index 29f59e0799..e8fa4ef7cd 100644 --- a/src/gnome-utils/gw-gnome-utils-spec.scm +++ b/src/gnome-utils/gw-gnome-utils-spec.scm @@ -43,9 +43,16 @@ "#include \n" "#include \n" "#include \n" + "#include \n" "#include \n" ))) + (let ((nnt (gw:wrap-non-native-type + mod + ' + "gncUIWidget" "const gncUIWidget"))) + #t) + (let ((nnt (gw:wrap-non-native-type mod ' diff --git a/src/gnome/Makefile.am b/src/gnome/Makefile.am index 57ec8b7108..725f3c2995 100644 --- a/src/gnome/Makefile.am +++ b/src/gnome/Makefile.am @@ -12,6 +12,7 @@ libgncgnome_la_LIBADD = \ ${top_builddir}/src/backend/file/libgncmod-backend-file.la \ ${top_builddir}/src/import-export/qif-import/libgncmod-qif-import.la \ ${top_builddir}/src/report/report-system/libgncmod-report-system.la \ + ${top_builddir}/src/report/report-gnome/libgncmod-report-gnome.la \ ${top_builddir}/src/register/ledger-core/libgncmod-ledger-core.la \ ${GUILE_LIBS} ${GNOME_LIBDIR} ${GNOMEUI_LIBS} ${GLIB_LIBS} @@ -51,8 +52,7 @@ libgncgnome_la_SOURCES = \ window-main.c \ window-main-summarybar.c \ window-reconcile.c \ - window-register.c \ - window-report.c + window-register.c gnomeappdir = ${datadir}/gnome/apps/Applications @@ -91,8 +91,7 @@ noinst_HEADERS = \ window-main.h \ window-main-summarybar.h \ window-reconcile.h \ - window-register.h \ - window-report.h + window-register.h EXTRA_DIST = \ .cvsignore \ @@ -118,6 +117,7 @@ AM_CFLAGS = \ -I${top_srcdir}/src/register/register-core \ -I${top_srcdir}/src/register/register-gnome \ -I${top_srcdir}/src/report/report-system \ + -I${top_srcdir}/src/report/report-gnome \ -I${top_srcdir}/src/import-export/binary-import \ -I${top_srcdir}/src/import-export/qif-import \ ${GUILE_INCS} \ @@ -159,6 +159,8 @@ gw-gnc.scm gw-gnc.h gw-gnc.c gw-gnc.html: gw-gnc-spec.scm .scm-links FLAVOR=gnome guile -c \ "(set! %load-path (cons \"${G_WRAP_MODULE_DIR}\" %load-path)) \ (set! %load-path (cons \"../engine\" %load-path)) \ + (set! %load-path (cons \"../gnome-utils\" %load-path)) \ + (set! %load-path (cons \"../report/report-gnome\" %load-path)) \ (primitive-load \"./gw-gnc-spec.scm\") \ (gw:generate-module \"gw-gnc\")" BUILT_SOURCES = gw-gnc.scm gw-gnc.h gw-gnc.c diff --git a/src/gnome/gw-gnc-spec.scm b/src/gnome/gw-gnc-spec.scm index 7ac1e9ebb6..71c9de7fe4 100644 --- a/src/gnome/gw-gnc-spec.scm +++ b/src/gnome/gw-gnc-spec.scm @@ -9,6 +9,9 @@ (use-modules (g-wrapped gw-engine-spec)) (use-modules (g-wrapped gw-glib-spec)) +(use-modules (g-wrapped gw-gnome-utils-spec)) +;; FIXME take out when finished creating report-gnome +(use-modules (g-wrapped gw-report-gnome-spec)) (let ((mod (gw:new-module "gw-gnc"))) (define (standard-c-call-gen result func-call-code) @@ -35,6 +38,9 @@ (gw:module-depends-on mod "gw-runtime") (gw:module-depends-on mod "gw-engine") (gw:module-depends-on mod "gw-glib") + (gw:module-depends-on mod "gw-gnome-utils") + ;; FIXME take out when finished creating report-gnome + (gw:module-depends-on mod "gw-report-gnome") (gw:module-set-guile-module! mod '(g-wrapped gw-gnc)) @@ -70,18 +76,6 @@ "#include \n" "#include \n" ))) - (let ((nnt (gw:wrap-non-native-type - mod - ' - "gncUIWidget" "const gncUIWidget"))) - #t) - - (let ((nnt (gw:wrap-non-native-type - mod - ' - "gnc_report_window*" "const gnc_report_window*"))) - #t) - (let ((nnt (gw:wrap-non-native-type mod ' diff --git a/src/report/Makefile.am b/src/report/Makefile.am index 61f7872f98..503ea627b8 100644 --- a/src/report/Makefile.am +++ b/src/report/Makefile.am @@ -1,7 +1,17 @@ -SUBDIRS=\ +NONGUI_SUBDIRS = \ report-system \ standard-reports \ utility-reports \ locale-specific \ - stylesheets + stylesheets +GUI_SUBDIRS = \ + report-gnome + +if GNUCASH_ENABLE_GUI +SUBDIRS = $(NONGUI_SUBDIRS) $(GUI_SUBDIRS) +else +SUBDIRS = $(NONGUI_SUBDIRS) +endif + +DIST_SUBDIRS = $(NONGUI_SUBDIRS) $(GUI_SUBDIRS) diff --git a/src/report/locale-specific/us/test/Makefile.am b/src/report/locale-specific/us/test/Makefile.am index fcd0b88ec0..53ee3b39e6 100644 --- a/src/report/locale-specific/us/test/Makefile.am +++ b/src/report/locale-specific/us/test/Makefile.am @@ -1,4 +1,4 @@ -TESTS=test-load-module test-link-module +TESTS = test-load-module test-link-module GNC_TEST_DEPS := \ --gnc-module-dir ${top_builddir}/src/gnc-module \ @@ -12,7 +12,9 @@ GNC_TEST_DEPS := \ --guile-load-dir ${G_WRAP_MODULE_DIR} \ --guile-load-dir ${top_srcdir}/lib \ --guile-load-dir ${top_srcdir}/src/scm \ + --guile-load-dir ${top_srcdir}/src/gnome-utils \ --guile-load-dir ${top_srcdir}/src/gnome \ + --library-dir ${top_srcdir}/src/gnome-utils \ --library-dir ${top_srcdir}/src/gnome TESTS_ENVIRONMENT := \ @@ -20,14 +22,11 @@ TESTS_ENVIRONMENT := \ EXTRA_DIST = test-load-module -noinst_PROGRAMS=test-link-module +noinst_PROGRAMS = test-link-module testit: ${TESTS_ENVIRONMENT} gdb guile -test_link_module_SOURCES=test-link-module.c +test_link_module_SOURCES = test-link-module.c test_link_module_LDADD= \ - ${top_srcdir}/src/report/locale-specific/us/libgncmod-locale-reports-us.la - - - \ No newline at end of file + ${top_srcdir}/src/report/locale-specific/us/libgncmod-locale-reports-us.la diff --git a/src/report/report-gnome/.cvsignore b/src/report/report-gnome/.cvsignore new file mode 100644 index 0000000000..282522db03 --- /dev/null +++ b/src/report/report-gnome/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/src/report/report-gnome/Makefile.am b/src/report/report-gnome/Makefile.am new file mode 100644 index 0000000000..2ba96cad57 --- /dev/null +++ b/src/report/report-gnome/Makefile.am @@ -0,0 +1,62 @@ +pkglib_LTLIBRARIES = libgncmod-report-gnome.la libgw-report-gnome.la + +AM_CFLAGS = \ + -I${top_srcdir}/src \ + -I${top_srcdir}/src/gnc-module \ + -I${top_srcdir}/src/engine \ + -I${top_srcdir}/src/app-utils \ + -I${top_srcdir}/src/gnome-utils \ + -I${top_srcdir}/src/app-file \ + ${GUILE_INCS} \ + ${G_WRAP_COMPILE_ARGS} \ + ${GLIB_CFLAGS} \ + ${GNOME_INCLUDEDIR} \ + ${GNOME_PRINT_CFLAGS} + +libgncmod_report_gnome_la_SOURCES = \ + gncmod-report-gnome.c \ + window-report.c + +gncincludedir = ${GNC_INCLUDE_DIR} +gncinclude_HEADERS = \ + window-report.h + +libgncmod_report_gnome_la_LDFLAGS = -module + +libgncmod_report_gnome_la_LIBADD = \ + ${top_srcdir}/src/gnc-module/libgncmodule.la \ + ${GUILE_LIBS} \ + ${GNOME_LIBDIR} \ + ${GNOMEUI_LIBS} \ + ${GNOME_PRINT_LIBS} \ + ${GLIB_LIBS} + +libgw_report_gnome_la_SOURCES = gw-report-gnome.c +libgw_report_gnome_la_LDFLAGS = -module + +gwmoddir = ${GNC_GWRAP_LIBDIR} +gwmod_DATA = gw-report-gnome.scm gw-report-gnome-spec.scm + +noinst_DATA = .scm-links + +EXTRA_DIST = \ + .cvsignore + +.scm-links: + rm -f gnucash g-wrapped + ln -sf . gnucash + ln -sf . g-wrapped + touch .scm-links + +gw-report-gnome.scm gw-report-gnome.c gw-report-gnome.h: .scm-links gw-report-gnome-spec.scm + FLAVOR=gnome guile -c \ + "(set! %load-path (cons \"${G_WRAP_MODULE_DIR}\" %load-path)) \ + (set! %load-path (cons \"${PWD}\" %load-path)) \ + (set! %load-path (cons \"${top_srcdir}/src/engine\" %load-path)) \ + (set! %load-path (cons \"${top_srcdir}/src/gnome-utils\" %load-path)) \ + (primitive-load \"./gw-report-gnome-spec.scm\") \ + (gw:generate-module \"gw-report-gnome\")" + +BUILT_SOURCES = gw-report-gnome.scm gw-report-gnome.c gw-report-gnome.h +CLEANFILES = gw-report-gnome.scm gw-report-gnome.c gw-report-gnome.h \ + gw-report-gnome.html gnucash g-wrapped .scm-links diff --git a/src/report/report-gnome/gncmod-report-gnome.c b/src/report/report-gnome/gncmod-report-gnome.c new file mode 100644 index 0000000000..634091d883 --- /dev/null +++ b/src/report/report-gnome/gncmod-report-gnome.c @@ -0,0 +1,65 @@ +/********************************************************************* + * gncmod-report-gnome.c + * module definition/initialization for the gnome report infrastructure + * + * Copyright (c) 2001 Linux Developers Group, Inc. + *********************************************************************/ + +#include +#include +#include + +#include "gnc-module.h" +#include "gnc-module-api.h" + +/* version of the gnc module system interface we require */ +int gnc_module_system_interface = 0; + +/* module versioning uses libtool semantics. */ +int gnc_module_current = 0; +int gnc_module_revision = 0; +int gnc_module_age = 0; + +char * +gnc_module_path(void) { + return g_strdup("gnucash/report/report-gnome"); +} + +char * +gnc_module_description(void) { + return g_strdup("Gnome component of Gnucash report generation system"); +} + +static void +lmod(char * mn) +{ + char * form = g_strdup_printf("(use-modules %s)\n", mn); + gh_eval_str(form); + g_free(form); +} + +int +gnc_module_init(int refcount) { + if(!gnc_module_load("gnucash/app-utils", 0)) { + return FALSE; + } + + if(!gnc_module_load("gnucash/gnome-utils", 0)) { + return FALSE; + } + + if(!gnc_module_load("gnucash/app-file", 0)) { + return FALSE; + } + + if(!gnc_module_load("gnucash/report/report-system", 0)) { + return FALSE; + } + + return TRUE; +} + +int +gnc_module_end(int refcount) { + return TRUE; +} diff --git a/src/report/report-gnome/gw-report-gnome-spec.scm b/src/report/report-gnome/gw-report-gnome-spec.scm new file mode 100644 index 0000000000..767cfe16aa --- /dev/null +++ b/src/report/report-gnome/gw-report-gnome-spec.scm @@ -0,0 +1,54 @@ +;;; -*-scheme-*- +(use-modules (g-wrap)) + +(debug-set! maxdepth 100000) +(debug-set! stack 2000000) + +(define-module (g-wrapped gw-report-gnome-spec) + :use-module (g-wrap)) + +(use-modules (g-wrapped gw-engine-spec)) +(use-modules (g-wrapped gw-glib-spec)) +(use-modules (g-wrapped gw-gnome-utils-spec)) + +(let ((mod (gw:new-module "gw-report-gnome"))) + (define (standard-c-call-gen result func-call-code) + (list (gw:result-get-c-name result) " = " func-call-code ";\n")) + + (define (add-standard-result-handlers! type c->scm-converter) + (define (standard-pre-handler result) + (let* ((ret-type-name (gw:result-get-proper-c-type-name result)) + (ret-var-name (gw:result-get-c-name result))) + (list "{\n" + " " ret-type-name " " ret-var-name ";\n"))) + + (gw:type-set-pre-call-result-ccodegen! type standard-pre-handler) + + (gw:type-set-post-call-result-ccodegen! + type + (lambda (result) + (let* ((scm-name (gw:result-get-scm-name result)) + (c-name (gw:result-get-c-name result))) + (list + (c->scm-converter scm-name c-name) + " }\n"))))) + + (gw:module-depends-on mod "gw-runtime") + (gw:module-depends-on mod "gw-engine") + (gw:module-depends-on mod "gw-glib") + (gw:module-depends-on mod "gw-gnome-utils") + + (gw:module-set-guile-module! mod '(g-wrapped gw-report-gnome)) + + (gw:module-set-declarations-ccodegen! + mod + (lambda (client-only?) + (list + "#include \n"))) + + (let ((nnt (gw:wrap-non-native-type + mod + ' + "gnc_report_window*" "const gnc_report_window*"))) + #t) + ) diff --git a/src/gnome/window-report.c b/src/report/report-gnome/window-report.c similarity index 97% rename from src/gnome/window-report.c rename to src/report/report-gnome/window-report.c index 4b64704f0d..45b1f21e4c 100644 --- a/src/gnome/window-report.c +++ b/src/report/report-gnome/window-report.c @@ -40,7 +40,7 @@ #include "gnc-gui-query.h" #include "gnc-html-history.h" #include "gnc-html.h" -#include "gnc-ui.h" +/* #include "gnc-ui.h" */ #include "option-util.h" #include "window-report.h" @@ -70,13 +70,6 @@ struct gnc_report_window_s }; -/* This static indicates the debugging module that this .o belongs to. */ -static short module = MOD_HTML; - -static gint last_width = 0; -static gint last_height = 0; - - /******************************************************************** * REPORT WINDOW FUNCTIONS * creating/managing report-window mdi children @@ -125,9 +118,9 @@ gnc_report_window_view_labeler(GnomeMDIChild * child, GtkWidget * current, } static void -gnc_report_window_view_destroy(GtkObject * obj, gpointer user_data) { +gnc_report_window_view_destroy(GtkObject * obj, gpointer user_data) +{ GNCMDIChildInfo * mc = user_data; - gnc_report_window * w = mc->user_data; gnc_mdi_remove_child(gnc_mdi_get_current(), mc); g_free(mc->toolbar_info); @@ -361,13 +354,13 @@ gnc_report_window_export_button_cb(GtkWidget * w, gpointer data) { static int -gnc_report_window_params_cb(GtkWidget * w, gpointer data) { +gnc_report_window_params_cb(GtkWidget * w, gpointer data) +{ gnc_report_window * report = data; - SCM window_type = gh_eval_str(""); SCM start_editor = gh_eval_str("gnc:report-edit-options"); - SCM window = gw_wcp_assimilate_ptr(report, window_type); - if(report->cur_report != SCM_BOOL_F) { + if(report->cur_report != SCM_BOOL_F) + { if(gh_call1(start_editor, report->cur_report) == SCM_BOOL_F) { gnc_warning_dialog(_("There are no options for this report.")); } @@ -375,6 +368,7 @@ gnc_report_window_params_cb(GtkWidget * w, gpointer data) { gnc_report_window_add_edited_report(report, report->cur_report); } } + return TRUE; } @@ -449,16 +443,14 @@ gnc_report_window_refresh (gpointer data) static void gnc_report_window_load_cb(gnc_html * html, URLType type, const gchar * location, const gchar * label, - gpointer data) { + gpointer data) +{ gnc_report_window * win = data; int report_id; SCM find_report = gh_eval_str("gnc:find-report"); SCM get_options = gh_eval_str("gnc:report-options"); - SCM get_editor = gh_eval_str("gnc:report-options-editor"); SCM set_needs_save = gh_eval_str("gnc:report-set-needs-save?!"); SCM inst_report; - SCM inst_options; - SCM inst_options_ed; /* we get this callback if a new report is requested to be loaded OR * if any URL is clicked. If an options URL is clicked, we want to @@ -596,11 +588,10 @@ close_handler (gpointer user_data) ********************************************************************/ gnc_report_window * -gnc_report_window_new(GNCMDIChildInfo * mc) { - +gnc_report_window_new(GNCMDIChildInfo * mc) +{ gnc_report_window * report = g_new0(gnc_report_window, 1); GtkObject * tlo; - GtkWidget * cframe = NULL; report->mc = mc; report->html = gnc_html_new(); @@ -743,7 +734,6 @@ gnc_report_window_destroy(gnc_report_window * win) { SCM get_editor = gh_eval_str("gnc:report-editor-widget"); SCM set_editor = gh_eval_str("gnc:report-set-editor-widget!"); - SCM disp_list; SCM edited, editor; gnc_unregister_gui_component_by_data (WINDOW_REPORT_CM_CLASS, win); @@ -869,11 +859,11 @@ gnc_options_dialog_close_cb(GNCOptionWin * propertybox, GtkWidget * -gnc_report_window_default_params_editor(SCM options, SCM report) { +gnc_report_window_default_params_editor(SCM options, SCM report) +{ SCM get_editor = gh_eval_str("gnc:report-editor-widget"); SCM get_title = gh_eval_str("gnc:report-type"); SCM ptr; - SCM new_edited; char *title = NULL; diff --git a/src/gnome/window-report.h b/src/report/report-gnome/window-report.h similarity index 100% rename from src/gnome/window-report.h rename to src/report/report-gnome/window-report.h diff --git a/src/report/report-system/test/Makefile.am b/src/report/report-system/test/Makefile.am index 29f7f0bd81..7b5397f1a5 100644 --- a/src/report/report-system/test/Makefile.am +++ b/src/report/report-system/test/Makefile.am @@ -11,7 +11,9 @@ GNC_TEST_DEPS := \ --guile-load-dir ${G_WRAP_MODULE_DIR} \ --guile-load-dir ${top_srcdir}/lib \ --guile-load-dir ${top_srcdir}/src/scm \ + --guile-load-dir ${top_srcdir}/src/gnome-utils \ --guile-load-dir ${top_srcdir}/src/gnome \ + --library-dir ${top_srcdir}/src/gnome-utils \ --library-dir ${top_srcdir}/src/gnome TESTS_ENVIRONMENT := \ diff --git a/src/report/standard-reports/test/Makefile.am b/src/report/standard-reports/test/Makefile.am index b4b58e2816..cd28e61ff7 100644 --- a/src/report/standard-reports/test/Makefile.am +++ b/src/report/standard-reports/test/Makefile.am @@ -10,7 +10,9 @@ GNC_TEST_DEPS := \ --guile-load-dir ${top_builddir}/src/scm \ --guile-load-dir ${top_builddir}/lib \ --guile-load-dir ${G_WRAP_MODULE_DIR} \ + --guile-load-dir ${top_builddir}/src/gnome-utils \ --guile-load-dir ${top_builddir}/src/gnome \ + --library-dir ${top_builddir}/src/gnome-utils \ --library-dir ${top_builddir}/src/gnome TESTS_ENVIRONMENT := \ diff --git a/src/report/stylesheets/test/Makefile.am b/src/report/stylesheets/test/Makefile.am index a258ce7f46..1420f9dd66 100644 --- a/src/report/stylesheets/test/Makefile.am +++ b/src/report/stylesheets/test/Makefile.am @@ -11,7 +11,9 @@ GNC_TEST_DEPS := \ --guile-load-dir ${top_builddir}/src/scm \ --guile-load-dir ${top_builddir}/lib \ --guile-load-dir ${G_WRAP_MODULE_DIR} \ + --guile-load-dir ${top_builddir}/src/gnome-utils \ --guile-load-dir ${top_builddir}/src/gnome \ + --library-dir ${top_builddir}/src/gnome-utils \ --library-dir ${top_builddir}/src/gnome TESTS_ENVIRONMENT := \ diff --git a/src/report/utility-reports/test/Makefile.am b/src/report/utility-reports/test/Makefile.am index e0650373f2..2c81dfd931 100644 --- a/src/report/utility-reports/test/Makefile.am +++ b/src/report/utility-reports/test/Makefile.am @@ -10,7 +10,9 @@ GNC_TEST_DEPS := \ --guile-load-dir ${top_builddir}/src/scm \ --guile-load-dir ${top_builddir}/lib \ --guile-load-dir ${G_WRAP_MODULE_DIR} \ + --guile-load-dir ${top_builddir}/src/gnome-utils \ --guile-load-dir ${top_builddir}/src/gnome \ + --library-dir ${top_builddir}/src/gnome-utils \ --library-dir ${top_builddir}/src/gnome diff --git a/src/scm/main.scm b/src/scm/main.scm index 38e27520b5..659dec9109 100644 --- a/src/scm/main.scm +++ b/src/scm/main.scm @@ -423,6 +423,7 @@ string and 'directories' must be a list of strings." (gnc:module-load "gnucash/report/standard-reports" 0) (gnc:module-load "gnucash/report/utility-reports" 0) (gnc:module-load "gnucash/report/locale-specific/us" 0) + (gnc:module-load "gnucash/report/report-gnome" 0) (gnc:module-load "gnucash/business-gnome" 0) ;; Now we can load a bunch of files. diff --git a/src/tax/us/test/Makefile.am b/src/tax/us/test/Makefile.am index d608c0e974..a04065d685 100644 --- a/src/tax/us/test/Makefile.am +++ b/src/tax/us/test/Makefile.am @@ -13,7 +13,9 @@ GNC_TEST_DEPS := \ --guile-load-dir ${top_builddir}/src/scm \ --guile-load-dir ${top_builddir}/lib \ --guile-load-dir ${G_WRAP_MODULE_DIR} \ + --guile-load-dir ${top_builddir}/src/gnome-utils \ --guile-load-dir ${top_builddir}/src/gnome \ + --library-dir ${top_builddir}/src/gnome-utils \ --library-dir ${top_builddir}/src/gnome TESTS_ENVIRONMENT := \