From f71317626d32c1c7555cfee96aef3f5bf4e83c27 Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Fri, 21 Jul 2017 19:51:55 +0200 Subject: [PATCH] Integrate gnome-business into gnome This breaks autotools' make check, which will be fixed in a subsequent commit. --- configure.ac | 1 - po/POTFILES.in | 34 ++-- src/CMakeLists.txt | 3 +- src/Makefile.am | 1 - src/bin/gnucash-bin.c | 1 - src/bin/overrides/gnucash-build-env.in | 2 - src/gnome-business/CMakeLists.txt | 83 --------- src/gnome-business/Makefile.am | 161 ------------------ src/gnome-business/business-gnome.scm | 37 ---- src/gnome-business/gncmod-business-gnome.c | 129 -------------- src/gnome/CMakeLists.txt | 41 ++++- src/gnome/Makefile.am | 42 ++++- .../business-gnome-utils.c | 0 .../business-gnome-utils.h | 0 .../business-options-gnome.c | 0 .../business-options-gnome.h | 0 src/{gnome-business => gnome}/business-urls.c | 0 src/{gnome-business => gnome}/business-urls.h | 0 .../dialog-billterms.c | 0 .../dialog-billterms.h | 0 .../dialog-choose-owner.c | 0 .../dialog-choose-owner.h | 0 .../dialog-customer.c | 0 .../dialog-customer.h | 0 .../dialog-date-close.c | 0 .../dialog-date-close.h | 0 .../dialog-employee.c | 0 .../dialog-employee.h | 0 .../dialog-invoice.c | 0 .../dialog-invoice.h | 0 src/{gnome-business => gnome}/dialog-job.c | 0 src/{gnome-business => gnome}/dialog-job.h | 0 src/{gnome-business => gnome}/dialog-order.c | 0 src/{gnome-business => gnome}/dialog-order.h | 0 .../dialog-payment.c | 0 .../dialog-payment.h | 0 src/{gnome-business => gnome}/dialog-vendor.c | 0 src/{gnome-business => gnome}/dialog-vendor.h | 0 .../gnc-plugin-business.c | 0 .../gnc-plugin-business.h | 0 .../gnc-plugin-page-invoice.c | 0 .../gnc-plugin-page-invoice.h | 0 .../gnc-plugin-page-owner-tree.c | 0 .../gnc-plugin-page-owner-tree.h | 0 src/{gnome-business => gnome}/search-owner.c | 0 src/{gnome-business => gnome}/search-owner.h | 0 src/gnome/top-level.c | 23 +++ src/plugins/bi_import/CMakeLists.txt | 4 +- src/plugins/bi_import/Makefile.am | 3 +- src/plugins/customer_import/CMakeLists.txt | 4 +- src/plugins/customer_import/Makefile.am | 3 +- src/report/report-gnome/report-gnome.scm | 3 + .../gncmod-standard-reports.c | 5 + 53 files changed, 132 insertions(+), 448 deletions(-) delete mode 100644 src/gnome-business/CMakeLists.txt delete mode 100644 src/gnome-business/Makefile.am delete mode 100644 src/gnome-business/business-gnome.scm delete mode 100644 src/gnome-business/gncmod-business-gnome.c rename src/{gnome-business => gnome}/business-gnome-utils.c (100%) rename src/{gnome-business => gnome}/business-gnome-utils.h (100%) rename src/{gnome-business => gnome}/business-options-gnome.c (100%) rename src/{gnome-business => gnome}/business-options-gnome.h (100%) rename src/{gnome-business => gnome}/business-urls.c (100%) rename src/{gnome-business => gnome}/business-urls.h (100%) rename src/{gnome-business => gnome}/dialog-billterms.c (100%) rename src/{gnome-business => gnome}/dialog-billterms.h (100%) rename src/{gnome-business => gnome}/dialog-choose-owner.c (100%) rename src/{gnome-business => gnome}/dialog-choose-owner.h (100%) rename src/{gnome-business => gnome}/dialog-customer.c (100%) rename src/{gnome-business => gnome}/dialog-customer.h (100%) rename src/{gnome-business => gnome}/dialog-date-close.c (100%) rename src/{gnome-business => gnome}/dialog-date-close.h (100%) rename src/{gnome-business => gnome}/dialog-employee.c (100%) rename src/{gnome-business => gnome}/dialog-employee.h (100%) rename src/{gnome-business => gnome}/dialog-invoice.c (100%) rename src/{gnome-business => gnome}/dialog-invoice.h (100%) rename src/{gnome-business => gnome}/dialog-job.c (100%) rename src/{gnome-business => gnome}/dialog-job.h (100%) rename src/{gnome-business => gnome}/dialog-order.c (100%) rename src/{gnome-business => gnome}/dialog-order.h (100%) rename src/{gnome-business => gnome}/dialog-payment.c (100%) rename src/{gnome-business => gnome}/dialog-payment.h (100%) rename src/{gnome-business => gnome}/dialog-vendor.c (100%) rename src/{gnome-business => gnome}/dialog-vendor.h (100%) rename src/{gnome-business => gnome}/gnc-plugin-business.c (100%) rename src/{gnome-business => gnome}/gnc-plugin-business.h (100%) rename src/{gnome-business => gnome}/gnc-plugin-page-invoice.c (100%) rename src/{gnome-business => gnome}/gnc-plugin-page-invoice.h (100%) rename src/{gnome-business => gnome}/gnc-plugin-page-owner-tree.c (100%) rename src/{gnome-business => gnome}/gnc-plugin-page-owner-tree.h (100%) rename src/{gnome-business => gnome}/search-owner.c (100%) rename src/{gnome-business => gnome}/search-owner.h (100%) diff --git a/configure.ac b/configure.ac index 337f01ca84..05970ed656 100644 --- a/configure.ac +++ b/configure.ac @@ -1781,7 +1781,6 @@ AC_CONFIG_FILES( src/tax/us/Makefile src/tax/us/test/Makefile src/test-core/Makefile - src/gnome-business/Makefile dnl # Stuff for bill/invoice import plugin src/plugins/Makefile src/plugins/bi_import/Makefile diff --git a/po/POTFILES.in b/po/POTFILES.in index a4e79887d1..2e1917d49b 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -179,14 +179,26 @@ src/gnome/assistant-acct-period.c src/gnome/assistant-hierarchy.c src/gnome/assistant-loan.c src/gnome/assistant-stock-split.c +src/gnome/business-gnome-utils.c +src/gnome/business-options-gnome.c +src/gnome/business-urls.c +src/gnome/dialog-billterms.c +src/gnome/dialog-choose-owner.c src/gnome/dialog-commodities.c +src/gnome/dialog-customer.c +src/gnome/dialog-date-close.c +src/gnome/dialog-employee.c src/gnome/dialog-fincalc.c src/gnome/dialog-find-account.c src/gnome/dialog-find-transactions2.c src/gnome/dialog-find-transactions.c src/gnome/dialog-imap-editor.c +src/gnome/dialog-invoice.c +src/gnome/dialog-job.c src/gnome/dialog-lot-viewer.c src/gnome/dialog-new-user.c +src/gnome/dialog-order.c +src/gnome/dialog-payment.c src/gnome/dialog-price-edit-db.c src/gnome/dialog-price-editor.c src/gnome/dialog-print-check.c @@ -197,12 +209,16 @@ src/gnome/dialog-sx-from-trans.c src/gnome/dialog-sx-since-last-run.c src/gnome/dialog-tax-info.c src/gnome/dialog-trans-assoc.c +src/gnome/dialog-vendor.c src/gnome/gnc-budget-view.c src/gnome/gnc-plugin-account-tree.c src/gnome/gnc-plugin-basic-commands.c src/gnome/gnc-plugin-budget.c +src/gnome/gnc-plugin-business.c src/gnome/gnc-plugin-page-account-tree.c src/gnome/gnc-plugin-page-budget.c +src/gnome/gnc-plugin-page-invoice.c +src/gnome/gnc-plugin-page-owner-tree.c src/gnome/gnc-plugin-page-register2.c src/gnome/gnc-plugin-page-register.c src/gnome/gnc-plugin-page-sx-list.c @@ -254,29 +270,13 @@ src/gnome/gtkbuilder/gnc-plugin-page-register.glade src/gnome/gtkbuilder/window-autoclear.glade src/gnome/gtkbuilder/window-reconcile.glade src/gnome/reconcile-view.c +src/gnome/search-owner.c src/gnome/top-level.c src/gnome/window-autoclear.c src/gnome/window-reconcile2.c src/gnome/window-reconcile.c src/gnome-business/business-gnome.scm -src/gnome-business/business-gnome-utils.c -src/gnome-business/business-options-gnome.c -src/gnome-business/business-urls.c -src/gnome-business/dialog-billterms.c -src/gnome-business/dialog-choose-owner.c -src/gnome-business/dialog-customer.c -src/gnome-business/dialog-date-close.c -src/gnome-business/dialog-employee.c -src/gnome-business/dialog-invoice.c -src/gnome-business/dialog-job.c -src/gnome-business/dialog-order.c -src/gnome-business/dialog-payment.c -src/gnome-business/dialog-vendor.c src/gnome-business/gncmod-business-gnome.c -src/gnome-business/gnc-plugin-business.c -src/gnome-business/gnc-plugin-page-invoice.c -src/gnome-business/gnc-plugin-page-owner-tree.c -src/gnome-business/search-owner.c src/gnome-search/dialog-search.c src/gnome-search/dialog-search.glade src/gnome-search/gnc-general-search.c diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 32036d1d15..4573fc78da 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -155,7 +155,6 @@ IF (WITH_GNUCASH) ADD_SUBDIRECTORY (debug) ADD_SUBDIRECTORY (doc) ADD_SUBDIRECTORY (gnome) - ADD_SUBDIRECTORY (gnome-business) ADD_SUBDIRECTORY (gnome-utils) ADD_SUBDIRECTORY (gnome-search) ADD_SUBDIRECTORY (html) @@ -186,7 +185,7 @@ SET(src_EXTRA_DIST SET_LOCAL_DIST(src_DIST_local CMakeLists.txt Makefile.am ${src_EXTRA_DIST}) -SET(src_DIST ${src_DIST_local} ${app_utils_DIST} ${backend_DIST} ${bin_DIST} ${business_DIST} ${cmake_modules_DIST} +SET(src_DIST ${src_DIST_local} ${app_utils_DIST} ${backend_DIST} ${bin_DIST} ${cmake_modules_DIST} ${core_utils_DIST} ${debug_DIST} ${doc_DIST} ${engine_DIST} ${gnc_module_DIST} ${gnome_DIST} ${gnome_search_DIST} ${gnome_utils_DIST} ${html_DIST} ${import_export_DIST} ${libqof_DIST} ${optional_DIST} ${plugins_DIST} ${pixmaps_DIST} ${python_DIST} ${quotes_DIST} ${register_DIST} ${report_DIST} ${scm_DIST} ${tax_DIST} ${test_core_DIST} PARENT_SCOPE) diff --git a/src/Makefile.am b/src/Makefile.am index d11442bad9..280839a8c1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -32,7 +32,6 @@ GUI_SUBDIRS = \ report \ register \ gnome \ - gnome-business \ import-export \ optional \ plugins \ diff --git a/src/bin/gnucash-bin.c b/src/bin/gnucash-bin.c index 21b2389f6a..9d2ad76cbc 100644 --- a/src/bin/gnucash-bin.c +++ b/src/bin/gnucash-bin.c @@ -509,7 +509,6 @@ load_gnucash_modules() { "gnucash/report/utility-reports", 0, FALSE }, { "gnucash/report/locale-specific/us", 0, FALSE }, { "gnucash/report/report-gnome", 0, FALSE }, - { "gnucash/business-gnome", 0, TRUE }, { "gnucash/gtkmm", 0, TRUE }, { "gnucash/python", 0, TRUE }, { "gnucash/plugins/bi_import", 0, TRUE}, diff --git a/src/bin/overrides/gnucash-build-env.in b/src/bin/overrides/gnucash-build-env.in index 111870a091..8e3aaeb3ad 100644 --- a/src/bin/overrides/gnucash-build-env.in +++ b/src/bin/overrides/gnucash-build-env.in @@ -53,7 +53,6 @@ eval `${top_srcdir}/src/gnc-test-env.pl \ --gnc-module-dir ${top_builddir}/src/import-export/ofx \ --gnc-module-dir ${top_builddir}/src/import-export/hbci \ --gnc-module-dir ${top_builddir}/src/import-export/log-replay \ - --gnc-module-dir ${top_builddir}/src/gnome-business \ --guile-load-dir ${top_builddir}/src/core-utils \ --guile-load-dir ${top_builddir}/src/gnc-module \ --guile-load-dir ${top_builddir}/src/engine \ @@ -69,7 +68,6 @@ eval `${top_srcdir}/src/gnc-test-env.pl \ --guile-load-dir ${top_builddir}/src/report/report-gnome \ --guile-load-dir ${top_builddir}/src/report/stylesheets \ --guile-load-dir ${top_builddir}/src/import-export/qif-import \ - --guile-load-dir ${top_builddir}/src/gnome-business \ --library-dir ${top_builddir}/src/test-core \ --library-dir ${top_builddir}/src/libqof/qof \ --library-dir ${top_builddir}/src/core-utils \ diff --git a/src/gnome-business/CMakeLists.txt b/src/gnome-business/CMakeLists.txt deleted file mode 100644 index ce04e29575..0000000000 --- a/src/gnome-business/CMakeLists.txt +++ /dev/null @@ -1,83 +0,0 @@ -SET(business_gnome_SOURCES - business-options-gnome.c - business-urls.c - business-gnome-utils.c - dialog-billterms.c - dialog-choose-owner.c - dialog-customer.c - dialog-date-close.c - dialog-employee.c - dialog-invoice.c - dialog-job.c - dialog-order.c - dialog-payment.c - dialog-vendor.c - gnc-plugin-business.c - gnc-plugin-page-invoice.c - gnc-plugin-page-owner-tree.c - gncmod-business-gnome.c - search-owner.c -) - -SET(business_gnome_noinst_HEADERS - business-options-gnome.h - business-urls.h - business-gnome-utils.h - dialog-billterms.h - dialog-choose-owner.h - dialog-customer.h - dialog-date-close.h - dialog-employee.h - dialog-invoice.h - dialog-job.h - dialog-order.h - dialog-payment.h - dialog-vendor.h - gnc-plugin-business.h - gnc-plugin-page-invoice.h - gnc-plugin-page-owner-tree.h - search-owner.h -) - -SET_SOURCE_FILES_PROPERTIES (${business_gnome_SOURCES} PROPERTIES OBJECT_DEPENDS ${CONFIG_H}) -SET_SOURCE_FILES_PROPERTIES (business-options-gnome.c PROPERTIES OBJECT_DEPENDS ${SWIG_RUNTIME_H}) -ADD_LIBRARY(gncmod-business-gnome - ${business_gnome_SOURCES} - ${business_gnome_HEADERS} -) - -TARGET_LINK_LIBRARIES(gncmod-business-gnome gncmod-ledger-core gncmod-gnome-search - gncmod-report-gnome gncmod-gnome-utils gnc-gnome gncmod-engine gnc-qof ${GTK3_LDFLAGS}) - -TARGET_COMPILE_DEFINITIONS(gncmod-business-gnome PRIVATE -DG_LOG_DOMAIN=\"gnc.business.gnome\") - -INSTALL(TARGETS gncmod-business-gnome - LIBRARY DESTINATION lib/gnucash - ARCHIVE DESTINATION lib/gnucash - RUNTIME DESTINATION bin) -# No headers to install - -# Scheme - -SET(gncmod_business_gnome_SCHEME business-gnome.scm) - -SET(GUILE_OUTPUT_DIR gnucash) -SET(GUILE_MODULES src/app-utils src/engine src/gnome-utils src/html src/report/report-system src/report/standard-reports) -SET(GUILE_LOAD_DIRS src/app-utils src/engine src/core-utils src/gnc-module src/gnome-utils src/report/business-reports src/report/report-system src/report/standard-reports src/scm) -SET(GUILE_LIBRARY_DIRS src/app-utils src/engine src/core-utils src/gnc-module src/gnome-utils src/report/report-system) -SET(GUILE_DEPENDS scm-business-reports) - -GNC_ADD_SCHEME_TARGETS(scm-business-gnome - "${gncmod_business_gnome_SCHEME}" - ${GUILE_OUTPUT_DIR} - "${GUILE_MODULES}" - "${GUILE_LOAD_DIRS}" - "${GUILE_LIBRARY_DIRS}" - "${GUILE_DEPENDS}" - FALSE -) -SET_LOCAL_DIST(business_gnome_DIST_local CMakeLists.txt Makefile.am ${business_gnome_SOURCES} ${business_gnome_HEADERS} - ${business_gnome_noinst_HEADERS} ${gncmod_business_gnome_SCHEME}) - -SET(business_gnome_DIST ${business_gnome_DIST_local} ${business_gnome_gschema_DIST} - ${business_gnome_gtkbuilder_DIST} ${business_gnome_ui_DIST} PARENT_SCOPE) diff --git a/src/gnome-business/Makefile.am b/src/gnome-business/Makefile.am deleted file mode 100644 index ba02c6c4e9..0000000000 --- a/src/gnome-business/Makefile.am +++ /dev/null @@ -1,161 +0,0 @@ -SUBDIRS = . - -pkglib_LTLIBRARIES = libgncmod-business-gnome.la - -AM_CPPFLAGS = \ - -I${top_srcdir}/src \ - -I${top_builddir}/src \ - -I${top_srcdir}/src/core-utils \ - -I${top_srcdir}/src/engine \ - -I${top_srcdir}/src/gnc-module \ - -I${top_srcdir}/src/gnome-utils \ - -I${top_srcdir}/src/gnome \ - -I${top_srcdir}/src/app-utils \ - -I${top_srcdir}/src/gnome-search \ - -I${top_srcdir}/src/html \ - -I${top_srcdir}/src/report/report-gnome \ - -I${top_srcdir}/src/register/register-core \ - -I${top_srcdir}/src/register/register-gnome \ - -I${top_srcdir}/src/register/ledger-core \ - -I${top_srcdir}/src/libqof/qof \ - ${GTK_CFLAGS} \ - ${GLIB_CFLAGS} \ - ${GUILE_CFLAGS} - -libgncmod_business_gnome_la_SOURCES = \ - business-options-gnome.c \ - business-urls.c \ - business-gnome-utils.c \ - dialog-billterms.c \ - dialog-choose-owner.c \ - dialog-customer.c \ - dialog-date-close.c \ - dialog-employee.c \ - dialog-invoice.c \ - dialog-job.c \ - dialog-order.c \ - dialog-payment.c \ - dialog-vendor.c \ - gnc-plugin-business.c \ - gnc-plugin-page-invoice.c \ - gnc-plugin-page-owner-tree.c \ - gncmod-business-gnome.c \ - search-owner.c - -noinst_HEADERS = \ - business-options-gnome.h \ - business-urls.h \ - business-gnome-utils.h \ - dialog-billterms.h \ - dialog-choose-owner.h \ - dialog-customer.h \ - dialog-date-close.h \ - dialog-employee.h \ - dialog-invoice.h \ - dialog-job.h \ - dialog-order.h \ - dialog-payment.h \ - dialog-vendor.h \ - gnc-plugin-business.h \ - gnc-plugin-page-invoice.h \ - gnc-plugin-page-owner-tree.h \ - search-owner.h - -libgncmod_business_gnome_la_LDFLAGS = -avoid-version - -libgncmod_business_gnome_la_LIBADD = \ - ${top_builddir}/src/gnome/libgnc-gnome.la \ - ${top_builddir}/src/register/register-core/libgncmod-register-core.la \ - ${top_builddir}/src/register/register-gnome/libgncmod-register-gnome.la \ - ${top_builddir}/src/register/ledger-core/libgncmod-ledger-core.la \ - ${top_builddir}/src/report/report-gnome/libgncmod-report-gnome.la \ - ${top_builddir}/src/gnome-search/libgncmod-gnome-search.la \ - ${top_builddir}/src/gnome-utils/libgncmod-gnome-utils.la \ - ${top_builddir}/src/app-utils/libgncmod-app-utils.la \ - ${top_builddir}/src/html/libgncmod-html.la \ - ${top_builddir}/src/engine/libgncmod-engine.la \ - ${top_builddir}/src/core-utils/libgnc-core-utils.la \ - ${top_builddir}/src/gnc-module/libgnc-module.la \ - ${top_builddir}/src/libqof/qof/libgnc-qof.la \ - ${GTK_LIBS} \ - ${GUILE_LIBS} \ - ${GLIB_LIBS} \ - ${EFENCE_LIBS} - -gncscmmoddir = ${GNC_SCM_INSTALL_DIR}/gnucash -gncscmmod_DATA = business-gnome.scm - -EXTRA_DIST = \ - ${gncscmmod_DATA} \ - CMakeLists.txt - -if GNUCASH_SEPARATE_BUILDDIR -#Only needed when srcdir and builddir are different -#for running -SCM_FILE_LINKS = ${gncscmmod_DATA} -endif - -.scm-links: - $(RM) -rf gnucash - mkdir -p gnucash -if GNUCASH_SEPARATE_BUILDDIR - for X in ${SCM_FILE_LINKS} ; do \ - $(LN_S) -f ${srcdir}/$$X . ; \ - done -endif - ( cd gnucash; for A in $(gncscmmod_DATA) ; do $(LN_S) -f ../$$A . ; done ) -if ! OS_WIN32 -# Windows knows no "ln -s" but uses "cp": must copy every time (see bug #566567). - touch .scm-links -endif - -if GNC_HAVE_GUILE_2 -GUILE_COMPILE_ENV = \ - --gnc-module-dir ${top_builddir}/src/app-utils \ - --gnc-module-dir ${top_builddir}/src/engine \ - --gnc-module-dir ${top_builddir}/src/html \ - --gnc-module-dir ${top_builddir}/src/gnome-utils \ - --gnc-module-dir ${top_builddir}/src/report/report-system \ - --gnc-module-dir ${top_builddir}/src/report/standard-reports \ - --guile-load-dir ${top_builddir}/src/app-utils \ - --guile-load-dir ${top_builddir}/src/core-utils \ - --guile-load-dir ${top_builddir}/src/engine \ - --guile-load-dir ${top_builddir}/src/gnc-module \ - --guile-load-dir ${top_builddir}/src/gnome-utils \ - --guile-load-dir ${top_builddir}/src/report/business-reports \ - --guile-load-dir ${top_builddir}/src/report/report-system \ - --guile-load-dir ${top_builddir}/src/report/standard-reports \ - --guile-load-dir ${top_builddir}/src/scm \ - --library-dir ${top_builddir}/src/libqof/qof \ - --library-dir ${top_builddir}/src/engine \ - --library-dir ${top_builddir}/src/app-utils \ - --library-dir ${top_builddir}/src/core-utils \ - --library-dir ${top_builddir}/src/gnc-module \ - --library-dir ${top_builddir}/src/gnome-utils \ - --library-dir ${top_builddir}/src/backend/xml \ - --library-dir ${top_builddir}/src/backend/sql \ - --library-dir ${top_builddir}/src/html \ - --library-dir ${top_builddir}/src/report/report-system - - -%.go : %.scm .scm-links $(pkglib_LTLIBRARIES) - GNC_UNINSTALLED=yes \ - GNC_BUILDDIR=${top_builddir} \ - $(shell ${abs_top_srcdir}/src/gnc-test-env.pl --noexports ${GUILE_COMPILE_ENV}) \ - $(GUILD) compile -o $@ $< - -gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash -gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go) -endif - -noinst_DATA = .scm-links -clean-local: - rm -rf gnucash - -CLEANFILES = \ - $(BUILT_SOURCES) \ - .scm-links \ - ${SCM_FILE_LINKS} \ - ${gncscmmodcache_DATA} - -AM_CPPFLAGS += -DG_LOG_DOMAIN=\"gnc.business.gnome\" diff --git a/src/gnome-business/business-gnome.scm b/src/gnome-business/business-gnome.scm deleted file mode 100644 index 617c10ef3c..0000000000 --- a/src/gnome-business/business-gnome.scm +++ /dev/null @@ -1,37 +0,0 @@ -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; 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@gnu.org -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(define-module (gnucash business-gnome)) -(use-modules (gnucash gnc-module)) - -(gnc:module-load "gnucash/gnome-utils" 0) -(gnc:module-load "gnucash/app-utils" 0) -(gnc:module-load "gnucash/gnome-search" 0) - -(gnc:module-load "gnucash/report/report-gnome" 0) - -(use-modules (gnucash report business-reports)) -(use-modules (gnucash main)) ;for gnc:debug - -(define (business-report-function) - (gnc-add-scm-extension - (gnc:make-menu gnc:menuname-business-reports - (list gnc:menuname-reports)))) - -(gnc-hook-add-scm-dangler HOOK-REPORT business-report-function) diff --git a/src/gnome-business/gncmod-business-gnome.c b/src/gnome-business/gncmod-business-gnome.c deleted file mode 100644 index ccc269e5b7..0000000000 --- a/src/gnome-business/gncmod-business-gnome.c +++ /dev/null @@ -1,129 +0,0 @@ -/********************************************************************* - * businessmod-core.c - * module definition/initialization for the Business GNOME UI module - * - * Copyright (c) 2001 Derek Atkins - * - * 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@gnu.org - * - *********************************************************************/ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include -#include - -#include "gnc-hooks.h" -#include "gnc-module.h" -#include "gnc-module-api.h" - -#include "search-core-type.h" -#include "search-owner.h" -#include "gncOwner.h" -#include "business-options-gnome.h" -#include "business-urls.h" - -#include "gnc-plugin-manager.h" -#include "gnc-plugin-business.h" - -#include "gnc-hooks.h" -#include "dialog-invoice.h" -#include "dialog-preferences.h" - -GNC_MODULE_API_DECL(libgncmod_business_gnome) - -/* version of the gnc module system interface we require */ -int libgncmod_business_gnome_gnc_module_system_interface = 0; - -/* module versioning uses libtool semantics. */ -int libgncmod_business_gnome_gnc_module_current = 0; -int libgncmod_business_gnome_gnc_module_revision = 0; -int libgncmod_business_gnome_gnc_module_age = 0; - - -char * -libgncmod_business_gnome_gnc_module_path(void) -{ - return g_strdup("gnucash/business-gnome"); -} - -char * -libgncmod_business_gnome_gnc_module_description(void) -{ - return g_strdup("The GnuCash business module GNOME UI"); -} - -int -libgncmod_business_gnome_gnc_module_init(int refcount) -{ - /* load app-utils: we depend on it -- and it depends on the engine */ - if (!gnc_module_load ("gnucash/app-utils", 0)) - { - return FALSE; - } - /* We also depend on gnome-utils and gnome-search modules */ - if (!gnc_module_load ("gnucash/gnome-utils", 0)) - { - return FALSE; - } - if (!gnc_module_load ("gnucash/gnome-search", 0)) - { - return FALSE; - } - if (!gnc_module_load ("gnucash/report/report-gnome", 0)) - { - return FALSE; - } - - scm_c_eval_string("(use-modules (gnucash business-gnome))"); - scm_c_eval_string("(use-modules (gnucash report business-reports))"); - - if (refcount == 0) - { - /* Register the Owner search type */ - gnc_search_core_register_type (GNC_OWNER_MODULE_NAME, - (GNCSearchCoreNew) gnc_search_owner_new); - gnc_business_urls_initialize (); - gnc_business_options_gnome_initialize (); - - gnc_plugin_manager_add_plugin (gnc_plugin_manager_get (), - gnc_plugin_business_new ()); - - gnc_hook_add_dangler(HOOK_BOOK_OPENED, - (GFunc)gnc_invoice_remind_bills_due_cb, NULL); - gnc_hook_add_dangler(HOOK_BOOK_OPENED, - (GFunc)gnc_invoice_remind_invoices_due_cb, NULL); - - /* Add to preferences under Business */ - /* The parameters are; glade file, items to add from glade file - last being the dialog, preference tab name */ - gnc_preferences_add_page("business-prefs.glade", "liststore_printinvoice,days_in_adj,cust_days_in_adj,business_prefs", - _("Business")); - } - - return TRUE; -} - -int -libgncmod_business_gnome_gnc_module_end(int refcount) -{ - return TRUE; -} diff --git a/src/gnome/CMakeLists.txt b/src/gnome/CMakeLists.txt index 00fc3d8c18..b8fc331da4 100644 --- a/src/gnome/CMakeLists.txt +++ b/src/gnome/CMakeLists.txt @@ -8,13 +8,25 @@ SET (gnc_gnome_noinst_HEADERS assistant-hierarchy.h assistant-loan.h assistant-stock-split.h + business-options-gnome.h + business-urls.h + business-gnome-utils.h + dialog-billterms.h + dialog-choose-owner.h + dialog-customer.h + dialog-date-close.h + dialog-employee.h dialog-fincalc.h dialog-find-account.h dialog-find-transactions.h dialog-find-transactions2.h dialog-imap-editor.h + dialog-invoice.h + dialog-job.h dialog-lot-viewer.h dialog-new-user.h + dialog-order.h + dialog-payment.h dialog-print-check.h dialog-progress.h dialog-sx-editor.h @@ -22,20 +34,25 @@ SET (gnc_gnome_noinst_HEADERS dialog-sx-from-trans.h dialog-sx-since-last-run.h dialog-trans-assoc.h + dialog-vendor.h gnc-budget-view.h gnc-plugin-account-tree.h gnc-plugin-basic-commands.h gnc-plugin-budget.h + gnc-plugin-business.h gnc-plugin-register.h gnc-plugin-register2.h gnc-plugin-page-account-tree.h gnc-plugin-page-budget.h + gnc-plugin-page-invoice.h + gnc-plugin-page-owner-tree.h gnc-plugin-page-sx-list.h gnc-plugin-page-register.h gnc-plugin-page-register2.h gnc-split-reg.h gnc-split-reg2.h reconcile-view.h + search-owner.h top-level.h window-reconcile.h window-reconcile2.h @@ -55,14 +72,26 @@ SET (gnc_gnome_SOURCES assistant-hierarchy.c assistant-loan.c assistant-stock-split.c + business-options-gnome.c + business-urls.c + business-gnome-utils.c + dialog-billterms.c + dialog-choose-owner.c dialog-commodities.c + dialog-customer.c + dialog-date-close.c + dialog-employee.c dialog-fincalc.c dialog-find-account.c dialog-find-transactions.c dialog-find-transactions2.c dialog-imap-editor.c + dialog-invoice.c + dialog-job.c dialog-lot-viewer.c dialog-new-user.c + dialog-order.c + dialog-payment.c dialog-price-editor.c dialog-price-edit-db.c dialog-print-check.c @@ -73,33 +102,41 @@ SET (gnc_gnome_SOURCES dialog-sx-since-last-run.c dialog-tax-info.c dialog-trans-assoc.c + dialog-vendor.c gnc-budget-view.c gnc-plugin-account-tree.c gnc-plugin-basic-commands.c gnc-plugin-budget.c + gnc-plugin-business.c gnc-plugin-register.c gnc-plugin-register2.c gnc-plugin-page-account-tree.c gnc-plugin-page-budget.c + gnc-plugin-page-invoice.c + gnc-plugin-page-owner-tree.c gnc-plugin-page-sx-list.c gnc-plugin-page-register.c gnc-plugin-page-register2.c gnc-split-reg.c gnc-split-reg2.c reconcile-view.c + search-owner.c top-level.c window-reconcile.c window-reconcile2.c window-autoclear.c ) +SET_SOURCE_FILES_PROPERTIES (${gnc_gnome_SOURCES} PROPERTIES OBJECT_DEPENDS ${CONFIG_H}) +SET_SOURCE_FILES_PROPERTIES (business-options-gnome.c PROPERTIES OBJECT_DEPENDS ${SWIG_RUNTIME_H}) + IF (WIN32) SET (gnc_gnome_SOURCES ${gnc_gnome_SOURCES} ${CMAKE_SOURCE_DIR}/lib/libc/strfmon.c) ENDIF(WIN32) ADD_LIBRARY (gnc-gnome ${gnc_gnome_SOURCES} ${gnc_gnome_noinst_HEADERS} ${SWIG_GNOME_C}) TARGET_LINK_LIBRARIES(gnc-gnome gncmod-gnome-search gncmod-ledger-core gncmod-report-gnome gncmod-report-system - gncmod-register-gnome gncmod-register-core gncmod-engine ${GTK3_LDFLAGS} ${GTK_MAC_LDFLAGS}) + gncmod-register-gnome gncmod-register-core gncmod-gnome-utils gncmod-engine ${GTK3_LDFLAGS} ${GTK_MAC_LDFLAGS}) TARGET_COMPILE_DEFINITIONS (gnc-gnome PRIVATE -DG_LOG_DOMAIN=\"gnc.gui\" ${GTK_MAC_CFLAGS_OTHER}) @@ -163,4 +200,4 @@ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/gnucash.desktop DESTINATION share/appl SET_LOCAL_DIST(gnome_DIST_local CMakeLists.txt Makefile.am gnome.i gnucash.appdata.xml.in gnucash.desktop.in.in ${gnc_gnome_noinst_HEADERS} ${gnc_gnome_SOURCES}) -SET(gnome_DIST ${gnome_DIST_local} ${gnome_ui_DIST} ${gnome_gschema_DIST} ${gnome_gtkbuilder_DIST} PARENT_SCOPE) \ No newline at end of file +SET(gnome_DIST ${gnome_DIST_local} ${gnome_ui_DIST} ${gnome_gschema_DIST} ${gnome_gtkbuilder_DIST} PARENT_SCOPE) diff --git a/src/gnome/Makefile.am b/src/gnome/Makefile.am index 9c6785b63b..48bb9533e3 100644 --- a/src/gnome/Makefile.am +++ b/src/gnome/Makefile.am @@ -28,14 +28,26 @@ libgnc_gnome_la_SOURCES = \ assistant-hierarchy.c \ assistant-loan.c \ assistant-stock-split.c \ + business-options-gnome.c \ + business-urls.c \ + business-gnome-utils.c \ + dialog-billterms.c \ + dialog-choose-owner.c \ dialog-commodities.c \ + dialog-customer.c \ + dialog-date-close.c \ + dialog-employee.c \ dialog-fincalc.c \ dialog-find-account.c \ dialog-find-transactions.c \ dialog-find-transactions2.c \ dialog-imap-editor.c \ + dialog-invoice.c \ + dialog-job.c \ dialog-lot-viewer.c \ dialog-new-user.c \ + dialog-order.c \ + dialog-payment.c \ dialog-price-editor.c \ dialog-price-edit-db.c \ dialog-print-check.c \ @@ -46,20 +58,25 @@ libgnc_gnome_la_SOURCES = \ dialog-sx-since-last-run.c \ dialog-tax-info.c \ dialog-trans-assoc.c \ + dialog-vendor.c \ gnc-budget-view.c \ gnc-plugin-account-tree.c \ gnc-plugin-basic-commands.c \ gnc-plugin-budget.c \ - gnc-plugin-register.c \ - gnc-plugin-register2.c \ + gnc-plugin-business.c \ gnc-plugin-page-account-tree.c \ gnc-plugin-page-budget.c \ + gnc-plugin-page-invoice.c \ + gnc-plugin-page-owner-tree.c \ gnc-plugin-page-sx-list.c \ gnc-plugin-page-register.c \ gnc-plugin-page-register2.c \ + gnc-plugin-register.c \ + gnc-plugin-register2.c \ gnc-split-reg.c \ gnc-split-reg2.c \ reconcile-view.c \ + search-owner.c \ top-level.c \ window-reconcile.c \ window-reconcile2.c \ @@ -83,13 +100,25 @@ noinst_HEADERS = \ assistant-hierarchy.h \ assistant-loan.h \ assistant-stock-split.h \ + business-options-gnome.h \ + business-urls.h \ + business-gnome-utils.h \ + dialog-billterms.h \ + dialog-choose-owner.h \ + dialog-customer.h \ + dialog-date-close.h \ + dialog-employee.h \ dialog-fincalc.h \ dialog-find-account.h \ dialog-find-transactions.h \ dialog-find-transactions2.h \ dialog-imap-editor.h \ + dialog-invoice.h \ + dialog-job.h \ dialog-lot-viewer.h \ dialog-new-user.h \ + dialog-order.h \ + dialog-payment.h \ dialog-print-check.h \ dialog-progress.h \ dialog-sx-editor.h \ @@ -97,20 +126,25 @@ noinst_HEADERS = \ dialog-sx-from-trans.h \ dialog-sx-since-last-run.h \ dialog-trans-assoc.h \ + dialog-vendor.h \ gnc-budget-view.h \ gnc-plugin-account-tree.h \ gnc-plugin-basic-commands.h \ gnc-plugin-budget.h \ - gnc-plugin-register.h \ - gnc-plugin-register2.h \ + gnc-plugin-business.h \ gnc-plugin-page-account-tree.h \ gnc-plugin-page-budget.h \ + gnc-plugin-page-invoice.h \ + gnc-plugin-page-owner-tree.h \ gnc-plugin-page-sx-list.h \ gnc-plugin-page-register.h \ gnc-plugin-page-register2.h \ + gnc-plugin-register.h \ + gnc-plugin-register2.h \ gnc-split-reg.h \ gnc-split-reg2.h \ reconcile-view.h \ + search-owner.h \ top-level.h \ window-reconcile.h \ window-reconcile2.h \ diff --git a/src/gnome-business/business-gnome-utils.c b/src/gnome/business-gnome-utils.c similarity index 100% rename from src/gnome-business/business-gnome-utils.c rename to src/gnome/business-gnome-utils.c diff --git a/src/gnome-business/business-gnome-utils.h b/src/gnome/business-gnome-utils.h similarity index 100% rename from src/gnome-business/business-gnome-utils.h rename to src/gnome/business-gnome-utils.h diff --git a/src/gnome-business/business-options-gnome.c b/src/gnome/business-options-gnome.c similarity index 100% rename from src/gnome-business/business-options-gnome.c rename to src/gnome/business-options-gnome.c diff --git a/src/gnome-business/business-options-gnome.h b/src/gnome/business-options-gnome.h similarity index 100% rename from src/gnome-business/business-options-gnome.h rename to src/gnome/business-options-gnome.h diff --git a/src/gnome-business/business-urls.c b/src/gnome/business-urls.c similarity index 100% rename from src/gnome-business/business-urls.c rename to src/gnome/business-urls.c diff --git a/src/gnome-business/business-urls.h b/src/gnome/business-urls.h similarity index 100% rename from src/gnome-business/business-urls.h rename to src/gnome/business-urls.h diff --git a/src/gnome-business/dialog-billterms.c b/src/gnome/dialog-billterms.c similarity index 100% rename from src/gnome-business/dialog-billterms.c rename to src/gnome/dialog-billterms.c diff --git a/src/gnome-business/dialog-billterms.h b/src/gnome/dialog-billterms.h similarity index 100% rename from src/gnome-business/dialog-billterms.h rename to src/gnome/dialog-billterms.h diff --git a/src/gnome-business/dialog-choose-owner.c b/src/gnome/dialog-choose-owner.c similarity index 100% rename from src/gnome-business/dialog-choose-owner.c rename to src/gnome/dialog-choose-owner.c diff --git a/src/gnome-business/dialog-choose-owner.h b/src/gnome/dialog-choose-owner.h similarity index 100% rename from src/gnome-business/dialog-choose-owner.h rename to src/gnome/dialog-choose-owner.h diff --git a/src/gnome-business/dialog-customer.c b/src/gnome/dialog-customer.c similarity index 100% rename from src/gnome-business/dialog-customer.c rename to src/gnome/dialog-customer.c diff --git a/src/gnome-business/dialog-customer.h b/src/gnome/dialog-customer.h similarity index 100% rename from src/gnome-business/dialog-customer.h rename to src/gnome/dialog-customer.h diff --git a/src/gnome-business/dialog-date-close.c b/src/gnome/dialog-date-close.c similarity index 100% rename from src/gnome-business/dialog-date-close.c rename to src/gnome/dialog-date-close.c diff --git a/src/gnome-business/dialog-date-close.h b/src/gnome/dialog-date-close.h similarity index 100% rename from src/gnome-business/dialog-date-close.h rename to src/gnome/dialog-date-close.h diff --git a/src/gnome-business/dialog-employee.c b/src/gnome/dialog-employee.c similarity index 100% rename from src/gnome-business/dialog-employee.c rename to src/gnome/dialog-employee.c diff --git a/src/gnome-business/dialog-employee.h b/src/gnome/dialog-employee.h similarity index 100% rename from src/gnome-business/dialog-employee.h rename to src/gnome/dialog-employee.h diff --git a/src/gnome-business/dialog-invoice.c b/src/gnome/dialog-invoice.c similarity index 100% rename from src/gnome-business/dialog-invoice.c rename to src/gnome/dialog-invoice.c diff --git a/src/gnome-business/dialog-invoice.h b/src/gnome/dialog-invoice.h similarity index 100% rename from src/gnome-business/dialog-invoice.h rename to src/gnome/dialog-invoice.h diff --git a/src/gnome-business/dialog-job.c b/src/gnome/dialog-job.c similarity index 100% rename from src/gnome-business/dialog-job.c rename to src/gnome/dialog-job.c diff --git a/src/gnome-business/dialog-job.h b/src/gnome/dialog-job.h similarity index 100% rename from src/gnome-business/dialog-job.h rename to src/gnome/dialog-job.h diff --git a/src/gnome-business/dialog-order.c b/src/gnome/dialog-order.c similarity index 100% rename from src/gnome-business/dialog-order.c rename to src/gnome/dialog-order.c diff --git a/src/gnome-business/dialog-order.h b/src/gnome/dialog-order.h similarity index 100% rename from src/gnome-business/dialog-order.h rename to src/gnome/dialog-order.h diff --git a/src/gnome-business/dialog-payment.c b/src/gnome/dialog-payment.c similarity index 100% rename from src/gnome-business/dialog-payment.c rename to src/gnome/dialog-payment.c diff --git a/src/gnome-business/dialog-payment.h b/src/gnome/dialog-payment.h similarity index 100% rename from src/gnome-business/dialog-payment.h rename to src/gnome/dialog-payment.h diff --git a/src/gnome-business/dialog-vendor.c b/src/gnome/dialog-vendor.c similarity index 100% rename from src/gnome-business/dialog-vendor.c rename to src/gnome/dialog-vendor.c diff --git a/src/gnome-business/dialog-vendor.h b/src/gnome/dialog-vendor.h similarity index 100% rename from src/gnome-business/dialog-vendor.h rename to src/gnome/dialog-vendor.h diff --git a/src/gnome-business/gnc-plugin-business.c b/src/gnome/gnc-plugin-business.c similarity index 100% rename from src/gnome-business/gnc-plugin-business.c rename to src/gnome/gnc-plugin-business.c diff --git a/src/gnome-business/gnc-plugin-business.h b/src/gnome/gnc-plugin-business.h similarity index 100% rename from src/gnome-business/gnc-plugin-business.h rename to src/gnome/gnc-plugin-business.h diff --git a/src/gnome-business/gnc-plugin-page-invoice.c b/src/gnome/gnc-plugin-page-invoice.c similarity index 100% rename from src/gnome-business/gnc-plugin-page-invoice.c rename to src/gnome/gnc-plugin-page-invoice.c diff --git a/src/gnome-business/gnc-plugin-page-invoice.h b/src/gnome/gnc-plugin-page-invoice.h similarity index 100% rename from src/gnome-business/gnc-plugin-page-invoice.h rename to src/gnome/gnc-plugin-page-invoice.h diff --git a/src/gnome-business/gnc-plugin-page-owner-tree.c b/src/gnome/gnc-plugin-page-owner-tree.c similarity index 100% rename from src/gnome-business/gnc-plugin-page-owner-tree.c rename to src/gnome/gnc-plugin-page-owner-tree.c diff --git a/src/gnome-business/gnc-plugin-page-owner-tree.h b/src/gnome/gnc-plugin-page-owner-tree.h similarity index 100% rename from src/gnome-business/gnc-plugin-page-owner-tree.h rename to src/gnome/gnc-plugin-page-owner-tree.h diff --git a/src/gnome-business/search-owner.c b/src/gnome/search-owner.c similarity index 100% rename from src/gnome-business/search-owner.c rename to src/gnome/search-owner.c diff --git a/src/gnome-business/search-owner.h b/src/gnome/search-owner.h similarity index 100% rename from src/gnome-business/search-owner.h rename to src/gnome/search-owner.h diff --git a/src/gnome/top-level.c b/src/gnome/top-level.c index 89c7b57816..1aa3c6b876 100644 --- a/src/gnome/top-level.c +++ b/src/gnome/top-level.c @@ -29,9 +29,13 @@ #include #include "TransLog.h" +#include "business-options-gnome.h" +#include "business-urls.h" #include "combocell.h" #include "dialog-account.h" #include "dialog-commodity.h" +#include "dialog-invoice.h" +#include "dialog-preferences.h" #include "dialog-options.h" #include "dialog-sx-editor.h" #include "dialog-transfer.h" @@ -52,6 +56,7 @@ #include "gnc-plugin-register.h" /* FIXME Remove this line*/ #include "gnc-plugin-register2.h" /* FIXME Remove this line*/ #include "gnc-plugin-budget.h" +#include "gnc-plugin-business.h" #include "gnc-plugin-page-register.h" #include "gnc-plugin-page-register2.h" #include "gnc-plugin-manager.h" /* FIXME Remove this line*/ @@ -66,6 +71,8 @@ #include "gnucash-sheet.h" #include "gnucash-style.h" #include "guile-util.h" +#include "search-core-type.h" +#include "search-owner.h" #include "top-level.h" #include "window-report.h" #include "gnc-window.h" @@ -372,6 +379,12 @@ gnc_main_gui_init (void) gnc_ui_sx_initialize(); + /* Register the Owner search type */ + gnc_search_core_register_type (GNC_OWNER_MODULE_NAME, + (GNCSearchCoreNew) gnc_search_owner_new); + gnc_business_urls_initialize (); + gnc_business_options_gnome_initialize (); + /* FIXME Remove this test code */ gnc_plugin_manager_add_plugin ( gnc_plugin_manager_get (), gnc_plugin_account_tree_new ()); @@ -385,6 +398,8 @@ gnc_main_gui_init (void) gnc_plugin_manager_get (), gnc_plugin_register_new ()); gnc_plugin_manager_add_plugin ( gnc_plugin_manager_get (), gnc_plugin_register2_new ()); + gnc_plugin_manager_add_plugin ( + gnc_plugin_manager_get (), gnc_plugin_business_new ()); /* I'm not sure why the FIXME note says to remove this. Maybe each module should be adding its own plugin to the manager? Anyway... Oh, maybe... nah */ @@ -401,7 +416,15 @@ gnc_main_gui_init (void) gnc_save_all_state, NULL); gnc_hook_add_dangler(HOOK_BOOK_CLOSED, (GFunc)gnc_reports_flush_global, NULL); + gnc_hook_add_dangler(HOOK_BOOK_OPENED, + (GFunc)gnc_invoice_remind_bills_due_cb, NULL); + gnc_hook_add_dangler(HOOK_BOOK_OPENED, + (GFunc)gnc_invoice_remind_invoices_due_cb, NULL); + /* Add to preferences under Business */ + /* The parameters are; glade file, items to add from glade file - last being the dialog, preference tab name */ + gnc_preferences_add_page("business-prefs.glade", "liststore_printinvoice,days_in_adj,cust_days_in_adj,business_prefs", + _("Business")); LEAVE(" "); return; diff --git a/src/plugins/bi_import/CMakeLists.txt b/src/plugins/bi_import/CMakeLists.txt index 2bdda50ef9..9662853fe5 100644 --- a/src/plugins/bi_import/CMakeLists.txt +++ b/src/plugins/bi_import/CMakeLists.txt @@ -23,7 +23,6 @@ SET(bi_import_noinst_HEADERS ADD_LIBRARY(gncmod-bi_import ${bi_import_noinst_HEADERS} ${bi_import_SOURCES}) TARGET_LINK_LIBRARIES(gncmod-bi_import - gncmod-business-gnome gncmod-gnome-utils gncmod-gnome-search gncmod-app-utils @@ -31,11 +30,12 @@ TARGET_LINK_LIBRARIES(gncmod-bi_import gnc-core-utils gnc-module gnc-qof + gnc-gnome ) TARGET_INCLUDE_DIRECTORIES(gncmod-bi_import PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} - PRIVATE ${CMAKE_SOURCE_DIR}/src/gnome-business + PRIVATE ${CMAKE_SOURCE_DIR}/src/gnome ) TARGET_COMPILE_DEFINITIONS(gncmod-bi_import PRIVATE -DG_LOG_DOMAIN=\"gnc.plugin.bi-import\") diff --git a/src/plugins/bi_import/Makefile.am b/src/plugins/bi_import/Makefile.am index 66445526c2..c996cf6c51 100644 --- a/src/plugins/bi_import/Makefile.am +++ b/src/plugins/bi_import/Makefile.am @@ -18,7 +18,7 @@ noinst_HEADERS = \ libgncmod_bi_import_la_LDFLAGS = -avoid-version libgncmod_bi_import_la_LIBADD = \ - ${top_builddir}/src/gnome-business/libgncmod-business-gnome.la \ + ${top_builddir}/src/gnome/libgnc-gnome.la \ ${top_builddir}/src/gnome-utils/libgncmod-gnome-utils.la \ ${top_builddir}/src/app-utils/libgncmod-app-utils.la \ ${top_builddir}/src/engine/libgncmod-engine.la \ @@ -33,7 +33,6 @@ AM_CPPFLAGS = \ -I${top_srcdir}/src \ -I${top_builddir}/src \ -I${top_srcdir}/src/gnome \ - -I${top_srcdir}/src/gnome-business \ -I${top_srcdir}/src/report/report-gnome \ -I${top_srcdir}/src/gnome-search/ \ -I${top_srcdir}/src/register/ledger-core \ diff --git a/src/plugins/customer_import/CMakeLists.txt b/src/plugins/customer_import/CMakeLists.txt index 1200c70ea9..5beaaa6d89 100644 --- a/src/plugins/customer_import/CMakeLists.txt +++ b/src/plugins/customer_import/CMakeLists.txt @@ -20,12 +20,12 @@ SET(customer_import_noinst_HEADERS ADD_LIBRARY(gncmod-customer_import ${customer_import_SOURCES} ${customer_input_noinst_HEADERS}) -TARGET_LINK_LIBRARIES(gncmod-customer_import gncmod-business-gnome gncmod-gnome-utils gncmod-app-utils +TARGET_LINK_LIBRARIES(gncmod-customer_import gnc-gnome gncmod-gnome-utils gncmod-app-utils gncmod-engine gnc-core-utils gnc-module gnc-qof ${GLIB2_LDFLAGS}) TARGET_INCLUDE_DIRECTORIES(gncmod-bi_import PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} - PRIVATE ${CMAKE_SOURCE_DIR}/src/gnome-business + PRIVATE ${CMAKE_SOURCE_DIR}/src/gnome ) TARGET_COMPILE_DEFINITIONS(gncmod-customer_import PRIVATE -DG_LOG_DOMAIN=\"gnc.plugin.customer_import\") diff --git a/src/plugins/customer_import/Makefile.am b/src/plugins/customer_import/Makefile.am index e6f9499ad6..5569e54660 100644 --- a/src/plugins/customer_import/Makefile.am +++ b/src/plugins/customer_import/Makefile.am @@ -16,7 +16,7 @@ noinst_HEADERS = \ libgncmod_customer_import_la_LDFLAGS = -avoid-version libgncmod_customer_import_la_LIBADD = \ - ${top_builddir}/src/gnome-business/libgncmod-business-gnome.la \ + ${top_builddir}/src/gnome/libgnc-gnome.la \ ${top_builddir}/src/gnome-utils/libgncmod-gnome-utils.la \ ${top_builddir}/src/app-utils/libgncmod-app-utils.la \ ${top_builddir}/src/engine/libgncmod-engine.la \ @@ -31,7 +31,6 @@ AM_CPPFLAGS = \ -I${top_srcdir}/src \ -I${top_builddir}/src \ -I${top_srcdir}/src/gnome \ - -I${top_srcdir}/src/gnome-business/ \ -I${top_srcdir}/src/report/report-gnome \ -I${top_srcdir}/src/gnome-search/ \ -I${top_srcdir}/src/register/ledger-core \ diff --git a/src/report/report-gnome/report-gnome.scm b/src/report/report-gnome/report-gnome.scm index 9c1f2c1a8f..460d5583ed 100644 --- a/src/report/report-gnome/report-gnome.scm +++ b/src/report/report-gnome/report-gnome.scm @@ -111,6 +111,8 @@ (gnc:make-menu gnc:menuname-utility (list gnc:menuname-reports))) (define tax-menu (gnc:make-menu gnc:menuname-taxes (list gnc:menuname-reports))) + (define business-menu + (gnc:make-menu gnc:menuname-business-reports (list gnc:menuname-reports))) (gnc-add-scm-extension (gnc:make-menu-item @@ -126,6 +128,7 @@ (gnc-add-scm-extension asset-liability-menu) (gnc-add-scm-extension budget-menu) (gnc-add-scm-extension utility-menu) + (gnc-add-scm-extension business-menu) ;; run report-hook danglers (gnc:hook-run-danglers HOOK-REPORT) diff --git a/src/report/standard-reports/gncmod-standard-reports.c b/src/report/standard-reports/gncmod-standard-reports.c index c6c6923a14..43bdf67c65 100644 --- a/src/report/standard-reports/gncmod-standard-reports.c +++ b/src/report/standard-reports/gncmod-standard-reports.c @@ -70,6 +70,11 @@ libgncmod_standard_reports_gnc_module_init(int refcount) { return FALSE; } + if (scm_c_eval_string("(use-modules (gnucash report business-reports))") == + SCM_BOOL_F) + { + return FALSE; + } return TRUE; }