[Gnucash-changes] get rid of pricedb crud
Linas Vepstas
linas at cvs.gnucash.org
Sun Jun 13 01:06:44 EDT 2004
Log Message:
-----------
get rid of pricedb crud
Tags:
----
backend-work-1
Modified Files:
--------------
gnucash/src/backend/file:
gnc-backend-file.c
io-gncbin-r.c
io-gncxml-v1.c
io-gncxml-v2.c
Revision Data
-------------
Index: io-gncxml-v1.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/io-gncxml-v1.c,v
retrieving revision 1.30
retrieving revision 1.30.2.1
diff -Lsrc/backend/file/io-gncxml-v1.c -Lsrc/backend/file/io-gncxml-v1.c -u -r1.30 -r1.30.2.1
--- src/backend/file/io-gncxml-v1.c
+++ src/backend/file/io-gncxml-v1.c
@@ -389,11 +389,6 @@
xaccSetAccountGroup(book, global_parse_status.account_group);
- if(global_parse_status.pricedb)
- {
- gnc_pricedb_set_db(book, global_parse_status.pricedb);
- }
-
/* Fix account and transaction commodities */
xaccGroupScrubCommodities (gnc_book_get_group(book));
Index: io-gncxml-v2.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/io-gncxml-v2.c,v
retrieving revision 1.42
retrieving revision 1.42.4.1
diff -Lsrc/backend/file/io-gncxml-v2.c -Lsrc/backend/file/io-gncxml-v2.c -u -r1.42 -r1.42.4.1
--- src/backend/file/io-gncxml-v2.c
+++ src/backend/file/io-gncxml-v2.c
@@ -305,13 +305,7 @@
static gboolean
add_pricedb_local(sixtp_gdv2 *data, GNCPriceDB *db)
{
- QofBook *book;
-
- book = data->book;
-
/* gnc_pricedb_print_contents(db, stdout); */
- gnc_pricedb_set_db(book, db);
-
return TRUE;
}
Index: gnc-backend-file.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/gnc-backend-file.c,v
retrieving revision 1.38
retrieving revision 1.38.4.1
diff -Lsrc/backend/file/gnc-backend-file.c -Lsrc/backend/file/gnc-backend-file.c -u -r1.38 -r1.38.4.1
--- src/backend/file/gnc-backend-file.c
+++ src/backend/file/gnc-backend-file.c
@@ -236,12 +236,13 @@
}
static void
-file_begin_edit (QofBackend *be, QofIdTypeConst typ, gpointer gp)
+file_begin_edit (QofBackend *be, QofInstance *inst)
{
FileBackend *fbe = (FileBackend *) be;
QofBook *book = gp;
const char * filepath;
+ QofIdTypeConst typ = QOF_ENTITY(inst)->e_type;
if (strcmp (GNC_ID_PERIOD, typ)) return;
filepath = build_period_filepath(fbe, book);
PINFO (" ====================== book=%p filepath=%s\n", book, filepath);
Index: io-gncbin-r.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/io-gncbin-r.c,v
retrieving revision 1.29
retrieving revision 1.29.4.1
diff -Lsrc/backend/file/io-gncbin-r.c -Lsrc/backend/file/io-gncbin-r.c -u -r1.29 -r1.29.4.1
--- src/backend/file/io-gncbin-r.c
+++ src/backend/file/io-gncbin-r.c
@@ -509,10 +509,8 @@
{
GNCPriceDB *tmpdb;
- if(cvt_potential_prices_to_pricedb_and_cleanup(&tmpdb, book))
+ if(!cvt_potential_prices_to_pricedb_and_cleanup(&tmpdb, book))
{
- gnc_pricedb_set_db(book, tmpdb);
- } else {
PWARN("pricedb import failed.");
error_code = ERR_BACKEND_MISC;
gnc_pricedb_destroy(tmpdb);
More information about the gnucash-changes
mailing list