From e2c521088f66f3168287d32e9dbab916e13004ba Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Fri, 16 Nov 2001 20:53:52 +0000 Subject: [PATCH] * src/scm/main.scm (gnc:startup): very ugly hack -- right now we switch the current-module briefly during the loads. This should go away once the rest of the startup process is cleaned up. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5891 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/scm/main.scm | 56 +++++++++++++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/src/scm/main.scm b/src/scm/main.scm index da8db39c1f..f51972d936 100644 --- a/src/scm/main.scm +++ b/src/scm/main.scm @@ -144,32 +144,40 @@ (gnc:module-system-init) - ;; right now we have to statically load all these at startup time. - ;; Hopefully we can gradually make them autoloading. - (gnc:module-load "gnucash/engine" 0) - (gnc:module-load "gnucash/app-utils" 0) - (gnc:module-load "gnucash/app-file" 0) - (gnc:module-load "gnucash/register/ledger-core" 0) - (gnc:module-load "gnucash/register/register-core" 0) - (gnc:module-load "gnucash/register/register-gnome" 0) - (gnc:module-load "gnucash/import-export/binary-import" 0) - (gnc:module-load "gnucash/import-export/qif-import" 0) - (gnc:module-load "gnucash/report/report-system" 0) - (gnc:module-load "gnucash/report/stylesheets" 0) - (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) + ;; SUPER UGLY HACK -- this should go away when I come back for the + ;; second cleanup pass... + (let ((original-module (current-module)) + (bootstrap (resolve-module '(gnucash bootstrap)))) + + (set-current-module bootstrap) + + ;; right now we have to statically load all these at startup time. + ;; Hopefully we can gradually make them autoloading. + (gnc:module-load "gnucash/engine" 0) + (gnc:module-load "gnucash/app-utils" 0) + (gnc:module-load "gnucash/app-file" 0) + (gnc:module-load "gnucash/register/ledger-core" 0) + (gnc:module-load "gnucash/register/register-core" 0) + (gnc:module-load "gnucash/register/register-gnome" 0) + (gnc:module-load "gnucash/import-export/binary-import" 0) + (gnc:module-load "gnucash/import-export/qif-import" 0) + (gnc:module-load "gnucash/report/report-system" 0) + (gnc:module-load "gnucash/report/stylesheets" 0) + (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) - ;; Now we can load a bunch of files. - (load-from-path "path.scm") - (load-from-path "command-line.scm") - (load-from-path "doc.scm") - (load-from-path "extensions.scm") - (load-from-path "main-window.scm") - (load-from-path "tip-of-the-day.scm") - (load-from-path "printing/print-check.scm") + ;; Now we can load a bunch of files. + (load-from-path "path.scm") + (load-from-path "command-line.scm") + (load-from-path "doc.scm") + (load-from-path "extensions.scm") + (load-from-path "main-window.scm") + (load-from-path "tip-of-the-day.scm") + (load-from-path "printing/print-check.scm") - (gnc:use-guile-module-here! '(gnucash price-quotes)) + (gnc:use-guile-module-here! '(gnucash price-quotes)) + (set-current-module original-module)) (gnc:hook-add-dangler gnc:*book-opened-hook* (lambda (file)