[Gnucash-changes] r13417 - gnucash/trunk - Bug#332802: fix
Export Accounts;
remove `price_lookup` and `export` functions from GncFileBackend.
Neil Williams
linux at codehelp.co.uk
Tue Feb 28 03:06:12 EST 2006
On Tuesday 28 February 2006 2:28 am, Joshua Sled wrote:
> Author: jsled
> Log:
> Bug#332802: fix Export Accounts; remove `price_lookup` and `export`
> functions from GncFileBackend.
The only problem with export is that it's now been moved into the QofBackend
where it is still deprecated, but I'm glad we're not using price_lookup
anymore (also deprecated).
> + * src/backend/file/gnc-backend-file.h (struct FileBackend_struct):
> + Remove unused `pricedb_lookup` and `export` operations from
> + gnucash-specific file backend.
But you've kept export in a different place - if it's really unused we should
dump it altogether.
Currently, only the gnc_backend_file supports export.
What's the functional difference between the two Export commands on the File
menu?
Should we just export the Accounts as QSF - without any starting balance
Transactions and Splits?
QofCollection col;
QofSession export_session;
export_session = qof_session_new();
/* insert code to get filename for export and begin export_session */
col = qof_book_get_collection(book, GNC_ID_ACCOUNT);
if(!qof_entity_copy_coll(export_session, col))
{ PINFO ("export accounts failed"); return; }
qof_session_save ...
then ditch export completely?
> +
> + * src/backend/file/gnc-backend-file.c (gnc_backend_new): Use
> + correct 'export' function-slot, allowing File > Export > Export
> + Accounts to work again. Bug#332802.
Unfortunately, it's a deprecated slot - it'll have to move again at some point
(libqof2).
> Modified: gnucash/trunk/src/backend/file/gnc-backend-file.c
> - gnc_be->export = gnc_file_be_write_accounts_to_file;
> + be->export = gnc_file_be_write_accounts_to_file;
> Modified: gnucash/trunk/src/backend/file/gnc-backend-file.h
> - /**
> - * XXX Export should really _NOT_ be here, but is left here for now.
> - * I'm not sure where this should be going to. It should be
> - * removed ASAP. This is a temporary hack-around until period-closing
> - * is fully implemented.
> - */
> - void (*export) (QofBackend *, QofBook *);
This was just a copy of the same comment in QofBackend relating to be->export.
There is no need for a specific export call in QofBackend because any
selection of session data can be exported.
--
Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20060228/2f3f5518/attachment.bin
More information about the gnucash-devel
mailing list