Commit 328bb0aa authored by Maxime Doyen's avatar Maxime Doyen

5.1.8 release

parent 5bbfd626
This diff is collapsed.
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for homebank 5.1.7.
# Generated by GNU Autoconf 2.69 for homebank 5.1.8.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
......@@ -577,8 +577,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='homebank'
PACKAGE_TARNAME='homebank'
PACKAGE_VERSION='5.1.7'
PACKAGE_STRING='homebank 5.1.7'
PACKAGE_VERSION='5.1.8'
PACKAGE_STRING='homebank 5.1.8'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
......@@ -1341,7 +1341,7 @@ if test "$ac_init_help" = "long"; then
# 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.1.7 to adapt to many kinds of systems.
\`configure' configures homebank 5.1.8 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1408,7 +1408,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of homebank 5.1.7:";;
short | recursive ) echo "Configuration of homebank 5.1.8:";;
esac
cat <<\_ACEOF
......@@ -1516,7 +1516,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
homebank configure 5.1.7
homebank configure 5.1.8
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
......@@ -1935,7 +1935,7 @@ cat >config.log <<_ACEOF
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.1.7, which was
It was created by homebank $as_me 5.1.8, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
......@@ -2803,7 +2803,7 @@ fi
# Define the identity of the package.
PACKAGE='homebank'
VERSION='5.1.7'
VERSION='5.1.8'
cat >>confdefs.h <<_ACEOF
......@@ -7076,7 +7076,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# 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.1.7, which was
This file was extended by homebank $as_me 5.1.8, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -7142,7 +7142,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
homebank config.status 5.1.7
homebank config.status 5.1.8
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
......
......@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.52)
AC_INIT([homebank], [5.1.7])
AC_INIT([homebank], [5.1.8])
#AC_INIT([homebank], [x.x-rc])
AM_CONFIG_HEADER(config.h)
......
homebank (5.1.7-1) unstable; urgency=medium
homebank (5.1.8-1) unstable; urgency=medium
* debian/control: changed description (Closes: #734503, #639536)
(LP: #155059)
......
......@@ -11,8 +11,8 @@
<p><img src="images/web_title.png"><br></p>
<p>&copy; Copyright 1995-2018 by Maxime Doyen<br>
All Rights Reserved</p>
<p>Version: 5.1.7<br>
Compilation date: Jan 8th, 2018</p><br>
<p>Version: 5.1.8<br>
Compilation date: Mar 18th, 2018</p><br>
</div>
</body>
</html>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -516,19 +516,23 @@ gint result, count;
static void register_panel_cb_filter_daterange(GtkWidget *widget, gpointer user_data)
{
struct register_panel_data *data;
gboolean future;
gint range;
DB( g_print("\n[account] filter_daterange\n") );
data = g_object_get_data(G_OBJECT(gtk_widget_get_ancestor(widget, GTK_TYPE_WINDOW)), "inst_data");
range = gtk_combo_box_get_active(GTK_COMBO_BOX(data->CY_range));
range = gtk_combo_box_get_active(GTK_COMBO_BOX(data->CY_range));
future = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(data->CM_future));
data->filter->nbdaysfuture = 0;
if(range != FLT_RANGE_OTHER)
{
filter_preset_daterange_set(data->filter, range, data->accnum);
// add eventual x days into future display
if( PREFS->date_future_nbdays > 0 )
if( future && (PREFS->date_future_nbdays > 0) )
filter_preset_daterange_add_futuregap(data->filter, PREFS->date_future_nbdays);
register_panel_collect_filtered_txn(data->LV_ope);
......@@ -543,10 +547,9 @@ gint range;
register_panel_update(data->LV_ope, GINT_TO_POINTER(UF_SENSITIVE+UF_BALANCE));
}
}
}
static void register_panel_cb_filter_type(GtkWidget *widget, gpointer user_data)
{
struct register_panel_data *data;
......@@ -805,6 +808,7 @@ guint i, qs_flag;
daterange = filter_daterange_text_get(data->filter);
gtk_widget_set_tooltip_markup(GTK_WIDGET(data->CY_range), daterange);
g_free(daterange);
}
......@@ -1439,6 +1443,8 @@ gint count = 0;
// euro convert
sensitive = PREFS->euro_active;
if( (data->acc != NULL) && currency_is_euro(data->acc->kcur) )
sensitive = FALSE;
gtk_action_set_visible(gtk_ui_manager_get_action(data->ui, "/MenuBar/ToolsMenu/ConvToEuro"), sensitive);
}
}
......@@ -1499,9 +1505,7 @@ gint count = 0;
GtkTreeIter iter;
model = gtk_tree_view_get_model(GTK_TREE_VIEW(data->LV_ope));
list = gtk_tree_selection_get_selected_rows(selection, &model);
tmplist = g_list_first(list);
while (tmplist != NULL)
{
......@@ -1851,7 +1855,7 @@ GtkWidget *register_panel_window_new(guint32 accnum, Account *acc)
struct register_panel_data *data;
struct WinGeometry *wg;
GtkWidget *window, *mainbox, *table, *sw;
GtkWidget *treeview, *label, *widget;
GtkWidget *treeview, *label, *widget, *image;
//GtkWidget *menu, *menu_items;
GtkUIManager *ui;
GtkActionGroup *actions;
......@@ -1867,43 +1871,38 @@ GError *error = NULL;
GLOBALS->define_off++;
ui_mainwindow_update(GLOBALS->mainwindow, GINT_TO_POINTER(UF_SENSITIVE));
/* create window, etc */
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
/* create window, etc */
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
data->window = window;
//debug
data->wintitle = NULL;
data->accnum = accnum;
//store our window private data
g_object_set_data(G_OBJECT(window), "inst_data", (gpointer)data);
DB( g_print(" - new window=%p, inst_data=%p\n", window, data) );
data->acc = acc;
data->accnum = accnum;
/* set transaction edit mutex */
if(data->acc)
data->acc->window = GTK_WINDOW(window);
//g_free(data->wintitle);
data->wintitle = g_strdup_printf("%s - HomeBank", data->acc->name);
gtk_window_set_title (GTK_WINDOW (window), data->wintitle);
gtk_window_set_icon_name(GTK_WINDOW (window), ICONNAME_HB_OPE_SHOW );
// connect our dispose function
g_signal_connect (window, "delete-event",
g_signal_connect (window, "delete-event",
G_CALLBACK (register_panel_dispose), (gpointer)data);
// connect our dispose function
g_signal_connect (window, "destroy",
g_signal_connect (window, "destroy",
G_CALLBACK (register_panel_destroy), (gpointer)data);
// connect our dispose function
g_signal_connect (window, "configure-event",
g_signal_connect (window, "configure-event",
G_CALLBACK (register_panel_getgeometry), (gpointer)data);
//store our window private data
g_object_set_data(G_OBJECT(window), "inst_data", (gpointer)data);
DB( g_print(" - new window=%p, inst_data=%p\n", window, data) );
//set the window icon
gtk_window_set_icon_name(GTK_WINDOW (window), ICONNAME_HB_OPE_SHOW );
#if UI == 1
//start test uimanager
......@@ -1956,6 +1955,7 @@ GError *error = NULL;
#endif
mainbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
//gtk_container_set_border_width(GTK_CONTAINER(mainbox), SPACING_SMALL);
gtk_container_add (GTK_CONTAINER (window), mainbox);
widget = gtk_ui_manager_get_widget (ui, "/MenuBar");
......@@ -2016,25 +2016,32 @@ GError *error = NULL;
gtk_container_set_border_width (GTK_CONTAINER(table), SPACING_SMALL);
gtk_box_pack_start (GTK_BOX (mainbox), table, FALSE, FALSE, 0);
label = make_label_widget(_("_Range:"));
gtk_grid_attach (GTK_GRID(table), label, 0, 0, 1, 1);
data->CY_range = make_daterange(label, TRUE);
gtk_grid_attach (GTK_GRID(table), data->CY_range, 1, 0, 1, 1);
widget = gtk_toggle_button_new();
image = gtk_image_new_from_icon_name (ICONNAME_HB_OPE_FUTURE, GTK_ICON_SIZE_MENU);
g_object_set (widget, "image", image, NULL);
gtk_widget_set_tooltip_text (widget, _("Toggle show future transaction"));
data->CM_future = widget;
gtk_grid_attach (GTK_GRID(table), widget, 2, 0, 1, 1);
label = make_label_widget(_("_Type:"));
gtk_grid_attach (GTK_GRID(table), label, 2, 0, 1, 1);
gtk_grid_attach (GTK_GRID(table), label, 3, 0, 1, 1);
data->CY_type = make_cycle(label, CYA_FLT_TYPE);
gtk_grid_attach (GTK_GRID(table), data->CY_type, 3, 0, 1, 1);
gtk_grid_attach (GTK_GRID(table), data->CY_type, 4, 0, 1, 1);
label = make_label_widget(_("_Status:"));
gtk_grid_attach (GTK_GRID(table), label, 4, 0, 1, 1);
gtk_grid_attach (GTK_GRID(table), label, 5, 0, 1, 1);
data->CY_status = make_cycle(label, CYA_FLT_STATUS);
gtk_grid_attach (GTK_GRID(table), data->CY_status, 5, 0, 1, 1);
gtk_grid_attach (GTK_GRID(table), data->CY_status, 6, 0, 1, 1);
widget = gtk_button_new_with_mnemonic (_("Reset _filters"));
//widget = gtk_button_new_with_mnemonic (_("Reset _filters"));
widget = gtk_button_new_with_mnemonic (_("_Reset"));
data->BT_reset = widget;
gtk_grid_attach (GTK_GRID(table), widget, 6, 0, 1, 1);
gtk_grid_attach (GTK_GRID(table), widget, 7, 0, 1, 1);
//TRANSLATORS: this is for Euro specific users, a toggle to display in 'Minor' currency
widget = gtk_check_button_new_with_mnemonic (_("Euro _minor"));
......@@ -2102,15 +2109,20 @@ GError *error = NULL;
#endif
//todo: should move this
gtk_widget_grab_focus(GTK_WIDGET(data->LV_ope));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data->CM_minor),GLOBALS->minor);
//setup
g_object_set_data(G_OBJECT(gtk_tree_view_get_model(GTK_TREE_VIEW(data->LV_ope))), "minor", data->CM_minor);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data->CM_future), (PREFS->date_future_nbdays > 0) ? TRUE : FALSE );
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data->CM_minor), GLOBALS->minor);
gtk_widget_grab_focus(GTK_WIDGET(data->LV_ope));
// connect signals
data->handler_id[HID_RANGE] = g_signal_connect (data->CY_range , "changed", G_CALLBACK (register_panel_cb_filter_daterange), NULL);
data->handler_id[HID_RANGE] = g_signal_connect (data->CY_range , "changed", G_CALLBACK (register_panel_cb_filter_daterange), NULL);
data->handler_id[HID_TYPE] = g_signal_connect (data->CY_type , "changed", G_CALLBACK (register_panel_cb_filter_type), NULL);
data->handler_id[HID_STATUS] = g_signal_connect (data->CY_status, "changed", G_CALLBACK (register_panel_cb_filter_status), NULL);
g_signal_connect (data->CM_future, "toggled", G_CALLBACK (register_panel_cb_filter_daterange), NULL);
g_signal_connect (data->BT_reset , "clicked", G_CALLBACK (register_panel_cb_filter_reset), NULL);
g_signal_connect (data->CM_minor , "toggled", G_CALLBACK (register_panel_toggle_minor), NULL);
......@@ -2149,6 +2161,10 @@ GError *error = NULL;
gtk_widget_show_all (window);
/* hide showfuture */
hb_widget_visible (data->CM_future, PREFS->date_future_nbdays > 0 ? TRUE : FALSE);
/* make sure splash is up */
while (gtk_events_pending ())
gtk_main_iteration ();
......
......@@ -51,6 +51,7 @@ struct register_panel_data
GtkWidget *TB_tools;
GtkWidget *CY_range;
GtkWidget *CM_future;
GtkWidget *CY_type;
GtkWidget *CY_status;
// GtkWidget *CY_month, *NB_year;
......@@ -73,10 +74,11 @@ struct register_panel_data
GtkActionGroup *actions;
Account *acc;
guint32 accnum;
Transaction *cur_ope;
guint32 accnum;
Account *acc;
gboolean do_sort;
......
This diff is collapsed.
......@@ -1231,10 +1231,35 @@ gint first, i;
x += chart->blkw;
}
/* overdrawn */
/* average */
if( chart->show_average )
{
if( chart->average < 0 )
{
y = 0.5 + chart->oy + (ABS(chart->average)/chart->range) * chart->graph.height;
}
else
{
y = 0.5 + chart->oy - (ABS(chart->average)/chart->range) * chart->graph.height;
}
DB( g_print(" min=%.2f range=%.2f\n", chart->min, chart->range) );
y2 = (ABS(chart->min)/chart->range) * chart->graph.height - (y - chart->oy) + 1;
DB( g_print(" draw average: x%d, y%f, w%d, h%f\n", chart->l, y, chart->w, y2) );
cairo_user_set_rgbacol(cr, &global_colors[THTEXT], 1.0);
cairo_set_line_width(cr, 1.0);
cairo_set_dash (cr, dashed3, 1, 0);
cairo_move_to(cr, chart->graph.x, y);
cairo_line_to (cr, chart->graph.x + chart->graph.width, y);
cairo_stroke(cr);
}
/* overdrawn */
DB( g_print(" min=%.2f range=%.2f\n", chart->min, chart->range) );
if( chart->show_over )
{
......@@ -2204,6 +2229,22 @@ void gtk_chart_show_xval(GtkChart * chart, gboolean visible)
// chart_recompute(chart);
}
void gtk_chart_show_average(GtkChart * chart, gdouble value, gboolean visible)
{
g_return_if_fail (GTK_IS_CHART (chart));
DB( g_print("\n[gtkchart] set show average %f\n", value) );
chart->average = value;
chart->show_average = visible;
//if(chart->type == CHART_TYPE_LINE)
// chart_recompute(chart);
}
/*
** chnage the overdrawn visibility
*/
......
......@@ -150,6 +150,7 @@ struct _GtkChart
gboolean show_legend;
gboolean show_legend_wide;
gboolean show_over;
gboolean show_average;
gboolean show_xval;
gboolean show_mono;
gint every_xval;
......@@ -202,7 +203,7 @@ struct _GtkChart
gint leg_nb_r, leg_width_r, leg_vspace_r;
/* bar specifics */
double rawmin, rawmax, range, min, max, unit, minimum;
double rawmin, rawmax, range, min, max, unit, minimum, average;
gint div;
gint visible;
......@@ -245,6 +246,7 @@ void gtk_chart_set_dualdatas(GtkChart *chart, GtkTreeModel *model, guint column1
void gtk_chart_set_minor_prefs(GtkChart * chart, gdouble rate, gchar *symbol);
void gtk_chart_set_currency(GtkChart * chart, guint32 kcur);
void gtk_chart_show_average(GtkChart * chart, gdouble value, gboolean visible);
void gtk_chart_set_overdrawn(GtkChart * chart, gdouble minimum);
//void gtk_chart_set_every_xval(GtkChart * chart, gint decay);
void gtk_chart_set_barw(GtkChart * chart, gdouble barw);
......
......@@ -266,6 +266,23 @@ da_cur_get(guint32 key)
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
gboolean
currency_is_euro(guint32 key)
{
Currency *item;
gboolean retval = FALSE;
item = da_cur_get(key);
if( item )
{
if(!strcasecmp("EUR", item->iso_code))
retval = TRUE;
}
return retval;
}
/**
* currency_is_used:
*
......@@ -586,6 +603,7 @@ gint i;
base = da_cur_get (GLOBALS->kcur);
node = g_string_sized_new(512);
//todo: let the user choose http / https
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);
......@@ -636,20 +654,23 @@ gboolean retval = TRUE;
if(msg != NULL)
{
soup_session_send_message (session, msg);
DB( g_print("status_code: %d %d\n", msg->status_code, SOUP_STATUS_IS_SUCCESSFUL(msg->status_code) ) );
DB( g_print("reason: %s\n", msg->reason_phrase) );
DB( g_print("datas: %s\n", msg->response_body->data) );
if( SOUP_STATUS_IS_SUCCESSFUL(msg->status_code) == TRUE )
{
retval = api_fixerio_parse(msg->response_body->data, error);
//retval = api_yahoo_parse(msg->response_body->data, error);
//#1750426 ignore the retval here (false when no rate was found, as we don't care)
api_fixerio_parse(msg->response_body->data, error);
}
else
{
*error = g_error_new_literal(1, msg->status_code, msg->reason_phrase);
retval = FALSE;
}
g_object_unref(msg);
}
else
{
......@@ -659,6 +680,10 @@ gboolean retval = TRUE;
g_free(query);
soup_session_abort (session);
g_object_unref(session);
return retval;
}
......
......@@ -78,6 +78,7 @@ Currency *da_cur_get_by_name(gchar *name);
Currency *da_cur_get_by_iso_code(gchar *iso_code);
Currency *da_cur_get(guint32 key);
gboolean currency_is_euro(guint32 key);
gboolean currency_is_used(guint32 key);
Currency *currency_add_from_user(Currency4217 *curfmt);
gboolean currency_online_sync(GError **error);
......
......@@ -63,15 +63,29 @@ gchar *filter_daterange_text_get(Filter *flt)
{
gchar buffer1[128];
gchar buffer2[128];
gchar buffer3[128];
GDate *date;
gchar *retval = NULL;
date = g_date_new_julian(flt->mindate);
g_date_strftime (buffer1, 128-1, PREFS->date_format, date);
g_date_set_julian(date, flt->maxdate);
g_date_strftime (buffer2, 128-1, PREFS->date_format, date);
if( flt->nbdaysfuture > 0 )
{
g_date_set_julian(date, flt->maxdate + flt->nbdaysfuture);
g_date_strftime (buffer3, 128-1, PREFS->date_format, date);
retval = g_strdup_printf("%s — <s>%s</s> %s", buffer1, buffer2, buffer3);
}
else
retval = g_strdup_printf("%s — %s", buffer1, buffer2);
g_date_free(date);
return g_strdup_printf(_("<i>from</i> %s <i>to</i> %s"), buffer1, buffer2);
//return g_strdup_printf(_("<i>from</i> %s <i>to</i> %s — "), buffer1, buffer2);
return retval;
}
......@@ -220,11 +234,14 @@ GList *lnk_txn;
void filter_preset_daterange_add_futuregap(Filter *filter, gint nbdays)
{
if( nbdays <= 0 )
//fixed > 5.1.7
/*if( nbdays <= 0 )
{
filter->nbdaysfuture = 0;
return;
}
}*/
filter->nbdaysfuture = 0;
switch( filter->range )
{
......@@ -238,7 +255,6 @@ void filter_preset_daterange_add_futuregap(Filter *filter, gint nbdays)
filter->nbdaysfuture = nbdays;
break;
}
}
......
This diff is collapsed.
......@@ -25,7 +25,9 @@ GQueue *hbfile_transaction_get_partial(guint32 minjulian, guint32 maxjulian);
GQueue *hbfile_transaction_get_partial_budget(guint32 minjulian, guint32 maxjulian);
gboolean hbfile_file_isbackup(gchar *filepath);
gboolean hbfile_file_hasbackup(gchar *filepath);
gboolean hbfile_file_hasrevert(gchar *filepath);
guint64 hbfile_file_get_time_modified(gchar *filepath);
void hbfile_file_default(void);
void hbfile_change_owner(gchar *owner);
......
......@@ -305,6 +305,9 @@ static gint csvtype[7] = {
}
newope->paymode = atoi(str_array[1]);
//added 5.1.8 forbid to import 5=internal xfer
if(newope->paymode == PAYMODE_INTXFER)
newope->paymode = PAYMODE_XFER;
newope->info = g_strdup(str_array[2]);
/* payee */
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment