Commit 640b99df authored by Maxime Doyen's avatar Maxime Doyen

4.5.4 release

parent 9dca1917
2013-09-29 Maxime Doyen
Made 4.5.4 release.
* bugfix: #1230401 running balance missordered after insert on same date
* bugfix: #1232418 Account, Payees and category, wrongly disabled!
* bugfix: scheduled transaction icon was still displayed after a save
2013-09-21 Maxime Doyen
Made 4.5.3 release.
* bugfix: #1225611 Trend Time report : categories crashes on windows
* bugfix: #1221484 End date not checked to be larger than Start date in reports
* bugfix: #1218644 There is a problem of calculating the column balances.
* bugfix: #1216321 reversed transactions
* bugfix: #1216284 balance report do not exclude account with exclude from report checked
* bugfix: #1215521 when importing qif, automatic assignments are not made
* bugfix: #1214077 win32: my csv file exported crash when import again
* bugfix: #1213569 win32: program not all translated in french since 4.5.1
2013-08-15 Maxime Doyen
Made 4.5.2 release.
......
......@@ -167,7 +167,7 @@ struct account_data *data = user_data;
DB( g_print("action close\n") );
DB( g_printf("window %p\n", data->window) );
DB( g_print("window %p\n", data->window) );
gtk_widget_destroy (GTK_WIDGET (data->window));
......@@ -449,7 +449,7 @@ gint result, count;
gtk_tree_model_get_iter(model, &iter, list->data);
gtk_tree_model_get(model, &iter, LST_DSPOPE_DATAS, &ope, -1);
DB( g_printf(" create archive %s %.2f\n", ope->wording, ope->amount) );
DB( g_print(" create archive %s %.2f\n", ope->wording, ope->amount) );
item = da_archive_malloc();
......@@ -573,10 +573,11 @@ static void account_balance_refresh(GtkWidget *view)
struct account_data *data;
GList *list;
gdouble balance;
GtkTreeModel *model;
data = g_object_get_data(G_OBJECT(gtk_widget_get_ancestor(view, GTK_TYPE_WINDOW)), "inst_data");
DB( g_printf("\n[account] balance refresh\n") );
DB( g_print("\n[account] balance refresh\n") );
balance = data->acc->initial;
......@@ -594,6 +595,10 @@ gdouble balance;
}
list = g_list_next(list);
}
model = gtk_tree_view_get_model(GTK_TREE_VIEW(data->LV_ope));
list_transaction_sort_force(GTK_TREE_SORTABLE(model), NULL);
}
......@@ -607,7 +612,7 @@ GList *list;
data = g_object_get_data(G_OBJECT(gtk_widget_get_ancestor(view, GTK_TYPE_WINDOW)), "inst_data");
DB( g_printf("\n[account] populate\n") );
DB( g_print("\n[account] populate\n") );
model = gtk_tree_view_get_model(GTK_TREE_VIEW(view));
......@@ -638,7 +643,7 @@ GList *list;
/* append to our treeview */
gtk_list_store_append (GTK_LIST_STORE(model), &iter);
//g_printf(" populate: %s\n", ope->ope_Word);
//g_print(" populate: %s\n", ope->ope_Word);
gtk_list_store_set (GTK_LIST_STORE(model), &iter,
LST_DSPOPE_DATAS, ope,
......@@ -752,12 +757,12 @@ struct account_data *data;
gint action = (gint)user_data;
gboolean result;
DB( g_printf("\n[account] action\n") );
DB( g_print("\n[account] action\n") );
data = g_object_get_data(G_OBJECT(gtk_widget_get_ancestor(widget, GTK_TYPE_WINDOW)), "inst_data");
//data = INST_DATA(widget);
DB( g_printf(" - action=%d\n", action) );
DB( g_print(" - action=%d\n", action) );
switch(action)
{
......@@ -772,7 +777,7 @@ gboolean result;
if(action == ACTION_ACCOUNT_ADD)
{
DB( g_printf("(transaction) add multiple\n") );
DB( g_print("(transaction) add multiple\n") );
//date = GLOBALS->today;
src_trn = da_transaction_malloc();
src_trn->date = GLOBALS->today;
......@@ -781,7 +786,7 @@ gboolean result;
}
else
{
DB( g_printf("(transaction) inherit multiple\n") );
DB( g_print("(transaction) inherit multiple\n") );
src_trn = da_transaction_clone(get_active_transaction(GTK_TREE_VIEW(data->LV_ope)));
type = TRANSACTION_EDIT_INHERIT;
}
......@@ -853,12 +858,12 @@ gboolean result;
Transaction *ct;
//nota: if kxfer is 0, the user has just changed the paymode to xfer
DB( g_printf(" - kxfer = %d\n", ope->kxfer) );
DB( g_print(" - kxfer = %d\n", ope->kxfer) );
//1) search a strong linked child
if(ope->kxfer > 0)
{
DB( g_printf(" - found a strong link ?\n") );
DB( g_print(" - found a strong link ?\n") );
ct = transaction_strong_get_child_transfer(ope);
if(ct != NULL) //should never be the case
......@@ -906,7 +911,7 @@ gboolean result;
gint result;
//gint count;
DB( g_printf(" - remove\n") );
DB( g_print(" - remove\n") );
//count = gtk_tree_selection_count_selected_rows(gtk_tree_view_get_selection(GTK_TREE_VIEW(data->LV_ope)));
......@@ -943,7 +948,7 @@ gboolean result;
gtk_tree_view_set_model(GTK_TREE_VIEW(data->LV_ope), NULL); /* Detach model from view */
DB( g_printf(" remove %d line\n", g_list_length(selection)) );
DB( g_print(" remove %d line\n", g_list_length(selection)) );
list = g_list_last(selection);
......@@ -955,7 +960,7 @@ gboolean result;
gtk_tree_model_get_iter(model, &iter, list->data);
gtk_tree_model_get(model, &iter, LST_DSPOPE_DATAS, &entry, -1);
DB( g_printf(" delete %s %.2f\n", entry->wording, entry->amount) );
DB( g_print(" delete %s %.2f\n", entry->wording, entry->amount) );
account_balances_sub(entry);
......@@ -997,7 +1002,7 @@ gboolean result;
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(data->LV_ope));
gtk_tree_selection_selected_foreach(selection, (GtkTreeSelectionForeachFunc)reconcile_selected_foreach_func, data);
DB( g_printf(" - reconcile\n") );
DB( g_print(" - reconcile\n") );
gtk_widget_queue_draw (data->LV_ope);
//gtk_widget_queue_resize (data->LV_acc);
......@@ -1027,7 +1032,7 @@ gboolean result;
//close
case ACTION_ACCOUNT_CLOSE:
{
DB( g_printf(" - close\n") );
DB( g_print(" - close\n") );
//g_signal_emit_by_name(data->window, "delete-event");
......@@ -1044,7 +1049,7 @@ static void account_toggle(GtkWidget *widget, gpointer user_data)
{
struct account_data *data;
DB( g_printf("\n[account] toggle\n") );
DB( g_print("\n[account] toggle\n") );
data = g_object_get_data(G_OBJECT(gtk_widget_get_ancestor(widget, GTK_TYPE_WINDOW)), "inst_data");
......@@ -1055,7 +1060,7 @@ struct account_data *data;
static void account_selection(GtkTreeSelection *treeselection, gpointer user_data)
{
DB( g_printf("\n[account] selection changed cb\n") );
DB( g_print("\n[account] selection changed cb\n") );
account_update(GTK_WIDGET(gtk_tree_selection_get_tree_view (treeselection)), GINT_TO_POINTER(UF_SENSITIVE));
......@@ -1070,7 +1075,7 @@ GtkTreeSelection *selection;
gint flags;
gint count = 0;
DB( g_printf("\n[account] update\n") );
DB( g_print("\n[account] update\n") );
data = g_object_get_data(G_OBJECT(gtk_widget_get_ancestor(widget, GTK_TYPE_WINDOW)), "inst_data");
//data = INST_DATA(widget);
......@@ -1367,7 +1372,7 @@ gchar *tagstr, *txt;
gtk_tree_model_get_iter(model, &iter, list->data);
gtk_tree_model_get(model, &iter, LST_DSPOPE_DATAS, &ope, -1);
DB( g_printf(" modifying %s %.2f\n", ope->wording, ope->amount) );
DB( g_print(" modifying %s %.2f\n", ope->wording, ope->amount) );
switch( col_id )
{
......@@ -1446,7 +1451,7 @@ GtkWidget *window;
GdkWindow *gdkwindow;
GdkCursor *cursor;
DB( g_printf("\n[account] busy %d\n", state) );
DB( g_print("\n[account] busy %d\n", state) );
window = gtk_widget_get_ancestor(widget, GTK_TYPE_WINDOW);
data = g_object_get_data(G_OBJECT(window), "inst_data");
......@@ -1554,7 +1559,7 @@ account_getgeometry(GtkWidget *widget, GdkEventConfigure *event, gpointer user_d
//struct account_data *data = user_data;
struct WinGeometry *wg;
DB( g_printf("\n[account] get geometry\n") );
DB( g_print("\n[account] get geometry\n") );
//store position and size
wg = &PREFS->acc_wg;
......@@ -1564,7 +1569,7 @@ struct WinGeometry *wg;
GdkWindowState state = gdk_window_get_state(gdk_window);
wg->s = (state & GDK_WINDOW_STATE_MAXIMIZED) ? 1 : 0;
DB( g_printf(" window: l=%d, t=%d, w=%d, h=%d s=%d, state=%d\n", wg->l, wg->t, wg->w, wg->h, wg->s, state & GDK_WINDOW_STATE_MAXIMIZED) );
DB( g_print(" window: l=%d, t=%d, w=%d, h=%d s=%d, state=%d\n", wg->l, wg->t, wg->w, wg->h, wg->s, state & GDK_WINDOW_STATE_MAXIMIZED) );
return FALSE;
}
......@@ -1577,14 +1582,14 @@ static gboolean account_dispose(GtkWidget *widget, GdkEvent *event, gpointer use
//struct account_data *data = user_data;
DB( g_printf("\n[account] delete-event\n") );
DB( g_print("\n[account] delete-event\n") );
return FALSE;
}
/* Another callback */
static void account_destroy( GtkWidget *widget,
static gboolean account_destroy( GtkWidget *widget,
gpointer user_data )
{
struct account_data *data;
......@@ -1604,7 +1609,7 @@ struct account_data *data;
data->acc->window = NULL;
/* free title and filter */
DB( g_printf(" user_data=%p to be free\n", user_data) );
DB( g_print(" user_data=%p to be free\n", user_data) );
g_free(data->wintitle);
......@@ -1616,6 +1621,7 @@ struct account_data *data;
//our global list has changed, so update the treeview
ui_mainwindow_update(GLOBALS->mainwindow, GINT_TO_POINTER(UF_TITLE+UF_SENSITIVE+UF_BALANCE+UF_REFRESHALL));
return FALSE;
}
......@@ -1632,7 +1638,7 @@ GtkActionGroup *actions;
GtkAction *action;
GError *error = NULL;
DB( g_printf("\n[account] create_account_window\n") );
DB( g_print("\n[account] create_account_window\n") );
data = g_malloc0(sizeof(struct account_data));
if(!data) return NULL;
......@@ -1677,7 +1683,7 @@ GError *error = NULL;
//store our window private data
g_object_set_data(G_OBJECT(window), "inst_data", (gpointer)data);
DB( g_printf(" - new window=%p, inst_data=%p\n", window, data) );
DB( g_print(" - new window=%p, inst_data=%p\n", window, data) );
//set the window icon
//homebank_window_set_icon_from_file(GTK_WINDOW (window), "ope_show.svg");
......@@ -1908,7 +1914,7 @@ GError *error = NULL;
/* setup to moove later */
data->filter = da_filter_malloc();
DB( g_printf(" - filter ok %x\n", (gint)data->filter) );
DB( g_print(" - filter ok %x\n", (gint)data->filter) );
return window;
......
This diff is collapsed.
......@@ -566,7 +566,7 @@ gint div;
chart->range = chart->max - chart->min;
DB(g_print(" initial: min=%.2f, max=%.2f, range=%.2f\n", chart->min, chart->max, chart->range) );
DB( g_print(" initial: min=%.2f, max=%.2f, range=%.2f\n", chart->min, chart->max, chart->range) );
chart->unit = GetUnit(chart->range);
......@@ -588,8 +588,8 @@ gint div;
chart->range = chart->unit*chart->div;
*/
DB(g_print(" unit=%.2f, div=%d => %d\n", chart->unit, chart->div, (gint)chart->unit*chart->div) );
DB(g_print(" min=%.2f, max=%.2f, range=%.2f\n", chart->min, chart->max, chart->range) );
DB( g_print(" unit=%.2f, div=%d => %d\n", chart->unit, chart->div, (gint)chart->unit*chart->div) );
DB( g_print(" min=%.2f, max=%.2f, range=%.2f\n", chart->min, chart->max, chart->range) );
}
......@@ -894,7 +894,7 @@ gint i, first;
}
#endif
for(i=first; i<=(first+chart->visible) ;i++)
for(i=first; i<(first+chart->visible) ;i++)
{
gint color;
gint barw = chart->barw;
......@@ -1097,7 +1097,7 @@ gint first, i;
cairo_set_line_join(cr, CAIRO_LINE_JOIN_BEVEL);
cairo_set_line_width(cr, linew);
for(i=first; i<=(first+chart->visible) ;i++)
for(i=first; i<(first+chart->visible) ;i++)
{
x2 = x + (chart->blkw)/2;
y2 = chart->oy - (chart->datas1[i] / chart->range) * chart->graph_height;
......@@ -1384,8 +1384,8 @@ double h;
}
}
//DB( g_printf(" inside: x=%d, y=%d\n", x, y) );
//DB( g_printf(" inside: b=%f angle=%f, slice is %d\n", b, angle, index) );
//DB( g_print(" inside: x=%d, y=%d\n", x, y) );
//DB( g_print(" inside: b=%f angle=%f, slice is %d\n", b, angle, index) );
}
return(retval);
}
......@@ -1834,7 +1834,7 @@ GtkWidget *alignment;
//gtk_widget_queue_resize(chart->tooltipwin);
gtk_widget_size_request (chart->tooltipwin, &req);
//DB( g_printf("size is: w%d h%d :: xpos=%d ypos=%d\n", req.width, req.height, xpos,ypos) );
//DB( g_print("size is: w%d h%d :: xpos=%d ypos=%d\n", req.width, req.height, xpos,ypos) );
gtk_window_move(GTK_WINDOW(chart->tooltipwin), xpos - (req.width/2), ypos - req.height);
......
......@@ -434,6 +434,38 @@ void gtk_dateentry_set_date(GtkDateEntry *dateentry, guint32 julian_days)
gtk_dateentry_entry_set_text(dateentry);
}
/*
**
*/
void gtk_dateentry_set_mindate(GtkDateEntry *dateentry, guint32 julian_days)
{
DB( g_print(" \n[dateentry] set date\n") );
g_return_if_fail (GTK_IS_DATE_ENTRY (dateentry));
if(g_date_valid_julian(julian_days))
{
g_date_set_julian (&dateentry->mindate, julian_days);
}
}
/*
**
*/
void gtk_dateentry_set_maxdate(GtkDateEntry *dateentry, guint32 julian_days)
{
DB( g_print(" \n[dateentry] set date\n") );
g_return_if_fail (GTK_IS_DATE_ENTRY (dateentry));
if(g_date_valid_julian(julian_days))
{
g_date_set_julian (&dateentry->maxdate, julian_days);
}
}
/*
**
*/
......@@ -501,6 +533,7 @@ GtkDateEntry *dateentry = GTK_DATE_ENTRY (object);
}
*/
/*
** fill in our gtkentry from our GDate
*/
......
......@@ -75,8 +75,10 @@ GType gtk_dateentry_get_type(void);
GtkWidget *gtk_dateentry_new(void);
void gtk_dateentry_set_date(GtkDateEntry * dateentry, guint32 julian_days);
guint32 gtk_dateentry_get_date(GtkDateEntry * dateentry);
void gtk_dateentry_set_date(GtkDateEntry * dateentry, guint32 julian_days);
void gtk_dateentry_set_mindate(GtkDateEntry * dateentry, guint32 julian_days);
void gtk_dateentry_set_maxdate(GtkDateEntry * dateentry, guint32 julian_days);
#ifdef __cplusplus
}
......
......@@ -141,12 +141,12 @@ guint archive_add_get_nbdays(void)
guint nbdays;
GDate *today, *maxdate;
DB( g_printf("(archive_add_get_nbdays)") );
DB( g_print("(archive_add_get_nbdays)") );
//add until xx of the next month (excluded)
if(GLOBALS->auto_smode == 0)
{
DB( g_printf("- set to %d of next month", GLOBALS->auto_weekday) );
DB( g_print("- set to %d of next month", GLOBALS->auto_weekday) );
today = g_date_new_julian(GLOBALS->today);
......
......@@ -1007,7 +1007,7 @@ gchar *filename;
gboolean exists;
guint i;
DB( g_printf("** category_find_preset **\n") );
DB( g_print("** category_find_preset **\n") );
langs = (gchar **)g_get_language_names ();
......@@ -1019,7 +1019,7 @@ guint i;
filename = g_strdup_printf("hb-categories-%s.csv", langs[i]);
gchar *pathfilename = g_build_filename(homebank_app_get_datas_dir(), filename, NULL);
exists = g_file_test(pathfilename, G_FILE_TEST_EXISTS);
DB( g_printf(" -> '%s' exists=%d\n", pathfilename, exists) );
DB( g_print(" -> '%s' exists=%d\n", pathfilename, exists) );
if(exists)
{
g_free(filename);
......
......@@ -106,7 +106,7 @@ void filter_default_all_set(Filter *flt)
{
gint i;
DB( g_printf("(filter) reset %p\n", flt) );
DB( g_print("(filter) reset %p\n", flt) );
filter_clear(flt);
......@@ -156,7 +156,7 @@ guint32 refdate, month, year, qnum;
year = g_date_get_year(date);
qnum = ((month - 1) / 3) + 1;
DB( g_printf("m=%d, y=%d, qnum=%d\n", month, year, qnum) );
DB( g_print("m=%d, y=%d, qnum=%d\n", month, year, qnum) );
switch( range )
{
......@@ -318,7 +318,7 @@ Payee *payitem;
Category *catitem;
gint insert;
//DB( g_printf("(filter) test\n") );
//DB( g_print("(filter) test\n") );
insert = 1;
......@@ -471,8 +471,8 @@ gint insert;
if(!insert) goto end;
end:
// DB( g_printf(" %d :: %d :: %d\n", flt->mindate, txn->date, flt->maxdate) );
// DB( g_printf(" [%d] %s => %d (%d)\n", txn->account, txn->wording, insert, count) );
// DB( g_print(" %d :: %d :: %d\n", flt->mindate, txn->date, flt->maxdate) );
// DB( g_print(" [%d] %s => %d (%d)\n", txn->account, txn->wording, insert, count) );
return(insert);
}
......@@ -85,7 +85,7 @@ gint count;
guint32 maxdate;
gint nb_days;
DB( g_printf("\n[hbfile] insert_scheduled_transactions\n") );
DB( g_print("\n[hbfile] insert_scheduled_transactions\n") );
count = 0;
nb_days = archive_add_get_nbdays();
......@@ -105,7 +105,7 @@ gint nb_days;
date = g_date_new_julian(arc->nextdate);
g_date_strftime (buffer1, 128-1, "%x", date);
g_date_free(date);
g_print(" -> '%s' - every %d %s - next %s limit %d\n", arc->wording, arc->every, CYA_UNIT[arc->unit], buffer1, arc->limit);
//g_print(" -> '%s' - every %d %s - next %s limit %d\n", arc->wording, arc->every, CYA_UNIT[arc->unit], buffer1, arc->limit);
#endif*/
if(arc->nextdate < maxdate)
......@@ -121,7 +121,7 @@ gint nb_days;
date = g_date_new_julian(mydate);
g_date_strftime (buffer1, 128-1, "%x", date);
g_date_free(date);
g_printf(" -> adding '%s' on %s\n", arc->wording, buffer1);
//g_print(" -> adding '%s' on %s\n", arc->wording, buffer1);
#endif*/
/* fill in the transaction */
......@@ -242,7 +242,7 @@ void hbfile_sanity_check(void)
{
GList *list;
DB( g_printf("\n[hbfile] sanity_check\n") );
DB( g_print("\n[hbfile] sanity_check\n") );
list = g_list_first(GLOBALS->ope_list);
......@@ -305,7 +305,7 @@ void hbfile_anonymize(void)
GList *list;
guint cnt, i;
DB( g_printf("\n[hbfile] anonymize\n") );
DB( g_print("\n[hbfile] anonymize\n") );
// owner
hbfile_change_owner(g_strdup("An0nym0us"));
......@@ -450,8 +450,8 @@ guint cnt, i;
void hbfile_cleanup(gboolean file_clear)
{
DB( g_printf("\n[hbfile] cleanup\n") );
DB( g_printf("- file clear is %d\n", file_clear) );
DB( g_print("\n[hbfile] cleanup\n") );
DB( g_print("- file clear is %d\n", file_clear) );
// Free data storage
//da_cur_destroy();
......@@ -475,8 +475,8 @@ void hbfile_cleanup(gboolean file_clear)
void hbfile_setup(gboolean file_clear)
{
DB( g_printf("\n[hbfile] setup\n") );
DB( g_printf("- file clear is %d\n", file_clear) );
DB( g_print("\n[hbfile] setup\n") );
DB( g_print("- file clear is %d\n", file_clear) );
// Allocate data storage
//da_cur_new();
......@@ -497,8 +497,8 @@ void hbfile_setup(gboolean file_clear)
hbfile_change_filepath(g_build_filename(PREFS->path_hbfile, "untitled.xhb", NULL));
GLOBALS->hbfile_is_new = TRUE;
DB( g_printf("- path_hbfile is '%s'\n", PREFS->path_hbfile) );
DB( g_printf("- xhb_filepath is '%s'\n", GLOBALS->xhb_filepath) );
DB( g_print("- path_hbfile is '%s'\n", PREFS->path_hbfile) );
DB( g_print("- xhb_filepath is '%s'\n", GLOBALS->xhb_filepath) );
}
else
{
......
......@@ -446,7 +446,7 @@ guint month, year, qnum;
year = g_date_get_year(date);
qnum = ((month-1)/3)+1;
DB( g_printf("m=%d, y=%d, qnum=%d\n", month, year, qnum) );
DB( g_print("m=%d, y=%d, qnum=%d\n", month, year, qnum) );
switch( range )
{
......@@ -619,7 +619,6 @@ guint32 julian = 0;
{
DB( g_print("-> %d %d %d\n", n1, n2, n3) );
date = g_date_new();
switch(datefmt)
{
case PRF_DATEFMT_MDY:
......@@ -651,11 +650,16 @@ guint32 julian = 0;
DB( g_print("-> %d %d %d\n", d, m, y) );
g_date_set_dmy(date, d, m, y);
if( g_date_valid (date) )
julian = g_date_get_julian (date);
g_date_free(date);
if(d <= 31 && m <= 12)
{
date = g_date_new();
g_date_set_dmy(date, d, m, y);
if( g_date_valid (date) )
{
julian = g_date_get_julian (date);
}
g_date_free(date);
}
}
return julian;
......
......@@ -808,7 +808,7 @@ GError *error = NULL;
#if MYDEBUG == 1
gsize length;
gchar *contents = g_key_file_to_data (keyfile, &length, NULL);
g_print(" keyfile:\n%s\n len=%d\n", contents, length);
//g_print(" keyfile:\n%s\n len=%d\n", contents, length);
g_free(contents);
#endif
*/
......
......@@ -255,6 +255,7 @@ GList *da_transaction_sort(GList *list)
return( g_list_sort(list, (GCompareFunc)da_transaction_compare_func));
}
static void da_transaction_insert_memo(Transaction *item)
{
// append the memo if new
......@@ -268,14 +269,31 @@ static void da_transaction_insert_memo(Transaction *item)
}
gboolean da_transaction_insert_sorted(Transaction *item)
gboolean da_transaction_insert_sorted(Transaction *newitem)
{
GLOBALS->ope_list = g_list_insert_sorted(GLOBALS->ope_list, item, (GCompareFunc)da_transaction_compare_func);
da_transaction_insert_memo(item);
GList *tmplist = g_list_first(GLOBALS->ope_list);
// find the breaking date
while (tmplist != NULL)
{
Transaction *item = tmplist->data;
if(item->date > newitem->date)
break;
tmplist = g_list_next(tmplist);
}
// here we're at the insert point, let's insert our new txn just before
GLOBALS->ope_list = g_list_insert_before(GLOBALS->ope_list, tmplist, newitem);
da_transaction_insert_memo(newitem);
return TRUE;
}
// nota: this is called only when loading xml file
gboolean da_transaction_append(Transaction *item)
{
GLOBALS->ope_list = g_list_append(GLOBALS->ope_list, item);
......@@ -283,6 +301,7 @@ gboolean da_transaction_append(Transaction *item)
return TRUE;
}
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
guint32
......@@ -438,7 +457,7 @@ guint count = g_list_length(matchlist);
DB( g_print("\n[transaction] transaction_xfer_search_or_add_child\n") );
DB( g_printf(" - found result is %d, switching\n", count) );
DB( g_print(" - found result is %d, switching\n", count) );
switch(count)
{
......@@ -485,7 +504,7 @@ Transaction *child;
Account *acc;
gchar swap;
DB( g_printf("\n[transaction] transaction_xfer_create_child\n") );
DB( g_print("\n[transaction] transaction_xfer_create_child\n") );
if( ope->kxferacc > 0 )
{
......@@ -508,18 +527,18 @@ gchar swap;
//strong link
guint maxkey = da_transaction_get_max_kxfer();
DB( g_printf(" + maxkey is %d\n", maxkey) );
DB( g_print(" + maxkey is %d\n", maxkey) );
ope->kxfer = maxkey+1;
child->kxfer = maxkey+1;
DB( g_printf(" + strong link to %d\n", ope->kxfer) );
DB( g_print(" + strong link to %d\n", ope->kxfer) );
DB( g_printf(" + add transfer, %p\n", child) );
DB( g_print(" + add transfer, %p\n", child) );
da_transaction_append(child);
da_transaction_insert_sorted(child);
account_balances_add (child);
......@@ -535,7 +554,7 @@ void transaction_xfer_change_to_child(Transaction *ope, Transaction *child)
{
Account *acc;
DB( g_printf("\n[transaction] transaction_xfer_change_to_child\n") );
DB( g_print("\n[transaction] transaction_xfer_change_to_child\n") );
child->paymode = PAYMODE_INTXFER;
......@@ -558,7 +577,7 @@ Account *acc;
void transaction_xfer_sync_child(Transaction *ope, Transaction *child)
{
DB( g_printf("\n[transaction] transaction_xfer_sync_child\n") );
DB( g_print("\n[transaction] transaction_xfer_sync_child\n") );
account_balances_sub (child);
......@@ -584,7 +603,7 @@ void transaction_xfer_delete_child(Transaction *src)
{
Transaction *dst;
DB( g_printf("\n[transaction] transaction_xfer_delete_child\n") );
DB( g_print("\n[transaction] transaction_xfer_delete_child\n") );
dst = transaction_strong_get_child_transfer( src );
......@@ -643,7 +662,7 @@ void transaction_add(Transaction *ope, GtkWidget *treeview, guint32 accnum)
Transaction *newope;
Account *acc;
DB( g_printf("\n[transaction] transaction add\n") );
DB( g_print("\n[transaction] transaction add\n") );
//controls accounts valid (archive scheduled maybe bad)
acc = da_acc_get(ope->kacc);
......@@ -679,7 +698,7 @@ Account *acc;
acc = da_acc_get( newope->kacc);
cheque = atol(newope->info);
//DB( g_printf(" -> should store cheque number %d to %d", cheque, newope->account) );
//DB( g_print(" -> should store cheque number %d to %d", cheque, newope->account) );
if( newope->flags & OF_CHEQ2 )
{
acc->cheque2 = MAX(acc->cheque2, cheque);
......@@ -696,7 +715,7 @@ Account *acc;
{
acc->flags |= AF_ADDED;
DB( g_printf(" + add normal %p\n", newope) );
DB( g_print(" + add normal %p\n", newope) );
//da_transaction_append(newope);
da_transaction_insert_sorted(newope);
......@@ -722,7 +741,7 @@ GtkTreeIter iter;