X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fhomebank;a=blobdiff_plain;f=src%2Fhb-export.c;h=b1022f351090ae55e66981a15c9ab7b16d006be3;hp=7e0881aeb42af622c095e91db6cf51cc13c6df81;hb=HEAD;hpb=d11c8dd3275ed2a4a35598e69c0804dcf9435766 diff --git a/src/hb-export.c b/src/hb-export.c index 7e0881a..b1022f3 100644 --- a/src/hb-export.c +++ b/src/hb-export.c @@ -1,5 +1,5 @@ /* HomeBank -- Free, easy, personal accounting for everyone. - * Copyright (C) 1995-2018 Maxime DOYEN + * Copyright (C) 1995-2019 Maxime DOYEN * * This file is part of HomeBank. * @@ -18,7 +18,9 @@ */ #include "homebank.h" + #include "hb-export.h" +#include "list-operation.h" /****************************************************************************/ /* Debug macros */ @@ -56,7 +58,6 @@ gint count, i; Transaction *txn = list->data; Payee *payee; Category *cat; - gchar *txt; g_date_set_julian (date, txn->date); //#1270876 @@ -125,24 +126,20 @@ gint count, i; cat = da_cat_get(txn->kcat); if(cat) { - txt = da_cat_get_fullname(cat); - g_string_append_printf (elt, "L%s\n", txt); - g_free(txt); + g_string_append_printf (elt, "L%s\n", cat->fullname); } } // splits - count = da_splits_count(txn->splits); + count = da_splits_length(txn->splits); for(i=0;isplits[i]; + Split *s = da_splits_get(txn->splits, i); cat = da_cat_get(s->kcat); if(cat) { - txt = da_cat_get_fullname(cat); - g_string_append_printf (elt, "S%s\n", txt); - g_free(txt); + g_string_append_printf (elt, "S%s\n", cat->fullname); } g_string_append_printf (elt, "E%s\n", s->memo); @@ -557,7 +554,7 @@ gint i, col; Transaction *txn; int tw, th; - gtk_tree_model_get (model, &iter, LST_DSPOPE_DATAS, &txn, -1); + gtk_tree_model_get (model, &iter, MODEL_TXN_POINTER, &txn, -1); i = 0; g_date_set_julian (date, txn->date); @@ -629,7 +626,7 @@ gint i, col; Transaction *txn; int tw, th; - gtk_tree_model_get (model, &iter, LST_DSPOPE_DATAS, &txn, -1); + gtk_tree_model_get (model, &iter, MODEL_TXN_POINTER, &txn, -1); //DB( g_print(" - %d, %d, %s\n", x, y, txn->memo) ); if(cur_page_line == 1)