]> Dogcows Code - chaz/homebank/blobdiff - src/hb-export.c
Merge branch 'upstream'
[chaz/homebank] / src / hb-export.c
index 7e0881aeb42af622c095e91db6cf51cc13c6df81..b1022f351090ae55e66981a15c9ab7b16d006be3 100644 (file)
@@ -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;i<count;i++)
                {
-               Split *s = txn->splits[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)
This page took 0.023745 seconds and 4 git commands to generate.