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

Phil Longstaff plongstaff at
Sat Dec 23 16:58:58 EST 2006

On Sat, 2006-23-12 at 12:58 -0700, Mark Johnson wrote:
> Derek Atkins wrote:
> >> I would like to test the gda backend by saving (a copy of) my real 
> >> data to it.  How would I do that?  (I am testing gnucash-gda on a 
> >> separate machine from where I run gnucash with my real data.)
> >
> >
> > My understanding is that right now there's not a good way of doing this
> > because there's no way to input a URI in the File Chooser, so you
> > cannot Save As to save to a GDA backend.   Fixing this is something
> > that needs to happen..  Care to take a shot?  ;)
> >
> Sigh, I couldn't resist the temptation...  I started looking into this. 

Thanks.  I'm happy to have other people tackling areas of this project.

> First, I thought I had found something when I found the function 
> gtk_file_chooser_set_local_only, but the wretched dialog insists on 
> trying to display the directory of the entered URI when one clicks 
> Save.  Naturally, such a directory does not exist.  Entering 
> gda://AnActualConection results in an error.

I found that function too and thought it would fix things, but it

I didn't see an error.  What I saw was that the returned file looked
like /path.../gda%3A%2F%2FAnActualConection.  I have some code which
looks for "%3A%2F%2F" and then searches around for the URI that was
entered.  This works, but now means I need to add the sync function to
the backend to blow away the current contents of the database and save
the new contents.  I should have this ready to commit in a few days.
This will at least allow saving to a GDA database.


More information about the gnucash-devel mailing list