Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package homebank for openSUSE:Factory checked in at 2023-08-09 17:26:02 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/homebank (Old) and /work/SRC/openSUSE:Factory/.homebank.new.11712 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "homebank" Wed Aug 9 17:26:02 2023 rev:42 rq:1103040 version:5.6.6 Changes: -------- --- /work/SRC/openSUSE:Factory/homebank/homebank.changes 2023-06-29 17:29:06.878535674 +0200 +++ /work/SRC/openSUSE:Factory/.homebank.new.11712/homebank.changes 2023-08-09 17:26:05.833695532 +0200 @@ -1,0 +2,21 @@ +Tue Aug 8 05:15:14 UTC 2023 - Carsten Ziepke <kiel...@gmail.com> + +- Update to 5.6.6: + * bugfix: lp#2027201 when ordering the transaction list by + category, split ones are not ordered + * bugfix: lp#2026641 anonymise does not deal with account notes, + start balance, overdraft and automatic assignment notes + * bugfix: lp#2026626 anonymise feature doesn't fully anonymise + accounts name + * bugfix: lp#2026594 changing currency account with xfer faulty + change target account currency + * bugfix: lp#2026184 statistics report doesn't always show total + for parent category + * bugfix: lp#2024940 statistics faulty hide items with data when + result is 0.0 + * bugfix: lp#2024389 filter Status always show section should + always be visible + * bugfix: lp#2019312 status column included in export detail txn + from report break re-import + +------------------------------------------------------------------- Old: ---- homebank-5.6.5.tar.gz New: ---- homebank-5.6.6.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ homebank.spec ++++++ --- /var/tmp/diff_new_pack.RMx0xG/_old 2023-08-09 17:26:06.569700114 +0200 +++ /var/tmp/diff_new_pack.RMx0xG/_new 2023-08-09 17:26:06.573700139 +0200 @@ -17,7 +17,7 @@ Name: homebank -Version: 5.6.5 +Version: 5.6.6 Release: 0 Summary: Application to manage personal accounts License: GPL-2.0-or-later ++++++ homebank-5.6.5.tar.gz -> homebank-5.6.6.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/homebank-5.6.5/ChangeLog new/homebank-5.6.6/ChangeLog --- old/homebank-5.6.5/ChangeLog 2023-06-21 19:02:03.000000000 +0200 +++ new/homebank-5.6.6/ChangeLog 2023-08-04 19:29:02.000000000 +0200 @@ -1,5 +1,19 @@ +2023-08-04 Maxime Doyen + + Made 5.6.6 release + + * bugfix: #2027201 when ordering the transaction list by category, split ones are not ordered + * bugfix: #2026641 anonymise does not deal with account notes, start balance, overdraft and automatic assignment notes + * bugfix: #2026626 anonymise feature doesn't fully anonymise accounts name + * bugfix: #2026594 changing currency account with xfer faulty change target account currency + * bugfix: #2026184 statistics report doesn't always show total for parent category + * bugfix: #2024940 statistics faulty hide items with data when result is 0.0 + * bugfix: #2024389 filter Status always show section should always be visible + * bugfix: #2019312 status column included in export detail txn from report break re-import + + 2023-06-21 Maxime Doyen Made 5.6.5 release @@ -7,7 +21,6 @@ * bugfix: #2024243 when creating splits for income transactions, expenses are added as incomes regardless of amount sign * bugfix: #2023388 account cannot be deleted message is not precise enough * bugfix: #2022049 windows: displayed values overflow int32 in 5.6.4 - * bugfix: #2019312 status column included in export detail txn from report break re-import * bugfix: #2018039 lock icon for reconciled txn is not displayed in report detail diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/homebank-5.6.5/configure new/homebank-5.6.6/configure --- old/homebank-5.6.5/configure 2023-06-17 11:15:43.000000000 +0200 +++ new/homebank-5.6.6/configure 2023-08-02 23:02:42.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for homebank 5.6.5. +# Generated by GNU Autoconf 2.71 for homebank 5.6.6. # # # Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, @@ -607,8 +607,8 @@ # Identity of this package. PACKAGE_NAME='homebank' PACKAGE_TARNAME='homebank' -PACKAGE_VERSION='5.6.5' -PACKAGE_STRING='homebank 5.6.5' +PACKAGE_VERSION='5.6.6' +PACKAGE_STRING='homebank 5.6.6' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1365,7 +1365,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures homebank 5.6.5 to adapt to many kinds of systems. +\`configure' configures homebank 5.6.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1432,7 +1432,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of homebank 5.6.5:";; + short | recursive ) echo "Configuration of homebank 5.6.6:";; esac cat <<\_ACEOF @@ -1540,7 +1540,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -homebank configure 5.6.5 +homebank configure 5.6.6 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1815,7 +1815,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by homebank $as_me 5.6.5, which was +It was created by homebank $as_me 5.6.6, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3089,7 +3089,7 @@ # Define the identity of the package. PACKAGE='homebank' - VERSION='5.6.5' + VERSION='5.6.6' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -7256,7 +7256,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by homebank $as_me 5.6.5, which was +This file was extended by homebank $as_me 5.6.6, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -7324,7 +7324,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -homebank config.status 5.6.5 +homebank config.status 5.6.6 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/homebank-5.6.5/configure.ac new/homebank-5.6.6/configure.ac --- old/homebank-5.6.5/configure.ac 2023-06-17 11:15:20.000000000 +0200 +++ new/homebank-5.6.6/configure.ac 2023-08-02 23:02:03.000000000 +0200 @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.71]) -AC_INIT([homebank],[5.6.5]) +AC_INIT([homebank],[5.6.6]) #AC_INIT([homebank],[x.x-rc]) AC_CONFIG_HEADERS(config.h) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/homebank-5.6.5/doc/frm-main.html new/homebank-5.6.6/doc/frm-main.html --- old/homebank-5.6.5/doc/frm-main.html 2023-06-21 19:01:24.000000000 +0200 +++ new/homebank-5.6.6/doc/frm-main.html 2023-08-04 19:28:34.000000000 +0200 @@ -10,8 +10,8 @@ <div class="mainpage"> <p><img src="images/web_title.png"><br></p> - <p>Version: 5.6.5<br> - Compilation date: Jun 21st, 2023</p><br> + <p>Version: 5.6.6<br> + Compilation date: Aug 4th, 2023</p><br> <p>© Copyright 1995-2023 by Maxime Doyen<br> All Rights Reserved</p> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/homebank-5.6.5/src/hb-account.c new/homebank-5.6.6/src/hb-account.c --- old/homebank-5.6.5/src/hb-account.c 2023-06-18 10:48:18.000000000 +0200 +++ new/homebank-5.6.6/src/hb-account.c 2023-08-02 23:15:46.000000000 +0200 @@ -147,7 +147,7 @@ static void -da_cat_build_xfername(Account *item) +da_acc_build_xfername(Account *item) { g_free(item->xferexpname); @@ -189,7 +189,7 @@ //#1889659: ensure name != null/empty da_acc_ensure_name(item); - da_cat_build_xfername(item); + da_acc_build_xfername(item); } @@ -214,7 +214,7 @@ //#1889659: ensure name != null/empty da_acc_ensure_name(item); - da_cat_build_xfername(item); + da_acc_build_xfername(item); g_hash_table_insert(GLOBALS->h_acc, new_key, item); @@ -339,6 +339,29 @@ } +//#2026641 +void da_acc_anonymize(Account *item) +{ + g_free(item->name); + item->name = g_strdup_printf("account %d", item->key); + + g_free(item->number); + item->number = NULL; + + g_free(item->bankname); + item->bankname = NULL; + + //#2026641 account notes, start balance, overdraft + g_free(item->notes); + item->notes = NULL; + + item->initial = 0.0; + item->minimum = 0.0; + + da_acc_build_xfername(item); +} + + /* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */ #if MYDEBUG @@ -565,14 +588,16 @@ /* * change the account currency * change every txn to currency - * ensure dst xfer transaction account will be set to same currency + * #2026594 no more change target currency + * #1673260 internal transfer with different currency + * => no more ensure dst xfer transaction account will be set to same currency */ void account_set_currency(Account *acc, guint32 kcur) { GList *list; -Account *dstacc; +/*Account *dstacc; gboolean *xfer_list; -guint32 maxkey, i; +guint32 maxkey, i;*/ DB( g_print("\n[account] set currency\n") ); @@ -584,9 +609,10 @@ DB( g_print(" - set for '%s'\n", acc->name) ); - maxkey = da_acc_get_max_key () + 1; + //#1673260 internal transfer with different currency + /*maxkey = da_acc_get_max_key () + 1; xfer_list = g_malloc0(sizeof(gboolean) * maxkey ); - DB( g_print(" - alloc for %d account\n", da_acc_length() ) ); + DB( g_print(" - alloc for %d account\n", da_acc_length() ) );*/ list = g_queue_peek_head_link(acc->txn_queue); while (list != NULL) @@ -594,17 +620,18 @@ Transaction *txn = list->data; txn->kcur = kcur; - if( (txn->flags & OF_INTXFER) && (txn->kxferacc > 0) && (txn->kxfer > 0) ) + /*if( (txn->flags & OF_INTXFER) && (txn->kxferacc > 0) && (txn->kxfer > 0) ) { xfer_list[txn->kxferacc] = TRUE; - } + }*/ list = g_list_next(list); } acc->kcur = kcur; DB( g_print(" - '%s'\n", acc->name) ); - for(i=1;i<maxkey;i++) + //#1673260 internal transfer with different currency + /*for(i=1;i<maxkey;i++) { DB( g_print(" - %d '%d'\n", i, xfer_list[i]) ); if( xfer_list[i] == TRUE ) @@ -614,7 +641,7 @@ } } - g_free(xfer_list); + g_free(xfer_list);*/ } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/homebank-5.6.5/src/hb-account.h new/homebank-5.6.6/src/hb-account.h --- old/homebank-5.6.5/src/hb-account.h 2023-06-18 12:10:42.000000000 +0200 +++ new/homebank-5.6.6/src/hb-account.h 2023-08-02 23:13:11.000000000 +0200 @@ -132,6 +132,7 @@ Account *da_acc_get(guint32 key); guint32 da_acc_get_first_key(void); void da_acc_consistency(Account *item); +void da_acc_anonymize(Account *item); GtkWindow *account_window(guint32 key); void account_transaction_sort(void); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/homebank-5.6.5/src/hb-category.c new/homebank-5.6.6/src/hb-category.c --- old/homebank-5.6.5/src/hb-category.c 2023-01-01 10:51:30.000000000 +0100 +++ new/homebank-5.6.6/src/hb-category.c 2023-08-02 23:12:09.000000000 +0200 @@ -540,6 +540,15 @@ } +//#2026641 +void da_cat_anonymize(Category *item) +{ + g_free(item->name); + item->name = g_strdup_printf("category %d", item->key); + + da_cat_build_fullname(item); +} + /* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */ @@ -967,8 +976,10 @@ GList *list = g_hash_table_get_values(GLOBALS->h_cat); if(column == 0) + // sort by cat and their consecutive subcat return g_list_sort(list, (GCompareFunc)category_glist_key_compare_func); else + // sort by name return g_list_sort(list, (GCompareFunc)category_glist_name_compare_func); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/homebank-5.6.5/src/hb-category.h new/homebank-5.6.6/src/hb-category.h --- old/homebank-5.6.5/src/hb-category.h 2023-01-01 10:51:26.000000000 +0100 +++ new/homebank-5.6.6/src/hb-category.h 2023-08-02 23:13:20.000000000 +0200 @@ -70,6 +70,7 @@ Category *da_cat_get_by_fullname(gchar *rawfullname); void da_cat_consistency(Category *item); +void da_cat_anonymize(Category *item); GList *category_glist_sorted(gint column); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/homebank-5.6.5/src/hb-currency.c new/homebank-5.6.6/src/hb-currency.c --- old/homebank-5.6.5/src/hb-currency.c 2023-01-15 17:09:45.000000000 +0100 +++ new/homebank-5.6.6/src/hb-currency.c 2023-08-02 23:12:22.000000000 +0200 @@ -705,7 +705,8 @@ node = g_string_sized_new(512); //todo: think about encapsulate the API call ourself //todo: let the user choose http / https - g_string_append_printf(node, "https://frankfurter.app/latest?base=%s&symbols=", base->iso_code); + g_string_append_printf(node, "https://api.frankfurter.app/latest?base=%s&symbols=", base->iso_code); + //g_string_append_printf(node, "https://frankfurter.app/latest?base=%s&symbols=", base->iso_code); //g_string_append_printf(node, "https://api.fixer.io/latest?base=%s&symbols=", base->iso_code); list = g_hash_table_get_values(GLOBALS->h_cur); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/homebank-5.6.5/src/hb-hbfile.c new/homebank-5.6.6/src/hb-hbfile.c --- old/homebank-5.6.5/src/hb-hbfile.c 2023-05-18 15:35:22.000000000 +0200 +++ new/homebank-5.6.6/src/hb-hbfile.c 2023-08-02 23:10:18.000000000 +0200 @@ -375,7 +375,7 @@ GList *lst_acc, *lnk_acc; GList *lnk_txn; GList *lxxx, *list; -guint cnt, i; +guint cnt; DB( g_print("\n[hbfile] anonymize\n") ); @@ -391,14 +391,9 @@ lxxx = list = g_hash_table_get_values(GLOBALS->h_acc); while (list != NULL) { - Account *item = list->data; - g_free(item->name); - item->name = g_strdup_printf("account %d", item->key); - g_free(item->number); - item->number = NULL; - g_free(item->bankname); - item->bankname = NULL; - + //#2026641 + da_acc_anonymize(list->data); + GLOBALS->changes_count++; list = g_list_next(list); } @@ -414,6 +409,7 @@ { g_free(item->name); item->name = g_strdup_printf("payee %d", item->key); + GLOBALS->changes_count++; } list = g_list_next(list); @@ -421,15 +417,17 @@ g_list_free(lxxx); //categories - lxxx = list = g_hash_table_get_values(GLOBALS->h_cat); + //lxxx = list = g_hash_table_get_values(GLOBALS->h_cat); + lxxx = list = category_glist_sorted(HB_GLIST_SORT_KEY); while (list != NULL) { Category *item = list->data; if(item->key != 0) { - g_free(item->name); - item->name = g_strdup_printf("category %d", item->key); + //#2026641 + da_cat_anonymize(item); + GLOBALS->changes_count++; } list = g_list_next(list); @@ -446,6 +444,7 @@ { g_free(item->name); item->name = g_strdup_printf("tag %d", item->key); + GLOBALS->changes_count++; } list = g_list_next(list); @@ -462,6 +461,10 @@ { g_free(item->search); item->search = g_strdup_printf("assign %d", item->key); + //#2026641 assignment notes + g_free(item->notes); + item->notes = NULL; + GLOBALS->changes_count++; } list = g_list_next(list); @@ -478,9 +481,14 @@ g_free(item->memo); item->memo = g_strdup_printf("archive %d", cnt++); GLOBALS->changes_count++; - - //later split anonymize also - + + //#2026641 splits memo as well + if(item->flags & OF_SPLIT) + { + cnt = da_splits_anonymize(item->splits); + GLOBALS->changes_count += cnt; + } + list = g_list_next(list); } @@ -495,7 +503,6 @@ while (lnk_txn != NULL) { Transaction *item = lnk_txn->data; - Split *split; g_free(item->info); item->info = NULL; @@ -505,18 +512,9 @@ if(item->flags & OF_SPLIT) { - cnt = da_splits_length (item->splits); - for(i=0;i<cnt;i++) - { - split = da_splits_get(item->splits, i); - if( split == NULL ) break; - - if(split->memo != NULL) - g_free(split->memo); - - split->memo = g_strdup_printf("memo %d", i); - GLOBALS->changes_count++; - } + //#2026641 + cnt = da_splits_anonymize(item->splits); + GLOBALS->changes_count += cnt; } lnk_txn = g_list_next(lnk_txn); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/homebank-5.6.5/src/hb-split.c new/homebank-5.6.6/src/hb-split.c --- old/homebank-5.6.5/src/hb-split.c 2023-01-01 10:51:30.000000000 +0100 +++ new/homebank-5.6.6/src/hb-split.c 2023-08-02 23:12:56.000000000 +0200 @@ -293,3 +293,28 @@ return splits->len; } + +//#2026641 +guint da_splits_anonymize (GPtrArray *splits) +{ +Split *split; +guint cnt, i; + + if(splits == NULL) + return 0; + + cnt = da_splits_length (splits); + for(i=0;i<cnt;i++) + { + split = da_splits_get(splits, i); + if( split == NULL ) + break; + + if(split->memo != NULL) + g_free(split->memo); + + split->memo = g_strdup_printf("memo %d", i); + } + return cnt; +} + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/homebank-5.6.5/src/hb-split.h new/homebank-5.6.6/src/hb-split.h --- old/homebank-5.6.5/src/hb-split.h 2023-01-01 10:51:26.000000000 +0100 +++ new/homebank-5.6.6/src/hb-split.h 2023-08-02 23:13:02.000000000 +0200 @@ -53,6 +53,7 @@ guint da_splits_tostring(GPtrArray *splits, gchar **cats, gchar **amounts, gchar **memos); guint da_splits_consistency (GPtrArray *splits); +guint da_splits_anonymize (GPtrArray *splits); #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/homebank-5.6.5/src/homebank.h new/homebank-5.6.6/src/homebank.h --- old/homebank-5.6.5/src/homebank.h 2023-06-17 11:15:39.000000000 +0200 +++ new/homebank-5.6.6/src/homebank.h 2023-08-02 23:02:38.000000000 +0200 @@ -75,13 +75,13 @@ #define HOMEBANK_MAJOR 5 #define HOMEBANK_MINOR 6 -#define HOMEBANK_MICRO 5 +#define HOMEBANK_MICRO 6 -#define HB_VERSION "5.6.5" +#define HB_VERSION "5.6.6" #define HB_VERSION_NUM (HOMEBANK_MAJOR*10000) + (HOMEBANK_MINOR*100) + HOMEBANK_MICRO #define FILE_VERSION 1.4 -#define PREF_VERSION 565 +#define PREF_VERSION 566 #if HB_UNSTABLE == FALSE #define PROGNAME "HomeBank" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/homebank-5.6.5/src/list-operation.c new/homebank-5.6.6/src/list-operation.c --- old/homebank-5.6.5/src/list-operation.c 2023-03-18 17:19:03.000000000 +0100 +++ new/homebank-5.6.6/src/list-operation.c 2023-08-02 23:07:39.000000000 +0200 @@ -55,10 +55,10 @@ static gint list_txn_sort_iter_compare_func (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer userdata) { - gint sortcol = GPOINTER_TO_INT(userdata); - gint retval = 0; - Transaction *ope1, *ope2; - gdouble tmpval = 0; +gint sortcol = GPOINTER_TO_INT(userdata); +gint retval = 0; +Transaction *ope1, *ope2; +gdouble tmpval = 0; gtk_tree_model_get(model, a, MODEL_TXN_POINTER, &ope1, -1); gtk_tree_model_get(model, b, MODEL_TXN_POINTER, &ope2, -1); @@ -73,15 +73,8 @@ break; case LST_DSPOPE_DATE: - if(! (retval = ope1->date - ope2->date) ) - { - //g_print("sort on balance d1=%d, d2=%d %f %f\n", ope1->date, ope2->date, ope1->balance , ope2->balance); - - tmpval = ope1->pos - ope2->pos; - retval = tmpval > 0 ? 1 : -1; - } - //g_print("ret=%d\n", ret); - break; + //5.7 let date as last sorting + break; case LST_DSPOPE_ACCOUNT: { @@ -151,14 +144,27 @@ case LST_DSPOPE_CATEGORY: { - Category *c1, *c2; + //2027201 order - split - + gchar *name1 = NULL; + gchar *name2 = NULL; - c1 = da_cat_get(ope1->kcat); - c2 = da_cat_get(ope2->kcat); - if( c1 != NULL && c2 != NULL ) + if( ope1->flags & OF_SPLIT ) + name1 = _("- split -"); + else { - retval = list_txn_sort_iter_compare_strings(c1->fullname, c2->fullname); + Category *cat = da_cat_get(ope1->kcat); + name1 = cat->fullname; } + + if( ope2->flags & OF_SPLIT ) + name2 = _("- split -"); + else + { + Category *cat = da_cat_get(ope2->kcat); + name2 = cat->fullname; + } + + retval = list_txn_sort_iter_compare_strings(name1, name2); } break; @@ -189,6 +195,19 @@ g_return_val_if_reached(0); } + //5.7 let date as last sorting + if( retval == 0 ) + { + if(! (retval = ope1->date - ope2->date) ) + { + //g_print("sort on balance d1=%d, d2=%d %f %f\n", ope1->date, ope2->date, ope1->balance , ope2->balance); + + tmpval = ope1->pos - ope2->pos; + retval = tmpval > 0 ? 1 : -1; + } + //g_print("ret=%d\n", ret); + } + return retval; } @@ -1488,25 +1507,6 @@ } -static void list_txn_destroy( GtkWidget *widget, gpointer user_data ) -{ -struct list_txn_data *data; - - data = g_object_get_data(G_OBJECT(widget), "inst_data"); - - DB( g_print ("\n[list_transaction] destroy event occurred\n") ); - - if( data->save_column_width ) - { - list_txn_get_columns(GTK_TREE_VIEW(data->treeview)); - } - - DB( g_print(" - view=%p, inst_data=%p\n", widget, data) ); - g_free(data); -} - - - Transaction *list_txn_get_surround_transaction(GtkTreeView *treeview, Transaction **prev, Transaction **next) { GtkTreeModel *model; @@ -1580,6 +1580,24 @@ } +static void list_txn_destroy( GtkWidget *widget, gpointer user_data ) +{ +struct list_txn_data *data; + + data = g_object_get_data(G_OBJECT(widget), "inst_data"); + + DB( g_print ("\n[list_transaction] destroy event occurred\n") ); + + if( data->save_column_width ) + { + list_txn_get_columns(GTK_TREE_VIEW(data->treeview)); + } + + DB( g_print(" - view=%p, inst_data=%p\n", widget, data) ); + g_free(data); +} + + /* ** create our transaction list ** 1 line: Status, Date, Info, Payee, Category, Tags, CLR, (Amount), Expense, Income, Balance, Memo, (Account) @@ -1613,7 +1631,7 @@ data->treeview = treeview; g_object_unref(store); - //store our window private data + //store our private data g_object_set_data(G_OBJECT(treeview), "inst_data", (gpointer)data); DB( g_print(" - treeview=%p, inst_data=%p\n", treeview, data) ); @@ -1696,6 +1714,7 @@ //gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column (GTK_TREE_VIEW(treeview), column); + //info column = list_txn_column_info_create(list_type); gtk_tree_view_append_column (GTK_TREE_VIEW(treeview), column); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/homebank-5.6.5/src/list-report.c new/homebank-5.6.6/src/list-report.c --- old/homebank-5.6.5/src/list-report.c 2023-05-18 16:10:49.000000000 +0200 +++ new/homebank-5.6.6/src/list-report.c 2023-08-02 23:29:03.000000000 +0200 @@ -139,7 +139,7 @@ { gdouble value; gchar *color; -gint pos; +gint pos, colid = GPOINTER_TO_INT(user_data); gint weight = PANGO_WEIGHT_NORMAL; gchar buf[G_ASCII_DTOSTR_BUF_SIZE]; @@ -148,7 +148,10 @@ GPOINTER_TO_INT(user_data), &value, -1); - if( value ) + //#2026184 + value = hb_amount_round(value, 2); + + if( (value != 0.0) || (colid == LST_REPDIST_TOTAL) ) { hb_strfmon(buf, G_ASCII_DTOSTR_BUF_SIZE-1, value, GLOBALS->kcur, GLOBALS->minor); @@ -163,7 +166,8 @@ "foreground", color, "weight", weight, "text", buf, - NULL); } + NULL); + } else { g_object_set(renderer, "text", "", NULL); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/homebank-5.6.5/src/rep-budget.c new/homebank-5.6.6/src/rep-budget.c --- old/homebank-5.6.5/src/rep-budget.c 2023-06-17 11:32:20.000000000 +0200 +++ new/homebank-5.6.6/src/rep-budget.c 2023-08-02 23:30:36.000000000 +0200 @@ -430,11 +430,12 @@ static void repbudget_export_detail_csv(GtkWidget *widget, gpointer user_data) { struct repbudget_data *data; -gchar *filename = NULL; +gchar *filepath = NULL; GString *node; GIOChannel *io; gchar *name; gint tmpfor; +gboolean hassplit, hasstatus; DB( g_print("\n[repbudget] export detail csv\n") ); @@ -443,24 +444,26 @@ tmpfor = gtk_combo_box_get_active(GTK_COMBO_BOX(data->CY_for)); name = g_strdup_printf("hb-repbudget-detail_%s.csv", CYA_CATSUBCAT[tmpfor]); + filepath = g_build_filename(PREFS->path_export, name, NULL); - if( ui_file_chooser_csv(GTK_WINDOW(data->window), GTK_FILE_CHOOSER_ACTION_SAVE, &filename, name) == TRUE ) + //#2019312 + //if( ui_file_chooser_csv(GTK_WINDOW(data->window), GTK_FILE_CHOOSER_ACTION_SAVE, &filepath, name) == TRUE ) + if( ui_dialog_export_csv(GTK_WINDOW(data->window), &filepath, &hassplit, &hasstatus, FALSE) == GTK_RESPONSE_ACCEPT ) { - DB( g_print(" + filename is %s\n", filename) ); + DB( g_print(" + filename is %s\n", filepath) ); - io = g_io_channel_new_file(filename, "w", NULL); + io = g_io_channel_new_file(filepath, "w", NULL); if(io != NULL) { - node = list_txn_to_string(GTK_TREE_VIEW(data->LV_detail), FALSE, FALSE, TRUE, FALSE); + node = list_txn_to_string(GTK_TREE_VIEW(data->LV_detail), FALSE, hassplit, hasstatus, FALSE); g_io_channel_write_chars(io, node->str, -1, NULL, NULL); g_io_channel_unref (io); g_string_free(node, TRUE); } - - g_free( filename ); } + g_free( filepath ); g_free(name); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/homebank-5.6.5/src/rep-stats.c new/homebank-5.6.6/src/rep-stats.c --- old/homebank-5.6.5/src/rep-stats.c 2023-06-20 08:44:01.000000000 +0200 +++ new/homebank-5.6.6/src/rep-stats.c 2023-08-02 23:31:08.000000000 +0200 @@ -554,11 +554,12 @@ static void repstats_export_detail_csv(GtkWidget *widget, gpointer user_data) { struct repstats_data *data; -gchar *filename = NULL; +gchar *filepath = NULL; GString *node; GIOChannel *io; gchar *name; gint tmpsrc; +gboolean hassplit, hasstatus; DB( g_print("\n[repdist] export detail csv\n") ); @@ -569,23 +570,26 @@ tmpsrc = hbtk_combo_box_get_active_id(GTK_COMBO_BOX_TEXT(data->CY_src)); name = g_strdup_printf("hb-repstat-detail_%s.csv", hbtk_get_label(CYA_REPORT_SRC,tmpsrc)); - if( ui_file_chooser_csv(GTK_WINDOW(data->window), GTK_FILE_CHOOSER_ACTION_SAVE, &filename, name) == TRUE ) + filepath = g_build_filename(PREFS->path_export, name, NULL); + + //#2019312 + //if( ui_file_chooser_csv(GTK_WINDOW(data->window), GTK_FILE_CHOOSER_ACTION_SAVE, &filename, name) == TRUE ) + if( ui_dialog_export_csv(GTK_WINDOW(data->window), &filepath, &hassplit, &hasstatus, FALSE) == GTK_RESPONSE_ACCEPT ) { - DB( g_print(" + filename is %s\n", filename) ); + DB( g_print(" + filepath is %s\n", filepath) ); - io = g_io_channel_new_file(filename, "w", NULL); + io = g_io_channel_new_file(filepath, "w", NULL); if(io != NULL) { - node = list_txn_to_string(GTK_TREE_VIEW(data->LV_detail), FALSE, FALSE, TRUE, FALSE); + node = list_txn_to_string(GTK_TREE_VIEW(data->LV_detail), FALSE, hassplit, hasstatus, FALSE); g_io_channel_write_chars(io, node->str, -1, NULL, NULL); g_io_channel_unref (io); g_string_free(node, TRUE); } - - g_free( filename ); } + g_free( filepath ); g_free(name); } @@ -941,8 +945,12 @@ DB( g_printf(" eval item %4d:'%s' %.2f\n", i, dr->label, total ) ); - if( !total ) + //#2024940 test on exp/inc individually + if( hb_amount_equal(total, 0.0) ) + { + DB( g_printf(" hide because no data\n") ); continue; + } DB( g_printf(" --> insert\n") ); n_inserted++; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/homebank-5.6.5/src/rep-time.c new/homebank-5.6.6/src/rep-time.c --- old/homebank-5.6.5/src/rep-time.c 2023-06-20 08:05:40.000000000 +0200 +++ new/homebank-5.6.6/src/rep-time.c 2023-08-02 23:20:20.000000000 +0200 @@ -370,11 +370,12 @@ static void reptime_export_detail_csv(GtkWidget *widget, gpointer user_data) { struct reptime_data *data; -gchar *filename = NULL; +gchar *filepath = NULL; GString *node; GIOChannel *io; gchar *name; gint tmpsrc; +gboolean hassplit, hasstatus; DB( g_print("\n[reptime] export detail csv\n") ); @@ -384,23 +385,26 @@ tmpsrc = hbtk_combo_box_get_active_id(GTK_COMBO_BOX_TEXT(data->CY_src)); name = g_strdup_printf("hb-reptime-detail_%s.csv", hbtk_get_label(CYA_REPORT_SRC_TREND, tmpsrc) ); - if( ui_file_chooser_csv(GTK_WINDOW(data->window), GTK_FILE_CHOOSER_ACTION_SAVE, &filename, name) == TRUE ) + filepath = g_build_filename(PREFS->path_export, name, NULL); + + //#2019312 + //if( ui_file_chooser_csv(GTK_WINDOW(data->window), GTK_FILE_CHOOSER_ACTION_SAVE, &filepath, name) == TRUE ) + if( ui_dialog_export_csv(GTK_WINDOW(data->window), &filepath, &hassplit, &hasstatus, FALSE) == GTK_RESPONSE_ACCEPT ) { - DB( g_print(" + filename is %s\n", filename) ); + DB( g_print(" + filename is %s\n", filepath) ); - io = g_io_channel_new_file(filename, "w", NULL); + io = g_io_channel_new_file(filepath, "w", NULL); if(io != NULL) { - node = list_txn_to_string(GTK_TREE_VIEW(data->LV_detail), FALSE, FALSE, TRUE, FALSE); + node = list_txn_to_string(GTK_TREE_VIEW(data->LV_detail), FALSE, hassplit, hasstatus, FALSE); g_io_channel_write_chars(io, node->str, -1, NULL, NULL); g_io_channel_unref (io); g_string_free(node, TRUE); } - - g_free( filename ); } + g_free( filepath ); g_free(name); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/homebank-5.6.5/src/ui-filter.c new/homebank-5.6.6/src/ui-filter.c --- old/homebank-5.6.5/src/ui-filter.c 2023-03-12 10:12:25.000000000 +0100 +++ new/homebank-5.6.6/src/ui-filter.c 2023-08-02 23:33:21.000000000 +0200 @@ -1146,7 +1146,7 @@ static GtkWidget *ui_flt_page_status(struct ui_flt_manage_data *data) { -GtkWidget *part, *grid, *label, *widget; +GtkWidget *part, *grid, *widget; gint row; part = gtk_box_new(GTK_ORIENTATION_VERTICAL, SPACING_LARGE); @@ -1178,29 +1178,6 @@ data->CM_starec = widget; gtk_grid_attach (GTK_GRID (grid), widget, 0, row, 1, 1); - // force display - grid = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); - gtk_box_pack_start (GTK_BOX (part), grid, FALSE, FALSE, 0); - - label = make_label_group(_("Always show")); - gtk_box_pack_start (GTK_BOX (grid), label, FALSE, FALSE, 0); - - widget = gtk_check_button_new_with_mnemonic (_("Remind")); - data->CM_forceremind = widget; - gtk_box_pack_start (GTK_BOX (grid), widget, FALSE, FALSE, 0); - - widget = gtk_check_button_new_with_mnemonic (_("Void")); - data->CM_forcevoid = widget; - gtk_box_pack_start (GTK_BOX (grid), widget, FALSE, FALSE, 0); - - widget = gtk_check_button_new_with_mnemonic (_("Added")); - data->CM_forceadd = widget; - gtk_box_pack_start (GTK_BOX (grid), widget, FALSE, FALSE, 0); - - widget = gtk_check_button_new_with_mnemonic (_("Edited")); - data->CM_forcechg = widget; - gtk_box_pack_start (GTK_BOX (grid), widget, FALSE, FALSE, 0); - return part; } @@ -1208,7 +1185,7 @@ gint ui_flt_manage_dialog_new(GtkWindow *parentwindow, Filter *filter, gboolean show_account, gboolean txnmode) { struct ui_flt_manage_data *data; -GtkWidget *dialog, *content, *mainbox, *sidebar, *stack, *page, *widget; +GtkWidget *dialog, *content, *mainbox, *sidebar, *stack, *grid, *page, *label, *widget; gint w, h, dw, dh; data = g_malloc0(sizeof(struct ui_flt_manage_data)); @@ -1256,7 +1233,7 @@ stack = gtk_stack_new (); - //gtk_stack_set_transition_type (GTK_STACK (stack), GTK_STACK_TRANSITION_TYPE_SLIDE_UP_DOWN); + gtk_stack_set_transition_type (GTK_STACK (stack), GTK_STACK_TRANSITION_TYPE_SLIDE_UP_DOWN); //gtk_stack_set_transition_type (GTK_STACK (stack), GTK_STACK_TRANSITION_TYPE_CROSSFADE); gtk_stack_sidebar_set_stack (GTK_STACK_SIDEBAR (sidebar), GTK_STACK (stack)); gtk_container_set_border_width(GTK_CONTAINER(stack), SPACING_LARGE); @@ -1306,6 +1283,40 @@ page = ui_flt_page_amounttext(data); gtk_stack_add_titled (GTK_STACK (stack), page, FLT_PAGE_NAME_TXT, _("Amount/Text")); + //#xxxxxxx + widget = gtk_separator_new(GTK_ORIENTATION_VERTICAL); + gtk_widget_set_margin_top(widget, SPACING_LARGE); + gtk_widget_set_margin_bottom(widget, SPACING_LARGE); + gtk_box_pack_start (GTK_BOX (mainbox), widget, FALSE, FALSE, 0); + + // force display + grid = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); + hb_widget_set_margin(grid, SPACING_LARGE); + gtk_widget_set_valign(grid, GTK_ALIGN_END); + gtk_box_pack_start (GTK_BOX (mainbox), grid, FALSE, TRUE, 0); + + label = make_label_group(_("Always show")); + gtk_box_pack_start (GTK_BOX (grid), label, FALSE, FALSE, 0); + + widget = gtk_check_button_new_with_mnemonic (_("Remind")); + data->CM_forceremind = widget; + gtk_box_pack_start (GTK_BOX (grid), widget, FALSE, FALSE, 0); + + widget = gtk_check_button_new_with_mnemonic (_("Void")); + data->CM_forcevoid = widget; + gtk_box_pack_start (GTK_BOX (grid), widget, FALSE, FALSE, 0); + + widget = gtk_check_button_new_with_mnemonic (_("Added")); + data->CM_forceadd = widget; + gtk_box_pack_start (GTK_BOX (grid), widget, FALSE, FALSE, 0); + + widget = gtk_check_button_new_with_mnemonic (_("Edited")); + data->CM_forcechg = widget; + gtk_box_pack_start (GTK_BOX (grid), widget, FALSE, FALSE, 0); + + + + //setup, init and show window ui_flt_manage_setup(data);