Coupling of preferences internal references and UI rendering

Jeff Kletsky gnucash at allycomm.com
Fri Feb 26 21:02:48 EST 2010


When I look at the code for setting preferences, such as in
src/business/business-utils/business-prefs.scm
it appears to me that there is a "hard link" between the access to the 
preference and the UI rendering

(define (book-options-generator options)
   (define (reg-option new-option)
     (gnc:register-option options new-option))

   (reg-option
    (gnc:make-string-option
     gnc:*business-label* gnc:*company-name*
     "a" (N_ "The name of your business") ""))

As I understand it, the combination of gnc:*business-label* 
gnc:*company-name* is used to identify the preference in the code, as 
well as identifying it to be rendered on the gnc:*business-label* tab.

Once an option like this is created, is there any way to have it appear 
(in the future) on a different tab, without having to change all the 
code references to the preference?




More information about the gnucash-devel mailing list