Save to URI [Was: Re: gda-dev does not compile]

Mark Johnson mrj001 at
Sun Dec 24 16:26:45 EST 2006

Derek Atkins wrote:

> What's the point of the global, static fb_info?  In general static
> storage is a Bad Idea (TM).

Agreed.  It's something I copied from 1.8.12, and didn't spend enough 
time thinking if the global was necessary. 

It is the storage space where the callback function (for when OK is 
clicked) stores the filename.  I see that given the lifetime of the 
dialog box that local storage (in gnc_file_dialog) would have sufficed.

I have attached another patch (to be applied after the previous one).  
This is also in the gda-dev branch.  This changes the global fb_info to 
a local variable in gnc_file_dialog.  Its lifetime exceeds that of the 
dialog which uses it.  I tried this code, and successfully opened a 
file, so the communication between the callback and gnc_file_dialog 
still works.

Thanks, Derek,

> As for the QSF Importer -- I'm not at all surprised that it doesn't
> use the GnuCash APIs :(   Feel free to change that ;)

I might (can't say won't after this one :-), but I am mainly interested 
in getting a database backend.

> -derek

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: FileSelection2.patch

More information about the gnucash-devel mailing list