diff options
author | Remi Cardona <remi@gentoo.org> | 2011-02-26 14:47:10 +0000 |
---|---|---|
committer | Remi Cardona <remi@gentoo.org> | 2011-02-26 14:47:10 +0000 |
commit | c72d938081f4be6bcc54f28d26625b4f55dfbc11 (patch) | |
tree | ffe614772e48e642f68990cff72df1280445a4e7 /app-office/grisbi | |
parent | Un-embed fltk for the zynaddsubfx plugin. (diff) | |
download | historical-c72d938081f4be6bcc54f28d26625b4f55dfbc11.tar.gz historical-c72d938081f4be6bcc54f28d26625b4f55dfbc11.tar.bz2 historical-c72d938081f4be6bcc54f28d26625b4f55dfbc11.zip |
Bump to 0.8.2 (with patches from upstream)
Package-Manager: portage-2.2.0_alpha23/cvs/Linux i686
Diffstat (limited to 'app-office/grisbi')
8 files changed, 1240 insertions, 2 deletions
diff --git a/app-office/grisbi/ChangeLog b/app-office/grisbi/ChangeLog index f0cbba3850e1..05bbbd62d0bd 100644 --- a/app-office/grisbi/ChangeLog +++ b/app-office/grisbi/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for app-office/grisbi # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-office/grisbi/ChangeLog,v 1.43 2011/02/22 08:29:00 remi Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-office/grisbi/ChangeLog,v 1.44 2011/02/26 14:47:10 remi Exp $ + +*grisbi-0.8.2 (26 Feb 2011) + + 26 Feb 2011; Rémi Cardona <remi@gentoo.org> +grisbi-0.8.2.ebuild, + +files/0.8.2-0001-fixes-bug-1289.patch, + +files/0.8.2-0002-fixes-a-crash-when-importing-a-file-without-extensio.patch, + +files/0.8.2-0003-fixes-bug-1293-Problem-of-updating-of-the-pointing-b.patch, + +files/0.8.2-0004-fix-memory-leaks-thanks-Philippe-D.patch, + +files/0.8.2-0005-fixes-bug-of-compilation.patch: + Bump to 0.8.2 (with patches from upstream) *grisbi-0.8.1 (22 Feb 2011) diff --git a/app-office/grisbi/Manifest b/app-office/grisbi/Manifest index f05e8fb92758..640811aa590e 100644 --- a/app-office/grisbi/Manifest +++ b/app-office/grisbi/Manifest @@ -1,4 +1,9 @@ AUX 0.6.0_rc2-properly-detect-gmodule.patch 1088 RMD160 166e59b11adaab0d955bd4619e1e762c1b69a796 SHA1 7e214171a13307463b1049a75aef451acc7be140 SHA256 5b2faf4ac8f85a6133c1191e0c99c3779a506f0a03d8328afbabf848b2cab61e +AUX 0.8.2-0001-fixes-bug-1289.patch 716 RMD160 d786c8a06d3e9422f5a753c615f5e027b8d47893 SHA1 d67871063469225d5e703354ceb4f930c36fa669 SHA256 6722aa3a09a07fbfed1b008eecf40407a307aca163885b8b2bb1580225140bc3 +AUX 0.8.2-0002-fixes-a-crash-when-importing-a-file-without-extensio.patch 806 RMD160 aaf70702ed3997939cae8d01b4fbbfdf01de2cdb SHA1 b1620a27e65554d4f337840a2e73727f21afbc77 SHA256 7359df58f31cfda575c46033cf2a8829a623d5afcb1c7b465f4927a862812d24 +AUX 0.8.2-0003-fixes-bug-1293-Problem-of-updating-of-the-pointing-b.patch 1351 RMD160 dbc0b63b79a22c9cc2cfbde7f5e40de8bc4d96b7 SHA1 8a5efbcb22ca010303fee851cb9155a63d401fe5 SHA256 c923974dba7541f50691fdba509a27ad919e8cbec7a4a6e97507b70034802734 +AUX 0.8.2-0004-fix-memory-leaks-thanks-Philippe-D.patch 26250 RMD160 1ade3adcff21b20cb68c75da70ec258da9d93db2 SHA1 bbd3adce864cec6eccf8704330f8d15ba8ca7b6c SHA256 66997b142b4f6920ce2a6968a08d8aefa5d7ddf9f46bd8dbd610362665bd450b +AUX 0.8.2-0005-fixes-bug-of-compilation.patch 14892 RMD160 76e0e1b5e75e9a72069b36dbf28bfd4960057d06 SHA1 40f4b44a82cb4ba7629e442bf30754ab152308d6 SHA256 876f950e0ed885d7132449093ed020004a50055023d1d98a0acabc82e478f202 AUX grisbi-0.5.6-latex-unicode.patch 461 RMD160 fa6bd5134e11768c5ee51e15931992fd34050248 SHA1 b8298c8d0fd4bedd32724f2126e155cae838fbbd SHA256 30d8bea8b5c53dc96c62da05a3f374d50cdfcb5ec3c736508c207e04d5f2fa5f AUX grisbi.desktop 170 RMD160 526c4e4d3e4e1f9e7dc87e75685a79e7c1c906ed SHA1 78db02f6dd53b8ed31dcccf14ddaab2e3ae53a62 SHA256 514362db5222f0609c2782a96078dc8638130b903f19e41e50c4259879a065fe DIST grisbi-0.5.8.tar.bz2 984884 RMD160 cc361c7c17ab9786d310fda70c9a8a50d45397f5 SHA1 dcc1c87a62265437bbfd4fd5d603131f3473c569 SHA256 011b1f9aefe39bcb73ec11ff518fae8f281e6264a0c64c8367ab9cc9e28b6c02 @@ -6,10 +11,12 @@ DIST grisbi-0.5.9.tar.bz2 1003327 RMD160 533c398443003c4f13204baa679932fccd77764 DIST grisbi-0.6.0.tar.bz2 1966296 RMD160 dedd2375136b36ab69026f42207cecb18c74190f SHA1 d76973eaa068827d0239b2a6d7c411f78ae743fb SHA256 3b9759e0839fc571ccedfb8514b47bef86db50223424137c2e70997f6d252527 DIST grisbi-0.6.0rc2.tar.bz2 1946861 RMD160 b3253a03019c39c8a2ba26eb21d7e30719f4d70a SHA1 a6d0984058af45602f8f1c94507bcbf110218367 SHA256 4f590468f74aae312cb4e36021bd37f68a23c26cc7619040d8363e88157768ab DIST grisbi-0.8.1.tar.bz2 1872598 RMD160 6ef1801989e397c62b447959814b017d6fc24d74 SHA1 9bf58148fb4550ae1cff9a3173f1f25a42e042fa SHA256 ebff98e82a53727b87222a78d94b3e73a85913d00c77e52b41f63c5b51d32379 +DIST grisbi-0.8.2.tar.bz2 1873004 RMD160 dc1ec637cde4fec5af26a8402ddf89b6150f9038 SHA1 a6ce95696f896c0eadbd3dafec795b39b0e656ea SHA256 d0f62fdbfbaec3863fc1f34e55198fc5564377ad9939a08d864de6019cfd0946 EBUILD grisbi-0.5.8.ebuild 1746 RMD160 10d3536477b72e9bda4fb1f40f0ea5b46cd0f9cd SHA1 bc0001eb3916035129f2bccfe6206af233ee2666 SHA256 35847e0f89bc3d0f9037ec5f3eee97bd2394cef4c38a0916a8a66d50e78f425c EBUILD grisbi-0.5.9.ebuild 1691 RMD160 14d449a3a951d960524ac9707ea6e01543d4a700 SHA1 2181058e8a9b2eaa4b5e67e335607f2c10341d60 SHA256 b9ea9ec961d53b02e6ea43aed9d49953a6bd8c310d797a8b95c54e9a20eaedd5 EBUILD grisbi-0.6.0.ebuild 1395 RMD160 be1dd2af5c5a32f5e78840aa14a3c3f1b6b53965 SHA1 a9c067be6476574108d4be9156330c27efe4b7c8 SHA256 67136abb2667dcaedb05cfa85954e59945e5a4323ee15b4aa76a828ce0effd8e EBUILD grisbi-0.6.0_rc2.ebuild 1583 RMD160 5255314bf6728cca1d587cf228097c86996b7ab8 SHA1 2ea9b4cda138c799ccf07feb6f85ca19c2db166b SHA256 9b9d21ecff6d40db8ec6251983181d97c1b749d2238d8185186a0f8a987efe68 EBUILD grisbi-0.8.1.ebuild 1081 RMD160 a0778fae15c74a1e6357c35307f675db38ffddb5 SHA1 3c48404f2b7556971fb9f902166d844b8fdad147 SHA256 3b8106c7fb450dcc49f08ca6a6d48ac40e27ae01354d925a88cf6914308a6076 -MISC ChangeLog 6716 RMD160 95d2838c5774a5dde74d2b2cc36a6f3a67eafc3d SHA1 b2faa222f763f68c31e17533aaebadb70fd5ffbf SHA256 ac43bcbfb5b5d83989f931c6567115643c08783ed8b6c9ca2179ccc1cfe4867a +EBUILD grisbi-0.8.2.ebuild 1485 RMD160 603f64ee89a664f25042568d342919cbbf7d2487 SHA1 b98af1908b1b04814d85e6c127e2550a34b04353 SHA256 111aeb3b47bab1e8866376efb93d7e017bfd901313ea6cb2a9fb53b02e1b5fd8 +MISC ChangeLog 7176 RMD160 a24c60f0ba99894a341aa111cd4165b21aea5791 SHA1 041f0875f5489d3c2cc62963fa68efd2530b4b3b SHA256 3305ff00a6466ba804be0fe5a85fdb45125ce34108b3705e5a8fddbc0652d5a2 MISC metadata.xml 484 RMD160 337a5892bb0d0eaf7c7f385259aba618068c71d6 SHA1 c8ba2b7a12306ddcb0913dcc908a620e63236a24 SHA256 5ea31d7c143ec432e07fe987ca46cee6b38e06654b6b369dcd69a798e67313b8 diff --git a/app-office/grisbi/files/0.8.2-0001-fixes-bug-1289.patch b/app-office/grisbi/files/0.8.2-0001-fixes-bug-1289.patch new file mode 100644 index 000000000000..484791f11b46 --- /dev/null +++ b/app-office/grisbi/files/0.8.2-0001-fixes-bug-1289.patch @@ -0,0 +1,25 @@ +From 3af09ff549167fd9de721f1434422faa9969645d Mon Sep 17 00:00:00 2001 +From: pbiava <pierre.biava@nerim.net> +Date: Wed, 23 Feb 2011 20:34:30 +0100 +Subject: [PATCH 1/5] fixes bug 1289 + +--- + src/etats_config.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/etats_config.c b/src/etats_config.c +index 9db2da3..9bf8e7d 100644 +--- a/src/etats_config.c ++++ b/src/etats_config.c +@@ -5576,7 +5576,7 @@ GtkWidget *cree_ligne_comparaison_montant ( gint amount_comparison_number ) + + /* on crée alors le bouton de lien */ + +- widget = cree_bouton_lien ( widget ); ++ widget = cree_bouton_lien ( widget_1 ); + gtk_box_pack_start ( GTK_BOX ( hbox ), + widget, + FALSE, +-- +1.7.4 + diff --git a/app-office/grisbi/files/0.8.2-0002-fixes-a-crash-when-importing-a-file-without-extensio.patch b/app-office/grisbi/files/0.8.2-0002-fixes-a-crash-when-importing-a-file-without-extensio.patch new file mode 100644 index 000000000000..8e8ae17aff24 --- /dev/null +++ b/app-office/grisbi/files/0.8.2-0002-fixes-a-crash-when-importing-a-file-without-extensio.patch @@ -0,0 +1,25 @@ +From 3aeefce5f46ae6989cc6a9c2569af895a9a00659 Mon Sep 17 00:00:00 2001 +From: pbiava <pierre.biava@nerim.net> +Date: Thu, 24 Feb 2011 23:07:02 +0100 +Subject: [PATCH 2/5] fixes a crash when importing a file without extension + +--- + src/import.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/import.c b/src/import.c +index 44802bf..1d5ceeb 100644 +--- a/src/import.c ++++ b/src/import.c +@@ -681,7 +681,7 @@ gboolean import_select_file ( GtkWidget * button, GtkWidget * assistant ) + extension = strrchr ( iterator -> data, '.' ); + + /* unzip Gnucash file if necessary */ +- if ( strcmp ( extension, ".gnc" ) == 0 ) ++ if ( extension && strcmp ( extension, ".gnc" ) == 0 ) + gsb_import_gunzip_file ( iterator -> data ); + + /* get contents of file */ +-- +1.7.4 + diff --git a/app-office/grisbi/files/0.8.2-0003-fixes-bug-1293-Problem-of-updating-of-the-pointing-b.patch b/app-office/grisbi/files/0.8.2-0003-fixes-bug-1293-Problem-of-updating-of-the-pointing-b.patch new file mode 100644 index 000000000000..f80e5596363b --- /dev/null +++ b/app-office/grisbi/files/0.8.2-0003-fixes-bug-1293-Problem-of-updating-of-the-pointing-b.patch @@ -0,0 +1,38 @@ +From 63b110a42e88e2b06c0ff432df0282db395cef17 Mon Sep 17 00:00:00 2001 +From: pbiava <pierre.biava@nerim.net> +Date: Fri, 25 Feb 2011 20:56:03 +0100 +Subject: [PATCH 3/5] fixes bug 1293 : Problem of updating of the pointing balance + +--- + src/gsb_form.c | 8 +++++++- + 1 files changed, 7 insertions(+), 1 deletions(-) + +diff --git a/src/gsb_form.c b/src/gsb_form.c +index fc81b59..e66c7c2 100644 +--- a/src/gsb_form.c ++++ b/src/gsb_form.c +@@ -105,6 +105,7 @@ static gboolean gsb_form_validate_form_transaction ( gint transaction_number, + + /*START_EXTERN*/ + extern GdkColor calendar_entry_color; ++extern gint mise_a_jour_liste_comptes_accueil; + extern GtkWidget *navigation_tree_view; + extern gsb_real null_real; + extern GtkWidget *window; +@@ -2660,7 +2661,12 @@ gboolean gsb_form_finish_edition ( void ) + if ( is_transaction ) + { + affiche_dialogue_soldes_minimaux (); +- update_transaction_in_trees (transaction_number); ++ update_transaction_in_trees ( transaction_number ); ++ if ( gsb_data_transaction_get_marked_transaction ( transaction_number ) == OPERATION_POINTEE ) ++ { ++ gsb_navigation_update_statement_label ( account_number ); ++ mise_a_jour_liste_comptes_accueil = 1; ++ } + } + + /* as we modify or create a transaction, we invalidate the current report */ +-- +1.7.4 + diff --git a/app-office/grisbi/files/0.8.2-0004-fix-memory-leaks-thanks-Philippe-D.patch b/app-office/grisbi/files/0.8.2-0004-fix-memory-leaks-thanks-Philippe-D.patch new file mode 100644 index 000000000000..b93cefcffb00 --- /dev/null +++ b/app-office/grisbi/files/0.8.2-0004-fix-memory-leaks-thanks-Philippe-D.patch @@ -0,0 +1,682 @@ +From 5e25d0add90786446d6083ac46c8f374ae1463cc Mon Sep 17 00:00:00 2001 +From: pbiava <pierre.biava@nerim.net> +Date: Fri, 25 Feb 2011 21:33:51 +0100 +Subject: [PATCH 4/5] fix memory leaks thanks Philippe D. + +--- + src/bet_data.c | 199 +++++++++++++++++++++++++++++++----------- + src/gsb_assistant_account.c | 1 + + src/gsb_file_config.c | 3 + + src/gsb_file_load.c | 3 + + src/gsb_select_icon.c | 12 ++- + src/import.c | 5 +- + src/import_csv.c | 3 + + src/utils.c | 1 + + src/utils_dates.c | 5 +- + src/utils_editables.c | 3 + + src/utils_files.c | 3 +- + src/utils_str.c | 11 ++- + 12 files changed, 188 insertions(+), 61 deletions(-) + +diff --git a/src/bet_data.c b/src/bet_data.c +index 0c9f7e5..fbc25d7 100644 +--- a/src/bet_data.c ++++ b/src/bet_data.c +@@ -264,13 +264,19 @@ gboolean bet_data_hist_add_div ( gint account_number, + { + gchar *key; + gchar *sub_key; ++ gchar *div_number_str, *account_number_str; // only to avoid memory leaks + struct_hist_div *shd; + ++ div_number_str = utils_str_itoa ( div_number ); + if ( account_number == 0 ) +- key = g_strconcat ("0:", utils_str_itoa ( div_number ), NULL ); ++ key = g_strconcat ("0:", div_number_str, NULL ); + else +- key = g_strconcat ( utils_str_itoa ( account_number ), ":", +- utils_str_itoa ( div_number ), NULL ); ++ { ++ account_number_str = utils_str_itoa ( account_number ); ++ key = g_strconcat ( account_number_str, ":", div_number_str, NULL ); ++ g_free ( account_number_str ); ++ } ++ g_free ( div_number_str ); + + if ( ( shd = g_hash_table_lookup ( bet_hist_div_list, key ) ) ) + { +@@ -342,13 +348,19 @@ void bet_data_insert_div_hist ( struct_hist_div *shd, struct_hist_div *sub_shd ) + { + gchar *key; + gchar *sub_key; ++ gchar *div_number_str, *account_nb_str; // only to avoid memory leaks + struct_hist_div *tmp_shd; + ++ div_number_str = utils_str_itoa ( shd -> div_number ); + if ( shd -> account_nb == 0 ) +- key = g_strconcat ("0:", utils_str_itoa ( shd -> div_number ), NULL ); ++ key = g_strconcat ("0:", div_number_str, NULL ); + else +- key = g_strconcat ( utils_str_itoa ( shd -> account_nb ), ":", +- utils_str_itoa ( shd -> div_number ), NULL ); ++ { ++ account_nb_str = utils_str_itoa ( shd -> account_nb ); ++ key = g_strconcat ( account_nb_str, ":", div_number_str, NULL ); ++ g_free ( account_nb_str ); ++ } ++ g_free ( div_number_str ); + + if ( ( tmp_shd = g_hash_table_lookup ( bet_hist_div_list, key ) ) ) + { +@@ -383,13 +395,19 @@ gboolean bet_data_remove_div_hist ( gint account_number, gint div_number, gint s + { + gchar *key; + char *sub_key; ++ gchar *div_number_str, *account_number_str; // only to avoid memory leaks + struct_hist_div *shd; + ++ div_number_str = utils_str_itoa ( div_number ); + if ( account_number == 0 ) +- key = g_strconcat ("0:", utils_str_itoa ( div_number ), NULL ); ++ key = g_strconcat ("0:", div_number_str, NULL ); + else +- key = g_strconcat ( utils_str_itoa ( account_number ), ":", +- utils_str_itoa ( div_number ), NULL ); ++ { ++ account_number_str = utils_str_itoa ( account_number ); ++ key = g_strconcat ( account_number_str, ":", div_number_str, NULL ); ++ g_free ( account_number_str ); ++ } ++ g_free ( div_number_str ); + + if ( ( shd = g_hash_table_lookup ( bet_hist_div_list, key ) ) ) + { +@@ -418,14 +436,20 @@ gboolean bet_data_search_div_hist ( gint account_number, gint div_number, gint s + { + gchar *key; + gchar *sub_key; ++ gchar *div_number_str, *account_number_str; // only to avoid memory leaks + gint origin; + struct_hist_div *shd; + ++ div_number_str = utils_str_itoa ( div_number ); + if ( account_number == 0 ) +- key = g_strconcat ("0:", utils_str_itoa ( div_number ), NULL ); ++ key = g_strconcat ("0:", div_number_str, NULL ); + else +- key = g_strconcat ( utils_str_itoa ( account_number ), ":", +- utils_str_itoa ( div_number ), NULL ); ++ { ++ account_number_str = utils_str_itoa ( account_number ); ++ key = g_strconcat ( account_number_str, ":", div_number_str, NULL ); ++ g_free ( account_number_str ); ++ } ++ g_free ( div_number_str ); + + origin = gsb_data_account_get_bet_hist_data ( account_number ); + +@@ -539,15 +563,21 @@ gchar *bet_data_get_div_name ( gint div_num, + gboolean bet_data_get_div_edited ( gint account_number, gint div_number, gint sub_div_nb ) + { + gchar *key; ++ gchar *div_number_str, *account_number_str; // only to avoid memory leaks + gint origin; + struct_hist_div *shd; + gboolean edited; + ++ div_number_str = utils_str_itoa ( div_number ); + if ( account_number == 0 ) +- key = g_strconcat ("0:", utils_str_itoa ( div_number ), NULL ); ++ key = g_strconcat ("0:", div_number_str, NULL ); + else +- key = g_strconcat ( utils_str_itoa ( account_number ), ":", +- utils_str_itoa ( div_number ), NULL ); ++ { ++ account_number_str = utils_str_itoa ( account_number ); ++ key = g_strconcat ( account_number_str, ":", div_number_str, NULL ); ++ g_free ( account_number_str ); ++ } ++ g_free ( div_number_str ); + + origin = gsb_data_account_get_bet_hist_data ( account_number ); + +@@ -589,13 +619,19 @@ gboolean bet_data_set_div_edited ( gint account_nb, + gboolean edited ) + { + gchar *key; ++ gchar *div_number_str, *account_nb_str; // only to avoid memory leaks + struct_hist_div *shd; + ++ div_number_str = utils_str_itoa ( div_number ); + if ( account_nb == 0 ) +- key = g_strconcat ("0:", utils_str_itoa ( div_number ), NULL ); ++ key = g_strconcat ("0:", div_number_str, NULL ); + else +- key = g_strconcat ( utils_str_itoa ( account_nb ), ":", +- utils_str_itoa ( div_number ), NULL ); ++ { ++ account_nb_str = utils_str_itoa ( account_nb ); ++ key = g_strconcat ( account_nb_str, ":", div_number_str, NULL ); ++ g_free ( account_nb_str ); ++ } ++ g_free ( div_number_str ); + + if ( ( shd = g_hash_table_lookup ( bet_hist_div_list, key ) ) ) + { +@@ -628,14 +664,20 @@ gboolean bet_data_set_div_edited ( gint account_nb, + gsb_real bet_data_hist_get_div_amount ( gint account_nb, gint div_number, gint sub_div_nb ) + { + gchar *key; ++ gchar *div_number_str, *account_nb_str; // only to avoid memory leaks + struct_hist_div *shd; + gsb_real amount; + ++ div_number_str = utils_str_itoa ( div_number ); + if ( account_nb == 0 ) +- key = g_strconcat ("0:", utils_str_itoa ( div_number ), NULL ); ++ key = g_strconcat ("0:", div_number_str, NULL ); + else +- key = g_strconcat ( utils_str_itoa ( account_nb ), ":", +- utils_str_itoa ( div_number ), NULL ); ++ { ++ account_nb_str = utils_str_itoa ( account_nb ); ++ key = g_strconcat ( account_nb_str, ":", div_number_str, NULL ); ++ g_free ( account_nb_str ); ++ } ++ g_free ( div_number_str ); + + if ( ( shd = g_hash_table_lookup ( bet_hist_div_list, key ) ) ) + { +@@ -674,13 +716,19 @@ gboolean bet_data_set_div_amount ( gint account_nb, + gsb_real amount ) + { + gchar *key; ++ gchar *div_number_str, *account_nb_str; // only to avoid memory leaks + struct_hist_div *shd; + ++ div_number_str = utils_str_itoa ( div_number ); + if ( account_nb == 0 ) +- key = g_strconcat ("0:", utils_str_itoa ( div_number ), NULL ); ++ key = g_strconcat ("0:", div_number_str, NULL ); + else +- key = g_strconcat ( utils_str_itoa ( account_nb ), ":", +- utils_str_itoa ( div_number ), NULL ); ++ { ++ account_nb_str = utils_str_itoa ( account_nb ); ++ key = g_strconcat ( account_nb_str, ":", div_number_str, NULL ); ++ g_free ( account_nb_str ); ++ } ++ g_free ( div_number_str ); + + if ( ( shd = g_hash_table_lookup ( bet_hist_div_list, key ) ) ) + { +@@ -1167,16 +1215,22 @@ void struct_free_bet_future ( struct_futur_data *scheduled ) + gboolean bet_data_future_add_lines ( struct_futur_data *scheduled ) + { + gchar *key; ++ gchar *future_number_str, *account_nb_str; // only to avoid memory leaks + + future_number ++; + + if ( scheduled -> frequency == 0 ) + { ++ future_number_str = utils_str_itoa ( future_number ); + if ( scheduled -> account_number == 0 ) +- key = g_strconcat ("0:", utils_str_itoa ( future_number ), NULL ); ++ key = g_strconcat ("0:", future_number_str, NULL ); + else +- key = g_strconcat ( utils_str_itoa ( scheduled -> account_number ), ":", +- utils_str_itoa ( future_number ), NULL ); ++ { ++ account_nb_str = utils_str_itoa ( scheduled -> account_number ); ++ key = g_strconcat ( account_nb_str, ":", future_number_str, NULL ); ++ g_free ( account_nb_str ); ++ } ++ g_free ( future_number_str ); + + scheduled -> number = future_number; + g_hash_table_insert ( bet_future_list, key, scheduled ); +@@ -1196,11 +1250,16 @@ gboolean bet_data_future_add_lines ( struct_futur_data *scheduled ) + date = gsb_date_copy ( scheduled -> date ); + while ( date != NULL && g_date_valid ( date ) ) + { ++ future_number_str = utils_str_itoa ( future_number ); + if ( scheduled -> account_number == 0 ) + key = g_strconcat ("0:", utils_str_itoa ( future_number ), NULL ); + else +- key = g_strconcat ( utils_str_itoa ( scheduled -> account_number ), ":", +- utils_str_itoa ( future_number ), NULL ); ++ { ++ account_nb_str = utils_str_itoa ( scheduled -> account_number ); ++ key = g_strconcat ( account_nb_str, ":", future_number_str, NULL ); ++ g_free ( account_nb_str ); ++ } ++ g_free ( future_number_str ); + + if ( mother_row == future_number ) + new_sch = scheduled; +@@ -1236,16 +1295,22 @@ gboolean bet_data_future_add_lines ( struct_futur_data *scheduled ) + gboolean bet_data_future_set_lines_from_file ( struct_futur_data *scheduled ) + { + gchar *key; ++ gchar *number_str, *account_nb_str; // only to avoid memory leaks + +- if ( scheduled -> account_number == 0 ) +- key = g_strconcat ("0:", utils_str_itoa ( scheduled -> number ), NULL ); +- else +- key = g_strconcat ( utils_str_itoa ( scheduled -> account_number ), ":", +- utils_str_itoa ( scheduled -> number ), NULL ); ++ number_str = utils_str_itoa ( scheduled -> number ); ++ if ( scheduled -> account_number == 0 ) ++ key = g_strconcat ("0:", number_str, NULL ); ++ else ++ { ++ account_nb_str = utils_str_itoa ( scheduled -> account_number ); ++ key = g_strconcat ( account_nb_str, ":", number_str, NULL ); ++ g_free ( account_nb_str ); ++ } ++ g_free ( number_str ); + +- bet_data_future_set_max_number ( scheduled -> number ); ++ bet_data_future_set_max_number ( scheduled -> number ); + +- g_hash_table_insert ( bet_future_list, key, scheduled ); ++ g_hash_table_insert ( bet_future_list, key, scheduled ); + + return TRUE; + } +@@ -1557,12 +1622,18 @@ GDate *bet_data_array_get_date_max ( gint account_number ) + gboolean bet_data_future_modify_lines ( struct_futur_data *scheduled ) + { + gchar *key; ++ gchar *number_str, *account_nb_str; // only to avoid memory leaks + ++ number_str = utils_str_itoa ( scheduled -> number ); + if ( scheduled -> account_number == 0 ) +- key = g_strconcat ("0:", utils_str_itoa ( scheduled -> number ), NULL ); ++ key = g_strconcat ("0:", number_str, NULL ); + else +- key = g_strconcat ( utils_str_itoa ( scheduled -> account_number ), ":", +- utils_str_itoa ( scheduled -> number ), NULL ); ++ { ++ account_nb_str = utils_str_itoa ( scheduled -> account_number ); ++ key = g_strconcat ( account_nb_str, ":", number_str, NULL ); ++ g_free ( account_nb_str ); ++ } ++ g_free ( number_str ); + + g_hash_table_replace ( bet_future_list, key, scheduled ); + +@@ -1582,13 +1653,19 @@ gboolean bet_data_future_modify_lines ( struct_futur_data *scheduled ) + struct_futur_data *bet_data_future_get_struct ( gint account_number, gint number ) + { + gchar *key; ++ gchar *number_str, *account_nb_str; // only to avoid memory leaks + struct_futur_data *scheduled; + +- if ( account_number == 0 ) +- key = g_strconcat ("0:", utils_str_itoa ( number ), NULL ); ++ number_str = utils_str_itoa ( number ); ++ if ( scheduled -> account_number == 0 ) ++ key = g_strconcat ("0:", number_str, NULL ); + else +- key = g_strconcat ( utils_str_itoa ( account_number ), ":", +- utils_str_itoa ( number ), NULL ); ++ { ++ account_nb_str = utils_str_itoa ( account_number ); ++ key = g_strconcat ( account_nb_str, ":", number_str, NULL ); ++ g_free ( account_nb_str ); ++ } ++ g_free ( number_str ); + + if ( ( scheduled = g_hash_table_lookup ( bet_future_list, key ) ) ) + return scheduled; +@@ -1651,14 +1728,20 @@ GHashTable *bet_data_transfert_get_list ( void ) + gboolean bet_data_transfert_add_line ( struct_transfert_data *transfert ) + { + gchar *key; ++ gchar *transfert_nb_str, *account_nb_str; // only to avoid memory leaks + + transfert_number ++; + ++ transfert_nb_str = utils_str_itoa ( transfert_number ); + if ( transfert -> account_number == 0 ) +- key = g_strconcat ("0:", utils_str_itoa ( transfert_number ), NULL ); ++ key = g_strconcat ("0:", transfert_nb_str, NULL ); + else +- key = g_strconcat ( utils_str_itoa ( transfert -> account_number ), ":", +- utils_str_itoa ( transfert_number ), NULL ); ++ { ++ account_nb_str = utils_str_itoa ( transfert -> account_number ); ++ key = g_strconcat ( account_nb_str, ":", transfert_nb_str, NULL ); ++ g_free ( account_nb_str ); ++ } ++ g_free ( transfert_nb_str ); + + transfert -> number = transfert_number; + g_hash_table_insert ( bet_transfert_list, key, transfert ); +@@ -1715,12 +1798,18 @@ gboolean bet_data_transfert_remove_line ( gint account_number, gint number ) + gboolean bet_data_transfert_set_line_from_file ( struct_transfert_data *transfert ) + { + gchar *key; ++ gchar *transfert_nb_str, *account_nb_str; // only to avoid memory leaks + ++ transfert_nb_str = utils_str_itoa ( transfert -> number ); + if ( transfert -> account_number == 0 ) +- key = g_strconcat ("0:", utils_str_itoa ( transfert -> number ), NULL ); ++ key = g_strconcat ("0:", transfert_nb_str, NULL ); + else +- key = g_strconcat ( utils_str_itoa ( transfert -> account_number ), ":", +- utils_str_itoa ( transfert -> number ), NULL ); ++ { ++ account_nb_str = utils_str_itoa ( transfert -> account_number ); ++ key = g_strconcat ( account_nb_str, ":", transfert_nb_str, NULL ); ++ g_free ( account_nb_str ); ++ } ++ g_free ( transfert_nb_str ); + + if ( transfert -> number > transfert_number ) + transfert_number = transfert -> number; +@@ -1740,12 +1829,18 @@ gboolean bet_data_transfert_set_line_from_file ( struct_transfert_data *transfer + gboolean bet_data_transfert_modify_line ( struct_transfert_data *transfert ) + { + gchar *key; ++ gchar *transfert_nb_str, *account_nb_str; // only to avoid memory leaks + ++ transfert_nb_str = utils_str_itoa ( transfert -> number ); + if ( transfert -> account_number == 0 ) +- key = g_strconcat ("0:", utils_str_itoa ( transfert -> number ), NULL ); ++ key = g_strconcat ("0:", transfert_nb_str, NULL ); + else +- key = g_strconcat ( utils_str_itoa ( transfert -> account_number ), ":", +- utils_str_itoa ( transfert -> number ), NULL ); ++ { ++ account_nb_str = utils_str_itoa ( transfert -> account_number ); ++ key = g_strconcat ( account_nb_str, ":", transfert_nb_str, NULL ); ++ g_free ( account_nb_str ); ++ } ++ g_free ( transfert_nb_str ); + + g_hash_table_replace ( bet_transfert_list, key, transfert ); + +diff --git a/src/gsb_assistant_account.c b/src/gsb_assistant_account.c +index 84f1caf..83eb348 100644 +--- a/src/gsb_assistant_account.c ++++ b/src/gsb_assistant_account.c +@@ -498,6 +498,7 @@ void gsb_assistant_account_change_account_icon ( GtkWidget *button, gpointer dat + { + devel_debug ( error -> message ); + dialogue_error ( error -> message ); ++ g_error_free ( error ); + } + else + { +diff --git a/src/gsb_file_config.c b/src/gsb_file_config.c +index 851552c..6dcfb94 100644 +--- a/src/gsb_file_config.c ++++ b/src/gsb_file_config.c +@@ -1540,7 +1540,10 @@ gchar *gsb_config_get_old_conf_name ( void ) + } + } + else ++ { + dialogue_error ( error -> message ); ++ g_error_free ( error ); ++ } + + if ( g_slist_length ( liste ) == 0 ) + return NULL; +diff --git a/src/gsb_file_load.c b/src/gsb_file_load.c +index f5be275..4c78fb8 100644 +--- a/src/gsb_file_load.c ++++ b/src/gsb_file_load.c +@@ -9027,7 +9027,10 @@ void gsb_file_load_copy_old_file ( gchar *filename, gchar *file_content) + file_copy = g_file_new_for_path ( copy_old_filename ); + if ( !g_file_copy ( file_ori, file_copy, G_FILE_COPY_OVERWRITE, + NULL, NULL, NULL, &error ) ) ++ { + dialogue_error (error -> message ); ++ g_error_free ( error ); ++ } + } + } + /* Local Variables: */ +diff --git a/src/gsb_select_icon.c b/src/gsb_select_icon.c +index bbbf6d9..7a75142 100644 +--- a/src/gsb_select_icon.c ++++ b/src/gsb_select_icon.c +@@ -369,7 +369,10 @@ GtkTreePath * gsb_select_icon_fill_icon_view ( gchar * name_icon ) + g_dir_close ( dir ); + } + else ++ { + dialogue_error ( error -> message ); ++ g_error_free ( error ); ++ } + + if ( tree_path == NULL ) + tree_path = gtk_tree_path_new_from_string ( "0" ); +@@ -657,7 +660,10 @@ GdkPixbuf *gsb_select_icon_get_default_logo_pixbuf ( void ) + (GRISBI_PIXMAPS_DIR, "grisbi-logo.png", NULL), &error ); + + if ( ! pixbuf ) ++ { + devel_debug ( error -> message ); ++ g_error_free ( error ); ++ } + + if ( gdk_pixbuf_get_width (pixbuf) > LOGO_WIDTH || + gdk_pixbuf_get_height (pixbuf) > LOGO_HEIGHT ) +@@ -890,6 +896,7 @@ gboolean gsb_select_icon_new_account_icon_from_file ( gint account_number, + filename, NULL ); + devel_debug ( tmp_str ); + dialogue_error ( tmp_str ); ++ g_error_free ( error ); + g_free ( tmp_str ); + g_free ( icon ); + +@@ -909,13 +916,12 @@ GdkPixbuf *gsb_select_icon_change_account_pixbuf ( gint account_number, + { + GSList *list_tmp; + GdkPixbuf *pixbuf; +- GError *error = NULL; + + if ( icon_buffer + && + icon_buffer -> account_number == account_number ) + { +- pixbuf = gdk_pixbuf_new_from_file_at_size ( filename , 32, 32, &error ); ++ pixbuf = gdk_pixbuf_new_from_file_at_size ( filename , 32, 32, NULL ); + if ( pixbuf ) + { + g_object_unref ( icon_buffer -> pixbuf ); +@@ -937,7 +943,7 @@ GdkPixbuf *gsb_select_icon_change_account_pixbuf ( gint account_number, + + if ( icon -> account_number == account_number ) + { +- pixbuf = gdk_pixbuf_new_from_file_at_size ( filename , 32, 32, &error ); ++ pixbuf = gdk_pixbuf_new_from_file_at_size ( filename , 32, 32, NULL ); + if ( pixbuf ) + { + g_object_unref ( icon -> pixbuf ); +diff --git a/src/import.c b/src/import.c +index 1d5ceeb..5543aa1 100644 +--- a/src/import.c ++++ b/src/import.c +@@ -534,6 +534,7 @@ gboolean import_switch_type ( GtkCellRendererText *cell, const gchar *path, + if ( ! g_file_get_contents ( nom_fichier, &tmp_str, NULL, &error ) ) + { + g_print ( _("Unable to read file: %s\n"), error -> message); ++ g_error_free ( error ); + return FALSE; + } + +@@ -688,6 +689,7 @@ gboolean import_select_file ( GtkWidget * button, GtkWidget * assistant ) + if ( ! g_file_get_contents ( iterator -> data, &tmp_str, NULL, &error ) ) + { + g_print ( _("Unable to read file: %s\n"), error -> message); ++ g_error_free ( error ); + return FALSE; + } + +@@ -4386,6 +4388,7 @@ gboolean gsb_import_by_rule ( gint rule ) + if ( ! g_file_get_contents ( filename, &pointeur_char, NULL, &error ) ) + { + g_print ( _("Unable to read file: %s\n"), error -> message); ++ g_error_free ( error ); + i++; + continue; + } +@@ -4677,6 +4680,7 @@ gboolean gsb_import_set_tmp_file ( gchar *filename, + { + g_free (contenu_fichier); + g_print ( _("Unable to create tmp file: %s\n"), error -> message); ++ g_error_free ( error ); + return FALSE; + } + +@@ -4710,7 +4714,6 @@ gboolean gsb_import_gunzip_file ( gchar *filename ) + dialogue_error ( tmpstr ); + g_free ( file_content); + g_error_free (error); +- + return FALSE; + } + else +diff --git a/src/import_csv.c b/src/import_csv.c +index 88b1462..4b1707f 100644 +--- a/src/import_csv.c ++++ b/src/import_csv.c +@@ -1081,6 +1081,7 @@ gboolean import_enter_csv_preview_page ( GtkWidget * assistant ) + if ( ! g_file_get_contents ( filename, &tmp_str, &size, &error ) ) + { + g_print ( _("Unable to read file: %s\n"), error -> message); ++ g_error_free ( error ); + return FALSE; + } + +@@ -1091,6 +1092,7 @@ gboolean import_enter_csv_preview_page ( GtkWidget * assistant ) + + if ( contents == NULL ) + { ++ g_error_free ( error ); + error = NULL; + size = 0; + bytes_written = 0; +@@ -1105,6 +1107,7 @@ gboolean import_enter_csv_preview_page ( GtkWidget * assistant ) + if ( bytes_written == 0 ) + { + g_print ( _("Unable to read file: %s\n"), error -> message); ++ g_error_free ( error ); + return FALSE; + } + } +diff --git a/src/utils.c b/src/utils.c +index 16361ef..aeb64ef 100644 +--- a/src/utils.c ++++ b/src/utils.c +@@ -555,6 +555,7 @@ void lance_mailer ( const gchar *uri ) + tmp_str = g_strdup_printf ( _("Grisbi was unable to execute a mailer to write at <tt>%s</tt>.\n" + "The error was: %s."), + uri, error -> message ); ++ g_error_free ( error ); + dialogue_error_hint ( tmp_str, _("Cannot execute mailer") ); + g_free(tmp_str); + } +diff --git a/src/utils_dates.c b/src/utils_dates.c +index 4f45bb2..c84118e 100644 +--- a/src/utils_dates.c ++++ b/src/utils_dates.c +@@ -79,6 +79,7 @@ gchar *gsb_date_today ( void ) + date = gdate_today ( ); + date_string = gsb_format_gdate ( date ); + gsb_date_set_last_date ( date_string ); ++ g_free ( date_string ); + g_date_free ( date ); + } + return (last_date); +@@ -678,8 +679,10 @@ gchar *gsb_date_get_compiled_time ( void ) + + date = g_date_new_dmy ( atoi ( tab[1] ), mois, atoi ( tab[2] ) ); + g_strfreev (tab); ++ str = gsb_format_gdate ( date ); ++ g_date_free ( date ); + +- return gsb_format_gdate ( date ); ++ return str; + } + + +diff --git a/src/utils_editables.c b/src/utils_editables.c +index ecfd082..6b15472 100644 +--- a/src/utils_editables.c ++++ b/src/utils_editables.c +@@ -155,7 +155,10 @@ gsb_real gsb_utils_edit_calculate_entry ( GtkWidget *entry ) + if ( string && strlen ( string ) ) + pointeur = string + strlen ( string ); + else ++ { ++ g_free ( string ); + return total; ++ } + + if ( g_utf8_strchr ( string, -1, '-' ) || g_utf8_strchr ( string, -1, '+' ) ) + { +diff --git a/src/utils_files.c b/src/utils_files.c +index d86629a..032db50 100644 +--- a/src/utils_files.c ++++ b/src/utils_files.c +@@ -534,7 +534,6 @@ GSList *utils_files_check_UTF8_validity ( const gchar *contents, + gint long_str = 0; + gsize size = 0; + gsize bytes_written = 0; +- GError * error = NULL; + gint i = 0; + gchar *ptr; + +@@ -565,7 +564,7 @@ GSList *utils_files_check_UTF8_validity ( const gchar *contents, + do + { + tmp_str = g_convert ( string, long_str, "UTF-8", charset_array[i], +- &size, &bytes_written, &error ); ++ &size, &bytes_written, NULL ); + if ( tmp_str ) + { + result = g_malloc0 ( sizeof ( struct struc_check_encoding ) ); +diff --git a/src/utils_str.c b/src/utils_str.c +index 8c1e881..729a8a8 100644 +--- a/src/utils_str.c ++++ b/src/utils_str.c +@@ -892,12 +892,16 @@ gchar *utils_str_dtostr ( gdouble number, gint nbre_decimal, gboolean canonical + { + gchar buffer[G_ASCII_DTOSTR_BUF_SIZE]; + gchar *str_number; ++ gchar *decimal; + gchar *format; + gint nbre_char; + +- format = g_strconcat ( "%.", utils_str_itoa ( nbre_decimal ), "f", NULL ); +- ++ decimal = utils_str_itoa ( nbre_decimal ); ++ format = g_strconcat ( "%.", decimal, "f", NULL ); + nbre_char = g_sprintf ( buffer, format, number ); ++ g_free ( decimal ); ++ g_free ( format ); ++ + if ( nbre_char > G_ASCII_DTOSTR_BUF_SIZE ) + return NULL; + +@@ -1004,7 +1008,10 @@ gchar *utils_str_incremente_number_from_str ( const gchar *str_number, gint incr + new_str_number = utils_str_itoa ( number ); + + if ( prefix && strlen ( prefix ) > 0 ) ++ { + new_str_number = g_strconcat ( prefix, new_str_number, NULL ); ++ g_free ( prefix ); ++ } + + return new_str_number; + } +-- +1.7.4 + diff --git a/app-office/grisbi/files/0.8.2-0005-fixes-bug-of-compilation.patch b/app-office/grisbi/files/0.8.2-0005-fixes-bug-of-compilation.patch new file mode 100644 index 000000000000..c209d0d0b0bc --- /dev/null +++ b/app-office/grisbi/files/0.8.2-0005-fixes-bug-of-compilation.patch @@ -0,0 +1,397 @@ +From 6697ec365f3829f945b82888e59851657ca198ca Mon Sep 17 00:00:00 2001 +From: pbiava <pierre.biava@nerim.net> +Date: Fri, 25 Feb 2011 22:57:45 +0100 +Subject: [PATCH 5/5] fixes bug of compilation + +--- + src/bet_data.c | 221 ++++++++++++-------------------------------------------- + 1 files changed, 46 insertions(+), 175 deletions(-) + +diff --git a/src/bet_data.c b/src/bet_data.c +index fbc25d7..d0067f3 100644 +--- a/src/bet_data.c ++++ b/src/bet_data.c +@@ -55,6 +55,7 @@ static GDate *bet_data_futur_get_next_date ( struct_futur_data *scheduled, + const GDate *date_max ); + static struct_futur_data *bet_data_future_copy_struct ( struct_futur_data *scheduled ); + static void bet_data_future_set_max_number ( gint number ); ++static gchar *bet_data_get_key ( gint account_number, gint div_number ); + static gboolean bet_data_update_div ( SH *sh, + gint transaction_number, + gint sub_div, +@@ -264,19 +265,9 @@ gboolean bet_data_hist_add_div ( gint account_number, + { + gchar *key; + gchar *sub_key; +- gchar *div_number_str, *account_number_str; // only to avoid memory leaks + struct_hist_div *shd; + +- div_number_str = utils_str_itoa ( div_number ); +- if ( account_number == 0 ) +- key = g_strconcat ("0:", div_number_str, NULL ); +- else +- { +- account_number_str = utils_str_itoa ( account_number ); +- key = g_strconcat ( account_number_str, ":", div_number_str, NULL ); +- g_free ( account_number_str ); +- } +- g_free ( div_number_str ); ++ key = bet_data_get_key ( account_number, div_number ); + + if ( ( shd = g_hash_table_lookup ( bet_hist_div_list, key ) ) ) + { +@@ -348,19 +339,9 @@ void bet_data_insert_div_hist ( struct_hist_div *shd, struct_hist_div *sub_shd ) + { + gchar *key; + gchar *sub_key; +- gchar *div_number_str, *account_nb_str; // only to avoid memory leaks + struct_hist_div *tmp_shd; + +- div_number_str = utils_str_itoa ( shd -> div_number ); +- if ( shd -> account_nb == 0 ) +- key = g_strconcat ("0:", div_number_str, NULL ); +- else +- { +- account_nb_str = utils_str_itoa ( shd -> account_nb ); +- key = g_strconcat ( account_nb_str, ":", div_number_str, NULL ); +- g_free ( account_nb_str ); +- } +- g_free ( div_number_str ); ++ key = bet_data_get_key ( shd -> account_nb, shd -> div_number ); + + if ( ( tmp_shd = g_hash_table_lookup ( bet_hist_div_list, key ) ) ) + { +@@ -395,19 +376,9 @@ gboolean bet_data_remove_div_hist ( gint account_number, gint div_number, gint s + { + gchar *key; + char *sub_key; +- gchar *div_number_str, *account_number_str; // only to avoid memory leaks + struct_hist_div *shd; + +- div_number_str = utils_str_itoa ( div_number ); +- if ( account_number == 0 ) +- key = g_strconcat ("0:", div_number_str, NULL ); +- else +- { +- account_number_str = utils_str_itoa ( account_number ); +- key = g_strconcat ( account_number_str, ":", div_number_str, NULL ); +- g_free ( account_number_str ); +- } +- g_free ( div_number_str ); ++ key = bet_data_get_key ( account_number, div_number ); + + if ( ( shd = g_hash_table_lookup ( bet_hist_div_list, key ) ) ) + { +@@ -436,20 +407,10 @@ gboolean bet_data_search_div_hist ( gint account_number, gint div_number, gint s + { + gchar *key; + gchar *sub_key; +- gchar *div_number_str, *account_number_str; // only to avoid memory leaks + gint origin; + struct_hist_div *shd; + +- div_number_str = utils_str_itoa ( div_number ); +- if ( account_number == 0 ) +- key = g_strconcat ("0:", div_number_str, NULL ); +- else +- { +- account_number_str = utils_str_itoa ( account_number ); +- key = g_strconcat ( account_number_str, ":", div_number_str, NULL ); +- g_free ( account_number_str ); +- } +- g_free ( div_number_str ); ++ key = bet_data_get_key ( account_number, div_number ); + + origin = gsb_data_account_get_bet_hist_data ( account_number ); + +@@ -563,21 +524,11 @@ gchar *bet_data_get_div_name ( gint div_num, + gboolean bet_data_get_div_edited ( gint account_number, gint div_number, gint sub_div_nb ) + { + gchar *key; +- gchar *div_number_str, *account_number_str; // only to avoid memory leaks + gint origin; + struct_hist_div *shd; + gboolean edited; + +- div_number_str = utils_str_itoa ( div_number ); +- if ( account_number == 0 ) +- key = g_strconcat ("0:", div_number_str, NULL ); +- else +- { +- account_number_str = utils_str_itoa ( account_number ); +- key = g_strconcat ( account_number_str, ":", div_number_str, NULL ); +- g_free ( account_number_str ); +- } +- g_free ( div_number_str ); ++ key = bet_data_get_key ( account_number, div_number ); + + origin = gsb_data_account_get_bet_hist_data ( account_number ); + +@@ -619,19 +570,9 @@ gboolean bet_data_set_div_edited ( gint account_nb, + gboolean edited ) + { + gchar *key; +- gchar *div_number_str, *account_nb_str; // only to avoid memory leaks + struct_hist_div *shd; + +- div_number_str = utils_str_itoa ( div_number ); +- if ( account_nb == 0 ) +- key = g_strconcat ("0:", div_number_str, NULL ); +- else +- { +- account_nb_str = utils_str_itoa ( account_nb ); +- key = g_strconcat ( account_nb_str, ":", div_number_str, NULL ); +- g_free ( account_nb_str ); +- } +- g_free ( div_number_str ); ++ key = bet_data_get_key ( account_nb, div_number ); + + if ( ( shd = g_hash_table_lookup ( bet_hist_div_list, key ) ) ) + { +@@ -664,20 +605,10 @@ gboolean bet_data_set_div_edited ( gint account_nb, + gsb_real bet_data_hist_get_div_amount ( gint account_nb, gint div_number, gint sub_div_nb ) + { + gchar *key; +- gchar *div_number_str, *account_nb_str; // only to avoid memory leaks + struct_hist_div *shd; + gsb_real amount; + +- div_number_str = utils_str_itoa ( div_number ); +- if ( account_nb == 0 ) +- key = g_strconcat ("0:", div_number_str, NULL ); +- else +- { +- account_nb_str = utils_str_itoa ( account_nb ); +- key = g_strconcat ( account_nb_str, ":", div_number_str, NULL ); +- g_free ( account_nb_str ); +- } +- g_free ( div_number_str ); ++ key = bet_data_get_key ( account_nb, div_number ); + + if ( ( shd = g_hash_table_lookup ( bet_hist_div_list, key ) ) ) + { +@@ -716,19 +647,9 @@ gboolean bet_data_set_div_amount ( gint account_nb, + gsb_real amount ) + { + gchar *key; +- gchar *div_number_str, *account_nb_str; // only to avoid memory leaks + struct_hist_div *shd; + +- div_number_str = utils_str_itoa ( div_number ); +- if ( account_nb == 0 ) +- key = g_strconcat ("0:", div_number_str, NULL ); +- else +- { +- account_nb_str = utils_str_itoa ( account_nb ); +- key = g_strconcat ( account_nb_str, ":", div_number_str, NULL ); +- g_free ( account_nb_str ); +- } +- g_free ( div_number_str ); ++ key = bet_data_get_key ( account_nb, div_number ); + + if ( ( shd = g_hash_table_lookup ( bet_hist_div_list, key ) ) ) + { +@@ -1215,22 +1136,12 @@ void struct_free_bet_future ( struct_futur_data *scheduled ) + gboolean bet_data_future_add_lines ( struct_futur_data *scheduled ) + { + gchar *key; +- gchar *future_number_str, *account_nb_str; // only to avoid memory leaks + + future_number ++; + + if ( scheduled -> frequency == 0 ) + { +- future_number_str = utils_str_itoa ( future_number ); +- if ( scheduled -> account_number == 0 ) +- key = g_strconcat ("0:", future_number_str, NULL ); +- else +- { +- account_nb_str = utils_str_itoa ( scheduled -> account_number ); +- key = g_strconcat ( account_nb_str, ":", future_number_str, NULL ); +- g_free ( account_nb_str ); +- } +- g_free ( future_number_str ); ++ key = bet_data_get_key ( scheduled -> account_number, future_number ); + + scheduled -> number = future_number; + g_hash_table_insert ( bet_future_list, key, scheduled ); +@@ -1250,16 +1161,7 @@ gboolean bet_data_future_add_lines ( struct_futur_data *scheduled ) + date = gsb_date_copy ( scheduled -> date ); + while ( date != NULL && g_date_valid ( date ) ) + { +- future_number_str = utils_str_itoa ( future_number ); +- if ( scheduled -> account_number == 0 ) +- key = g_strconcat ("0:", utils_str_itoa ( future_number ), NULL ); +- else +- { +- account_nb_str = utils_str_itoa ( scheduled -> account_number ); +- key = g_strconcat ( account_nb_str, ":", future_number_str, NULL ); +- g_free ( account_nb_str ); +- } +- g_free ( future_number_str ); ++ key = bet_data_get_key ( scheduled -> account_number, future_number ); + + if ( mother_row == future_number ) + new_sch = scheduled; +@@ -1295,18 +1197,8 @@ gboolean bet_data_future_add_lines ( struct_futur_data *scheduled ) + gboolean bet_data_future_set_lines_from_file ( struct_futur_data *scheduled ) + { + gchar *key; +- gchar *number_str, *account_nb_str; // only to avoid memory leaks + +- number_str = utils_str_itoa ( scheduled -> number ); +- if ( scheduled -> account_number == 0 ) +- key = g_strconcat ("0:", number_str, NULL ); +- else +- { +- account_nb_str = utils_str_itoa ( scheduled -> account_number ); +- key = g_strconcat ( account_nb_str, ":", number_str, NULL ); +- g_free ( account_nb_str ); +- } +- g_free ( number_str ); ++ key = bet_data_get_key ( scheduled -> account_number, scheduled -> number ); + + bet_data_future_set_max_number ( scheduled -> number ); + +@@ -1622,18 +1514,8 @@ GDate *bet_data_array_get_date_max ( gint account_number ) + gboolean bet_data_future_modify_lines ( struct_futur_data *scheduled ) + { + gchar *key; +- gchar *number_str, *account_nb_str; // only to avoid memory leaks + +- number_str = utils_str_itoa ( scheduled -> number ); +- if ( scheduled -> account_number == 0 ) +- key = g_strconcat ("0:", number_str, NULL ); +- else +- { +- account_nb_str = utils_str_itoa ( scheduled -> account_number ); +- key = g_strconcat ( account_nb_str, ":", number_str, NULL ); +- g_free ( account_nb_str ); +- } +- g_free ( number_str ); ++ key = bet_data_get_key ( scheduled -> account_number, scheduled -> number ); + + g_hash_table_replace ( bet_future_list, key, scheduled ); + +@@ -1653,19 +1535,9 @@ gboolean bet_data_future_modify_lines ( struct_futur_data *scheduled ) + struct_futur_data *bet_data_future_get_struct ( gint account_number, gint number ) + { + gchar *key; +- gchar *number_str, *account_nb_str; // only to avoid memory leaks + struct_futur_data *scheduled; + +- number_str = utils_str_itoa ( number ); +- if ( scheduled -> account_number == 0 ) +- key = g_strconcat ("0:", number_str, NULL ); +- else +- { +- account_nb_str = utils_str_itoa ( account_number ); +- key = g_strconcat ( account_nb_str, ":", number_str, NULL ); +- g_free ( account_nb_str ); +- } +- g_free ( number_str ); ++ key = bet_data_get_key ( account_number, number ); + + if ( ( scheduled = g_hash_table_lookup ( bet_future_list, key ) ) ) + return scheduled; +@@ -1728,20 +1600,10 @@ GHashTable *bet_data_transfert_get_list ( void ) + gboolean bet_data_transfert_add_line ( struct_transfert_data *transfert ) + { + gchar *key; +- gchar *transfert_nb_str, *account_nb_str; // only to avoid memory leaks + + transfert_number ++; + +- transfert_nb_str = utils_str_itoa ( transfert_number ); +- if ( transfert -> account_number == 0 ) +- key = g_strconcat ("0:", transfert_nb_str, NULL ); +- else +- { +- account_nb_str = utils_str_itoa ( transfert -> account_number ); +- key = g_strconcat ( account_nb_str, ":", transfert_nb_str, NULL ); +- g_free ( account_nb_str ); +- } +- g_free ( transfert_nb_str ); ++ key = bet_data_get_key ( transfert -> account_number, transfert_number ); + + transfert -> number = transfert_number; + g_hash_table_insert ( bet_transfert_list, key, transfert ); +@@ -1798,18 +1660,8 @@ gboolean bet_data_transfert_remove_line ( gint account_number, gint number ) + gboolean bet_data_transfert_set_line_from_file ( struct_transfert_data *transfert ) + { + gchar *key; +- gchar *transfert_nb_str, *account_nb_str; // only to avoid memory leaks + +- transfert_nb_str = utils_str_itoa ( transfert -> number ); +- if ( transfert -> account_number == 0 ) +- key = g_strconcat ("0:", transfert_nb_str, NULL ); +- else +- { +- account_nb_str = utils_str_itoa ( transfert -> account_number ); +- key = g_strconcat ( account_nb_str, ":", transfert_nb_str, NULL ); +- g_free ( account_nb_str ); +- } +- g_free ( transfert_nb_str ); ++ key = bet_data_get_key ( transfert -> account_number, transfert -> number ); + + if ( transfert -> number > transfert_number ) + transfert_number = transfert -> number; +@@ -1829,18 +1681,8 @@ gboolean bet_data_transfert_set_line_from_file ( struct_transfert_data *transfer + gboolean bet_data_transfert_modify_line ( struct_transfert_data *transfert ) + { + gchar *key; +- gchar *transfert_nb_str, *account_nb_str; // only to avoid memory leaks + +- transfert_nb_str = utils_str_itoa ( transfert -> number ); +- if ( transfert -> account_number == 0 ) +- key = g_strconcat ("0:", transfert_nb_str, NULL ); +- else +- { +- account_nb_str = utils_str_itoa ( transfert -> account_number ); +- key = g_strconcat ( account_nb_str, ":", transfert_nb_str, NULL ); +- g_free ( account_nb_str ); +- } +- g_free ( transfert_nb_str ); ++ key = bet_data_get_key ( transfert -> account_number, transfert -> number ); + + g_hash_table_replace ( bet_transfert_list, key, transfert ); + +@@ -1962,6 +1804,35 @@ gboolean bet_data_remove_all_bet_data ( gint account_number ) + } + + ++/** ++ * retourne la clef de recherche de la division passée en paramètre. ++ * ++ * ++ * ++ * */ ++gchar *bet_data_get_key ( gint account_number, gint div_number ) ++{ ++ gchar *key; ++ gchar *div_number_str, *account_number_str; /* only to avoid memory leaks */ ++ ++ div_number_str = utils_str_itoa ( div_number ); ++ ++ if ( account_number == 0 ) ++ key = g_strconcat ("0:", div_number_str, NULL ); ++ else ++ { ++ account_number_str = utils_str_itoa ( account_number ); ++ key = g_strconcat ( account_number_str, ":", div_number_str, NULL ); ++ ++ g_free ( account_number_str ); ++ } ++ ++ g_free ( div_number_str ); ++ ++ return key; ++} ++ ++ + /* Local Variables: */ + /* c-basic-offset: 4 */ + /* End: */ +-- +1.7.4 + diff --git a/app-office/grisbi/grisbi-0.8.2.ebuild b/app-office/grisbi/grisbi-0.8.2.ebuild new file mode 100644 index 000000000000..b7ce169a890f --- /dev/null +++ b/app-office/grisbi/grisbi-0.8.2.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-office/grisbi/grisbi-0.8.2.ebuild,v 1.1 2011/02/26 14:47:10 remi Exp $ + +EAPI="3" + +inherit eutils gnome2 + +IUSE="nls ofx ssl" + +DESCRIPTION="Grisbi is a personal accounting application for Linux" +HOMEPAGE="http://www.grisbi.org" +SRC_URI="mirror://sourceforge/grisbi/grisbi%20stable/0.8.x/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~sparc ~x86" + +RDEPEND="dev-libs/libxml2 + >=dev-libs/glib-2.18.0 + >=x11-libs/gtk+-2.12.0 + ssl? ( >=dev-libs/openssl-0.9.5 ) + ofx? ( >=dev-libs/libofx-0.7.0 )" + +DEPEND="${RDEPEND} + >=dev-util/pkgconfig-0.20" + +pkg_setup() { + G2CONF=" + --with-plugins + --with-libxml2 + $(use_with ssl openssl) + $(use_with ofx) + $(use_enable nls)" + DOCS="AUTHORS NEWS README" +} + +src_prepare() { + gnome2_src_prepare + + epatch \ + "${FILESDIR}/0.8.2-0001-fixes-bug-1289.patch" \ + "${FILESDIR}/0.8.2-0002-fixes-a-crash-when-importing-a-file-without-extensio.patch" \ + "${FILESDIR}/0.8.2-0003-fixes-bug-1293-Problem-of-updating-of-the-pointing-b.patch" \ + "${FILESDIR}/0.8.2-0004-fix-memory-leaks-thanks-Philippe-D.patch" \ + "${FILESDIR}/0.8.2-0005-fixes-bug-of-compilation.patch" +} + +pkg_postinst() { + gnome2_pkg_postinst + elog "The first thing you should do is set up the browser command in" + elog "preferences after you start up grisbi. Otherwise you will not" + elog "be able to see the help and manuals." +} |