mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Don't export lots.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7777 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
2bd08c53e3
commit
fabeeeb3d7
10
ChangeLog
10
ChangeLog
@ -1,5 +1,15 @@
|
||||
2003-01-04 David Hampton <hampton@employees.org>
|
||||
|
||||
* src/backend/file/gnc-account-xml-v2.c:
|
||||
* src/backend/file/gnc-book-xml-v2.c:
|
||||
* src/backend/file/io-gncxml-v2.c:
|
||||
* src/backend/file/io-utils.c:
|
||||
* src/backend/file/test/test-xml-account.c: Don't export lots.
|
||||
|
||||
* src/engine/gnc-session.c (gnc_session_destroy): Don't clear the
|
||||
current_session global unless the actual current session is being
|
||||
destroyed. 101707.
|
||||
|
||||
* src/backend/file/io-gncxml-v2.c: Pipe the output through zlib if
|
||||
the user requested compression. This request is either setting a
|
||||
option in the preferences (for all files), or naming the
|
||||
|
@ -73,7 +73,7 @@ const gchar *account_version_string = "2.0.0";
|
||||
#define act_security_scu_string "act:security-scu"
|
||||
|
||||
xmlNodePtr
|
||||
gnc_account_dom_tree_create(Account *act)
|
||||
gnc_account_dom_tree_create(Account *act, gboolean exporting)
|
||||
{
|
||||
const char *str;
|
||||
kvp_frame *kf;
|
||||
@ -134,7 +134,7 @@ gnc_account_dom_tree_create(Account *act)
|
||||
|
||||
n = xaccAccountGetLotList (act);
|
||||
PINFO ("lot list=%p", n);
|
||||
if (n)
|
||||
if (n && !exporting)
|
||||
{
|
||||
xmlNodePtr toaddto = xmlNewChild(ret, NULL, act_lots_string, NULL);
|
||||
|
||||
|
@ -75,7 +75,7 @@ append_group (xmlNodePtr parent, AccountGroup *grp)
|
||||
xmlNodePtr accnode;
|
||||
AccountGroup *newgrp;
|
||||
|
||||
accnode = gnc_account_dom_tree_create((Account*)(node->data));
|
||||
accnode = gnc_account_dom_tree_create((Account*)(node->data), FALSE);
|
||||
xmlAddChild (parent, accnode);
|
||||
|
||||
newgrp = xaccAccountGetChildren((Account*)(node->data));
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include "gnc-xml-helper.h"
|
||||
#include "sixtp.h"
|
||||
|
||||
xmlNodePtr gnc_account_dom_tree_create(Account *act);
|
||||
xmlNodePtr gnc_account_dom_tree_create(Account *act, gboolean exporting);
|
||||
sixtp* gnc_account_sixtp_parser_create(void);
|
||||
|
||||
xmlNodePtr gnc_book_dom_tree_create(GNCBook *book);
|
||||
|
@ -647,6 +647,7 @@ add_parser_cb (const char *type, gpointer data_p, gpointer be_data_p)
|
||||
static sixtp_gdv2 *
|
||||
gnc_sixtp_gdv2_new (
|
||||
GNCBook *book,
|
||||
gboolean exporting,
|
||||
countCallbackFn countcallback,
|
||||
GNCBePercentageFunc gui_display_fn)
|
||||
{
|
||||
@ -667,7 +668,7 @@ gnc_sixtp_gdv2_new (
|
||||
gd->counter.prices_total = 0;
|
||||
gd->counter.schedXactions_loaded = 0;
|
||||
gd->counter.schedXactions_total = 0;
|
||||
|
||||
gd->exporting = exporting;
|
||||
gd->countCallback = countcallback;
|
||||
gd->gui_display_fn = gui_display_fn;
|
||||
return gd;
|
||||
@ -686,7 +687,7 @@ gnc_session_load_from_xml_file_v2(GNCSession *session)
|
||||
|
||||
book = gnc_session_get_book (session);
|
||||
be = (Backend *)gnc_book_get_backend(book);
|
||||
gd = gnc_sixtp_gdv2_new(book, file_rw_feedback, be->percentage);
|
||||
gd = gnc_sixtp_gdv2_new(book, FALSE, file_rw_feedback, be->percentage);
|
||||
|
||||
top_parser = sixtp_new();
|
||||
main_parser = sixtp_new();
|
||||
@ -1114,7 +1115,7 @@ gnc_book_write_to_xml_filehandle_v2(GNCBook *book, FILE *out)
|
||||
NULL);
|
||||
|
||||
be = (Backend *)gnc_book_get_backend(book);
|
||||
gd = gnc_sixtp_gdv2_new(book, file_rw_feedback, be->percentage);
|
||||
gd = gnc_sixtp_gdv2_new(book, FALSE, file_rw_feedback, be->percentage);
|
||||
gd->counter.commodities_total =
|
||||
gnc_commodity_table_get_size(gnc_book_get_commodity_table(book));
|
||||
gd->counter.accounts_total = 1 +
|
||||
@ -1151,7 +1152,7 @@ gnc_book_write_accounts_to_xml_filehandle_v2(Backend *be, GNCBook *book, FILE *o
|
||||
1 + xaccGroupGetNumSubAccounts(gnc_book_get_group(book)),
|
||||
NULL);
|
||||
|
||||
gd = gnc_sixtp_gdv2_new(book, file_rw_feedback, be->percentage);
|
||||
gd = gnc_sixtp_gdv2_new(book, TRUE, file_rw_feedback, be->percentage);
|
||||
gd->counter.commodities_total =
|
||||
gnc_commodity_table_get_size(gnc_book_get_commodity_table(book));
|
||||
gd->counter.accounts_total = 1 +
|
||||
|
@ -73,6 +73,7 @@ struct sixtp_gdv2
|
||||
load_counter counter;
|
||||
countCallbackFn countCallback;
|
||||
GNCBePercentageFunc gui_display_fn;
|
||||
gboolean exporting;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include "Group.h"
|
||||
#include "gnc-book.h"
|
||||
#include "gnc-xml.h"
|
||||
#include "gnc-xml-helper.h"
|
||||
#include "gnc-xml.h"
|
||||
#include "io-utils.h"
|
||||
|
||||
/*
|
||||
@ -65,7 +65,8 @@ write_account_group(FILE *out, AccountGroup *grp, sixtp_gdv2 *gd)
|
||||
xmlNodePtr accnode;
|
||||
AccountGroup *newgrp;
|
||||
|
||||
accnode = gnc_account_dom_tree_create((Account*)(node->data));
|
||||
accnode = gnc_account_dom_tree_create((Account*)(node->data),
|
||||
gd && gd->exporting);
|
||||
|
||||
xmlElemDump(out, NULL, accnode);
|
||||
fprintf(out, "\n");
|
||||
|
@ -229,7 +229,7 @@ test_account(int i, Account *test_act)
|
||||
gchar *compare_msg;
|
||||
int fd;
|
||||
|
||||
test_node = gnc_account_dom_tree_create(test_act);
|
||||
test_node = gnc_account_dom_tree_create(test_act, FALSE);
|
||||
|
||||
if(!test_node)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user