[Gnucash-changes] r12976 - gnucash/trunk/src - Export debugging
state from C to guile.
Chris Shoemaker
chris at cvs.gnucash.org
Tue Jan 24 21:06:08 EST 2006
Author: chris
Date: 2006-01-24 21:06:08 -0500 (Tue, 24 Jan 2006)
New Revision: 12976
Trac: http://svn.gnucash.org/trac/changeset/12976
Modified:
gnucash/trunk/src/app-utils/app-utils.scm
gnucash/trunk/src/core-utils/gw-core-utils-spec.scm
gnucash/trunk/src/engine/gw-engine-spec.scm
gnucash/trunk/src/gnome-utils/gnc-menu-extensions.scm
gnucash/trunk/src/gnome-utils/gnome-utils.scm
gnucash/trunk/src/scm/command-line.scm
gnucash/trunk/src/scm/main.scm
Log:
Export debugging state from C to guile.
Remove obsolete guile command line options.
Remove guile setting of add-extension hooks that were apparently
obsoleted by C code a while ago.
Remove guile's access to application lifecycle function hooks.
Modified: gnucash/trunk/src/app-utils/app-utils.scm
===================================================================
--- gnucash/trunk/src/app-utils/app-utils.scm 2006-01-25 01:36:28 UTC (rev 12975)
+++ gnucash/trunk/src/app-utils/app-utils.scm 2006-01-25 02:06:08 UTC (rev 12976)
@@ -233,11 +233,6 @@
(export gnc:hook-run-danglers) ;; from hooks.scm
(re-export gnc:hook-add-dangler)
(re-export gnc:hook-remove-dangler)
-(re-export gnc:*startup-hook*)
-(re-export gnc:*shutdown-hook*)
-(re-export gnc:*ui-startup-hook*)
-(re-export gnc:*ui-post-startup-hook*)
-(re-export gnc:*ui-shutdown-hook*)
(re-export gnc:*book-opened-hook*)
(re-export gnc:*new-book-hook*)
(re-export gnc:*book-closed-hook*)
Modified: gnucash/trunk/src/core-utils/gw-core-utils-spec.scm
===================================================================
--- gnucash/trunk/src/core-utils/gw-core-utils-spec.scm 2006-01-25 01:36:28 UTC (rev 12975)
+++ gnucash/trunk/src/core-utils/gw-core-utils-spec.scm 2006-01-25 02:06:08 UTC (rev 12976)
@@ -24,7 +24,8 @@
ws
(lambda (wrapset client-wrapset)
(list
- "#include <gnc-gconf-utils.h>\n")))
+ "#include <gnc-gconf-utils.h>\n"
+ "#include <gnc-main.h>\n")))
(gw:wrap-function
ws
@@ -34,4 +35,13 @@
'(((<gw:mchars> caller-owned) section)
((<gw:mchars> caller-owned) name))
"Get a boolean value from gconf.")
+
+ (gw:wrap-function
+ ws
+ 'gnc:debugging?
+ '<gw:bool>
+ "gnc_is_debugging"
+ '()
+ "Is debugging mode on?")
+
)
Modified: gnucash/trunk/src/engine/gw-engine-spec.scm
===================================================================
--- gnucash/trunk/src/engine/gw-engine-spec.scm 2006-01-25 01:36:28 UTC (rev 12975)
+++ gnucash/trunk/src/engine/gw-engine-spec.scm 2006-01-25 02:06:08 UTC (rev 12976)
@@ -2621,24 +2621,12 @@
"Run the danglers on a hook.")
; Now wrap all the 'known' hooks
-(gw:wrap-value ws 'gnc:*startup-hook*
- '(<gw:mchars> callee-owned) "HOOK_STARTUP")
-(gw:wrap-value ws 'gnc:*shutdown-hook*
- '(<gw:mchars> callee-owned) "HOOK_SHUTDOWN")
-(gw:wrap-value ws 'gnc:*ui-startup-hook*
- '(<gw:mchars> callee-owned) "HOOK_UI_STARTUP")
-(gw:wrap-value ws 'gnc:*ui-post-startup-hook*
- '(<gw:mchars> callee-owned) "HOOK_UI_POST_STARTUP")
-(gw:wrap-value ws 'gnc:*ui-shutdown-hook*
- '(<gw:mchars> callee-owned) "HOOK_UI_SHUTDOWN")
(gw:wrap-value ws 'gnc:*new-book-hook*
'(<gw:mchars> callee-owned) "HOOK_NEW_BOOK")
(gw:wrap-value ws 'gnc:*report-hook*
'(<gw:mchars> callee-owned) "HOOK_REPORT")
(gw:wrap-value ws 'gnc:*save-options-hook*
'(<gw:mchars> callee-owned) "HOOK_SAVE_OPTIONS")
-(gw:wrap-value ws 'gnc:*add-extension-hook*
- '(<gw:mchars> callee-owned) "HOOK_ADD_EXTENSION")
(gw:wrap-value ws 'gnc:*book-opened-hook*
'(<gw:mchars> callee-owned) "HOOK_BOOK_OPENED")
(gw:wrap-value ws 'gnc:*book-closed-hook*
Modified: gnucash/trunk/src/gnome-utils/gnc-menu-extensions.scm
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-menu-extensions.scm 2006-01-25 01:36:28 UTC (rev 12975)
+++ gnucash/trunk/src/gnome-utils/gnc-menu-extensions.scm 2006-01-25 02:06:08 UTC (rev 12976)
@@ -53,13 +53,3 @@
(define (gnc:make-separator path)
(gnc:make-extension 'separator "" "" path #f))
-
-(define (gnc:extensions-menu-setup)
- (define menu (gnc:make-menu (N_ "Extensions") (list "_Tools")))
- (gnc:add-extension menu)
- (gnc:hook-run-danglers gnc:*add-extension-hook*)
- #f)
-
-(if (gnc:debugging?)
- (gnc:hook-add-dangler gnc:*ui-startup-hook*
- gnc:extensions-menu-setup))
Modified: gnucash/trunk/src/gnome-utils/gnome-utils.scm
===================================================================
--- gnucash/trunk/src/gnome-utils/gnome-utils.scm 2006-01-25 01:36:28 UTC (rev 12975)
+++ gnucash/trunk/src/gnome-utils/gnome-utils.scm 2006-01-25 02:06:08 UTC (rev 12976)
@@ -15,7 +15,6 @@
(export gnc:make-menu-item)
(export gnc:make-menu)
(export gnc:make-separator)
-(re-export gnc:*add-extension-hook*)
(export gnc:kvp-option-dialog)
Modified: gnucash/trunk/src/scm/command-line.scm
===================================================================
--- gnucash/trunk/src/scm/command-line.scm 2006-01-25 01:36:28 UTC (rev 12975)
+++ gnucash/trunk/src/scm/command-line.scm 2006-01-25 02:06:08 UTC (rev 12976)
@@ -22,8 +22,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Configuration variables
-(define gnc:*loglevel* #f)
-
(define gnc:*doc-path* #f)
(define (gnc:expand-path new-list current-list default-generator)
@@ -67,23 +65,6 @@
;; We use a function so we don't do this at file load time.
;; Convert the temporary startup value into a config var.
- (let ((current-value gnc:*debugging?*))
- (set!
- gnc:*debugging?*
- (gnc:make-config-var
- (N_ "Enable debugging code.")
- (lambda (var value) (if (boolean? value) (list value) #f))
- eq?
- #f))
- (gnc:config-var-value-set! gnc:*debugging?* #f current-value))
-
- (set! gnc:*loglevel*
- (gnc:make-config-var
- (N_ "Logging level from 0 (least logging) to 5 (most logging).")
- (lambda (var value) (if (exact? value) (list value) #f))
- eq?
- #f))
-
(set! gnc:*doc-path*
(gnc:make-path-config-var
(N_ "A list of directories (strings) indicating where to look for html and parsed-html files. \
@@ -111,20 +92,6 @@
;; for now since it doesn't depend on running any code.
(define gnc:*arg-defs*
(list
- (list "debug"
- 'boolean
- (lambda (val)
- (gnc:config-var-value-set! gnc:*debugging?* #f val))
- #f
- (N_ "Enable debugging mode"))
-
- (list "loglevel"
- 'integer
- (lambda (val)
- (gnc:config-var-value-set! gnc:*loglevel* #f val))
- "LOGLEVEL"
- (N_ "Set the logging level from 0 (least) to 6 (most)"))
-
(list "doc-path"
'string
(lambda (val)
Modified: gnucash/trunk/src/scm/main.scm
===================================================================
--- gnucash/trunk/src/scm/main.scm 2006-01-25 01:36:28 UTC (rev 12975)
+++ gnucash/trunk/src/scm/main.scm 2006-01-25 02:06:08 UTC (rev 12976)
@@ -45,7 +45,6 @@
;; from main.scm
(export gnc:version)
-(export gnc:debugging?)
(export gnc:warn)
(export gnc:error)
(export gnc:msg)
@@ -89,15 +88,6 @@
;;(use-modules (ice-9 statprof))
-;; These will be converted to config vars later (see command-line.scm)
-(define gnc:*debugging?* (if (getenv "GNC_DEBUG") #t #f))
-
-;; Function to get debugging
-(define (gnc:debugging?)
- (if (boolean? gnc:*debugging?*)
- gnc:*debugging?*
- (gnc:config-var-value-get gnc:*debugging?*)))
-
(define (gnc:setup-debugging)
(if (gnc:debugging?)
(debug-enable 'backtrace)))
More information about the gnucash-changes
mailing list