patches and double druids

Derek Atkins warlord at MIT.EDU
Tue Nov 30 22:43:10 EST 2004


Neil Williams <linux at codehelp.co.uk> writes:

> I'll fix the example account trees and fold those, the Nov 17th changes and 
> the changes since Nov 17th into another patch - possibly this weekend.

Great.

> Don't worry about it, the double druid bug has disappeared from my system too. 
> I was missing nautilus and apt-get install nautilus solved the problem.

???  Isn't there an actual bug in the code?  How did nautilus "solve
the problem"?

> OK. I'm going to see if I can 'step-over' certain druid pages to further 
> customise the process. It's clunky at the moment and there is potential for 
> confusion with two introductory pages and two Finish pages.

Hmm...  I dont know how hard that might be.

>> However it may be confusing to the user to click "finish" and then
>> have another druid pop up.
>
> Agreed. Now that you've confirmed the above, I'll use some judicious "Next" 
> calls to skip unnecessary windows when hierarchy druid runs at the behest of 
> merge druid.

Ok.

> As the older binary format is still supported in the backend/file, would it 
> naturally follow that wrapping the current backend/file in a second 
> QofSession and then passing that QofBook to qof_book_merge would allow all 
> existing GnuCash files to be imported into any other GnuCash book? Much like 
> the hierarchy druid, a few subtle changes to handle assumptions about the 
> current book may be all that is really needed.

Hmm...  I dont know.  That does sound like a rather intriguing idea.

> File -> Import -> GnuCash file
> File -> Import -> QSF data
> File -> Export -> QSF

I think we'd also want "File -> Export -> Gnucash XML" for when we
(finally) move to SQLite.

> I agree. I'll concentrate on getting the merge/QSF code working and leave 
> improvements to the GUI to a later stage. It sounds like the generic druid 
> will also allow the hierarchy druid pages to appear at the same X window 
> coordinates as the merge druid - currently the hierarchy druid is offset to 
> the side of the now disappeared merge druid. It looks odd and forces an 
> unnecessary mouse movement, just to click Next.

Yes, the generic druid will let you build a signal druid from the
various "hierarchy" and "merge" components.  So, yes, you get a single
coherent druid.  To see an example, run the File -> Import -> Test
Druid in the g2 branch.

> What did you think about the QSF improvements? I'm hoping to get that finished 
> by the end of December. I spent a lot of time considering other options to 
> encode the map and when I realised I could use XML after all, it all became 
> very straightforward.

Sorry, I haven't had a chance to really look into it, but the cursory
glance seems fine to me.

> As QSF is a file backend and I can reliably distinguish between QSF files and 
> GnuCash XML v1 /v2 files (using schema validation in libxml2), are there 
> particular problems with adding QSF as another backend/file option? Would it 
> simply be a case of adapting gnc_is_our_xml_file() to attempt to validate the 
> file against both QSF schemas and then load the QSF functions instead of 
> sixtp? The QSF validation wouldn't need the const char *first_tag, just the 
> filename and a default for the the name and location of the schemas. (The 
> schema validation is a more rigorous test than currently used for GnuCash XML 
> files.) I'll have to look at how GnuCash uses the environment to find 
> external files too. Some QSF files will need to go in install_dir/share/qsf 
> and some in ~/.gnucash.

I'm not convinced that schema validation would work for gnucash files.
I do think that "File -> Open" should have some logic to detect what
kind of file is being opened so it can switch between the "gnucash
binary", "gnucash xml 1", "gnucash xml 2", "gnucash qsf", and "gnucash
sqlite" file formats.  How this happens I dont know, yet, but if you
find a good relatively generic method I'd go for it.

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-devel mailing list