[GNC-dev] Getting book option
ianchi74 at outlook.com
Sun May 12 23:08:39 EDT 2019
Hi, I need help to find the right API from C code to get the value of a book option (the ones set from the dialog at File -> Properties ).
I know it is stored as a KVP with the name "options/Budgeting/Default Budget".
I've read the documentation and the source code, but couldn't find a simple way to do it.
The only way a found would be to use qof_book_get_option() (as done from SCM code) but I'll have to add boilerplate to convert the string path to a GSList and to unpack the returned value from KvpValue to the stored GUID.
Is there a better way of doing it?
Another question, that I cannot deduce: which is the relationship (if any), between that option and qof_instance_get (book, "default-budget", &value, NUL)?
This last one, is always NUL, but I couldn't find a way to set it.
More information about the gnucash-devel