Commit 6a93fa3e authored by Maxime Doyen's avatar Maxime Doyen

5.0.2 release

parent 862a6a49
2015-05-06 Maxime Doyen
Made 5.0.2 release.
* bugfix: #1448549 importing CSV files automatically creates 3 new accounts
* bugfix: #1443782 date filter From/To fields not working in Trend time and Balance reports
* bugfix: #1443048 saving cut file name after a dot
* bugfix: #1443047 budget amount is wrong (seems twice)
* bugfix: #1429414 calendar widget can't be dismissed by clicking on the arrow or text entry
2015-04-06 Maxime Doyen
Made 5.0.1 release.
......
<?xml version="1.0" encoding="UTF-8"?>
<application>
<id type="desktop">homebank.desktop</id>
<licence>GPL-2.0+</licence>
<description>
<p>HomeBank is a free software (as in "free speech" and also as in "free beer") that will assist you to manage your personal accounting.</p>
<p>It is designed to easy to use and be able to analyse your personal finance in detail using powerful filtering tools and beautiful graphs.</p>
<p>If you are looking for a completely free and easy way to manage your personal accounting then HomeBank should be the software of choice.</p>
</description>
<screenshots>
<screenshot width="624" type="default" height="351">http://homebank.free.fr/img/homebank-appdata.png</screenshot>
</screenshots>
<url type="homepage">http://homebank.free.fr</url>
<updatecontact>homebank_at_free.fr</updatecontact>
</application>
\ No newline at end of file
[Desktop Entry]
_Name=HomeBank
_GenericName=Personal finance
_Comment=Free, easy, personal accounting for everyone.
_Keywords=finance;accounting;budget;personal;money;
Exec=homebank %f
Terminal=false
StartupNotify=true
Type=Application
Icon=homebank
Categories=GNOME;GTK;Office;Finance;
MimeType=application/x-homebank;
homebank (5.0.0-1) unstable; urgency=medium
homebank (5.0.2-1) unstable; urgency=medium
* debian/control: changed description (Closes: #734503, #639536)
(LP: #155059)
......
......@@ -28,7 +28,6 @@
#include "dsp_account.h"
#include "ui-assist-import.h"
#include "imp_qif.h"
#include "ui-assist-start.h"
#include "ui-account.h"
#include "ui-payee.h"
......@@ -383,9 +382,9 @@ gint result;
{
DB( g_print(" - should revert\n") );
hbfile_change_filepath(hb_filename_new_with_extention(GLOBALS->xhb_filepath, "xhb~"));
hbfile_change_filepath(hb_util_filename_new_with_extension(GLOBALS->xhb_filepath, "xhb~"));
ui_mainwindow_open_internal(widget, NULL);
hbfile_change_filepath(hb_filename_new_with_extention(GLOBALS->xhb_filepath, "xhb"));
hbfile_change_filepath(hb_util_filename_new_with_extension(GLOBALS->xhb_filepath, "xhb"));
}
}
......@@ -1031,19 +1030,19 @@ GList *lacc, *elt;
*/
void ui_mainwindow_clear(GtkWidget *widget, gpointer user_data)
{
//struct hbfile_data *data;
struct hbfile_data *data;
gboolean file_clear = GPOINTER_TO_INT(user_data);
DB( g_print("\n[ui-mainwindow] clear\n") );
//data = g_object_get_data(G_OBJECT(gtk_widget_get_ancestor(widget, GTK_TYPE_WINDOW)), "inst_data");
data = g_object_get_data(G_OBJECT(gtk_widget_get_ancestor(widget, GTK_TYPE_WINDOW)), "inst_data");
// Close opened account window
// Clear TreeView
ui_mainwindow_close_openbooks();
//gtk_tree_store_clear(GTK_TREE_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(data->LV_acc))));
//gtk_list_store_clear(GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(data->LV_upc))));
//gtk_list_store_clear(GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(data->LV_top))));
gtk_tree_store_clear(GTK_TREE_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(data->LV_acc))));
gtk_list_store_clear(GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(data->LV_upc))));
gtk_list_store_clear(GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(data->LV_top))));
hbfile_cleanup(file_clear);
hbfile_setup(file_clear);
......@@ -1094,14 +1093,14 @@ gint account, count;
result = gtk_dialog_run (GTK_DIALOG (window));
DB( g_print(" -> dialog result is %d\n", result) );
DB( g_print(" - dialog result is %d\n", result) );
if(result == GTK_RESPONSE_ADD || result == GTK_RESPONSE_ADDKEEP || result == GTK_RESPONSE_ACCEPT)
{
deftransaction_get(window, NULL);
transaction_add(ope, NULL, ope->kacc);
DB( g_print(" -> added 1 transaction to %d\n", ope->kacc) );
DB( g_print(" - added 1 transaction to %d\n", ope->kacc) );
ui_mainwindow_populate_accounts(GLOBALS->mainwindow, NULL);
......@@ -1418,7 +1417,7 @@ struct hbfile_data *data = user_data;
result = gtk_dialog_run (GTK_DIALOG (window));
DB( g_print(" -> dialog result is %d\n", result) );
DB( g_print(" - dialog result is %d\n", result) );
if(result == GTK_RESPONSE_ADD || result == GTK_RESPONSE_ACCEPT)
{
......@@ -1428,7 +1427,7 @@ struct hbfile_data *data = user_data;
scheduled_date_advance(arc);
DB( g_print(" -> added 1 transaction to %d\n", txn->kacc) );
DB( g_print(" - added 1 transaction to %d\n", txn->kacc) );
}
da_transaction_free(txn);
......@@ -1691,7 +1690,7 @@ gint r;
data = g_object_get_data(G_OBJECT(gtk_widget_get_ancestor(widget, GTK_TYPE_WINDOW)), "inst_data");
DB( g_print(" -> filename: '%s'\n", GLOBALS->xhb_filepath) );
DB( g_print(" - filename: '%s'\n", GLOBALS->xhb_filepath) );
if( GLOBALS->xhb_filepath != NULL )
{
......@@ -1701,7 +1700,7 @@ gint r;
r = homebank_load_xml(GLOBALS->xhb_filepath);
if( r == XML_OK )
{
DB( g_print(" -> file loaded ok : rcode=%d\n", r) );
DB( g_print(" - file loaded ok : rcode=%d\n", r) );
hbfile_file_hasbackup(GLOBALS->xhb_filepath);
......@@ -1714,9 +1713,6 @@ gint r;
account_compute_balances();
ui_mainwindow_recent_add(data, GLOBALS->xhb_filepath);
ui_mainwindow_populate_accounts(GLOBALS->mainwindow, NULL);
ui_mainwindow_scheduled_populate(GLOBALS->mainwindow, NULL);
ui_mainwindow_populate_topspending(GLOBALS->mainwindow, NULL);
}
else
{
......@@ -1745,6 +1741,9 @@ gint r;
}
ui_mainwindow_populate_accounts(GLOBALS->mainwindow, NULL);
ui_mainwindow_scheduled_populate(GLOBALS->mainwindow, NULL);
ui_mainwindow_populate_topspending(GLOBALS->mainwindow, NULL);
ui_mainwindow_update(GLOBALS->mainwindow, GINT_TO_POINTER(UF_TITLE+UF_SENSITIVE+UF_VISUAL));
}
......@@ -1772,10 +1771,9 @@ gint r = XML_UNSET;
{
if(ui_file_chooser_xhb(GTK_FILE_CHOOSER_ACTION_SAVE, &filename) == TRUE)
{
DB( g_print(" + should save as %s\n", GLOBALS->xhb_filepath) );
hbfile_change_filepath(filename);
homebank_backup_current_file(GLOBALS->xhb_filepath);
homebank_file_ensure_xhb();
DB( g_print(" + should save as '%s'\n", filename) );
homebank_file_ensure_xhb(filename);
homebank_backup_current_file();
r = homebank_save_xml(GLOBALS->xhb_filepath);
GLOBALS->hbfile_is_new = FALSE;
}
......@@ -1785,8 +1783,8 @@ gint r = XML_UNSET;
else
{
DB( g_print(" + should quick save %s\n", GLOBALS->xhb_filepath) );
homebank_backup_current_file(GLOBALS->xhb_filepath);
homebank_file_ensure_xhb();
homebank_file_ensure_xhb(NULL);
homebank_backup_current_file();
r = homebank_save_xml(GLOBALS->xhb_filepath);
}
......@@ -1836,7 +1834,7 @@ gdouble gtbank, gttoday, gtfuture;
//#1339572
if( !(acc->flags & (AF_CLOSED|AF_NOSUMMARY)) )
{
DB( g_print(" -> insert %d:%s\n", acc->key, acc->name) );
DB( g_print(" - insert %d:%s\n", acc->key, acc->name) );
if(typeacc[acc->type] == NULL)
typeacc[acc->type] = g_ptr_array_sized_new(da_acc_length ());
......@@ -1849,7 +1847,7 @@ gdouble gtbank, gttoday, gtfuture;
gtbank = gttoday = gtfuture = 0;
DB( g_print(" -> populate listview\n") );
DB( g_print(" - populate listview\n") );
/* then populate the listview */
......@@ -1866,7 +1864,7 @@ gdouble gtbank, gttoday, gtfuture;
{
nbtype++;
//1: Header: Bank, Cash, ...
DB( g_print(" -> append type '%s'\n", CYA_ACC_TYPE[i]) );
DB( g_print(" - append type '%s'\n", CYA_ACC_TYPE[i]) );
gtk_tree_store_append (GTK_TREE_STORE(model), &iter1, NULL);
gtk_tree_store_set (GTK_TREE_STORE(model), &iter1,
......@@ -1955,7 +1953,7 @@ gdouble gtbank, gttoday, gtfuture;
gtk_tree_view_expand_all(GTK_TREE_VIEW(data->LV_acc));
DB( g_print(" -> free ressources\n") );
DB( g_print(" - free ressources\n") );
/* free all temp stuff */
......@@ -2324,7 +2322,7 @@ void ui_mainwindow_recent_add (struct hbfile_data *data, const gchar *path)
DB( g_print("\n[ui-mainwindow] recent_add\n") );
DB( g_print(" - suffix xhb %d", g_str_has_suffix (path, ".xhb") ) );
DB( g_print(" - file has .xhb suffix = %d\n", g_str_has_suffix (path, ".xhb") ) );
if( g_str_has_suffix (path, ".xhb") == FALSE ) //ignore reverted file
return;
......@@ -2381,7 +2379,7 @@ static void ui_mainwindow_drag_data_received (GtkWidget *widget,
guint info, guint time, GtkWindow *window)
{
gchar **uris, **str;
gchar *data;
gchar *newseldata;
gint filetype, slen;
if (info != TARGET_URI_LIST)
......@@ -2391,11 +2389,11 @@ static void ui_mainwindow_drag_data_received (GtkWidget *widget,
/* On MS-Windows, it looks like `selection_data->data' is not NULL terminated. */
slen = gtk_selection_data_get_length(selection_data);
data = g_new (gchar, slen + 1);
memcpy (data, gtk_selection_data_get_data(selection_data), slen);
data[slen] = 0;
newseldata = g_new (gchar, slen + 1);
memcpy (newseldata, gtk_selection_data_get_data(selection_data), slen);
newseldata[slen] = 0;
uris = g_uri_list_extract_uris (data);
uris = g_uri_list_extract_uris (newseldata);
str = uris;
//for (str = uris; *str; str++)
......@@ -2438,6 +2436,8 @@ static void ui_mainwindow_drag_data_received (GtkWidget *widget,
g_free (path);
}
g_strfreev (uris);
g_free(newseldata);
}
......
This diff is collapsed.
......@@ -73,6 +73,10 @@ struct _GtkDateEntryPrivate
GDate mindate, maxdate;
GdkDevice *device;
gboolean has_grab;
gboolean popup_in_progress;
GdkDevice *grab_pointer;
GdkDevice *grab_keyboard;
};
......
......@@ -43,7 +43,7 @@ gboolean hbfile_file_hasbackup(gchar *filepath)
{
gchar *bakfilepath;
bakfilepath = hb_filename_new_with_extention(GLOBALS->xhb_filepath, "xhb~");
bakfilepath = hb_util_filename_new_with_extension(GLOBALS->xhb_filepath, "xhb~");
GLOBALS->xhb_hasbak = g_file_test(bakfilepath, G_FILE_TEST_EXISTS);
g_free(bakfilepath);
//todo check here if need to return something
......
......@@ -140,24 +140,24 @@ Account *tmp_acc, *dst_acc;
if(data.account_id_valid==true)
{
DB( g_print(" account_id: %s\n", data.account_id) );
DB( g_print(" account_name: %s\n", data.account_name) );
DB( g_print(" account_id: '%s'\n", data.account_id) );
DB( g_print(" account_name: '%s'\n", data.account_name) );
}
//if(data.account_number_valid==true)
//{
DB( g_print(" account_number: %s\n", data.account_number) );
DB( g_print(" account_number: '%s'\n", data.account_number) );
//}
if(data.account_type_valid==true)
{
DB( g_print(" account_type: %d\n", data.account_type) );
DB( g_print(" account_type: '%d'\n", data.account_type) );
}
if(data.currency_valid==true)
{
DB( g_print(" currency: %s\n", data.currency) );
DB( g_print(" currency: '%s'\n", data.currency) );
}
......
......@@ -17,6 +17,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
//nota: this file should be renamed hb-utils
#include "homebank.h"
#include "hb-misc.h"
......@@ -756,11 +759,11 @@ GDate *date;
gint n1, n2, n3, d, m, y;
guint32 julian = 0;
DB( g_print("hb_date_get_julian: %s, %d\n", string, datefmt) );
DB( g_print("hb_date_get_julian: '%s', '%d'\n", string, datefmt) );
if( hb_date_parser_get_nums(string, &n1, &n2, &n3) )
{
DB( g_print("-> %d %d %d\n", n1, n2, n3) );
DB( g_print("-> '%d' '%d' '%d'\n", n1, n2, n3) );
switch(datefmt)
{
......@@ -812,49 +815,34 @@ guint32 julian = 0;
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =*/
gchar *hb_filename_new_with_extention(gchar *filename, const gchar *extension)
gchar *hb_util_filename_new_with_extension(gchar *filename, const gchar *extension)
{
gchar *dirname;
gchar *basename;
gchar *newbasename;
gchar *lastdot, *fwe;
gchar *newfilename;
gchar **str_array;
dirname = g_path_get_dirname (filename);
basename = g_path_get_basename(filename);
str_array = g_strsplit(basename, ".", 0);
newbasename = g_strdup_printf("%s.%s", str_array[0], extension);
newfilename = g_build_filename(dirname, newbasename, NULL);
g_strfreev(str_array);
g_free(basename);
g_free(dirname);
g_free(newbasename);
return newfilename;
}
/* file backup, qif export */
DB( g_print("\n[util] filename with extension\n") );
/*gchar *homebank_filename_without_extention(gchar *path)
{
gchar *basename;
gchar *newname;
gchar **str_array;
basename = g_path_get_basename(path);
DB( g_print(" - orig: '%s' => '%s'\n", filename, extension) );
str_array = g_strsplit(basename, ".", 0);
//duplicate without extensions
lastdot = g_strrstr(filename, ".");
if(lastdot != NULL)
{
fwe = g_strndup(filename, strlen(filename) - strlen(lastdot));
DB( g_print(" - fwe: '%s'\n", fwe) );
newfilename = g_strdup_printf("%s.%s", fwe, extension);
g_free(fwe);
}
else
{
newfilename = g_strdup_printf("%s.%s", filename, extension);
}
newname = g_strdup(str_array[0]);
DB( g_print(" - new: '%s'\n", newfilename) );
g_strfreev(str_array);
g_free(basename);
return newfilename;
}
return newname;
}*/
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =*/
......
......@@ -34,7 +34,7 @@ gint mystrfmon_int(gchar *outstr, gint outlen, gdouble value, gboolean minor);
//void hb_strfmon_int(gchar *outstr, gint outlen, gdouble value, guint32 kcur);
//gint hb_strfmon(gchar *outstr, gint outlen, gdouble value, gboolean minor);
gchar *hb_filename_new_with_extention(gchar *filename, const gchar *extension);
gchar *hb_util_filename_new_with_extension(gchar *filename, const gchar *extension);
gchar *get_normal_color_amount(gdouble value);
gchar *get_minimum_color_amount(gdouble value, gdouble minvalue);
......
......@@ -302,8 +302,6 @@ da_pay_debug_list(void)
#endif
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
......
This diff is collapsed.
......@@ -68,7 +68,7 @@
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =*/
#define HB_UNSTABLE FALSE
#define HB_VERSION "5.0.1"
#define HB_VERSION "5.0.2"
#define FILE_VERSION 1.1
#define PREF_VERSION 500
......@@ -261,8 +261,8 @@ struct HomeBank
gint homebank_alienfile_recognize(gchar *filename);
gchar *homebank_filepath_with_extention(gchar *path, gchar *extension);
gchar *homebank_filename_without_extention(gchar *path);
void homebank_file_ensure_xhb(void);
void homebank_backup_current_file(gchar *pathname);
void homebank_file_ensure_xhb(gchar *filename);
void homebank_backup_current_file(void);
gboolean homebank_util_url_show (const gchar *url);
gboolean homebank_lastopenedfiles_load(void);
gboolean homebank_lastopenedfiles_save(void);
......
......@@ -653,8 +653,9 @@ Account *acc;
//gtk_chart_set_currency(GTK_CHART(data->RE_line), GLOBALS->kcur);
}
filter_preset_daterange_set(data->filter, data->filter->range, data->accnum);
repbalance_update_quickdate(widget, NULL);
//to remove > 5.0.2
//filter_preset_daterange_set(data->filter, data->filter->range, data->accnum);
//repbalance_update_quickdate(widget, NULL);
repbalance_compute_full_datas(acckey, selectall, data);
......
......@@ -515,7 +515,7 @@ GtkTreeModel *model;
GtkTreeIter iter;
GList *list;
guint n_result, id;
gdouble *tmp_spent, *tmp_budget, *tmp_hasbudget;
gdouble *tmp_spent, *tmp_budget;
gint nbmonth = 1;
gchar *title;
......@@ -545,9 +545,8 @@ gchar *title;
/* allocate some memory */
tmp_spent = g_malloc0((n_result+1) * sizeof(gdouble));
tmp_budget = g_malloc0((n_result+1) * sizeof(gdouble));
tmp_hasbudget = g_malloc0((n_result+1) * sizeof(gdouble));
if(tmp_spent && tmp_budget && tmp_hasbudget)
if(tmp_spent && tmp_budget)
{
guint i = 0;
/* compute the results */
......@@ -566,7 +565,7 @@ gchar *title;
if( entry == NULL)
continue;
DB( g_print("+ catgory %d:'%s' custom=%d\n", entry->key, entry->name, (entry->flags & GF_CUSTOM)) );
DB( g_print("+ category %d:'%s' hasbudget=%d custom=%d\n", entry->key, entry->name, (entry->flags & GF_BUDGET), (entry->flags & GF_CUSTOM)) );
//debug
#if MYDEBUG == 1
......@@ -597,7 +596,6 @@ gchar *title;
{
DB( g_print(" -> monthly %.2f\n", entry->budget[0]) );
tmp_budget[pos] += entry->budget[0]*nbmonth;
tmp_hasbudget[i] += entry->budget[0]*nbmonth;
}
//otherwise sum each month from mindate month
else
......@@ -606,21 +604,19 @@ gchar *title;
gint j;
DB( g_print(" -> custom each month for %d months\n", nbmonth) );
for(j=0;j<nbmonth;j++)
{
for(j=0;j<nbmonth;j++) {
DB( g_print(" -> j=%d month=%d budg=%.2f\n", j, month, entry->budget[month]) );
tmp_budget[pos] += entry->budget[month];
tmp_hasbudget[i] += entry->budget[month];
month++;
if(month > 12) month = 1;
if(month > 12) {
month = 1;
}
}
}
//debug
#if MYDEBUG == 1
g_print(" final budget: %d '%s' : budg[%d]=%.2f hasbudg[%d]=%.2f\n",
entry->key, entry->name, pos, tmp_budget[pos], i, tmp_hasbudget[i]);
g_print(" final budget: %d:'%s' : budg[%d]=%.2f\n", entry->key, entry->name, pos, tmp_budget[pos] );
#endif
}
......@@ -780,7 +776,7 @@ next1:
if( tmpkind == 2 && tmp_budget[pos] < 0)
continue;
DB( g_print(" eval insert '%s' : %.2f %.2f %.2f\n", name, tmp_budget[pos], tmp_hasbudget[pos], tmp_spent[pos]) );
DB( g_print(" eval insert '%s' : bud=%.2f spen=%.2f\n", name, tmp_budget[pos], tmp_spent[pos]) );
if((entry->flags & (GF_BUDGET|GF_FORCED)) || tmp_budget[pos] /*|| tmp_spent[pos]*/)
{
......@@ -861,7 +857,6 @@ next1:
/* free our memory */
g_free(tmp_spent);
g_free(tmp_budget);
g_free(tmp_hasbudget);
}
......
......@@ -745,8 +745,9 @@ guint32 selkey;
/* do nothing if no transaction */
if(g_list_length(GLOBALS->ope_list) == 0) return;
filter_preset_daterange_set(data->filter, data->filter->range, data->accnum);
ui_reptime_update_quickdate(widget, NULL);
//to remove > 5.0.2
//filter_preset_daterange_set(data->filter, data->filter->range, data->accnum);
//ui_reptime_update_quickdate(widget, NULL);
//get our min max date
from = data->filter->mindate;
......
......@@ -1444,7 +1444,8 @@ ImportContext *ictx = &data->ictx;
if(i != PREFS->dtex_datefmt) //don't reload with user pref date format
{
DB( g_print(" fail, reload with '%s'\n", CYA_IMPORT_DATEORDER[i]) );
_import_context_clear (&data->ictx);
//#1448549
import_clearall(data);
ictx->encoding = encoding; //#1425986 keep encoding with us
ictx->datefmt = i;
_import_tryload_file(data);
......
......@@ -300,7 +300,7 @@ gboolean retval;
{
gchar *tmpfilename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (chooser));
*storage_ptr = hb_filename_new_with_extention(tmpfilename, "qif");
*storage_ptr = hb_util_filename_new_with_extension(tmpfilename, "qif");
g_free(tmpfilename);
retval = TRUE;
}
......@@ -360,7 +360,7 @@ gchar *path;
if( action == GTK_FILE_CHOOSER_ACTION_SAVE )
{
*storage_ptr = hb_filename_new_with_extention(tmpfilename, "csv");
*storage_ptr = hb_util_filename_new_with_extension(tmpfilename, "csv");
g_free(tmpfilename);
}
else
......
......@@ -389,7 +389,7 @@ gchar *string;
name = entry->name;
#if MYDEBUG
string = g_strdup_printf ("%d > %s [ft=%d im=%d]", entry->key, name, entry->filter, entry->imported);
string = g_strdup_printf ("%d > %s [ft=%d]", entry->key, name, entry->filter);
g_object_set(renderer, "text", string, NULL);
g_free(string);
#else
......@@ -399,7 +399,6 @@ gchar *string;
}
/* = = = = = = = = = = = = = = = = */
......@@ -636,6 +635,7 @@ gchar *filename = NULL;
}
}
/**
* ui_pay_manage_dialog_add:
*
......
......@@ -38,7 +38,7 @@ struct ui_pay_manage_dialog_data
GtkWidget *BT_merge;
GtkWidget *BT_delete;
gint change;
gint change;
};
struct payPopContext
......
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