[grisbi-cvs] grisbi/src affichage.c, 1.173, 1.173.2.1 affichage_liste.c, 1.122, 1.122.2.1 balance_estimate_config.c, 1.15, 1.15.2.1 balance_estimate_config.h, 1.5, 1.5.2.1 balance_estimate_data.c, 1.22, 1.22.2.1 balance_estimate_data.h, 1.15, 1.15.2.1 balance_estimate_future.c, 1.9, 1.9.2.1 balance_estimate_future.h, 1.5, 1.5.2.1 balance_estimate_hist.c, 1.23, 1.23.2.1 balance_estimate_hist.h, 1.10, 1.10.2.1 balance_estimate_tab.c, 1.66, 1.66.2.1 balance_estimate_tab.h, 1.15, 1.15.2.1 barre_outils.c, 1.133, 1.133.2.1 custom_list.c, 1.7, 1.7.2.1 erreur.c, 1.100, 1.100.2.1 etats_config.c, 1.177, 1.177.2.1 export_csv.c, 1.28, 1.28.2.1 fenetre_principale.c, 1.135, 1.135.2.1 fenetre_principale.h, 1.33, 1.33.2.1 file_obfuscate_qif.c, 1.5, 1.5.4.1 go-charmap-sel.c, 1.12, 1.12.4.1 go-optionmenu.c, 1.11, 1.11.4.1 gsb_account.c, 1.49, 1.49.2.1 gsb_account_property.c, 1.53, 1.53.2.1 gsb_archive_config.c, 1.29, 1.29.2.1 gsb_assistant_account.c, 1.27, 1.27.4.1 gsb_assistant_archive.c, 1.44, 1.44.2.1 gsb_assistant_archive_export.c, 1.20, 1.20.2.1 g sb_assistant_file.c, 1.19, 1.19.2.1 gsb_assistant_first.c, 1.29, 1.29.2.1 gsb_assistant_reconcile_config.c, 1.29, 1.29.2.1 gsb_autofunc.c, 1.27, 1.27.2.1 gsb_automem.c, 1.28, 1.28.2.1 gsb_bank.c, 1.26, 1.26.2.1 gsb_data_account.c, 1.103, 1.103.2.1 gsb_data_account.h, 1.44, 1.44.2.1 gsb_data_archive.c, 1.16, 1.16.2.1 gsb_data_archive_store.c, 1.18, 1.18.2.1 gsb_data_bank.c, 1.14, 1.14.4.1 gsb_data_budget.c, 1.56, 1.56.2.1 gsb_data_currency.c, 1.19, 1.19.4.1 gsb_data_currency_link.c, 1.17, 1.17.4.1 gsb_data_fyear.c, 1.22, 1.22.2.1 gsb_data_import_rule.c, 1.5, 1.5.2.1 gsb_data_partial_balance.c, 1.12, 1.12.2.1 gsb_data_partial_balance.h, 1.3, 1.3.4.1 gsb_data_payee.c, 1.53, 1.53.2.1 gsb_data_payment.c, 1.21, 1.21.2.1 gsb_data_reconcile.c, 1.22, 1.22.2.1 gsb_data_report.c, 1.34, 1.34.4.1 gsb_data_report_amout_comparison.c, 1.14, 1.14.4.1 gsb_data_report_text_comparison.c, 1.17, 1.17.4.1 gsb_data_scheduled.c, 1.34, 1.34.2.1 gsb_data_transaction.c, 1.88, 1.88.2.1 gsb_file.c, 1.64, 1.64.2.1 gsb_file_config.c, 1.96, 1.96.2.1 gsb_file_loa d.c, 1.221, 1.221.2.1 gsb_file_save.c, 1.165, 1.165.2.1 gsb_form.c, 1.161, 1.161.2.1 gsb_payment_method.c, 1.23, 1.23.2.1 gsb_real.c, 1.78, 1.78.2.1 gsb_reconcile.h, 1.2, 1.2.4.1 gsb_transactions_list.c, 1.210, 1.210.2.1 gsb_transactions_list_sort.c, 1.23, 1.23.2.1 gtk_combofix.c, 1.75, 1.75.2.1 import.c, 1.332, 1.332.2.1 main.c, 1.173, 1.173.2.1 menu.c, 1.151, 1.151.2.1 navigation.c, 1.143, 1.143.2.1 parametres.c, 1.214, 1.214.2.1 parse_cmdline.c, 1.17, 1.17.2.1 print_report.c, 1.11, 1.11.2.1 print_transactions_list.c, 1.14, 1.14.2.1 qif.c, 1.145, 1.145.2.1 structures.h, 1.246, 1.246.2.1 tiers_onglet.c, 1.172, 1.172.2.1 traitement_variables.c, 1.193, 1.193.2.1 transaction_list.c, 1.61, 1.61.2.1 transaction_list_select.c, 1.10, 1.10.2.1 transaction_list_sort.h, 1.1, 1.1.4.1 transaction_model.c, 1.7, 1.7.2.1 transaction_model.h, 1.2, 1.2.4.1 utils.c, 1.64, 1.64.2.1 utils.h, 1.29, 1.29.2.1 utils_dates.c, 1.68, 1.68.2.1 utils_files.c, 1.54, 1.54.2.1 utils_font.c, 1.4, 1.4.4.1
Pierre Biava
pbiava at users.sourceforge.net
Sat May 22 00:39:58 CEST 2010
Update of /cvsroot/grisbi/grisbi/src
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv27152/src
Modified Files:
Tag: version_0_6_0_corr
affichage.c affichage_liste.c balance_estimate_config.c
balance_estimate_config.h balance_estimate_data.c
balance_estimate_data.h balance_estimate_future.c
balance_estimate_future.h balance_estimate_hist.c
balance_estimate_hist.h balance_estimate_tab.c
balance_estimate_tab.h barre_outils.c custom_list.c erreur.c
etats_config.c export_csv.c fenetre_principale.c
fenetre_principale.h file_obfuscate_qif.c go-charmap-sel.c
go-optionmenu.c gsb_account.c gsb_account_property.c
gsb_archive_config.c gsb_assistant_account.c
gsb_assistant_archive.c gsb_assistant_archive_export.c
gsb_assistant_file.c gsb_assistant_first.c
gsb_assistant_reconcile_config.c gsb_autofunc.c gsb_automem.c
gsb_bank.c gsb_data_account.c gsb_data_account.h
gsb_data_archive.c gsb_data_archive_store.c gsb_data_bank.c
gsb_data_budget.c gsb_data_currency.c gsb_data_currency_link.c
gsb_data_fyear.c gsb_data_import_rule.c
gsb_data_partial_balance.c gsb_data_partial_balance.h
gsb_data_payee.c gsb_data_payment.c gsb_data_reconcile.c
gsb_data_report.c gsb_data_report_amout_comparison.c
gsb_data_report_text_comparison.c gsb_data_scheduled.c
gsb_data_transaction.c gsb_file.c gsb_file_config.c
gsb_file_load.c gsb_file_save.c gsb_form.c
gsb_payment_method.c gsb_real.c gsb_reconcile.h
gsb_transactions_list.c gsb_transactions_list_sort.c
gtk_combofix.c import.c main.c menu.c navigation.c
parametres.c parse_cmdline.c print_report.c
print_transactions_list.c qif.c structures.h tiers_onglet.c
traitement_variables.c transaction_list.c
transaction_list_select.c transaction_list_sort.h
transaction_model.c transaction_model.h utils.c utils.h
utils_dates.c utils_files.c utils_font.c
Log Message:
Initialize the branch 0.6.x-grisbi-corr
Index: gsb_assistant_archive_export.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_assistant_archive_export.c,v
retrieving revision 1.20
retrieving revision 1.20.2.1
diff -u -d -r1.20 -r1.20.2.1
--- gsb_assistant_archive_export.c 8 Mar 2010 21:30:00 -0000 1.20
+++ gsb_assistant_archive_export.c 21 May 2010 22:39:55 -0000 1.20.2.1
@@ -74,14 +74,14 @@
static GtkWidget *archive_export_label_success = NULL;
/*START_STATIC*/
-static gint gsb_assistant_archive_export_get_selected_archive ( GtkTreeModel *model );
-static GtkWidget *gsb_assistant_archive_export_page_choose ( GtkWidget *assistant );
-static GtkWidget *gsb_assistant_archive_export_page_name ( GtkWidget *assistant );
-static GtkWidget *gsb_assistant_archive_export_page_succes ( GtkWidget *assistant );
-static gboolean gsb_assistant_archive_export_toggled ( GtkCellRendererToggle *renderer,
+static gint gsb_assistant_archive_export_get_selected_archive ( GtkTreeModel *model );
+static GtkWidget *gsb_assistant_archive_export_page_choose ( GtkWidget *assistant );
+static GtkWidget *gsb_assistant_archive_export_page_name ( GtkWidget *assistant );
+static GtkWidget *gsb_assistant_archive_export_page_succes ( GtkWidget *assistant );
+static gboolean gsb_assistant_archive_export_toggled ( GtkCellRendererToggle *renderer,
gchar *path_string,
GtkWidget *assistant );
-static gboolean gsb_assistant_archive_switch ( GtkWidget *assistant,
+static gboolean gsb_assistant_archive_switch ( GtkWidget *assistant,
gint new_page );
/*END_STATIC*/
Index: go-optionmenu.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/go-optionmenu.c,v
retrieving revision 1.11
retrieving revision 1.11.4.1
diff -u -d -r1.11 -r1.11.4.1
--- go-optionmenu.c 27 Apr 2009 19:41:03 -0000 1.11
+++ go-optionmenu.c 21 May 2010 22:39:55 -0000 1.11.4.1
@@ -38,61 +38,61 @@
/*END_INCLUDE*/
/*START_STATIC*/
-static void connect_menu_signals (GtkMenu *menu, gpointer data);;
-static void connect_menu_signals_to_submenu (GtkMenuItem *item, gpointer data);
-static gint go_option_menu_button_press (GtkWidget *widget,
+static void connect_menu_signals (GtkMenu *menu, gpointer data);;
+static void connect_menu_signals_to_submenu (GtkMenuItem *item, gpointer data);
+static gint go_option_menu_button_press (GtkWidget *widget,
GdkEventButton *event);
-static void go_option_menu_calc_size (GOOptionMenu *option_menu);
-static void go_option_menu_changed (GOOptionMenu *option_menu);
-static GType go_option_menu_child_type (GtkContainer *container);
-static void go_option_menu_class_init (GOOptionMenuClass *class);
-static void go_option_menu_destroy (GtkObject *object);
-static void go_option_menu_detacher (GtkWidget *widget,
+static void go_option_menu_calc_size (GOOptionMenu *option_menu);
+static void go_option_menu_changed (GOOptionMenu *option_menu);
+static GType go_option_menu_child_type (GtkContainer *container);
+static void go_option_menu_class_init (GOOptionMenuClass *class);
+static void go_option_menu_destroy (GtkObject *object);
+static void go_option_menu_detacher (GtkWidget *widget,
GtkMenu *menu) ;
-static gint go_option_menu_expose (GtkWidget *widget,
+static gint go_option_menu_expose (GtkWidget *widget,
GdkEventExpose *event);
-static void go_option_menu_get_property (GObject *object,
+static void go_option_menu_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec);
-static void go_option_menu_get_props (GOOptionMenu *option_menu,
+static void go_option_menu_get_props (GOOptionMenu *option_menu,
GOOptionMenuProps *props);
-static void go_option_menu_hide_all (GtkWidget *widget);
-static void go_option_menu_init (GOOptionMenu *option_menu);
-static void go_option_menu_item_destroy_cb (GtkWidget *widget,
+static void go_option_menu_hide_all (GtkWidget *widget);
+static void go_option_menu_init (GOOptionMenu *option_menu);
+static void go_option_menu_item_destroy_cb (GtkWidget *widget,
GOOptionMenu *option_menu);
-static void go_option_menu_item_state_changed_cb (GtkWidget *widget,
+static void go_option_menu_item_state_changed_cb (GtkWidget *widget,
GtkStateType previous_state,
GOOptionMenu *option_menu);
-static gint go_option_menu_key_press (GtkWidget *widget,
+static gint go_option_menu_key_press (GtkWidget *widget,
GdkEventKey *event);
-static gboolean go_option_menu_mnemonic_activate (GtkWidget *widget,
+static gboolean go_option_menu_mnemonic_activate (GtkWidget *widget,
gboolean group_cycling);
-static void go_option_menu_paint (GtkWidget *widget,
+static void go_option_menu_paint (GtkWidget *widget,
GdkRectangle *area);
-static void go_option_menu_position (GtkMenu *menu,
+static void go_option_menu_position (GtkMenu *menu,
gint *x,
gint *y,
gboolean *push_in,
gpointer user_data);
-static void go_option_menu_remove_contents (GOOptionMenu *option_menu);;
+static void go_option_menu_remove_contents (GOOptionMenu *option_menu);;
static void go_option_menu_remove_menu (GOOptionMenu *option_menu);
-static gint go_option_menu_scroll_event (GtkWidget *widget,
+static gint go_option_menu_scroll_event (GtkWidget *widget,
GdkEventScroll *event);
-static void go_option_menu_select_first_sensitive (GOOptionMenu *option_menu);
-static void go_option_menu_selection_done (GtkMenu *menu,
+static void go_option_menu_select_first_sensitive (GOOptionMenu *option_menu);
+static void go_option_menu_selection_done (GtkMenu *menu,
GOOptionMenu *option_menu);
-static void go_option_menu_set_property (GObject *object,
+static void go_option_menu_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec);
-static void go_option_menu_show_all (GtkWidget *widget);
-static void go_option_menu_size_allocate (GtkWidget *widget,
+static void go_option_menu_show_all (GtkWidget *widget);
+static void go_option_menu_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
-static void go_option_menu_size_request (GtkWidget *widget,
+static void go_option_menu_size_request (GtkWidget *widget,
GtkRequisition *requisition);
-static void go_option_menu_update_contents (GOOptionMenu *option_menu, GtkMenu *menu);;
-static void go_option_menu_update_contents_real (GOOptionMenu *option_menu,
+static void go_option_menu_update_contents (GOOptionMenu *option_menu, GtkMenu *menu);;
+static void go_option_menu_update_contents_real (GOOptionMenu *option_menu,
GtkMenu *menu, GtkMenuItem *menu_item);
/*END_STATIC*/
Index: balance_estimate_future.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/balance_estimate_future.h,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -u -d -r1.5 -r1.5.2.1
--- balance_estimate_future.h 3 Apr 2010 19:57:41 -0000 1.5
+++ balance_estimate_future.h 21 May 2010 22:39:55 -0000 1.5.2.1
@@ -4,15 +4,22 @@
#include <gtk/gtk.h>
/* START_INCLUDE_H */
+#include "././gsb_real.h"
+#include "././balance_estimate_data.h"
/* END_INCLUDE_H */
/* START_DECLARATION */
+void bet_future_initialise_dialog ( void );
gboolean bet_future_modify_line ( gint account_number,
gint number,
gint mother_row );
gboolean bet_future_new_line_dialog ( GtkTreeModel *tab_model,
gchar *str_date );
+gboolean bet_transfert_modify_line ( gint account_number, gint number );
+gboolean bet_transfert_new_line_dialog ( GtkTreeModel *tab_model,
+ gchar *str_date );
+gchar *gsb_transfert_get_str_amount ( struct_transfert_data *transfert, gsb_real amount );
/* END_DECLARATION */
#endif /*_BALANCE_ESTIMATE_FUTURE_H*/
Index: transaction_list.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/transaction_list.c,v
retrieving revision 1.61
retrieving revision 1.61.2.1
diff -u -d -r1.61 -r1.61.2.1
--- transaction_list.c 10 Apr 2010 21:03:15 -0000 1.61
+++ transaction_list.c 21 May 2010 22:39:56 -0000 1.61.2.1
@@ -59,10 +59,10 @@
/*END_INCLUDE*/
/*START_STATIC*/
-static void transaction_list_append_child ( gint transaction_number );
-static CustomRecord *transaction_list_create_record ( gint transaction_number,
+static void transaction_list_append_child ( gint transaction_number );
+static CustomRecord *transaction_list_create_record ( gint transaction_number,
gint line_in_transaction );
-static gboolean transaction_list_update_white_child ( CustomRecord *white_record );
+static gboolean transaction_list_update_white_child ( CustomRecord *white_record );
/*END_STATIC*/
/*START_EXTERN*/
Index: balance_estimate_future.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/balance_estimate_future.c,v
retrieving revision 1.9
retrieving revision 1.9.2.1
diff -u -d -r1.9 -r1.9.2.1
--- balance_estimate_future.c 18 Apr 2010 07:53:06 -0000 1.9
+++ balance_estimate_future.c 21 May 2010 22:39:55 -0000 1.9.2.1
@@ -30,8 +30,8 @@
/*START_INCLUDE*/
#include "balance_estimate_future.h"
-#include "./balance_estimate_tab.h"
#include "./balance_estimate_data.h"
+#include "./balance_estimate_tab.h"
#include "./dialog.h"
#include "./utils_dates.h"
#include "./gsb_calendar_entry.h"
@@ -39,6 +39,8 @@
#include "./gsb_data_account.h"
[...1348 lines suppressed...]
+ "bet_transfert_category_combo" );
+ gtk_widget_set_sensitive ( widget, FALSE );
+ widget = g_object_get_data ( G_OBJECT ( bet_transfert_dialog ),
+ "bet_transfert_budget_combo" );
+ gtk_widget_set_sensitive ( widget, FALSE );
+ }
+
+}
+
+
+/**
+ *
+ *
+ *
+ *
+ * */
+
/* Local Variables: */
/* c-basic-offset: 4 */
/* End: */
Index: gsb_data_account.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_account.c,v
retrieving revision 1.103
retrieving revision 1.103.2.1
diff -u -d -r1.103 -r1.103.2.1
--- gsb_data_account.c 17 Apr 2010 15:37:03 -0000 1.103
+++ gsb_data_account.c 21 May 2010 22:39:55 -0000 1.103.2.1
@@ -117,6 +117,7 @@
gpointer form_organization;
/** @name bet data */
+ gint bet_use_budget; /* 1 = use the budget module */
GDate *bet_start_date; /* date de début */
gint bet_spin_range; /* echelle de la période 0 = mois 1 = années */
gint bet_months; /* nombre de mois ou d'années */
@@ -126,11 +127,12 @@
gint bet_select_futur_label; /* fixe le label pour les données futures */
gint bet_hist_data; /* origine des données 0 = catégories 1 = IB */
gint bet_hist_fyear; /* numéro d'exercice */
+ gint bet_maj; /* MAJ du module estiamte balance */
} struct_account;
/*START_STATIC*/
-static void _gsb_data_account_free ( struct_account* account );
+static void _gsb_data_account_free ( struct_account* account );
static void gsb_data_account_delete_all_accounts (void);
static struct_account *gsb_data_account_get_structure ( gint no );
static gint gsb_data_account_max_number ( void );
@@ -225,8 +227,7 @@
last_number = gsb_data_account_max_number ();
/* we have to append the account first because some functions later will
* look for that account */
- list_accounts = g_slist_append ( list_accounts,
- account );
+ list_accounts = g_slist_append ( list_accounts, account );
/* set the base */
account -> account_number = last_number + 1;
@@ -285,28 +286,33 @@
{
if ( ! account )
return;
- if ( account -> account_id );
+ if ( account -> account_id )
g_free ( account -> account_id );
- if ( account -> account_name );
+ if ( account -> account_name )
g_free ( account -> account_name );
- if ( account -> name_icon );
+ if ( account -> name_icon )
g_free ( account -> name_icon );
- if ( account -> comment );
+ if ( account -> comment )
g_free ( account -> comment );
- if ( account -> holder_name );
+ if ( account -> holder_name )
g_free ( account -> holder_name );
- if ( account -> holder_address );
+ if ( account -> holder_address )
g_free ( account -> holder_address );
- if ( account -> bank_branch_code );
+ if ( account -> bank_branch_code )
g_free ( account -> bank_branch_code );
- if ( account -> bank_account_number );
+ if ( account -> bank_account_number )
g_free ( account -> bank_account_number );
- if ( account -> bank_account_key );
+ if ( account -> bank_account_key )
g_free ( account -> bank_account_key );
- if ( account -> bank_account_iban );
+ if ( account -> bank_account_iban )
g_free ( account -> bank_account_iban );
- /* TODO dOm : free row_align */
- /* TODO dOm : free sort_list */
+ /* Should have already been freed */
+ if ( account -> sort_list )
+ g_slist_free( account -> sort_list ) ;
+ if ( account -> form_organization )
+ g_free ( account -> form_organization );
+ if ( account -> bet_start_date )
+ g_date_free( account -> bet_start_date );
g_free ( account );
if ( account_buffer == account )
account_buffer = NULL;
@@ -1393,7 +1399,7 @@
*
* \param account_number no of the account
*
- * \return last number of reconcile or 0 if the account doesn't exist
+ * \return currency or 0 if the account doesn't exist
* */
gint gsb_data_account_get_currency ( gint account_number )
{
@@ -3057,7 +3063,7 @@
account = gsb_data_account_get_structure ( account_number );
- if (!account )
+ if ( !account )
return FALSE;
account -> bet_auto_inc_month = auto_inc_month;
@@ -3130,6 +3136,11 @@
}
+/**
+ *
+ *
+ *
+ * */
gboolean gsb_data_account_bet_update_initial_date_if_necessary ( gint account_number )
{
GDate *date_jour;
@@ -3140,12 +3151,118 @@
g_date_add_months ( tmp_date, 1 );
if ( g_date_compare ( date_jour, tmp_date ) >= 0 )
- gsb_data_account_set_bet_start_date ( account_number, tmp_date );
+ {
+ if ( g_date_get_month ( date_jour ) == g_date_get_month ( tmp_date ) )
+ gsb_data_account_set_bet_start_date ( account_number, tmp_date );
+ else
+ {
+ g_date_set_day ( date_jour, g_date_get_day ( tmp_date ) );
+ gsb_data_account_set_bet_start_date ( account_number, date_jour );
+ }
+ }
g_date_free ( tmp_date );
+ g_date_free ( date_jour );
return FALSE;
}
+
+
+/**
+ * retourne le bit utilisation du module budget.
+ *
+ * -1 pas de module possible 0 non utilisé 1 utilisé
+ * */
+gint gsb_data_account_get_bet_use_budget ( gint account_number )
+{
+ struct_account *account;
+ kind_account kind;
+
+ account = gsb_data_account_get_structure ( account_number );
+
+ if (!account )
+ return 0;
+
+ kind = account -> account_kind;
+
+ switch ( kind )
+ {
+ case GSB_TYPE_BANK:
+ case GSB_TYPE_CASH:
+ case GSB_TYPE_LIABILITIES:
+ return account -> bet_use_budget;
+ break;
+ case GSB_TYPE_ASSET:
+ return -1;
+ break;
+ default:
+ return -1;
+ break;
+ }
+
+ return -1;
+}
+
+
+/**
+ *
+ *
+ *
+ *
+ * */
+gboolean gsb_data_account_set_bet_use_budget ( gint account_number, gint value )
+{
+ struct_account *account;
+
+ account = gsb_data_account_get_structure ( account_number );
+
+ if ( !account )
+ return FALSE;
+
+ account -> bet_use_budget = value;
+
+ return TRUE;
+}
+/**
+ *
+ *
+ *
+ *
+ * */
+gint gsb_data_account_get_bet_maj ( gint account_number )
+{
+ struct_account *account;
+
+ account = gsb_data_account_get_structure ( account_number );
+
+ if (!account )
+ return 0;
+
+ return account -> bet_maj;
+}
+
+
+/**
+ *
+ *
+ *
+ *
+ * */
+gboolean gsb_data_account_set_bet_maj ( gint account_number, gint type_maj )
+{
+ struct_account *account;
+
+ account = gsb_data_account_get_structure ( account_number );
+
+ if ( !account )
+ return FALSE;
+
+ account -> bet_maj = type_maj;
+
+ return TRUE;
+}
+
+
/* Local Variables: */
/* c-basic-offset: 4 */
/* End: */
Index: gsb_data_account.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_account.h,v
retrieving revision 1.44
retrieving revision 1.44.2.1
diff -u -d -r1.44 -r1.44.2.1
--- gsb_data_account.h 17 Apr 2010 15:37:03 -0000 1.44
+++ gsb_data_account.h 21 May 2010 22:39:55 -0000 1.44.2.1
@@ -46,10 +46,12 @@
gboolean gsb_data_account_get_bet_auto_inc_month ( gint account_number );
gint gsb_data_account_get_bet_hist_data ( gint account_number );
gint gsb_data_account_get_bet_hist_fyear ( gint account_number );
+gint gsb_data_account_get_bet_maj ( gint account_number );
gint gsb_data_account_get_bet_months ( gint account_number );
gint gsb_data_account_get_bet_select_label ( gint account_number, gint origine );
gint gsb_data_account_get_bet_spin_range ( gint account_number );
GDate *gsb_data_account_get_bet_start_date ( gint account_number );
+gint gsb_data_account_get_bet_use_budget ( gint account_number );
gint gsb_data_account_get_closed_account ( gint account_number );
gchar *gsb_data_account_get_comment ( gint account_number );
gint gsb_data_account_get_currency ( gint account_number );
@@ -106,12 +108,14 @@
gboolean auto_inc_month );
gboolean gsb_data_account_set_bet_hist_data ( gint account_number, gint hist_data );
gboolean gsb_data_account_set_bet_hist_fyear ( gint account_number, gint hist_fyear );
+gboolean gsb_data_account_set_bet_maj ( gint account_number, gint type_maj );
gboolean gsb_data_account_set_bet_months ( gint account_number, gint months );
gboolean gsb_data_account_set_bet_select_label ( gint account_number,
gint origine,
gint type );
gboolean gsb_data_account_set_bet_spin_range ( gint account_number, gint spin_range );
gboolean gsb_data_account_set_bet_start_date ( gint account_number, const GDate *date );
+gboolean gsb_data_account_set_bet_use_budget ( gint account_number, gint value );
gboolean gsb_data_account_set_closed_account ( gint account_number,
gint closed_account );
gboolean gsb_data_account_set_comment ( gint account_number,
Index: structures.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/structures.h,v
retrieving revision 1.246
retrieving revision 1.246.2.1
diff -u -d -r1.246 -r1.246.2.1
--- structures.h 24 Apr 2010 05:39:25 -0000 1.246
+++ structures.h 21 May 2010 22:39:56 -0000 1.246.2.1
@@ -13,7 +13,7 @@
#define VERSION_FICHIER "0.6.0"
/* Define this when in CVS development branch. */
-#define IS_DEVELOPMENT_VERSION 0
+#define IS_DEVELOPMENT_VERSION 1
#define VERSION_FICHIER_ETAT "0.6.0"
#define VERSION_FICHIER_CATEG "0.6.0"
@@ -36,7 +36,8 @@
* la partie configurée par la conf
* la partie configurée pendant le fonctionnement de grisbi
* */
-struct {
+struct
+{
time_t modification_fichier;
gint is_archive; /** TRUE if the file is an archive, FALSE else */
gint equilibrage;
@@ -122,7 +123,8 @@
* configured by the file grisbi.conf
*
*/
-struct {
+struct
+{
/* geometry */
gint root_x; /* main_window x position */
@@ -180,17 +182,32 @@
gchar *search_str;
};
-enum alignement {
+enum alignement
+{
LEFT, CENTER, RIGHT,
};
-enum bet_array_origin_data {
+enum bet_array_origin_data
+{
SPP_ORIGIN_TRANSACTION,
SPP_ORIGIN_SCHEDULED,
SPP_ORIGIN_HISTORICAL,
- SPP_ORIGIN_FUTURE
+ SPP_ORIGIN_FUTURE,
+ SPP_ORIGIN_ACCOUNT,
+ SPP_ORIGIN_ARRAY,
+ SPP_ORIGIN_CONFIG
+};
+
+enum bet_type_maj
+{
+ BET_MAJ_FALSE = 0,
+ BET_MAJ_ESTIMATE,
+ BET_MAJ_HISTORICAL,
+ BET_MAJ_FINANCIAL,
+ BET_MAJ_ALL,
};
+
#endif
Index: gsb_assistant_first.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_assistant_first.c,v
retrieving revision 1.29
retrieving revision 1.29.2.1
diff -u -d -r1.29 -r1.29.2.1
--- gsb_assistant_first.c 8 Mar 2010 21:30:00 -0000 1.29
+++ gsb_assistant_first.c 21 May 2010 22:39:55 -0000 1.29.2.1
@@ -44,12 +44,12 @@
/*END_INCLUDE*/
/*START_STATIC*/
-static gboolean gsb_assistant_first_enter_page_2 ( GtkWidget *assistant,
+static gboolean gsb_assistant_first_enter_page_2 ( GtkWidget *assistant,
gint new_page );
-static gboolean gsb_assistant_first_enter_page_3 ( GtkWidget *assistant,
+static gboolean gsb_assistant_first_enter_page_3 ( GtkWidget *assistant,
gint new_page );
-static GtkWidget *gsb_assistant_first_page_2 ( GtkWidget *assistant );
-static GtkWidget *gsb_assistant_first_page_3 ( GtkWidget *assistant );
+static GtkWidget *gsb_assistant_first_page_2 ( GtkWidget *assistant );
+static GtkWidget *gsb_assistant_first_page_3 ( GtkWidget *assistant );
/*END_STATIC*/
/*START_EXTERN*/
Index: import.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/import.c,v
retrieving revision 1.332
retrieving revision 1.332.2.1
diff -u -d -r1.332 -r1.332.2.1
--- import.c 18 Apr 2010 07:53:06 -0000 1.332
+++ import.c 21 May 2010 22:39:55 -0000 1.332.2.1
@@ -71,6 +71,7 @@
#include "./qif.h"
#include "./transaction_list.h"
#include "./utils_files.h"
+#include "./balance_estimate_data.h"
#include "./structures.h"
#include "./gsb_transactions_list.h"
#include "./go-charmap-sel.h"
@@ -102,7 +103,7 @@
static void gsb_import_add_imported_transactions ( struct struct_compte_importation *imported_account,
gint account_number );
static void gsb_import_associations_add_assoc ( GtkWidget *button, GtkWidget *main_widget );
-static void gsb_import_associations_cell_edited (GtkCellRendererText *cell,
+static void gsb_import_associations_cell_edited (GtkCellRendererText *cell,
const gchar *path_string,
const gchar *new_text,
GObject * main_widget );
@@ -1520,6 +1521,9 @@
break;
}
+ /* MAJ des données du module bet */
+ gsb_data_account_set_bet_maj ( account_number, BET_MAJ_ALL );
+
/* first, we create the rule if asked */
if (compte -> create_rule && compte -> action != IMPORT_CREATE_ACCOUNT)
{
@@ -1603,11 +1607,6 @@
"with any reconcile number yet. You may associate them with a reconcilation "
"later via the preferences windows.") );
-#ifdef ENABLE_BALANCE_ESTIMATE
- /* force the update module budget */
- bet_data_set_maj ( gsb_gui_navigation_get_current_account (), BET_MAJ_ESTIMATE );
-#endif /* ENABLE_BALANCE_ESTIMATE */
-
if ( etat.modification_fichier == 0 )
modification_fichier ( TRUE );
}
@@ -4373,7 +4372,7 @@
#ifdef ENABLE_BALANCE_ESTIMATE
/* force the update module budget */
- bet_data_set_maj ( account_number, BET_MAJ_ESTIMATE );
+ gsb_data_account_set_bet_maj ( account_number, BET_MAJ_ALL );
#endif /* ENABLE_BALANCE_ESTIMATE */
if ( etat.modification_fichier == 0 )
Index: gsb_file_load.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_load.c,v
retrieving revision 1.221
retrieving revision 1.221.2.1
diff -u -d -r1.221 -r1.221.2.1
--- gsb_file_load.c 24 Apr 2010 05:39:25 -0000 1.221
+++ gsb_file_load.c 21 May 2010 22:39:55 -0000 1.221.2.1
@@ -68,6 +68,7 @@
#include "./custom_list.h"
#include "./gsb_data_account.h"
#include "./gsb_data_form.h"
+#include "./utils_str.h"
#include "./gsb_data_transaction.h"
#include "./gsb_scheduler_list.h"
#include "./structures.h"
@@ -90,10 +91,14 @@
const gchar **attribute_values );
static void gsb_file_load_bank ( const gchar **attribute_names,
const gchar **attribute_values );
+static void gsb_file_load_bet_future_data ( const gchar **attribute_names,
+ const gchar **attribute_values );
static void gsb_file_load_bet_historical ( const gchar **attribute_names,
const gchar **attribute_values );
static void gsb_file_load_bet_part ( const gchar **attribute_names,
const gchar **attribute_values );
+static void gsb_file_load_bet_transfert_part ( const gchar **attribute_names,
+ const gchar **attribute_values );
static gboolean gsb_file_load_check_new_structure ( gchar *file_content );
static void gsb_file_load_color_part ( const gchar **attribute_names,
const gchar **attribute_values );
@@ -108,8 +113,6 @@
GError **error);
static void gsb_file_load_financial_year ( const gchar **attribute_names,
const gchar **attribute_values );
-static void gsb_file_load_future_data ( const gchar **attribute_names,
- const gchar **attribute_values );
static void gsb_file_load_general_part ( const gchar **attribute_names,
const gchar **attribute_values );
static void gsb_file_load_general_part_before_0_6 ( GMarkupParseContext *context,
@@ -168,6 +171,7 @@
extern GdkColor calendar_entry_color;
extern GdkColor couleur_bet_division;
extern GdkColor couleur_bet_future;
+extern GdkColor couleur_bet_transfert;
extern GdkColor couleur_fond[2];
extern GdkColor couleur_grise;
extern GdkColor couleur_jour;
@@ -644,9 +648,16 @@
if ( !strcmp ( element_name, "Bet_future" ) )
{
- gsb_file_load_future_data ( attribute_names, attribute_values );
+ gsb_file_load_bet_future_data ( attribute_names, attribute_values );
return;
}
+
+ if ( !strcmp ( element_name, "Bet_transfert" ) )
+ {
+ gsb_file_load_bet_transfert_part ( attribute_names, attribute_values );
+ return;
+ }
+
#endif /* ENABLE_BALANCE_ESTIMATE */
if ( !strcmp ( element_name,
@@ -1274,6 +1285,24 @@
couleur_bet_future.blue = utils_str_atoi (attribute_values[i]);
}
+ else if ( !strcmp ( attribute_names[i],
+ "Couleur_bet_transfert_red" ))
+ {
+ couleur_bet_transfert.red = utils_str_atoi (attribute_values[i]);
+ }
+
+ else if ( !strcmp ( attribute_names[i],
+ "Couleur_bet_transfert_green" ))
+ {
+ couleur_bet_transfert.green = utils_str_atoi (attribute_values[i]);
+ }
+
+ else if ( !strcmp ( attribute_names[i],
+ "Couleur_bet_transfert_blue" ))
+ {
+ couleur_bet_transfert.blue = utils_str_atoi (attribute_values[i]);
+ }
+
i++;
}
while ( attribute_names[i] );
@@ -1790,6 +1819,14 @@
continue;
}
+ if ( !strcmp ( attribute_names[i], "Bet_use_budget" ))
+ {
+ gsb_data_account_set_bet_use_budget ( account_number,
+ utils_str_atoi ( attribute_values[i] ) );
+ i++;
+ continue;
+ }
+
if ( !strcmp ( attribute_names[i], "Bet_start_date" ))
{
gsb_data_account_set_bet_start_date ( account_number,
@@ -3872,7 +3909,7 @@
* \param attribute_values
*
* */
-void gsb_file_load_future_data ( const gchar **attribute_names,
+void gsb_file_load_bet_future_data ( const gchar **attribute_names,
const gchar **attribute_values )
{
gint i=0;
@@ -4035,6 +4072,127 @@
/**
+ * load the bet transfert line
+ *
+ * \param attribute_names
+ * \param attribute_values
+ *
+ * */
+void gsb_file_load_bet_transfert_part ( const gchar **attribute_names,
+ const gchar **attribute_values )
+{
+ gint i=0;
+ struct_transfert_data *transfert;
+
+ if ( !attribute_names[i] )
+ return;
+
+ transfert = struct_initialise_bet_transfert ( );
+
+ if ( !transfert )
+ {
+ dialogue_error_memory ();
+ return;
+ }
+
+ do
+ {
+ /* we test at the beginning if the attribute_value is NULL, if yes, */
+ /* go to the next */
+
+ if ( !strcmp (attribute_values[i], "(null)") )
+ {
+ i++;
+ continue;
+ }
+
+ if ( !strcmp ( attribute_names[i], "Nb" ) )
+ {
+ transfert -> number = utils_str_atoi ( attribute_values[i] );
+ i++;
+ continue;
+ }
+
+ if ( !strcmp ( attribute_names[i], "Dt" ) )
+ {
+ transfert -> date = gsb_parse_date_string_safe ( attribute_values[i] );
+ i++;
+ continue;
+ }
+
+ if ( !strcmp ( attribute_names[i], "Ac" ) )
+ {
+ transfert -> account_number = utils_str_atoi ( attribute_values[i] );
+ i++;
+ continue;
+ }
+
+ if ( !strcmp ( attribute_names[i], "Ty" ) )
+ {
+ transfert -> type = utils_str_atoi ( attribute_values[i] );
+ i++;
+ continue;
+ }
+
+ if ( !strcmp ( attribute_names[i], "Ra" ) )
+ {
+ transfert -> replace_account = utils_str_atoi ( attribute_values[i] );
+ i++;
+ continue;
+ }
+
+ if ( !strcmp ( attribute_names[i], "Rt" ) )
+ {
+ transfert -> replace_transaction = utils_str_atoi ( attribute_values[i] );
+ i++;
+ continue;
+ }
+
+ if ( !strcmp ( attribute_names[i], "Aim" ) )
+ {
+ transfert -> auto_inc_month = utils_str_atoi ( attribute_values[i] );
+ i++;
+ continue;
+ }
+
+ if ( !strcmp ( attribute_names[i], "Ca" ) )
+ {
+ transfert -> category_number = utils_str_atoi ( attribute_values[i] );
+ i++;
+ continue;
+ }
+
+ if ( !strcmp ( attribute_names[i], "Sca" ) )
+ {
+ transfert -> sub_category_number = utils_str_atoi ( attribute_values[i] );
+ i++;
+ continue;
+ }
+
+ if ( !strcmp ( attribute_names[i], "Bu" ) )
+ {
+ transfert -> budgetary_number = utils_str_atoi ( attribute_values[i] );
+ i++;
+ continue;
+ }
+
+ if ( !strcmp ( attribute_names[i], "Sbu" ) )
+ {
+ transfert -> sub_budgetary_number = utils_str_atoi ( attribute_values[i] );
+ i++;
+ continue;
+ }
+
+ /* normally, shouldn't come here */
+ i++;
+ }
+ while ( attribute_names[i] );
+
+ bet_data_transfert_set_line_from_file ( transfert );
+}
+
+
+/**
* load the report structure in the grisbi file
*
* \param attribute_names
Index: transaction_model.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/transaction_model.h,v
retrieving revision 1.2
retrieving revision 1.2.4.1
diff -u -d -r1.2 -r1.2.4.1
--- transaction_model.h 2 Oct 2008 22:11:23 -0000 1.2
+++ transaction_model.h 21 May 2010 22:39:56 -0000 1.2.4.1
@@ -10,8 +10,6 @@
gboolean transaction_model_get_iter (GtkTreeIter *iter,
GtkTreePath *path);
CustomList *transaction_model_get_model (void);
-GtkTreePath *transaction_model_get_path ( gint transaction_number,
- gint line_in_transaction );
gboolean transaction_model_get_transaction_iter ( GtkTreeIter *iter,
gint transaction_number,
gint line_in_transaction );
Index: transaction_model.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/transaction_model.c,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -u -d -r1.7 -r1.7.2.1
--- transaction_model.c 13 Feb 2010 17:44:59 -0000 1.7
+++ transaction_model.c 21 May 2010 22:39:56 -0000 1.7.2.1
@@ -134,52 +134,6 @@
/**
- * return the path of the transaction
- * according line_in_transaction
- *
- * \param line_in_transaction
- *
- * \return a newly allocated GtkTreePath
- * */
-GtkTreePath *transaction_model_get_path ( gint transaction_number,
- gint line_in_transaction )
-{
- CustomRecord *record;
- GtkTreePath *path;
- GtkTreeIter iter;
-
- g_return_val_if_fail ( custom_list != NULL, NULL );
-
- if (!transaction_model_get_transaction_iter ( &iter,
- transaction_number, line_in_transaction ))
- {
- printf ("iter == NULL\n");
- return NULL;
- }
-
- record = iter.user_data;
- if (!record)
- {
- printf ("record == NULL\n");
- return NULL;
- }
- record = record -> transaction_records[line_in_transaction];
-
- path = gtk_tree_path_new ();
- if (record -> mother_row)
- {
- printf ("record -> mother_row -> filtered_pos = %d\n", record -> mother_row -> filtered_pos);
- /* it's a child, need to get the path of the mother */
- gtk_tree_path_append_index (path, record -> mother_row -> filtered_pos);
- }
-
- gtk_tree_path_append_index (path, record -> filtered_pos);
-
- return path;
-}
-
-
-/**
* find the iter of the line of the asked transaction
* the transaction can be a mother or a child
*
Index: gsb_autofunc.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_autofunc.c,v
retrieving revision 1.27
retrieving revision 1.27.2.1
diff -u -d -r1.27 -r1.27.2.1
--- gsb_autofunc.c 20 Apr 2010 21:34:33 -0000 1.27
+++ gsb_autofunc.c 21 May 2010 22:39:55 -0000 1.27.2.1
@@ -51,23 +51,23 @@
/*END_INCLUDE*/
/*START_STATIC*/
-static gboolean gsb_autofunc_checkbutton_changed ( GtkWidget *button,
+static gboolean gsb_autofunc_checkbutton_changed ( GtkWidget *button,
gboolean default_func (gint, gboolean));
-static gboolean gsb_autofunc_combobox_changed ( GtkWidget *combobox,
+static gboolean gsb_autofunc_combobox_changed ( GtkWidget *combobox,
gboolean default_func (gint, gint));
static gboolean gsb_autofunc_currency_changed ( GtkWidget *combobox,
gboolean default_func (gint, gint));
-static gboolean gsb_autofunc_date_changed ( GtkWidget *entry,
+static gboolean gsb_autofunc_date_changed ( GtkWidget *entry,
gboolean default_func (gint, const GDate *));
-static gboolean gsb_autofunc_entry_changed ( GtkWidget *entry,
+static gboolean gsb_autofunc_entry_changed ( GtkWidget *entry,
gboolean default_func (gint, const gchar *));
-static gboolean gsb_autofunc_int_changed ( GtkWidget *entry,
+static gboolean gsb_autofunc_int_changed ( GtkWidget *entry,
gboolean default_func (gint, gint));
-static gboolean gsb_autofunc_real_changed ( GtkWidget *entry,
+static gboolean gsb_autofunc_real_changed ( GtkWidget *entry,
gboolean default_func (gint, gsb_real));
-static gboolean gsb_autofunc_spin_changed ( GtkWidget *spin_button,
+static gboolean gsb_autofunc_spin_changed ( GtkWidget *spin_button,
gboolean default_func (gint, gint));
-static gboolean gsb_autofunc_textview_changed ( GtkTextBuffer *buffer,
+static gboolean gsb_autofunc_textview_changed ( GtkTextBuffer *buffer,
gboolean default_func (gint, const gchar *));
/*END_STATIC*/
Index: gsb_account.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_account.c,v
retrieving revision 1.49
retrieving revision 1.49.2.1
diff -u -d -r1.49 -r1.49.2.1
--- gsb_account.c 18 Apr 2010 18:45:03 -0000 1.49
+++ gsb_account.c 21 May 2010 22:39:55 -0000 1.49.2.1
@@ -35,6 +35,7 @@
#include "./gsb_file.h"
#include "./gsb_form_scheduler.h"
#include "./navigation.h"
+#include "./fenetre_principale.h"
#include "./menu.h"
#include "./gsb_real.h"
#include "./gsb_scheduler_list.h"
@@ -49,8 +50,6 @@
#include "./gsb_form_scheduler.h"
#include "./include.h"
#include "./structures.h"
-#include "./gsb_real.h"
-#include "./gsb_data_account.h"
/*END_INCLUDE*/
/*START_STATIC*/
@@ -137,10 +136,8 @@
gsb_gui_navigation_add_account ( account_number, TRUE );
/* Go to accounts properties */
- gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general ),
- GSB_ACCOUNT_PAGE );
- gtk_notebook_set_current_page ( GTK_NOTEBOOK ( account_page ),
- gsb_gui_on_account_get_property_page ( GTK_NOTEBOOK ( account_page ) ) );
+ gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general ), GSB_ACCOUNT_PAGE );
+ gtk_notebook_set_current_page ( GTK_NOTEBOOK ( account_page ), GSB_PROPERTIES_PAGE );
gsb_account_property_fill_page ();
}
Index: gtk_combofix.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gtk_combofix.c,v
retrieving revision 1.75
retrieving revision 1.75.2.1
diff -u -d -r1.75 -r1.75.2.1
--- gtk_combofix.c 5 Apr 2010 21:24:53 -0000 1.75
+++ gtk_combofix.c 21 May 2010 22:39:55 -0000 1.75.2.1
@@ -795,6 +795,8 @@
/* show the popup */
if ( combofix -> visible_items && strlen ( entry_string )
&&
+ completed_string
+ &&
(!combofix -> max_items
||
combofix -> visible_items < combofix -> max_items))
@@ -1575,6 +1577,8 @@
if ( tmp_str
&&
+ tmp_item
+ &&
g_utf8_collate ( g_utf8_casefold ( tmp_str, -1 ),
g_utf8_casefold ( tmp_item, -1 ) ) == 0 )
break;
@@ -1820,6 +1824,11 @@
gchar *cmp_string_1;
gchar *cmp_string_2;
+ if ( string_1 == NULL )
+ return -1;
+ if ( string_2 == NULL )
+ return 1;
+
cmp_string_1 = g_utf8_collate_key (string_1, -1);
cmp_string_2 = g_utf8_collate_key (string_2, -1);
return_value = g_ascii_strcasecmp ( cmp_string_1,
Index: gsb_assistant_reconcile_config.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_assistant_reconcile_config.c,v
retrieving revision 1.29
retrieving revision 1.29.2.1
diff -u -d -r1.29 -r1.29.2.1
--- gsb_assistant_reconcile_config.c 9 Jan 2010 20:57:38 -0000 1.29
+++ gsb_assistant_reconcile_config.c 21 May 2010 22:39:55 -0000 1.29.2.1
@@ -50,21 +50,21 @@
/*END_INCLUDE*/
/*START_STATIC*/
-static gboolean gsb_assistant_reconcile_config_hide_label_error ( GtkWidget *editable,
+static gboolean gsb_assistant_reconcile_config_hide_label_error ( GtkWidget *editable,
GtkWidget *label );
-static gboolean gsb_assistant_reconcile_config_lauch_auto_asso ( GtkWidget *button,
+static gboolean gsb_assistant_reconcile_config_lauch_auto_asso ( GtkWidget *button,
GtkWidget *assistant );
-static gboolean gsb_assistant_reconcile_config_lauch_manu_asso ( GtkWidget *button,
+static gboolean gsb_assistant_reconcile_config_lauch_manu_asso ( GtkWidget *button,
GtkWidget *assistant );
-static gboolean gsb_assistant_reconcile_config_page_add_new_reconcile ( GtkWidget *button,
+static gboolean gsb_assistant_reconcile_config_page_add_new_reconcile ( GtkWidget *button,
GtkWidget *label );
-static GtkWidget *gsb_assistant_reconcile_config_page_automatically_associate ( GtkWidget *assistant );
-static GtkWidget *gsb_assistant_reconcile_config_page_manually_associate ( GtkWidget *assistant );
-static GtkWidget *gsb_assistant_reconcile_config_page_menu ( GtkWidget *assistant );
-static gboolean gsb_assistant_reconcile_config_page_menu_toggled ( GtkWidget *button,
+static GtkWidget *gsb_assistant_reconcile_config_page_automatically_associate ( GtkWidget *assistant );
+static GtkWidget *gsb_assistant_reconcile_config_page_manually_associate ( GtkWidget *assistant );
+static GtkWidget *gsb_assistant_reconcile_config_page_menu ( GtkWidget *assistant );
+static gboolean gsb_assistant_reconcile_config_page_menu_toggled ( GtkWidget *button,
GtkWidget *assistant );
-static GtkWidget *gsb_assistant_reconcile_config_page_new_reconcile ( void );
-static GtkWidget *gsb_assistant_reconcile_config_page_success ( void );
+static GtkWidget *gsb_assistant_reconcile_config_page_new_reconcile ( void );
+static GtkWidget *gsb_assistant_reconcile_config_page_success ( void );
static gboolean gsb_assistant_reconcile_config_update_auto_asso ( GtkWidget *assistant,
gint new_page );
static gboolean gsb_assistant_reconcile_config_update_manu_asso ( GtkWidget *assistant,
Index: gsb_data_fyear.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_fyear.c,v
retrieving revision 1.22
retrieving revision 1.22.2.1
diff -u -d -r1.22 -r1.22.2.1
--- gsb_data_fyear.c 14 Feb 2010 17:48:50 -0000 1.22
+++ gsb_data_fyear.c 21 May 2010 22:39:55 -0000 1.22.2.1
@@ -48,7 +48,7 @@
};
/*START_STATIC*/
-static void _gsb_data_fyear_free ( struct_fyear *fyear );
+static void _gsb_data_fyear_free ( struct_fyear *fyear );
static gpointer gsb_data_fyear_get_structure ( gint fyear_number );
static gint gsb_data_fyear_max_number ( void );
/*END_STATIC*/
Index: gsb_file.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file.c,v
retrieving revision 1.64
retrieving revision 1.64.2.1
diff -u -d -r1.64 -r1.64.2.1
--- gsb_file.c 5 Apr 2010 21:24:53 -0000 1.64
+++ gsb_file.c 21 May 2010 22:39:55 -0000 1.64.2.1
@@ -70,8 +70,8 @@
/*START_STATIC*/
static void gsb_file_append_name_to_opened_list ( gchar * path_fichier );
static gboolean gsb_file_automatic_backup ( gpointer null );
-static gchar *gsb_file_dialog_ask_name ( void );
-static gint gsb_file_dialog_save ( void );
+static gchar *gsb_file_dialog_ask_name ( void );
+static gint gsb_file_dialog_save ( void );
static gboolean gsb_file_save_backup ( void );
static gboolean gsb_file_save_file ( gint origine );
static void gsb_file_save_remove_old_file ( gchar *filename );
Index: gsb_account_property.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_account_property.c,v
retrieving revision 1.53
retrieving revision 1.53.2.1
diff -u -d -r1.53 -r1.53.2.1
--- gsb_account_property.c 24 Apr 2010 05:39:25 -0000 1.53
+++ gsb_account_property.c 21 May 2010 22:39:55 -0000 1.53.2.1
@@ -68,7 +68,6 @@
#include "./gsb_form_scheduler.h"
#include "./include.h"
#include "./erreur.h"
-#include "./gtk_combofix.h"
/*END_INCLUDE*/
/*START_STATIC*/
Index: gsb_file_save.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_save.c,v
retrieving revision 1.165
retrieving revision 1.165.2.1
diff -u -d -r1.165 -r1.165.2.1
--- gsb_file_save.c 20 Apr 2010 21:34:33 -0000 1.165
+++ gsb_file_save.c 21 May 2010 22:39:55 -0000 1.165.2.1
@@ -65,6 +65,7 @@
#include "./structures.h"
#include "./custom_list.h"
#include "./gsb_data_form.h"
+#include "./utils_str.h"
#include "./gsb_scheduler_list.h"
#include "./include.h"
#include "./gsb_calendar.h"
@@ -144,6 +145,7 @@
extern GdkColor calendar_entry_color;
extern GdkColor couleur_bet_division;
extern GdkColor couleur_bet_future;
+extern GdkColor couleur_bet_transfert;
extern GdkColor couleur_fond[2];
extern GdkColor couleur_grise;
extern GdkColor couleur_jour;
@@ -801,7 +803,10 @@
"\t\tCouleur_bet_division_blue=\"%d\"\n"
"\t\tCouleur_bet_future_red=\"%d\"\n"
"\t\tCouleur_bet_future_green=\"%d\"\n"
- "\t\tCouleur_bet_future_blue=\"%d\" />\n",
+ "\t\tCouleur_bet_future_blue=\"%d\"\n"
+ "\t\tCouleur_bet_transfert_red=\"%d\"\n"
+ "\t\tCouleur_bet_transfert_green=\"%d\"\n"
+ "\t\tCouleur_bet_transfert_blue=\"%d\" />\n",
couleur_fond[0].red,
couleur_fond[0].green,
@@ -838,7 +843,10 @@
couleur_bet_division.blue,
couleur_bet_future.red,
couleur_bet_future.green,
- couleur_bet_future.blue );
+ couleur_bet_future.blue,
+ couleur_bet_transfert.red,
+ couleur_bet_transfert.green,
+ couleur_bet_transfert.blue );
/* append the new string to the file content
* and return the new iterator */
@@ -1075,6 +1083,7 @@
"\t\tForm_lines_number=\"%d\"\n"
"\t\tForm_organization=\"%s\"\n"
"\t\tForm_columns_width=\"%s\"\n"
+ "\t\tBet_use_budget=\"%d\"\n"
"\t\tBet_start_date=\"%s\"\n"
"\t\tBet_months=\"%d\"\n"
"\t\tBet_UT=\"%d\"\n"
@@ -1117,6 +1126,7 @@
gsb_data_form_get_nb_rows (account_number),
my_safe_null_str(form_organization),
my_safe_null_str(form_columns_width),
+ gsb_data_account_get_bet_use_budget ( account_number ),
my_safe_null_str ( gsb_format_gdate_safe (
gsb_data_account_get_bet_start_date ( account_number ) ) ),
gsb_data_account_get_bet_months ( account_number ),
Index: print_transactions_list.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/print_transactions_list.c,v
retrieving revision 1.14
retrieving revision 1.14.2.1
diff -u -d -r1.14 -r1.14.2.1
--- print_transactions_list.c 14 Feb 2010 17:48:50 -0000 1.14
+++ print_transactions_list.c 21 May 2010 22:39:56 -0000 1.14.2.1
@@ -51,23 +51,23 @@
static gboolean print_transactions_list_begin ( GtkPrintOperation *operation,
GtkPrintContext *context,
gpointer null );
-static void print_transactions_list_calculate_columns ( gdouble page_width );
-static void print_transactions_list_draw_background ( CustomRecord *record,
+static void print_transactions_list_calculate_columns ( gdouble page_width );
+static void print_transactions_list_draw_background ( CustomRecord *record,
gboolean color_bg,
gint line_position );
-static gint print_transactions_list_draw_column ( gint column_position,
+static gint print_transactions_list_draw_column ( gint column_position,
gint line_position );
-static gint print_transactions_list_draw_columns_title ( GtkPrintContext *context,
+static gint print_transactions_list_draw_columns_title ( GtkPrintContext *context,
gint line_position);
-static gint print_transactions_list_draw_line ( gint line_position );
+static gint print_transactions_list_draw_line ( gint line_position );
static gboolean print_transactions_list_draw_page ( GtkPrintOperation *operation,
GtkPrintContext *context,
gint page,
gpointer null );
-static gint print_transactions_list_draw_row ( GtkPrintContext *context,
+static gint print_transactions_list_draw_row ( GtkPrintContext *context,
CustomRecord *record,
gint line_position );
-static gint print_transactions_list_draw_title ( GtkPrintContext *context,
+static gint print_transactions_list_draw_title ( GtkPrintContext *context,
gint line_position );
static gboolean print_transactions_list_get_visibles_lines ( gint *number_of_archives,
gint *number_of_transactions );
Index: erreur.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/erreur.c,v
retrieving revision 1.100
retrieving revision 1.100.2.1
diff -u -d -r1.100 -r1.100.2.1
--- erreur.c 23 Mar 2010 22:15:21 -0000 1.100
+++ erreur.c 21 May 2010 22:39:55 -0000 1.100.2.1
@@ -38,6 +38,7 @@
#include "./utils_str.h"
#include "./include.h"
#include "./structures.h"
+#include "./gsb_real.h"
/*END_INCLUDE*/
#ifdef HAVE_BACKTRACE
Index: gsb_data_partial_balance.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_partial_balance.c,v
retrieving revision 1.12
retrieving revision 1.12.2.1
diff -u -d -r1.12 -r1.12.2.1
--- gsb_data_partial_balance.c 5 Apr 2010 21:24:53 -0000 1.12
+++ gsb_data_partial_balance.c 21 May 2010 22:39:55 -0000 1.12.2.1
@@ -61,7 +61,7 @@
/*START_STATIC*/
-static void _gsb_data_partial_balance_free ( struct_partial_balance *partial_balance);
+static void _gsb_data_partial_balance_free ( struct_partial_balance *partial_balance);
static gpointer gsb_data_partial_balance_get_structure ( gint partial_balance_number );
static gboolean gsb_data_partial_balance_init_from_liste_cptes ( gint partial_balance_number,
GtkWidget *parent );
@@ -1039,11 +1039,11 @@
partial_balance = gsb_data_partial_balance_get_structure ( partial_balance_number );
if ( !partial_balance )
- return 0;
+ return NULL;
if ( partial_balance -> liste_cptes == NULL ||
strlen ( partial_balance -> liste_cptes ) == 0 )
- return 0;
+ return NULL;
tab = g_strsplit ( partial_balance -> liste_cptes, ";", 0 );
for ( i = 0; tab[i]; i++ )
@@ -1078,9 +1078,10 @@
if ( partial_balance -> colorise && solde.mantissa < 0 )
string = g_strdup_printf ( "<span color=\"red\">%s</span>",
gsb_real_get_string_with_currency (
- solde, partial_balance -> currency, TRUE) );
+ solde, partial_balance -> currency, TRUE ) );
else
- string = gsb_real_get_string_with_currency (solde, partial_balance -> currency, TRUE);
+ string = gsb_real_get_string_with_currency (
+ solde, partial_balance -> currency, TRUE );
return string;
}
@@ -1090,22 +1091,21 @@
*
*
* */
-gchar *gsb_data_partial_balance_get_current_balance ( gint partial_balance_number )
+gsb_real gsb_data_partial_balance_get_current_amount ( gint partial_balance_number )
{
struct_partial_balance *partial_balance;
gsb_real solde = null_real;
gchar **tab;
- gchar *string;
gint i;
partial_balance = gsb_data_partial_balance_get_structure ( partial_balance_number );
if ( !partial_balance )
- return 0;
+ return null_real;
if ( partial_balance -> liste_cptes == NULL ||
strlen ( partial_balance -> liste_cptes ) == 0 )
- return 0;
+ return null_real;
tab = g_strsplit ( partial_balance -> liste_cptes, ";", 0 );
for ( i = 0; tab[i]; i++ )
@@ -1136,12 +1136,34 @@
solde = gsb_real_add ( solde, tmp_real );
}
+ return solde;
+}
+
+
+/**
+ *
+ *
+ * */
+gchar *gsb_data_partial_balance_get_current_balance ( gint partial_balance_number )
+{
+ struct_partial_balance *partial_balance;
+ gsb_real solde = null_real;
+ gchar *string;
+
+ partial_balance = gsb_data_partial_balance_get_structure ( partial_balance_number );
+
+ if ( !partial_balance )
+ return NULL;
+
+ solde = gsb_data_partial_balance_get_current_amount ( partial_balance_number );
+
if ( partial_balance -> colorise && solde.mantissa < 0 )
string = g_strdup_printf ( "<span color=\"red\">%s</span>",
gsb_real_get_string_with_currency (
- solde, partial_balance -> currency, TRUE) );
+ solde, partial_balance -> currency, TRUE ) );
else
- string = gsb_real_get_string_with_currency (solde, partial_balance -> currency, TRUE);
+ string = gsb_real_get_string_with_currency (
+ solde, partial_balance -> currency, TRUE );
return string;
}
Index: qif.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/qif.c,v
retrieving revision 1.145
retrieving revision 1.145.2.1
diff -u -d -r1.145 -r1.145.2.1
--- qif.c 5 Apr 2010 21:24:53 -0000 1.145
+++ qif.c 21 May 2010 22:39:56 -0000 1.145.2.1
@@ -46,9 +46,9 @@
/*END_INCLUDE*/
/*START_STATIC*/
-static GDate *gsb_qif_get_date ( gchar *date_string, gint order );
-static gchar **gsb_qif_get_date_content ( gchar *date_string );
-static gint gsb_qif_get_date_order ( GSList *transactions_list );
+static GDate *gsb_qif_get_date ( gchar *date_string, gint order );
+static gchar **gsb_qif_get_date_content ( gchar *date_string );
+static gint gsb_qif_get_date_order ( GSList *transactions_list );
/*END_STATIC*/
/*START_EXTERN*/
Index: go-charmap-sel.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/go-charmap-sel.c,v
retrieving revision 1.12
retrieving revision 1.12.4.1
diff -u -d -r1.12 -r1.12.4.1
--- go-charmap-sel.c 9 Jan 2009 14:49:00 -0000 1.12
+++ go-charmap-sel.c 21 May 2010 22:39:55 -0000 1.12.4.1
@@ -41,28 +41,28 @@
};
/*START_STATIC*/
-static void cb_find_entry (GtkMenuItem *w, struct cb_find_entry *cl);
-static int charset_order (const void *_a, const void *_b);
-static void cs_build_menu (GOCharmapSel *cs);
-static void cs_class_init (GtkWidgetClass *widget_klass);
-static void cs_emphasize_label (GtkLabel *label);
-static void cs_get_property (GObject *object,
+static void cb_find_entry (GtkMenuItem *w, struct cb_find_entry *cl);
+static int charset_order (const void *_a, const void *_b);
+static void cs_build_menu (GOCharmapSel *cs);
+static void cs_class_init (GtkWidgetClass *widget_klass);
+static void cs_emphasize_label (GtkLabel *label);
+static void cs_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec);
-static void cs_init (GOCharmapSel *cs);
-static gboolean cs_mnemonic_activate (GtkWidget *w, gboolean group_cycling);
-static void cs_set_property (GObject *object,
+static void cs_init (GOCharmapSel *cs);
+static gboolean cs_mnemonic_activate (GtkWidget *w, gboolean group_cycling);
+static void cs_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec);
-static void encodings_changed_cb (GOOptionMenu *optionmenu, GOCharmapSel *cs);
-static char const * get_locale_encoding_name (GOCharmapSel *cs);
+static void encodings_changed_cb (GOOptionMenu *optionmenu, GOCharmapSel *cs);
+static char const * get_locale_encoding_name (GOCharmapSel *cs);
static const char * go_charmap_sel_get_encoding_name (G_GNUC_UNUSED GOCharmapSel *cs,
const char *encoding);
-static gboolean iconv_supported (const char *to, const char *from);
-static int lgroups_order (const void *_a, const void *_b);
-static void set_menu_to_default (GOCharmapSel *cs, gint item);
+static gboolean iconv_supported (const char *to, const char *from);
+static int lgroups_order (const void *_a, const void *_b);
+static void set_menu_to_default (GOCharmapSel *cs, gint item);
/*END_STATIC*/
/*START_EXTERN*/
Index: traitement_variables.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/traitement_variables.c,v
retrieving revision 1.193
retrieving revision 1.193.2.1
diff -u -d -r1.193 -r1.193.2.1
--- traitement_variables.c 5 Apr 2010 21:24:53 -0000 1.193
+++ traitement_variables.c 21 May 2010 22:39:56 -0000 1.193.2.1
@@ -30,6 +30,7 @@
/*START_INCLUDE*/
#include "traitement_variables.h"
#include "./balance_estimate_data.h"
+#include "./balance_estimate_future.h"
#include "./gsb_currency.h"
#include "./gsb_data_account.h"
#include "./gsb_data_archive.h"
@@ -128,10 +129,15 @@
GdkColor couleur_bleue;
GdkColor couleur_jaune;
+
+/* colors for the balance estimate modul */
GdkColor couleur_bet_division;
GdkColor default_couleur_bet_division;
GdkColor couleur_bet_future;
GdkColor default_couleur_bet_future;
+GdkColor couleur_bet_transfert;
+GdkColor default_couleur_bet_transfert;
+
GSList *liste_labels_titres_colonnes_liste_ope = NULL;
@@ -383,6 +389,8 @@
#ifdef ENABLE_BALANCE_ESTIMATE
/* création de la liste des données à utiliser dans le tableau de résultats */
bet_data_init_variables ( );
+ /* initialisation des boites de dialogue */
+ bet_future_initialise_dialog ( );
#endif /* ENABLE_BALANCE_ESTIMATE */
etat.bet_deb_period = 1;
}
@@ -524,6 +532,15 @@
default_couleur_bet_future.red = 31829;
default_couleur_bet_future.green = 51015;
default_couleur_bet_future.blue = 35908;
+
+ /* colors of the background bet transfert data */
+ couleur_bet_transfert.red = 31829;
+ couleur_bet_transfert.green = 51015;
+ couleur_bet_transfert.blue = 35908;
+
+ default_couleur_bet_transfert.red = 60035;
+ default_couleur_bet_transfert.green = 37622;
+ default_couleur_bet_transfert.blue = 59956;
}
/*****************************************************************************************************/
Index: balance_estimate_hist.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/balance_estimate_hist.h,v
retrieving revision 1.10
retrieving revision 1.10.2.1
diff -u -d -r1.10 -r1.10.2.1
--- balance_estimate_hist.h 17 Apr 2010 15:37:03 -0000 1.10
+++ balance_estimate_hist.h 21 May 2010 22:39:55 -0000 1.10.2.1
@@ -27,11 +27,14 @@
/* START_DECLARATION */
GtkWidget *bet_historical_create_page ( void );
gint bet_historical_get_fyear_from_combobox ( GtkWidget *combo_box );
+void bet_historical_g_signal_block_tree_view ( void );
+void bet_historical_g_signal_unblock_tree_view ( void );
void bet_historical_populate_data ( gint account_number );
void bet_historical_refresh_data ( GtkTreeModel *tab_model,
GDate *date_min,
GDate *date_max );
void bet_historical_set_fyear_from_combobox ( GtkWidget *combo_box, gint fyear );
+void bet_historical_set_page_title ( gint account_number );
/* END_DECLARATION */
#endif /*_BALANCE_ESTIMATE_HIST_H*/
Index: balance_estimate_hist.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/balance_estimate_hist.c,v
retrieving revision 1.23
retrieving revision 1.23.2.1
diff -u -d -r1.23 -r1.23.2.1
--- balance_estimate_hist.c 18 Apr 2010 07:53:06 -0000 1.23
+++ balance_estimate_hist.c 21 May 2010 22:39:55 -0000 1.23.2.1
@@ -38,15 +38,17 @@
#include "./gsb_data_fyear.h"
#include "./gsb_data_transaction.h"
#include "./gsb_fyear.h"
+#include "./gsb_real.h"
#include "./navigation.h"
#include "./traitement_variables.h"
#include "./utils_str.h"
+#include "./balance_estimate_data.h"
#include "./gsb_fyear.h"
#include "./mouse.h"
-#include "./balance_estimate_data.h"
#include "./structures.h"
#include "./include.h"
#include "./erreur.h"
+#include "./gsb_real.h"
/*END_INCLUDE*/
/*START_STATIC*/
@@ -92,11 +94,15 @@
/*END_STATIC*/
/*START_EXTERN*/
+extern GtkWidget *account_page;
extern GdkColor couleur_fond[2];
extern GtkWidget *notebook_general;
extern gsb_real null_real;
/*END_EXTERN*/
+/* blocage des signaux pour le tree_view pour les comptes de type GSB_TYPE_CASH */
+static gboolean hist_block_signal = FALSE;
+
/**
* this is a tree model filter with 3 columns :
* the name, the number and a boolean to show it or not
@@ -118,7 +124,6 @@
* */
GtkWidget *bet_historical_create_page ( void )
{
- GtkWidget *notebook;
GtkWidget *widget;
GtkWidget *page;
GtkWidget *hbox;
@@ -128,9 +133,9 @@
GtkWidget *tree_view;
gchar *str_year;
gint year;
+ gpointer pointer;
devel_debug (NULL);
- notebook = g_object_get_data ( G_OBJECT ( notebook_general ), "account_notebook");
page = gtk_vbox_new ( FALSE, 5 );
gtk_widget_set_name ( page, "historical_page" );
@@ -140,7 +145,7 @@
label = gtk_label_new ( "bet_hist_title" );
gtk_container_add ( GTK_CONTAINER ( align ), label );
- g_object_set_data ( G_OBJECT ( notebook ), "bet_hist_title", label);
+ g_object_set_data ( G_OBJECT ( account_page ), "bet_hist_title", label);
/* Choix des données sources */
align = gtk_alignment_new (0.5, 0.0, 0.0, 0.0);
@@ -148,7 +153,7 @@
hbox = gtk_hbox_new ( FALSE, 5 );
gtk_container_add ( GTK_CONTAINER ( align ), hbox );
- g_object_set_data ( G_OBJECT ( notebook ), "bet_historical_data", hbox );
+ g_object_set_data ( G_OBJECT ( account_page ), "bet_historical_data", hbox );
button_1 = gtk_radio_button_new_with_label ( NULL,
_("Categories") );
@@ -166,8 +171,8 @@
G_CALLBACK ( bet_config_origin_data_clicked ),
GINT_TO_POINTER ( 1 ) );
- g_object_set_data ( G_OBJECT ( notebook ), "bet_hist_button_1", button_1 );
- g_object_set_data ( G_OBJECT ( notebook ), "bet_hist_button_2", button_2 );
+ g_object_set_data ( G_OBJECT ( account_page ), "bet_hist_button_1", button_1 );
+ g_object_set_data ( G_OBJECT ( account_page ), "bet_hist_button_2", button_2 );
gtk_box_pack_start ( GTK_BOX ( hbox ), button_1, FALSE, FALSE, 5) ;
gtk_box_pack_start ( GTK_BOX ( hbox ), button_2, FALSE, FALSE, 5) ;
@@ -182,7 +187,7 @@
gtk_widget_set_tooltip_text ( GTK_WIDGET ( widget ),
SPACIFY(_("Choose the financial year or 12 months rolling") ) );
- g_object_set_data ( G_OBJECT ( notebook ), "bet_hist_fyear_combo", widget );
+ g_object_set_data ( G_OBJECT ( account_page ), "bet_hist_fyear_combo", widget );
gtk_box_pack_start ( GTK_BOX ( hbox ), widget, FALSE, FALSE, 5);
@@ -193,15 +198,17 @@
g_free ( str_year );
/* set the signal */
+ pointer = GINT_TO_POINTER ( 1 );
+ g_object_set_data ( G_OBJECT ( widget ), "pointer", pointer );
g_signal_connect ( G_OBJECT ( widget ),
"changed",
G_CALLBACK (bet_config_fyear_clicked),
- GINT_TO_POINTER ( 1 ) );
+ pointer );
}
/* création de la liste des données */
tree_view = bet_historical_get_data_tree_view ( page );
- g_object_set_data ( G_OBJECT ( notebook ), "bet_historical_treeview", tree_view );
+ g_object_set_data ( G_OBJECT ( account_page ), "bet_historical_treeview", tree_view );
gtk_widget_show_all ( page );
@@ -229,7 +236,7 @@
gint div_number;
gint sub_div_nb;
gint nbre_fils;
- gint account_nb;
+ gint account_number;
gboolean valeur;
gboolean col_edited;
@@ -237,7 +244,7 @@
SPP_HISTORICAL_SELECT_COLUMN, &valeur,
SPP_HISTORICAL_AVERAGE_COLUMN, &str_average,
SPP_HISTORICAL_AVERAGE_AMOUNT, &str_amount,
- SPP_HISTORICAL_ACCOUNT_NUMBER, &account_nb,
+ SPP_HISTORICAL_ACCOUNT_NUMBER, &account_number,
SPP_HISTORICAL_DIV_NUMBER, &div_number,
SPP_HISTORICAL_SUB_DIV_NUMBER, &sub_div_nb,
SPP_HISTORICAL_EDITED_COLUMN, &col_edited,
@@ -246,30 +253,33 @@
if ( col_edited == FALSE && valeur == FALSE )
return FALSE;
- valeur = 1 - valeur;
+ if ( renderer )
+ valeur = 1 - valeur;
+
if ( valeur == 1 )
{
- //~ printf ("avant - account_nb = %d, div = %d, sub_div = %d\n", account_nb, div, sub_div);
- bet_data_hist_add_div ( account_nb, div_number, sub_div_nb );
- bet_data_set_div_amount ( account_nb, div_number, sub_div_nb,
+ //~ printf ("avant - account_number = %d, div = %d, sub_div = %d\n",
+ //~ account_number, div, sub_div);
+ bet_data_hist_add_div ( account_number, div_number, sub_div_nb );
+ bet_data_set_div_amount ( account_number, div_number, sub_div_nb,
gsb_real_import_from_string ( str_amount ) );
gtk_tree_store_set ( GTK_TREE_STORE ( model ), &iter,
SPP_HISTORICAL_SELECT_COLUMN, 1,
SPP_HISTORICAL_RETAINED_COLUMN, str_average,
SPP_HISTORICAL_RETAINED_AMOUNT, str_amount,
- SPP_HISTORICAL_ACCOUNT_NUMBER, account_nb,
+ SPP_HISTORICAL_ACCOUNT_NUMBER, account_number,
SPP_HISTORICAL_DIV_NUMBER, div_number,
SPP_HISTORICAL_SUB_DIV_NUMBER, sub_div_nb,
-1 );
}
else
{
- bet_data_remove_div_hist ( account_nb, div_number, sub_div_nb );
+ bet_data_remove_div_hist ( account_number, div_number, sub_div_nb );
gtk_tree_store_set ( GTK_TREE_STORE ( model ), &iter,
SPP_HISTORICAL_SELECT_COLUMN, FALSE,
SPP_HISTORICAL_RETAINED_COLUMN, "",
SPP_HISTORICAL_RETAINED_AMOUNT, str_amount,
- SPP_HISTORICAL_ACCOUNT_NUMBER, account_nb,
+ SPP_HISTORICAL_ACCOUNT_NUMBER, account_number,
SPP_HISTORICAL_DIV_NUMBER, div_number,
SPP_HISTORICAL_SUB_DIV_NUMBER, sub_div_nb,
SPP_HISTORICAL_EDITED_COLUMN, TRUE,
@@ -300,7 +310,7 @@
if ( str_average )
g_free ( str_average );
str_average = gsb_real_get_string_with_currency ( amount,
- gsb_data_account_get_currency ( account_nb ), TRUE );
+ gsb_data_account_get_currency ( account_number ), TRUE );
gtk_tree_store_set ( GTK_TREE_STORE ( model ),
&parent,
SPP_HISTORICAL_SELECT_COLUMN, TRUE,
@@ -308,13 +318,13 @@
SPP_HISTORICAL_RETAINED_AMOUNT, str_amount,
-1);
if ( bet_historical_amount_differ_average ( model, &parent) )
- bet_data_set_div_amount ( account_nb, div_number, 0, amount );
+ bet_data_set_div_amount ( account_number, div_number, 0, amount );
bet_historical_row_collapse_all ( NULL, &parent, model );
}
else
{
- bet_data_set_div_amount ( account_nb, div_number, 0, null_real );
+ bet_data_set_div_amount ( account_number, div_number, 0, null_real );
gtk_tree_store_set ( GTK_TREE_STORE ( model ), &parent,
SPP_HISTORICAL_SELECT_COLUMN, FALSE,
SPP_HISTORICAL_RETAINED_COLUMN, "",
@@ -324,7 +334,8 @@
}
}
- bet_data_set_maj ( account_nb, BET_MAJ_ESTIMATE );
+ gsb_data_account_set_bet_maj ( account_number, BET_MAJ_ESTIMATE );
+ bet_data_update_bet_module ( account_number, GSB_HISTORICAL_PAGE );
}
if ( etat.modification_fichier == 0 )
@@ -371,7 +382,7 @@
GtkTreeIter parent;
gboolean valeur;
gboolean edited;
- gint account_nb;
+ gint account_number;
gint currency_number;
gint div_number;
gint sub_div_nb;
@@ -382,7 +393,7 @@
gtk_tree_model_get ( GTK_TREE_MODEL ( model ), &iter,
SPP_HISTORICAL_SELECT_COLUMN, &valeur,
- SPP_HISTORICAL_ACCOUNT_NUMBER, &account_nb,
+ SPP_HISTORICAL_ACCOUNT_NUMBER, &account_number,
SPP_HISTORICAL_DIV_NUMBER, &div_number,
SPP_HISTORICAL_SUB_DIV_NUMBER, &sub_div_nb,
SPP_HISTORICAL_EDITED_COLUMN, &edited,
@@ -399,14 +410,14 @@
}
number = gsb_real_get_from_string ( new_text );
- currency_number = gsb_data_account_get_currency ( account_nb );
+ currency_number = gsb_data_account_get_currency ( account_number );
tmp_str = gsb_real_get_string_with_currency ( number, currency_number, TRUE );
- if ( bet_data_search_div_hist ( account_nb, div_number, sub_div_nb ) == FALSE )
- bet_data_hist_add_div ( account_nb, div_number, sub_div_nb );
+ if ( bet_data_search_div_hist ( account_number, div_number, sub_div_nb ) == FALSE )
+ bet_data_hist_add_div ( account_number, div_number, sub_div_nb );
- bet_data_set_div_edited ( account_nb, div_number, sub_div_nb, TRUE );
- bet_data_set_div_amount ( account_nb, div_number, sub_div_nb, number );
+ bet_data_set_div_edited ( account_number, div_number, sub_div_nb, TRUE );
+ bet_data_set_div_amount ( account_number, div_number, sub_div_nb, number );
gtk_tree_store_set ( GTK_TREE_STORE ( model ), &iter,
SPP_HISTORICAL_SELECT_COLUMN, TRUE,
SPP_HISTORICAL_RETAINED_COLUMN, tmp_str,
@@ -423,10 +434,10 @@
if ( is_parent && bet_historical_get_full_div ( model, &parent ) )
{
number = bet_historical_get_children_amount ( model, &parent );
- bet_data_set_div_amount ( account_nb, div_number, 0, number );
+ bet_data_set_div_amount ( account_number, div_number, 0, number );
str_amount = gsb_real_save_real_to_string ( number, 2 );
tmp_str = gsb_real_get_string_with_currency ( number,
- gsb_data_account_get_currency ( account_nb ), TRUE );
+ gsb_data_account_get_currency ( account_number ), TRUE );
gtk_tree_store_set ( GTK_TREE_STORE ( model ),
&parent,
SPP_HISTORICAL_SELECT_COLUMN, TRUE,
@@ -438,7 +449,7 @@
g_free ( tmp_str );
}
- bet_data_set_maj ( account_nb, BET_MAJ_ESTIMATE );
+ gsb_data_account_set_bet_maj ( account_number, BET_MAJ_ESTIMATE );
if ( etat.modification_fichier == 0 )
modification_fichier ( TRUE );
@@ -454,7 +465,6 @@
* */
GtkWidget *bet_historical_get_data_tree_view ( GtkWidget *container )
{
- GtkWidget *notebook;
GtkWidget *scrolled_window;
GtkWidget *tree_view;
GtkTreeStore *tree_model;
@@ -464,9 +474,9 @@
gchar *title;
//~ devel_debug (NULL);
- notebook = g_object_get_data ( G_OBJECT ( notebook_general ), "account_notebook");
tree_view = gtk_tree_view_new ( );
gtk_tree_view_set_rules_hint ( GTK_TREE_VIEW (tree_view), TRUE);
+ g_object_set_data ( G_OBJECT ( account_page ), "hist_tree_view", tree_view );
tree_model = gtk_tree_store_new ( SPP_HISTORICAL_NUM_COLUMNS,
G_TYPE_BOOLEAN, /* SPP_HISTORICAL_SELECT_COLUMN */
@@ -501,6 +511,7 @@
/* create columns */
cell = gtk_cell_renderer_toggle_new ( );
+ g_object_set_data ( G_OBJECT ( account_page ), "toggle_cell", cell );
gtk_cell_renderer_toggle_set_radio ( GTK_CELL_RENDERER_TOGGLE ( cell ),
FALSE );
g_object_set (cell, "xalign", 0.5, NULL);
@@ -526,11 +537,10 @@
"text", SPP_HISTORICAL_DESC_COLUMN,
"cell-background-gdk", SPP_HISTORICAL_BACKGROUND_COLOR,
NULL);
- g_object_set_data ( G_OBJECT ( notebook ), "historical_column_source",
+ g_object_set_data ( G_OBJECT ( account_page ), "historical_column_source",
column );
gtk_tree_view_append_column ( GTK_TREE_VIEW ( tree_view ),
GTK_TREE_VIEW_COLUMN ( column ) );
- //~ gtk_tree_view_column_set_min_width ( column, 300 );
gtk_tree_view_column_set_expand ( GTK_TREE_VIEW_COLUMN ( column ), TRUE );
gtk_tree_view_column_set_resizable ( column, TRUE );
@@ -546,7 +556,6 @@
gtk_tree_view_column_set_alignment ( column, 0.5 );
gtk_tree_view_append_column ( GTK_TREE_VIEW ( tree_view ),
GTK_TREE_VIEW_COLUMN ( column ) );
- //~ gtk_tree_view_column_set_min_width ( column, 120 );
gtk_tree_view_column_set_expand ( GTK_TREE_VIEW_COLUMN ( column ), TRUE );
gtk_tree_view_column_set_resizable ( column, TRUE );
@@ -560,7 +569,6 @@
NULL);
gtk_tree_view_append_column ( GTK_TREE_VIEW ( tree_view ),
GTK_TREE_VIEW_COLUMN ( column ) );
- //~ gtk_tree_view_column_set_min_width ( column, 100 );
g_object_set ( G_OBJECT ( GTK_CELL_RENDERER ( cell ) ), "xalign", 1.0, NULL );
gtk_tree_view_column_set_alignment ( column, 1 );
gtk_tree_view_column_set_clickable ( GTK_TREE_VIEW_COLUMN ( column ), TRUE );
@@ -577,7 +585,6 @@
NULL);
gtk_tree_view_append_column ( GTK_TREE_VIEW ( tree_view ),
GTK_TREE_VIEW_COLUMN ( column ) );
- //~ gtk_tree_view_column_set_min_width ( column, 100 );
g_object_set ( G_OBJECT ( GTK_CELL_RENDERER ( cell ) ), "xalign", 1.0, NULL );
gtk_tree_view_column_set_alignment ( column, 1 );
gtk_tree_view_column_set_clickable ( GTK_TREE_VIEW_COLUMN ( column ), TRUE );
@@ -586,6 +593,7 @@
/* amount retained column */
cell = gtk_cell_renderer_text_new ( );
+ g_object_set_data ( G_OBJECT ( account_page ), "edited_cell", cell );
column = gtk_tree_view_column_new_with_attributes (
_("Amount retained"), cell,
"text", SPP_HISTORICAL_RETAINED_COLUMN,
@@ -595,7 +603,6 @@
NULL);
gtk_tree_view_append_column ( GTK_TREE_VIEW ( tree_view ),
GTK_TREE_VIEW_COLUMN ( column ) );
- //~ gtk_tree_view_column_set_min_width ( column, 100 );
g_object_set ( G_OBJECT ( GTK_CELL_RENDERER ( cell ) ), "xalign", 1.0, NULL );
gtk_tree_view_column_set_alignment ( column, 1 );
gtk_tree_view_column_set_clickable ( GTK_TREE_VIEW_COLUMN ( column ), TRUE );
@@ -635,7 +642,6 @@
* */
void bet_historical_populate_data ( gint account_number )
{
- GtkWidget *notebook;
GtkWidget *tree_view;
GtkTreeModel *model;
gint fyear_number;
@@ -644,9 +650,8 @@
GSList* tmp_list;
GHashTable *list_div;
- //~ devel_debug (NULL);
- notebook = g_object_get_data ( G_OBJECT ( notebook_general ), "account_notebook");
- tree_view = g_object_get_data (G_OBJECT ( notebook ), "bet_historical_treeview" );
+ devel_debug_int ( account_number );
+ tree_view = g_object_get_data (G_OBJECT ( account_page ), "bet_historical_treeview" );
if ( GTK_IS_TREE_VIEW ( tree_view ) == FALSE )
return;
@@ -664,14 +669,14 @@
g_date_subtract_years ( date_min, 1 );
date_max = gdate_today ( );
g_date_subtract_days ( date_max, 1 );
- g_object_set_data ( G_OBJECT ( notebook ), "bet_historical_period",
+ g_object_set_data ( G_OBJECT ( account_page ), "bet_historical_period",
g_strdup ( _("12 months rolling") ) );
}
else
{
date_min = gsb_data_fyear_get_beginning_date ( fyear_number );
date_max = gsb_data_fyear_get_end_date ( fyear_number );
- g_object_set_data ( G_OBJECT ( notebook ), "bet_historical_period",
+ g_object_set_data ( G_OBJECT ( account_page ), "bet_historical_period",
g_strdup ( gsb_data_fyear_get_name ( fyear_number ) ) );
}
list_div = g_hash_table_new_full ( g_str_hash,
@@ -681,7 +686,6 @@
/* search transactions of the account */
tmp_list = gsb_data_transaction_get_complete_transactions_list ( );
-
while ( tmp_list )
{
gint transaction_number;
@@ -712,6 +716,7 @@
bet_data_populate_div ( transaction_number, TRUE, list_div );
}
+
bet_historical_affiche_div ( list_div, tree_view );
//~ bet_data_synchronise_hist_div_list ( list_div );
@@ -750,7 +755,6 @@
gpointer value,
gpointer user_data )
{
- GtkWidget *notebook;
SH *sh = ( SH* ) value;
SBR *sbr = sh -> sbr;
GtkTreeView *tree_view = ( GtkTreeView * ) user_data;
@@ -772,13 +776,16 @@
gsb_real average;
gsb_real retained;
gsb_real amount;
+ kind_account kind;
div_number = sh -> div;
div_name = bet_data_get_div_name ( div_number, 0, NULL );
account_nb = sh -> account_nb;
+ kind = gsb_data_account_get_kind ( account_nb );
+ if ( kind == GSB_TYPE_CASH )
+ edited = FALSE;
- notebook = g_object_get_data ( G_OBJECT ( notebook_general ), "account_notebook");
- titre = g_object_get_data ( G_OBJECT ( notebook ), "bet_historical_period" );
+ titre = g_object_get_data ( G_OBJECT ( account_page ), "bet_historical_period" );
model = gtk_tree_view_get_model ( tree_view );
@@ -801,7 +808,7 @@
SPP_HISTORICAL_ACCOUNT_NUMBER, account_nb,
SPP_HISTORICAL_DIV_NUMBER, div_number,
SPP_HISTORICAL_SUB_DIV_NUMBER, 0,
- SPP_HISTORICAL_EDITED_COLUMN, TRUE,
+ SPP_HISTORICAL_EDITED_COLUMN, edited,
-1);
if ( bet_data_search_div_hist ( account_nb, div_number, 0 )
@@ -874,7 +881,7 @@
SPP_HISTORICAL_ACCOUNT_NUMBER, account_nb,
SPP_HISTORICAL_DIV_NUMBER, div_number,
SPP_HISTORICAL_SUB_DIV_NUMBER, sub_sh -> div,
- SPP_HISTORICAL_EDITED_COLUMN, TRUE,
+ SPP_HISTORICAL_EDITED_COLUMN, edited,
-1);
if ( bet_data_search_div_hist ( account_nb, div_number, sub_sh -> div ) )
@@ -1037,20 +1044,26 @@
GDate *date_min,
GDate *date_max )
{
- GtkWidget *notebook;
GtkWidget *tree_view;
GtkTreeModel *model;
GtkTreeIter iter;
GtkTreeIter fils_iter;
- //~ devel_debug (NULL);
- notebook = g_object_get_data ( G_OBJECT ( notebook_general ), "account_notebook");
- tree_view = g_object_get_data ( G_OBJECT ( notebook ), "bet_historical_treeview" );
+ devel_debug (NULL);
+ tree_view = g_object_get_data ( G_OBJECT ( account_page ), "bet_historical_treeview" );
model = gtk_tree_view_get_model ( GTK_TREE_VIEW ( tree_view ) );
if ( gtk_tree_model_get_iter_first ( GTK_TREE_MODEL ( model ), &iter ) )
{
gboolean valeur;
+ gint account_number;
+
+ /* test du numero de compte */
+ gtk_tree_model_get ( GTK_TREE_MODEL ( model ), &iter,
+ SPP_HISTORICAL_ACCOUNT_NUMBER, &account_number,
+ -1 );
+ if ( account_number != gsb_gui_navigation_get_current_account ( ) )
+ return;
do
{
@@ -1170,9 +1183,7 @@
if ( edited )
{
- tree_view = g_object_get_data ( G_OBJECT (
- g_object_get_data ( G_OBJECT ( notebook_general ),
- "account_notebook") ),
+ tree_view = g_object_get_data ( G_OBJECT ( account_page ),
"bet_historical_treeview" );
gtk_tree_view_collapse_row ( tree_view,
gtk_tree_model_get_path ( model, parent ) );
@@ -1315,9 +1326,7 @@
GtkTreeModel *model )
{
if ( tree_view == NULL )
- tree_view = g_object_get_data ( G_OBJECT (
- g_object_get_data ( G_OBJECT ( notebook_general ), "account_notebook") ),
- "bet_historical_treeview" );
+ tree_view = g_object_get_data ( G_OBJECT ( account_page ), "bet_historical_treeview" );
gtk_tree_view_collapse_row ( tree_view,
gtk_tree_model_get_path ( model, iter ) );
gtk_tree_selection_select_iter ( gtk_tree_view_get_selection (
@@ -1469,7 +1478,7 @@
SPP_HISTORICAL_EDITED_COLUMN, FALSE,
-1);
- bet_data_set_maj ( account_number, BET_MAJ_ESTIMATE );
+ gsb_data_account_set_bet_maj ( account_number, BET_MAJ_ESTIMATE );
if ( etat.modification_fichier == 0 )
modification_fichier ( TRUE );
@@ -1508,20 +1517,28 @@
* */
gboolean bet_historical_initializes_account_settings ( gint account_number )
{
- GtkWidget *notebook;
GtkWidget *combo = NULL;
gint fyear_number;
+ gpointer pointer;
- notebook = g_object_get_data ( G_OBJECT ( notebook_general ), "account_notebook" );
- combo = g_object_get_data ( G_OBJECT ( notebook ), "bet_hist_fyear_combo" );
+ combo = g_object_get_data ( G_OBJECT ( account_page ), "bet_hist_fyear_combo" );
fyear_number = gsb_data_account_get_bet_hist_fyear ( account_number );
+ pointer = g_object_get_data ( G_OBJECT ( combo ), "pointer" );
+ g_signal_handlers_block_by_func ( G_OBJECT ( combo ),
+ G_CALLBACK ( bet_config_fyear_clicked ),
+ pointer );
+
gsb_fyear_select_iter_by_number ( combo,
bet_fyear_model,
bet_fyear_model_filter,
fyear_number );
+ g_signal_handlers_unblock_by_func ( G_OBJECT ( combo ),
+ G_CALLBACK ( bet_config_fyear_clicked ),
+ pointer );
+
return FALSE;
}
@@ -1585,6 +1602,77 @@
*
*
* */
+void bet_historical_g_signal_block_tree_view ( void )
+{
+ GtkTreeView *tree_view;
+ gpointer cell;
+ GtkTreeModel *tree_model;
+
+ hist_block_signal = TRUE;
+ tree_view = g_object_get_data ( G_OBJECT ( account_page ), "hist_tree_view" );
+ tree_model = gtk_tree_view_get_model ( GTK_TREE_VIEW ( tree_view ) );
+
+ cell = g_object_get_data ( G_OBJECT ( account_page ), "toggle_cell" );
+ g_signal_handlers_block_by_func ( cell, bet_historical_div_toggle_clicked, tree_model );
+
+ cell = g_object_get_data ( G_OBJECT ( account_page ), "edited_cell" );
+ g_signal_handlers_block_by_func ( tree_view, bet_historical_button_press, NULL );
+}
+
+
+/**
+ *
+ *
+ *
+ *
+ * */
+void bet_historical_g_signal_unblock_tree_view ( void )
+{
+ GtkTreeView *tree_view;
+ gpointer cell;
+ GtkTreeModel *tree_model;
+
+ if ( hist_block_signal == FALSE )
+ return;
+
+ hist_block_signal = FALSE;
+ tree_view = g_object_get_data ( G_OBJECT ( account_page ), "hist_tree_view" );
+ tree_model = gtk_tree_view_get_model ( GTK_TREE_VIEW ( tree_view ) );
+ cell = g_object_get_data ( G_OBJECT ( account_page ), "toggle_cell" );
+
+ g_signal_handlers_unblock_by_func ( cell, bet_historical_div_toggle_clicked, tree_model );
+
+ cell = g_object_get_data ( G_OBJECT ( account_page ), "edited_cell" );
+ g_signal_handlers_unblock_by_func ( tree_view, bet_historical_button_press, NULL );
+}
+
+
+/**
+ *
+ *
+ *
+ *
+ * */
+void bet_historical_set_page_title ( gint account_number )
+{
+ GtkWidget * widget;
+ gchar *title;
+
+ title = g_strdup_printf (
+ _("Please select the data source for the account: \"%s\""),
+ gsb_data_account_get_name ( account_number ) );
+ widget = GTK_WIDGET ( g_object_get_data ( G_OBJECT ( account_page ), "bet_hist_title") );
+ gtk_label_set_label ( GTK_LABEL ( widget ), title );
+ g_free ( title );
+}
+
+
+/**
+ *
+ *
+ *
+ *
+ * */
/* Local Variables: */
/* c-basic-offset: 4 */
Index: gsb_data_payee.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_payee.c,v
retrieving revision 1.53
retrieving revision 1.53.2.1
diff -u -d -r1.53 -r1.53.2.1
--- gsb_data_payee.c 24 Apr 2010 18:23:30 -0000 1.53
+++ gsb_data_payee.c 21 May 2010 22:39:55 -0000 1.53.2.1
@@ -62,7 +62,7 @@
/*START_STATIC*/
-static void _gsb_data_payee_free ( struct_payee* payee);
+static void _gsb_data_payee_free ( struct_payee* payee);
static GSList *gsb_data_payee_get_name_list ( void );
static gint gsb_data_payee_get_pointer_from_name_in_glist ( struct_payee *payee,
const gchar *name );
@@ -744,19 +744,22 @@
* we work with empty_payee */
if (!payee
- &&
- !gsb_data_transaction_get_split_of_transaction (transaction_number)
- &&
- gsb_data_transaction_get_contra_transaction_number (transaction_number) == 0)
- payee = empty_payee;
+ &&
+ !gsb_data_transaction_get_split_of_transaction (transaction_number)
+ &&
+ gsb_data_transaction_get_contra_transaction_number (transaction_number) == 0)
+ payee = empty_payee;
- payee -> payee_nb_transactions --;
- payee -> payee_balance = gsb_real_sub ( payee -> payee_balance,
- gsb_data_transaction_get_adjusted_amount_for_currency ( transaction_number,
- payee_tree_currency (), -1));
+ if (payee)
+ {
+ payee -> payee_nb_transactions --;
+ payee -> payee_balance = gsb_real_sub ( payee -> payee_balance,
+ gsb_data_transaction_get_adjusted_amount_for_currency ( transaction_number,
+ payee_tree_currency (), -1));
- if ( !payee -> payee_nb_transactions ) /* Cope with float errors */
- payee -> payee_balance = null_real;
+ if ( !payee -> payee_nb_transactions ) /* Cope with float errors */
+ payee -> payee_balance = null_real;
+ }
}
Index: gsb_real.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_real.c,v
retrieving revision 1.78
retrieving revision 1.78.2.1
diff -u -d -r1.78 -r1.78.2.1
--- gsb_real.c 17 Apr 2010 15:37:03 -0000 1.78
+++ gsb_real.c 21 May 2010 22:39:55 -0000 1.78.2.1
@@ -378,13 +378,14 @@
gint8 sign = 0;
gint8 dot_position = -1;
const gchar *p = string;
+ gboolean success = FALSE;
if ( !string)
return error_real;
mts_len = mon_thousands_sep
- ? strlen ( mon_thousands_sep )
- : 0;
+ ? strlen ( mon_thousands_sep )
+ : 0;
mdp_len = mon_decimal_point ? strlen ( mon_decimal_point ) : 0;
if ( mon_thousands_sep )
@@ -396,9 +397,9 @@
}
decimal_chars = g_strconcat(default_decimal_char_dot,
- default_decimal_char_comma,
- mon_decimal_point,
- NULL);
+ default_decimal_char_comma,
+ mon_decimal_point,
+ NULL);
space_chars = g_strconcat(" ", mon_thousands_sep, NULL);
for ( ; ; )
@@ -408,24 +409,24 @@
mantissa *= 10;
mantissa += ( *p - '0' );
if ( mantissa > G_MAXLONG )
- return error_real;
+ {
+ break;
+ }
if ( sign == 0 ) sign = 1; // no sign found yet ==> positive
++nb_digits;
++p;
}
else if ( *p == 0 ) // terminal zero
{
- gsb_real result;
- result.mantissa = sign * mantissa;
- result.exponent = ( dot_position >= 0 )
- ? nb_digits - dot_position
- : 0;
- return result;
+ success = TRUE;
+ break;
}
else if ( decimal_chars && strchr ( decimal_chars, *p ) )
{
if ( dot_position >= 0 ) // already found a decimal separator
- return error_real;
+ {
+ break;
+ }
dot_position = nb_digits;
p = g_utf8_find_next_char ( p, NULL );
}
@@ -437,25 +438,42 @@
else if ( strchr ( negative_chars, *p ) )
{
if ( sign != 0 ) // sign already set
- return error_real;
+ {
+ break;
+ }
sign = -1;
++p;
}
else if ( strchr ( positive_chars, *p ) )
{
if ( sign != 0 ) // sign already set
- return error_real;
+ {
+ break;
+ }
sign = 1;
++p;
}
else // unknown char ==> error
{
- return error_real;
+ break;
}
}
- /* Free memory */
- g_free ( decimal_chars );
- g_free ( space_chars );
+ /* Free memory */
+ g_free ( decimal_chars );
+ g_free ( space_chars );
+ if (success == TRUE)
+ {
+ gsb_real result;
+ result.mantissa = sign * mantissa;
+ result.exponent = ( dot_position >= 0 )
+ ? nb_digits - dot_position
+ : 0;
+ return result;
+ }
+ else
+ {
+ return error_real;
+ }
}
@@ -602,7 +620,9 @@
while ( exponent < target_exponent )
{
- gint64 new_mantissa = mantissa * 10;
+ gint64 new_mantissa;
+
+ new_mantissa = mantissa * 10;
if ( ( new_mantissa > G_MAXLONG ) || ( new_mantissa < G_MINLONG ) )
{
succes = FALSE;
@@ -630,9 +650,10 @@
* */
gboolean gsb_real_normalize ( gsb_real *number_1, gsb_real *number_2 )
{
+ gboolean safe_precision = TRUE;
+
gsb_real_minimize_exponent ( number_1 );
gsb_real_minimize_exponent ( number_2 );
- gboolean safe_precision = TRUE;
if ( number_1->exponent < number_2->exponent )
{
Index: gsb_data_report_text_comparison.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_report_text_comparison.c,v
retrieving revision 1.17
retrieving revision 1.17.4.1
diff -u -d -r1.17 -r1.17.4.1
--- gsb_data_report_text_comparison.c 12 Jun 2009 19:06:56 -0000 1.17
+++ gsb_data_report_text_comparison.c 21 May 2010 22:39:55 -0000 1.17.4.1
@@ -87,8 +87,8 @@
/*START_STATIC*/
-static void _gsb_data_report_text_comparison_free ( struct_text_comparison* text_comparison );
-static struct_text_comparison *gsb_data_report_text_comparison_get_struct_by_no ( gint text_comparison_number );
+static void _gsb_data_report_text_comparison_free ( struct_text_comparison* text_comparison );
+static struct_text_comparison *gsb_data_report_text_comparison_get_struct_by_no ( gint text_comparison_number );
static gint gsb_data_report_text_comparison_max_number ( void );
/*END_STATIC*/
Index: affichage.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/affichage.c,v
retrieving revision 1.173
retrieving revision 1.173.2.1
diff -u -d -r1.173 -r1.173.2.1
--- affichage.c 5 Apr 2010 21:24:53 -0000 1.173
+++ affichage.c 21 May 2010 22:39:55 -0000 1.173.2.1
@@ -62,14 +62,14 @@
static gboolean modification_logo_accueil ( );
static gboolean preferences_switch_headings_bar ( GtkWidget *toggle_button,
gpointer null );
-static gboolean preferences_view_color_changed ( GtkWidget *color_button,
+static gboolean preferences_view_color_changed ( GtkWidget *color_button,
GtkWidget *combobox );
-static gboolean preferences_view_color_combobox_changed ( GtkWidget *combobox,
+static gboolean preferences_view_color_combobox_changed ( GtkWidget *combobox,
GtkWidget *color_button );
-static gboolean preferences_view_color_default ( GtkWidget *button,
+static gboolean preferences_view_color_default ( GtkWidget *button,
GtkWidget *combobox );
-static GtkWidget *preferences_view_create_color_combobox (void);
-static gboolean preferences_view_update_preview_logo ( GtkFileChooser *file_chooser,
+static GtkWidget *preferences_view_create_color_combobox (void);
+static gboolean preferences_view_update_preview_logo ( GtkFileChooser *file_chooser,
GtkWidget *preview );
static void update_fonte_listes ( gchar *fontname,
gpointer null);
@@ -83,6 +83,7 @@
extern GdkColor calendar_entry_color;
extern GdkColor couleur_bet_division;
extern GdkColor couleur_bet_future;
+extern GdkColor couleur_bet_transfert;
extern GdkColor couleur_fond[2];
extern GdkColor couleur_grise;
extern GdkColor couleur_jour;
@@ -91,6 +92,7 @@
extern GdkColor default_calendar_entry_color;
extern GdkColor default_couleur_bet_division;
extern GdkColor default_couleur_bet_future;
+extern GdkColor default_couleur_bet_transfert;
extern GdkColor default_couleur_fond[2];
extern GdkColor default_couleur_grise;
extern GdkColor default_couleur_jour;
@@ -797,6 +799,7 @@
{ N_("Background of invalid date entry"), &calendar_entry_color, &default_calendar_entry_color },
{ N_("Background of bet division"), &couleur_bet_division, &default_couleur_bet_division },
{ N_("Background of bet futur"), &couleur_bet_future, &default_couleur_bet_future },
+ { N_("Background of bet transfer"), &couleur_bet_transfert, &default_couleur_bet_transfert },
{ NULL, 0, 0},
};
Index: balance_estimate_data.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/balance_estimate_data.h,v
retrieving revision 1.15
retrieving revision 1.15.2.1
diff -u -d -r1.15 -r1.15.2.1
--- balance_estimate_data.h 18 Apr 2010 07:53:06 -0000 1.15
+++ balance_estimate_data.h 21 May 2010 22:39:55 -0000 1.15.2.1
@@ -5,6 +5,7 @@
/* START_INCLUDE_H */
#include "././gsb_real.h"
+#include "./fenetre_principale.h"
/* END_INCLUDE_H */
@@ -12,6 +13,7 @@
typedef struct _historical SH;
typedef struct _hist_div struct_hist_div;
typedef struct _future_data struct_futur_data;
+typedef struct _transfert_data struct_transfert_data;
struct _bet_range
{
@@ -65,12 +67,19 @@
};
-enum type_maj
+struct _transfert_data
{
- BET_MAJ_FALSE = 0,
- BET_MAJ_ESTIMATE,
- BET_MAJ_HISTORICAL,
- BET_MAJ_ALL,
+ gint number;
+ gint account_number;
+ gint type;
+ gint replace_account;
+ gint replace_transaction;
+ gint auto_inc_month;
+ GDate *date;
+ gint category_number;
+ gint sub_category_number;
+ gint budgetary_number;
+ gint sub_budgetary_number;
};
@@ -90,7 +99,6 @@
gint sub_div,
const gchar *return_value_error );
gint bet_data_get_div_number ( gint transaction_number, gboolean is_transaction );
-gint bet_data_get_maj ( void );
gint bet_data_get_selected_currency ( void );
GPtrArray *bet_data_get_strings_to_save ( void );
gint bet_data_get_sub_div_nb ( gint transaction_number, gboolean is_transaction );
@@ -103,6 +111,7 @@
gboolean bet_data_populate_div ( gint transaction_number,
gboolean is_transaction,
GHashTable *list_div );
+gboolean bet_data_remove_all_bet_data ( gint account_number );
gboolean bet_data_remove_div_hist ( gint account_nb, gint div_number, gint sub_div_nb );
gboolean bet_data_search_div_hist ( gint account_nb, gint div_number, gint sub_div_nb );
void bet_data_select_bet_pages ( gint account_number );
@@ -117,9 +126,17 @@
gboolean bet_data_set_div_ptr ( gint type_div );
void bet_data_set_maj ( gint account_number, gint type_maj );
void bet_data_synchronise_hist_div_list ( GHashTable *list_div );
+gboolean bet_data_transfert_add_line ( struct_transfert_data *transfert );
+GHashTable *bet_data_transfert_get_list ( void );
+gboolean bet_data_transfert_modify_line ( struct_transfert_data *transfert );
+gboolean bet_data_transfert_remove_line ( gint account_number, gint number );
+gboolean bet_data_transfert_set_line_from_file ( struct_transfert_data *transfert );
+void bet_data_transfert_update_date_if_necessary ( struct_transfert_data *transfert );
+void bet_data_update_bet_module ( gint account_number, guint page );
void struct_free_bet_historical ( SH *sh );
struct_futur_data *struct_initialise_bet_future ( void );
SBR *struct_initialise_bet_range ( void );
+struct_transfert_data *struct_initialise_bet_transfert ( void );
struct_hist_div *struct_initialise_hist_div ( void );
/* END_DECLARATION */
Index: gsb_data_report_amout_comparison.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_report_amout_comparison.c,v
retrieving revision 1.14
retrieving revision 1.14.4.1
diff -u -d -r1.14 -r1.14.4.1
--- gsb_data_report_amout_comparison.c 27 Apr 2009 19:41:03 -0000 1.14
+++ gsb_data_report_amout_comparison.c 21 May 2010 22:39:55 -0000 1.14.4.1
@@ -67,8 +67,8 @@
/*START_STATIC*/
-static void _gsb_data_report_amount_comparison_free ( struct_amount_comparison *amount_comparison );
-static struct_amount_comparison *gsb_data_report_amount_comparison_get_struct_by_no ( gint amount_comparison_number );
+static void _gsb_data_report_amount_comparison_free ( struct_amount_comparison *amount_comparison );
+static struct_amount_comparison *gsb_data_report_amount_comparison_get_struct_by_no ( gint amount_comparison_number );
static gint gsb_data_report_amount_comparison_max_number ( void );
/*END_STATIC*/
Index: balance_estimate_data.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/balance_estimate_data.c,v
retrieving revision 1.22
retrieving revision 1.22.2.1
diff -u -d -r1.22 -r1.22.2.1
--- balance_estimate_data.c 20 Apr 2010 21:34:33 -0000 1.22
+++ balance_estimate_data.c 21 May 2010 22:39:55 -0000 1.22.2.1
@@ -30,6 +30,7 @@
/*START_INCLUDE*/
#include "balance_estimate_data.h"
+#include "./balance_estimate_hist.h"
#include "./balance_estimate_tab.h"
#include "./dialog.h"
#include "./gsb_data_account.h"
@@ -58,12 +59,14 @@
static gboolean bet_data_update_div ( SH *sh, gint transaction_number, gint sub_div );
static void struct_free_bet_future ( struct_futur_data *scheduled );
static void struct_free_bet_range ( SBR *sbr );
+static void struct_free_bet_transfert ( struct_transfert_data *transfert );
static void struct_free_hist_div ( struct_hist_div *shd );
static SH *struct_initialise_bet_historical ( void );
/*END_STATIC*/
/*START_EXTERN*/
+extern GtkWidget *account_page;
extern GtkWidget *notebook_general;
extern gsb_real null_real;
/*END_EXTERN*/
@@ -80,11 +83,127 @@
/** the hashtable which contains all the bet_future structures */
static GHashTable *bet_future_list;
-
static gint future_number;
-/* force la mise à jour des données */
-static gint bet_maj = FALSE;
+/** the hashtable for account_balance */
+static GHashTable *bet_transfert_list;
+static gint transfert_number;
+
+
+/**
+ * Sélectionne les onglets du module gestion budgétaire en fonction du type de compte
+ *
+ */
+void bet_data_select_bet_pages ( gint account_number )
+{
+ GtkWidget *page;
+ kind_account kind;
+ gint current_page;
+ gint bet_use_budget;
+
+ devel_debug_int ( account_number );
+
+ kind = gsb_data_account_get_kind ( account_number );
+ current_page = gtk_notebook_get_current_page ( GTK_NOTEBOOK ( account_page ) );
+ bet_use_budget = gsb_data_account_get_bet_use_budget ( account_number );
+ if ( bet_use_budget <= 0 )
+ kind = GSB_TYPE_ASSET;
+
+ switch ( kind )
+ {
+ case GSB_TYPE_BANK:
+ page = gtk_notebook_get_nth_page ( GTK_NOTEBOOK ( account_page ), GSB_ESTIMATE_PAGE );
+ gtk_widget_show ( page );
+ page = gtk_notebook_get_nth_page ( GTK_NOTEBOOK ( account_page ), GSB_HISTORICAL_PAGE );
+ gtk_widget_show ( page );
+ bet_historical_g_signal_unblock_tree_view ( );
+ gsb_data_account_set_bet_maj ( account_number, BET_MAJ_ALL );
+ if ( current_page < GSB_PROPERTIES_PAGE
+ &&
+ gsb_data_account_get_bet_use_budget ( account_number ) == FALSE )
+ gtk_notebook_set_current_page ( GTK_NOTEBOOK ( account_page ), GSB_TRANSACTIONS_PAGE );
+ break;
+ case GSB_TYPE_CASH:
+ page = gtk_notebook_get_nth_page ( GTK_NOTEBOOK ( account_page ), GSB_ESTIMATE_PAGE );
+ gtk_widget_hide ( page );
+ page = gtk_notebook_get_nth_page ( GTK_NOTEBOOK ( account_page ), GSB_HISTORICAL_PAGE );
+ gtk_widget_show ( page );
+ if ( current_page == GSB_ESTIMATE_PAGE )
+ gtk_notebook_set_current_page ( GTK_NOTEBOOK ( account_page ), GSB_HISTORICAL_PAGE );
+ bet_historical_g_signal_block_tree_view ( );
+ gsb_data_account_set_bet_maj ( account_number, BET_MAJ_HISTORICAL );
+ break;
+ case GSB_TYPE_LIABILITIES:
+ page = gtk_notebook_get_nth_page ( GTK_NOTEBOOK ( account_page ), GSB_ESTIMATE_PAGE );
+ gtk_widget_show ( page );
+ if ( current_page == GSB_HISTORICAL_PAGE )
+ gtk_notebook_set_current_page ( GTK_NOTEBOOK ( account_page ), GSB_ESTIMATE_PAGE );
+ page = gtk_notebook_get_nth_page ( GTK_NOTEBOOK ( account_page ), GSB_HISTORICAL_PAGE );
+ gtk_widget_hide ( page );
+ gsb_data_account_set_bet_maj ( account_number, BET_MAJ_ESTIMATE );
+ break;
+ case GSB_TYPE_ASSET:
+ if ( current_page < GSB_PROPERTIES_PAGE )
+ gtk_notebook_set_current_page ( GTK_NOTEBOOK ( account_page ), GSB_TRANSACTIONS_PAGE );
+ page = gtk_notebook_get_nth_page ( GTK_NOTEBOOK ( account_page ), GSB_ESTIMATE_PAGE );
+ gtk_widget_hide ( page );
+ page = gtk_notebook_get_nth_page ( GTK_NOTEBOOK ( account_page ), GSB_HISTORICAL_PAGE );
+ gtk_widget_hide ( page );
+ break;
+ }
+}
+
+
+/*
+ * Met à jour les données à afficher dans les différentes vues du module
+ *
+ *
+ */
+void bet_data_update_bet_module ( gint account_number, guint page )
+{
+ gint type_maj;
+ kind_account kind;
+
+ devel_debug_int ( account_number );
+
+ /* test account number */
+ if ( account_number == -1 )
+ return;
+
+ type_maj = gsb_data_account_get_bet_maj ( account_number );
+ if ( type_maj == BET_MAJ_FALSE )
+ return;
+
+ kind = gsb_data_account_get_kind ( account_number );
+
+ printf ("account_number = %d kind = %d page = %d type_maj = %d\n",
+ account_number, kind, page, type_maj );
+
+ if ( page == -1 && gsb_gui_navigation_get_current_page ( ) == GSB_ACCOUNT_PAGE )
+ page = gtk_notebook_get_current_page ( GTK_NOTEBOOK ( account_page ) );
+
+ switch ( page )
+ {
+ case GSB_ESTIMATE_PAGE:
+ bet_array_update_estimate_tab ( account_number, type_maj );
+ gsb_data_account_set_bet_maj ( account_number, BET_MAJ_FALSE );
+ break;
+ case GSB_HISTORICAL_PAGE:
+ if ( type_maj == BET_MAJ_ALL )
+ {
+ bet_historical_populate_data ( account_number );
+ gsb_data_account_set_bet_maj ( account_number, BET_MAJ_ESTIMATE );
+ }
+ else if ( type_maj == BET_MAJ_HISTORICAL )
+ {
+ bet_historical_populate_data ( account_number );
+ gsb_data_account_set_bet_maj ( account_number, BET_MAJ_FALSE );
+ }
+ break;
+ default:
+ break;
+ }
+}
/**
@@ -106,74 +225,13 @@
(GDestroyNotify) struct_free_bet_future );
future_number = 0;
- return FALSE;
-}
-
-
-/**
- *
- *
- *
- *
- * */
-gint bet_data_get_maj ( void )
-{
- return bet_maj;
-}
-
-
-/**
- *
- *
- *
- *
- * */
-void bet_data_set_maj ( gint account_number, gint type_maj )
-{
- GtkWidget *notebook;
- GtkWidget *child;
- const gchar *label;
-
- //~ devel_debug_int (account_number);
- if ( type_maj != bet_maj )
- {
- switch ( type_maj )
- {
- case BET_MAJ_FALSE:
- bet_maj = type_maj;
- return;
- break;
- case BET_MAJ_ESTIMATE:
- if ( bet_maj == BET_MAJ_FALSE )
- bet_maj = type_maj;
- else if ( bet_maj == BET_MAJ_HISTORICAL )
- bet_maj = BET_MAJ_ALL;
- break;
- case BET_MAJ_HISTORICAL:
- if ( bet_maj == BET_MAJ_FALSE )
- bet_maj = type_maj;
- else if ( bet_maj == BET_MAJ_ESTIMATE )
- bet_maj = BET_MAJ_ALL;
- break;
- case BET_MAJ_ALL:
- bet_maj = type_maj;
- break;
- }
-
- if ( account_number == -1
- || account_number != gsb_gui_navigation_get_current_account ( ) )
- return;
- }
-
- notebook = g_object_get_data ( G_OBJECT ( notebook_general ), "account_notebook");
- child = gtk_notebook_get_nth_page ( GTK_NOTEBOOK ( notebook ),
- gtk_notebook_get_current_page ( GTK_NOTEBOOK ( notebook ) ) );
- label = gtk_widget_get_name ( child );
+ bet_transfert_list = g_hash_table_new_full ( g_str_hash,
+ g_str_equal,
+ (GDestroyNotify) g_free,
+ (GDestroyNotify) struct_free_bet_transfert );
+ transfert_number = 0;
- if ( g_strcmp0 ( label, "forecast_page" ) == 0 )
- bet_array_update_estimate_tab ( account_number );
- else if ( g_strcmp0 ( label, "historical_page" ) == 0 )
- bet_array_update_estimate_tab ( account_number );
+ return FALSE;
}
@@ -309,9 +367,6 @@
char *sub_key;
struct_hist_div *shd;
- //~ devel_debug ( g_strdup_printf ("account_nb = %d div_number = %d sub_div_nb = %d",
- //~ account_nb, div_number, sub_div_nb));
-
if ( account_nb == 0 )
key = g_strconcat ("0:", utils_str_itoa ( div_number ), NULL );
else
@@ -710,8 +765,13 @@
gchar *tmp_str = NULL;
GHashTableIter iter;
gpointer key, value;
+ gint index = 0;
- if ( g_hash_table_size ( bet_hist_div_list ) == 0 )
+ if ( g_hash_table_size ( bet_hist_div_list ) == 0
+ &&
+ g_hash_table_size ( bet_future_list ) == 0
+ &&
+ g_hash_table_size ( bet_transfert_list ) == 0 )
return NULL;
tab = g_ptr_array_new ( );
@@ -805,6 +865,36 @@
g_free (limit_date);
}
+ g_hash_table_iter_init ( &iter, bet_transfert_list );
+ index = 0;
+ while ( g_hash_table_iter_next ( &iter, &key, &value ) )
+ {
+ struct_transfert_data *transfert = ( struct_transfert_data* ) value;
+ gchar *date;
+
+ /* set the dates */
+ date = gsb_format_gdate_safe ( transfert -> date );
+
+ tmp_str = g_markup_printf_escaped ( "\t<Bet_transfert Nb=\"%d\" Dt=\"%s\" Ac=\"%d\" "
+ "Ty=\"%d\" Ra=\"%d\" Rt=\"%d\" Aim=\"%d\" Ca=\"%d\" Sca=\"%d\" "
+ "Bu=\"%d\" Sbu=\"%d\" />\n",
+ ++index,
+ my_safe_null_str ( date ),
+ transfert -> account_number,
+ transfert -> type,
+ transfert -> replace_account,
+ transfert -> replace_transaction,
+ transfert -> auto_inc_month,
+ transfert -> category_number,
+ transfert -> sub_category_number,
+ transfert -> budgetary_number,
+ transfert -> sub_budgetary_number );
+
+ g_ptr_array_add ( tab, tmp_str );
+
+ g_free (date);
+ }
+
return tab;
}
@@ -965,52 +1055,6 @@
}
/**
- * Sélectionne les onglets du module gestion budgétaire en fonction du type de compte
- *
- */
-void bet_data_select_bet_pages ( gint account_number )
-{
- GtkWidget *notebook;
- GtkWidget *page;
- kind_account kind;
- gint current_page;
-
- notebook = g_object_get_data ( G_OBJECT ( notebook_general ), "account_notebook");
- kind = gsb_data_account_get_kind ( account_number );
- current_page = gtk_notebook_get_current_page ( GTK_NOTEBOOK ( notebook ) );
-
- switch ( kind )
- {
- case GSB_TYPE_BANK:
- case GSB_TYPE_CASH:
- page = gtk_notebook_get_nth_page ( GTK_NOTEBOOK ( notebook ), 1 );
- gtk_widget_show ( page );
- page = gtk_notebook_get_nth_page ( GTK_NOTEBOOK ( notebook ), 2 );
- gtk_widget_show ( page );
- bet_data_set_maj ( account_number, BET_MAJ_ALL );
- break;
- case GSB_TYPE_LIABILITIES:
- page = gtk_notebook_get_nth_page ( GTK_NOTEBOOK ( notebook ), 1 );
- gtk_widget_show ( page );
- if ( current_page == 2 )
- gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook ), 1 );
- page = gtk_notebook_get_nth_page ( GTK_NOTEBOOK ( notebook ), 2 );
- gtk_widget_hide ( page );
- bet_data_set_maj ( account_number, BET_MAJ_ALL );
- break;
- case GSB_TYPE_ASSET:
- if ( current_page < 2 )
- gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook ), 0 );
- page = gtk_notebook_get_nth_page ( GTK_NOTEBOOK ( notebook ), 1 );
- gtk_widget_hide ( page );
- page = gtk_notebook_get_nth_page ( GTK_NOTEBOOK ( notebook ), 2 );
- gtk_widget_hide ( page );
- break;
- }
-}
-
-
-/**
*
*
*
@@ -1051,7 +1095,7 @@
/**
- * add lines creates in the tab_array
+ * add lines creates in the bet_future_list
*
*
*
@@ -1305,7 +1349,7 @@
return new_sch;
}
/**
- *
+ * supprime l'occurence sélectionnée.
*
*
*
@@ -1333,12 +1377,15 @@
if ( etat.modification_fichier == 0 )
modification_fichier ( TRUE );
+ gsb_data_account_set_bet_maj ( account_number, BET_MAJ_ESTIMATE );
+ bet_data_update_bet_module ( account_number, GSB_ESTIMATE_PAGE );
+
return FALSE;
}
/**
- *
+ * supprime touts les occurences de la ligne sélectionnée
*
*
*
@@ -1454,6 +1501,290 @@
}
+/**
+ *
+ *
+ *
+ *
+ * */
+struct_transfert_data *struct_initialise_bet_transfert ( void )
+{
+ struct_transfert_data *transfert;
+
+ transfert = g_malloc0 ( sizeof ( struct_transfert_data ) );
+
+ transfert -> date = NULL;
+
+ return transfert;
+}
+
+
+/**
+ *
+ *
+ *
+ *
+ * */
+void struct_free_bet_transfert ( struct_transfert_data *transfert )
+{
+ if ( transfert -> date )
+ g_date_free ( transfert -> date );
+
+ g_free ( transfert );
+}
+
+
+/**
+ *
+ *
+ *
+ *
+ * */
+GHashTable *bet_data_transfert_get_list ( void )
+{
+ return bet_transfert_list;
+}
+
+
+/**
+ * add line in the bet_transfer_list
+ *
+ *
+ *
+ * */
+gboolean bet_data_transfert_add_line ( struct_transfert_data *transfert )
+{
+ gchar *key;
+
+ transfert_number ++;
+
+ if ( transfert -> account_number == 0 )
+ key = g_strconcat ("0:", utils_str_itoa ( transfert_number ), NULL );
+ else
+ key = g_strconcat ( utils_str_itoa ( transfert -> account_number ), ":",
+ utils_str_itoa ( transfert_number ), NULL );
+
+ transfert -> number = transfert_number;
+ g_hash_table_insert ( bet_transfert_list, key, transfert );
+
+ if ( etat.modification_fichier == 0 )
+ modification_fichier ( TRUE );
+
+ return TRUE;
+}
+
+
+/**
+ *
+ *
+ *
+ *
+ * */
+gboolean bet_data_transfert_remove_line ( gint account_number, gint number )
+{
+ GHashTableIter iter;
+ gpointer key, value;
+
+ g_hash_table_iter_init ( &iter, bet_transfert_list );
+ while (g_hash_table_iter_next ( &iter, &key, &value ) )
+ {
+ struct_transfert_data *transfert = ( struct_transfert_data *) value;
+
+ if ( account_number != transfert -> account_number
+ ||
+ number != transfert -> number)
+ continue;
+
+ g_hash_table_iter_remove ( &iter );
+
+ break;
+ }
+
+ if ( etat.modification_fichier == 0 )
+ modification_fichier ( TRUE );
+
+ gsb_data_account_set_bet_maj ( account_number, BET_MAJ_ESTIMATE );
+ bet_data_update_bet_module ( account_number, GSB_ESTIMATE_PAGE );
+
+ return FALSE;
+}
+
+
+/**
+ *
+ *
+ *
+ *
+ * */
+gboolean bet_data_transfert_set_line_from_file ( struct_transfert_data *transfert )
+{
+ gchar *key;
+
+ if ( transfert -> account_number == 0 )
+ key = g_strconcat ("0:", utils_str_itoa ( transfert -> number ), NULL );
+ else
+ key = g_strconcat ( utils_str_itoa ( transfert -> account_number ), ":",
+ utils_str_itoa ( transfert -> number ), NULL );
+
+ if ( transfert -> number > transfert_number )
+ transfert_number = transfert -> number;
+
+ g_hash_table_insert ( bet_transfert_list, key, transfert );
+
+ return TRUE;
+}
+
+
+/**
+ * modify transfert line
+ *
+ *
+ *
+ * */
+gboolean bet_data_transfert_modify_line ( struct_transfert_data *transfert )
+{
+ gchar *key;
+
+ if ( transfert -> account_number == 0 )
+ key = g_strconcat ("0:", utils_str_itoa ( transfert -> number ), NULL );
+ else
+ key = g_strconcat ( utils_str_itoa ( transfert -> account_number ), ":",
+ utils_str_itoa ( transfert -> number ), NULL );
+
+ g_hash_table_replace ( bet_transfert_list, key, transfert );
+
+ if ( etat.modification_fichier == 0 )
+ modification_fichier ( TRUE );
+
+ return TRUE;
+}
+
+
+/**
+ *
+ *
+ *
+ *
+ * */
+void bet_data_transfert_update_date_if_necessary ( struct_transfert_data *transfert )
+{
+ GDate *date_jour;
+ GDate *tmp_date;
+
+ date_jour = gdate_today ( );
+ tmp_date = gsb_date_copy ( transfert -> date );
+ g_date_add_months ( tmp_date, 1 );
+
+ if ( g_date_compare ( date_jour, tmp_date ) >= 0 )
+ {
+ if ( g_date_get_month ( date_jour ) == g_date_get_month ( tmp_date ) )
+ {
+ g_date_free ( transfert -> date );
+ g_date_free ( date_jour );
+ transfert -> date = tmp_date;
+ }
+ else
+ {
+ g_date_set_day ( date_jour, g_date_get_day ( tmp_date ) );
+ g_date_free ( transfert -> date );
+ g_date_free ( tmp_date );
+ transfert -> date = date_jour;
+ }
+ bet_data_transfert_modify_line ( transfert );
+ }
+ else
+ {
+ g_date_free ( tmp_date );
+ g_date_free ( date_jour );
+ }
+}
+
+
+/**
+ * supprime toutes les données du module pour le compte passé en paramètre.
+ *
+ *
+ *
+ * */
+gboolean bet_data_remove_all_bet_data ( gint account_number )
+{
+ GHashTable *tmp_list;
+ GHashTableIter iter;
+ gpointer key, value;
+
+ tmp_list = bet_hist_div_list;
+
+ g_hash_table_iter_init ( &iter, tmp_list );
+ while ( g_hash_table_iter_next ( &iter, &key, &value ) )
+ {
+ struct_hist_div *shd = ( struct_hist_div *) value;
+
+ if ( account_number != shd -> account_nb )
+ continue;
+
+ if ( g_hash_table_size ( shd -> sub_div_list ) == 0 )
+ {
+ g_hash_table_iter_remove ( &iter );
+ g_hash_table_iter_init ( &iter, tmp_list );
+ }
+ else
+ {
+ GHashTableIter new_iter;
+
+ g_hash_table_iter_init ( &new_iter, shd -> sub_div_list );
+ while ( g_hash_table_iter_next ( &new_iter, &key, &value ) )
+ {
+ g_hash_table_iter_remove ( &new_iter );
+ g_hash_table_iter_init ( &new_iter, shd -> sub_div_list );
+
+ if ( g_hash_table_size ( shd -> sub_div_list ) == 0 )
+ break;
+ }
+ }
+
+ if ( g_hash_table_size ( tmp_list ) == 0 )
+ break;
+ }
+
+ tmp_list = bet_future_list;
+
+ g_hash_table_iter_init ( &iter, tmp_list );
+ while ( g_hash_table_iter_next ( &iter, &key, &value ) )
+ {
+ struct_futur_data *scheduled = ( struct_futur_data *) value;
+
+ if ( account_number != scheduled -> account_number )
+ continue;
+
+ bet_data_future_remove_lines ( account_number, scheduled -> number,
+ scheduled -> mother_row );
+ g_hash_table_iter_init ( &iter, tmp_list );
+
+ if ( g_hash_table_size ( tmp_list ) == 0 )
+ break;
+ }
+
+ tmp_list = bet_transfert_list;
+
+ g_hash_table_iter_init ( &iter, tmp_list );
+ while ( g_hash_table_iter_next ( &iter, &key, &value ) )
+ {
+ struct_transfert_data *transfert = ( struct_transfert_data *) value;
+
+ if ( account_number != transfert -> account_number )
+ continue;
+
+ g_hash_table_iter_remove ( &iter );
+ g_hash_table_iter_init ( &iter, tmp_list );
+
+ if ( g_hash_table_size ( tmp_list ) == 0 )
+ return TRUE;
+ }
+
+ return TRUE;
+}
+
+
/* Local Variables: */
/* c-basic-offset: 4 */
/* End: */
Index: gsb_data_currency_link.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_currency_link.c,v
retrieving revision 1.17
retrieving revision 1.17.4.1
diff -u -d -r1.17 -r1.17.4.1
--- gsb_data_currency_link.c 18 Oct 2009 17:46:20 -0000 1.17
+++ gsb_data_currency_link.c 21 May 2010 22:39:55 -0000 1.17.4.1
@@ -59,7 +59,7 @@
} struct_currency_link;
/*START_STATIC*/
-static void _g_data_currency_link_free ( struct_currency_link *currency_link );
+static void _g_data_currency_link_free ( struct_currency_link *currency_link );
static gboolean gsb_data_currency_link_check_for_invalid ( gint currency_link_number );
static gpointer gsb_data_currency_link_get_structure ( gint currency_link_number );
static gint gsb_data_currency_link_max_number ( void );
Index: export_csv.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/export_csv.c,v
retrieving revision 1.28
retrieving revision 1.28.2.1
diff -u -d -r1.28 -r1.28.2.1
--- export_csv.c 5 Apr 2010 21:24:53 -0000 1.28
+++ export_csv.c 21 May 2010 22:39:55 -0000 1.28.2.1
@@ -49,18 +49,17 @@
#include "./utils_files.h"
#include "./gsb_data_transaction.h"
#include "./include.h"
-#include "./gsb_real.h"
/*END_INCLUDE*/
/*START_STATIC*/
-static void csv_add_record(FILE* file,
+static void csv_add_record(FILE* file,
gboolean clear_all,
gboolean print_balance );
-static void csv_clear_fields(gboolean clear_all);
-static FILE *gsb_csv_export_open_file ( const gchar *filename );
-static gboolean gsb_csv_export_title_line ( FILE *csv_file,
+static void csv_clear_fields(gboolean clear_all);
+static FILE *gsb_csv_export_open_file ( const gchar *filename );
+static gboolean gsb_csv_export_title_line ( FILE *csv_file,
gboolean print_balance );
-static gboolean gsb_csv_export_transaction ( gint transaction_number,
+static gboolean gsb_csv_export_transaction ( gint transaction_number,
FILE *csv_file,
gboolean print_balance );
/*END_STATIC*/
Index: fenetre_principale.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/fenetre_principale.h,v
retrieving revision 1.33
retrieving revision 1.33.2.1
diff -u -d -r1.33 -r1.33.2.1
--- fenetre_principale.h 18 Apr 2010 14:38:28 -0000 1.33
+++ fenetre_principale.h 21 May 2010 22:39:55 -0000 1.33.2.1
@@ -13,6 +13,16 @@
GSB_AQBANKING_PAGE,
} GsbGeneralNotebookPages;
+typedef enum GSB_ACCOUNT_NOTEBOOK_PAGES {
+ GSB_TRANSACTIONS_PAGE,
+#ifdef ENABLE_BALANCE_ESTIMATE
+ GSB_ESTIMATE_PAGE,
+ GSB_HISTORICAL_PAGE,
+ //~ GSB_FINANCIAL_PAGE,
+#endif /* ENABLE_BALANCE_ESTIMATE */
+ GSB_PROPERTIES_PAGE,
+} GsbaccountNotebookPages;
+
/* START_INCLUDE_H */
/* END_INCLUDE_H */
@@ -22,7 +32,7 @@
void gsb_gui_headings_update_suffix ( gchar * suffix );
void gsb_gui_headings_update_title ( gchar * title );
void gsb_gui_notebook_change_page ( GsbGeneralNotebookPages page );
-gint gsb_gui_on_account_get_property_page ( GtkNotebook *account_page );
+void gsb_gui_on_account_change_page ( GsbaccountNotebookPages page );
gboolean gsb_gui_on_account_switch_page ( GtkNotebook *notebook,
GtkNotebookPage *page,
guint page_number,
Index: gsb_reconcile.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_reconcile.h,v
retrieving revision 1.2
retrieving revision 1.2.4.1
diff -u -d -r1.2 -r1.2.4.1
--- gsb_reconcile.h 18 Feb 2007 12:37:19 -0000 1.2
+++ gsb_reconcile.h 21 May 2010 22:39:55 -0000 1.2.4.1
@@ -8,8 +8,8 @@
/* START_DECLARATION */
GtkWidget *gsb_reconcile_create_box ( void );
gboolean gsb_reconcile_run_reconciliation ( GtkWidget *button,
- gpointer null );
+ gpointer null );
gboolean gsb_reconcile_update_amounts ( GtkWidget *entry,
- gpointer null );
+ gpointer null );
/* END_DECLARATION */
#endif
Index: gsb_assistant_account.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_assistant_account.c,v
retrieving revision 1.27
retrieving revision 1.27.4.1
diff -u -d -r1.27 -r1.27.4.1
--- gsb_assistant_account.c 29 Aug 2009 08:36:41 -0000 1.27
+++ gsb_assistant_account.c 21 May 2010 22:39:55 -0000 1.27.4.1
@@ -50,10 +50,10 @@
/*START_STATIC*/
static void gsb_assistant_account_change_account_icon ( GtkWidget *button, gpointer data );
-static gboolean gsb_assistant_account_enter_page_finish ( GtkWidget * assistant, gint new_page );
-static GtkWidget *gsb_assistant_account_page_2 ( GtkWidget *assistant );
-static GtkWidget *gsb_assistant_account_page_3 ( GtkWidget *assistant );
-static GtkWidget *gsb_assistant_account_page_finish ( GtkWidget *assistant );
+static gboolean gsb_assistant_account_enter_page_finish ( GtkWidget * assistant, gint new_page );
+static GtkWidget *gsb_assistant_account_page_2 ( GtkWidget *assistant );
+static GtkWidget *gsb_assistant_account_page_3 ( GtkWidget *assistant );
+static GtkWidget *gsb_assistant_account_page_finish ( GtkWidget *assistant );
static gboolean gsb_assistant_account_toggled_kind_account ( GtkWidget *button,
GtkWidget *assistant );
/*END_STATIC*/
Index: fenetre_principale.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/fenetre_principale.c,v
retrieving revision 1.135
retrieving revision 1.135.2.1
diff -u -d -r1.135 -r1.135.2.1
--- fenetre_principale.c 18 Apr 2010 14:48:46 -0000 1.135
+++ fenetre_principale.c 21 May 2010 22:39:55 -0000 1.135.2.1
@@ -28,11 +28,12 @@
#include "./balance_estimate_tab.h"
#include "./balance_estimate_data.h"
#include "./balance_estimate_hist.h"
-#include "./gsb_account_property.h"
#include "./navigation.h"
#include "./gsb_transactions_list.h"
#include "./accueil.h"
#include "./etats_onglet.h"
+#include "./gsb_data_account.h"
+#include "./gsb_account_property.h"
#include "./gsb_form.h"
#include "./gsb_scheduler_list.h"
#include "./main.h"
@@ -235,8 +236,6 @@
creation_fenetre_operations (),
gtk_label_new (SPACIFY(_("Transactions"))) );
- g_object_set_data ( G_OBJECT (notebook), "account_notebook", account_page );
-
#ifdef ENABLE_BALANCE_ESTIMATE
/* append the balance estimate pages */
gtk_notebook_append_page ( GTK_NOTEBOOK ( account_page ),
@@ -303,20 +302,28 @@
guint page_number,
gpointer null )
{
+ gint account_number;
+
//~ devel_debug_int (page_number);
switch ( page_number )
{
- case 0:
+ case GSB_TRANSACTIONS_PAGE:
gsb_form_set_expander_visible ( TRUE, TRUE );
break;
-
- case 1:
- case 2:
#ifdef ENABLE_BALANCE_ESTIMATE
- if ( bet_data_get_maj ( ) )
- bet_array_update_estimate_tab ( gsb_gui_navigation_get_current_account ( ) );
+ case GSB_ESTIMATE_PAGE:
+ account_number = gsb_gui_navigation_get_current_account ( );
+ if ( gsb_data_account_get_bet_maj ( account_number ) )
+ bet_data_update_bet_module ( account_number, GSB_ESTIMATE_PAGE );
+ break;
+ case GSB_HISTORICAL_PAGE:
+ account_number = gsb_gui_navigation_get_current_account ( );
+ if ( gsb_data_account_get_bet_maj ( account_number ) )
+ bet_data_update_bet_module ( account_number, GSB_HISTORICAL_PAGE );
+ bet_historical_set_page_title ( account_number );
+ break;
#endif /* ENABLE_BALANCE_ESTIMATE */
- case 3:
+ case GSB_PROPERTIES_PAGE:
gsb_form_set_expander_visible (FALSE, FALSE );
break;
}
@@ -325,6 +332,16 @@
}
+/**
+ * Set the account notebook page.
+ *
+ * \param page Page to set.
+ */
+void gsb_gui_on_account_change_page ( GsbaccountNotebookPages page )
+{
+ gtk_notebook_set_current_page ( GTK_NOTEBOOK ( account_page ), page );
+}
+
/**
* Update one of the heading bar label with a new text.
@@ -417,7 +434,6 @@
}
-
/**
* Trigger a callback functions only if button event that triggered it
* was a simple click.
@@ -450,24 +466,6 @@
}
-gint gsb_gui_on_account_get_property_page ( GtkNotebook *account_page )
-{
- GtkWidget *child;
- gint i = 0;
-
- while ( ( child = gtk_notebook_get_nth_page ( account_page, i ) ) )
- {
- const gchar *label;
-
- label = gtk_widget_get_name ( child );
- if ( g_strcmp0 ( label, "properties_page" ) == 0 )
- return i;
- else
- i++;
- }
-
- return 0;
-}
/* Local Variables: */
/* c-basic-offset: 4 */
/* End: */
Index: gsb_transactions_list.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_transactions_list.c,v
retrieving revision 1.210
retrieving revision 1.210.2.1
diff -u -d -r1.210 -r1.210.2.1
--- gsb_transactions_list.c 25 Apr 2010 05:48:16 -0000 1.210
+++ gsb_transactions_list.c 21 May 2010 22:39:55 -0000 1.210.2.1
@@ -59,6 +59,7 @@
#include "./transaction_list_select.h"
#include "./transaction_list_sort.h"
#include "./transaction_model.h"
+#include "./balance_estimate_data.h"
#include "./structures.h"
#include "./custom_list.h"
#include "./fenetre_principale.h"
@@ -84,7 +85,7 @@
static gboolean gsb_transactions_list_check_mark ( gint transaction_number );
static gint gsb_transactions_list_choose_reconcile ( gint account_number,
gint selected_reconcile_number );
-static gboolean gsb_transactions_list_clone_template ( GtkWidget *menu_item,
+static gboolean gsb_transactions_list_clone_template ( GtkWidget *menu_item,
gpointer null );
static gint gsb_transactions_list_clone_transaction ( gint transaction_number,
gint mother_transaction_number );
@@ -2430,10 +2431,8 @@
gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general ), 1 );
-#ifdef ENABLE_BALANCE_ESTIMATE
/* force the update module budget */
- bet_data_set_maj ( gsb_gui_navigation_get_current_account ( ), BET_MAJ_ESTIMATE );
-#endif /* ENABLE_BALANCE_ESTIMATE */
+ gsb_data_account_set_bet_maj ( gsb_gui_navigation_get_current_account ( ), BET_MAJ_ALL );
if ( etat.modification_fichier == 0 )
modification_fichier ( TRUE );
@@ -2470,10 +2469,8 @@
"transaction_selected_in_form",
GINT_TO_POINTER ( -1 ) );
-#ifdef ENABLE_BALANCE_ESTIMATE
/* force the update module budget */
- bet_data_set_maj ( gsb_gui_navigation_get_current_account ( ), BET_MAJ_ESTIMATE );
-#endif /* ENABLE_BALANCE_ESTIMATE */
+ gsb_data_account_set_bet_maj ( gsb_gui_navigation_get_current_account ( ), BET_MAJ_ALL );
if ( etat.modification_fichier == 0 )
modification_fichier ( TRUE );
Index: gsb_data_partial_balance.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_partial_balance.h,v
retrieving revision 1.3
retrieving revision 1.3.4.1
diff -u -d -r1.3 -r1.3.4.1
--- gsb_data_partial_balance.h 16 Aug 2009 21:00:05 -0000 1.3
+++ gsb_data_partial_balance.h 21 May 2010 22:39:55 -0000 1.3.4.1
@@ -3,6 +3,7 @@
/* START_INCLUDE_H */
+#include "././gsb_real.h"
#include "././gsb_data_account.h"
/* END_INCLUDE_H */
@@ -15,6 +16,7 @@
GtkSelectionData * selection_data );
gboolean gsb_data_partial_balance_get_colorise ( gint partial_balance_number );
gint gsb_data_partial_balance_get_currency ( gint partial_balance_number );
+gsb_real gsb_data_partial_balance_get_current_amount ( gint partial_balance_number );
gchar *gsb_data_partial_balance_get_current_balance ( gint partial_balance_number );
kind_account gsb_data_partial_balance_get_kind ( gint partial_balance_number );
GSList *gsb_data_partial_balance_get_list ( void );
Index: gsb_data_payment.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_payment.c,v
retrieving revision 1.21
retrieving revision 1.21.2.1
diff -u -d -r1.21 -r1.21.2.1
--- gsb_data_payment.c 18 Apr 2010 14:38:28 -0000 1.21
+++ gsb_data_payment.c 21 May 2010 22:39:55 -0000 1.21.2.1
@@ -63,7 +63,7 @@
static struct_payment *payment_buffer;
/*START_STATIC*/
-static void _gsb_data_payment_free ( struct_payment *payment );
+static void _gsb_data_payment_free ( struct_payment *payment );
static struct_payment *gsb_data_payment_get_structure ( gint payment_number );
static gint gsb_data_payment_max_number ( void );
/*END_STATIC*/
Index: file_obfuscate_qif.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/file_obfuscate_qif.c,v
retrieving revision 1.5
retrieving revision 1.5.4.1
diff -u -d -r1.5 -r1.5.4.1
--- file_obfuscate_qif.c 1 Jan 2009 20:43:49 -0000 1.5
+++ file_obfuscate_qif.c 21 May 2010 22:39:55 -0000 1.5.4.1
@@ -42,7 +42,7 @@
static void file_obfuscate_qif_next_line ( gchar *file_content,
gint *position,
gint *position_in_line );
-static void file_obfuscate_qif_start ( gchar *filename );
+static void file_obfuscate_qif_start ( gchar *filename );
/*END_STATIC*/
/*START_EXTERN*/
Index: gsb_transactions_list_sort.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_transactions_list_sort.c,v
retrieving revision 1.23
retrieving revision 1.23.2.1
diff -u -d -r1.23 -r1.23.2.1
--- gsb_transactions_list_sort.c 5 Apr 2010 21:24:53 -0000 1.23
+++ gsb_transactions_list_sort.c 21 May 2010 22:39:55 -0000 1.23.2.1
@@ -538,36 +538,42 @@
gint transaction_number_2 )
{
gint return_value;
+ gint party_number_1;
+ gint party_number_2;
- if ( gsb_data_transaction_get_party_number ( transaction_number_1)== gsb_data_transaction_get_party_number ( transaction_number_2))
- return_value = gsb_transactions_list_sort_by_transaction_date_and_no(transaction_number_1, transaction_number_2);
+ party_number_1 = gsb_data_transaction_get_party_number ( transaction_number_1 );
+ party_number_2 = gsb_data_transaction_get_party_number ( transaction_number_2 );
+
+ if ( party_number_1 == party_number_2 )
+ return_value = gsb_transactions_list_sort_by_transaction_date_and_no (
+ transaction_number_1, transaction_number_2 );
else
{
- const gchar *temp_1;
- const gchar *temp_2;
+ const gchar *temp_1;
+ const gchar *temp_2;
- temp_1 = gsb_data_payee_get_name ( gsb_data_transaction_get_party_number ( transaction_number_1),
- TRUE );
- temp_2 = gsb_data_payee_get_name ( gsb_data_transaction_get_party_number ( transaction_number_2),
- TRUE );
+ temp_1 = gsb_data_payee_get_name ( party_number_1, TRUE );
+ if ( temp_1 == NULL )
+ return -1;
- /* g_utf8_collate is said not very fast, must try with big big account to check
- * if it's enough, for me it's ok (cedric), eventually, change with gsb_strcasecmp */
- return_value = g_utf8_collate ( g_utf8_casefold ( temp_1 ? temp_1 : "",
- -1 ),
- g_utf8_casefold ( temp_2 ? temp_2 : "",
- -1 ));
+ temp_2 = gsb_data_payee_get_name ( party_number_2, TRUE );
+ if ( temp_2 == NULL )
+ return 1;
+
+ /* g_utf8_collate is said not very fast, must try with big big account to check
+ * if it's enough, for me it's ok (cedric), eventually, change with gsb_strcasecmp */
+ return_value = g_utf8_collate ( g_utf8_casefold ( temp_1 ? temp_1 : "", -1 ),
+ g_utf8_casefold ( temp_2 ? temp_2 : "", -1 ));
}
if ( return_value )
- return return_value;
+ return return_value;
else
- return gsb_transactions_list_sort_by_transaction_date_and_no (transaction_number_1, transaction_number_2);
+ return gsb_transactions_list_sort_by_transaction_date_and_no (
+ transaction_number_1, transaction_number_2);
}
-
-
/** used to compare 2 iters and sort the by budgetary first, and
* by date and no transaction after
* always put the white line below
@@ -580,40 +586,52 @@
gint transaction_number_2 )
{
gint return_value;
+ gint budgetary_number_1;
+ gint budgetary_number_2;
+ gint sub_budgetary_number_1;
+ gint sub_budgetary_number_2;
- if ( gsb_data_transaction_get_budgetary_number ( transaction_number_1) == gsb_data_transaction_get_budgetary_number ( transaction_number_2)
+ budgetary_number_1 = gsb_data_transaction_get_budgetary_number ( transaction_number_1 );
+ budgetary_number_2 = gsb_data_transaction_get_budgetary_number ( transaction_number_2 );
+ sub_budgetary_number_1 = gsb_data_transaction_get_sub_budgetary_number ( transaction_number_1 );
+ sub_budgetary_number_2 = gsb_data_transaction_get_sub_budgetary_number ( transaction_number_2 );
+
+ if ( budgetary_number_1 == budgetary_number_2
&&
- gsb_data_transaction_get_sub_budgetary_number ( transaction_number_1)== gsb_data_transaction_get_sub_budgetary_number ( transaction_number_2))
- return_value = gsb_transactions_list_sort_by_transaction_date_and_no(transaction_number_1, transaction_number_2);
+ sub_budgetary_number_1 == sub_budgetary_number_2 )
+ return_value = gsb_transactions_list_sort_by_transaction_date_and_no(
+ transaction_number_1, transaction_number_2 );
else
{
- const gchar *temp_1;
- const gchar *temp_2;
+ const gchar *temp_1;
+ const gchar *temp_2;
- temp_1 = gsb_data_budget_get_name ( gsb_data_transaction_get_budgetary_number ( transaction_number_1),
- gsb_data_transaction_get_sub_budgetary_number ( transaction_number_1),
- NULL );
- temp_2 = gsb_data_budget_get_name ( gsb_data_transaction_get_budgetary_number ( transaction_number_2),
- gsb_data_transaction_get_sub_budgetary_number ( transaction_number_2),
- NULL);
+ temp_1 = gsb_data_budget_get_name ( budgetary_number_1,
+ sub_budgetary_number_1,
+ NULL );
+ if ( temp_1 == NULL )
+ return -1;
- /* g_utf8_collate is said not very fast, must try with big big account to check
- * if it's enough, for me it's ok (cedric), eventually, change with gsb_strcasecmp */
- return_value = g_utf8_collate ( g_utf8_casefold ( temp_1 ? temp_1 : "",
- -1 ),
- g_utf8_casefold ( temp_2 ? temp_2 : "",
- -1 ));
+ temp_2 = gsb_data_budget_get_name ( budgetary_number_2,
+ sub_budgetary_number_2,
+ NULL);
+ if ( temp_2 == NULL )
+ return 1;
+
+ /* g_utf8_collate is said not very fast, must try with big big account to check
+ * if it's enough, for me it's ok (cedric), eventually, change with gsb_strcasecmp */
+ return_value = g_utf8_collate ( g_utf8_casefold ( temp_1 ? temp_1 : "", -1 ),
+ g_utf8_casefold ( temp_2 ? temp_2 : "", -1 ) );
}
if ( return_value )
- return return_value;
+ return return_value;
else
- return gsb_transactions_list_sort_by_transaction_date_and_no(transaction_number_1, transaction_number_2);
+ return gsb_transactions_list_sort_by_transaction_date_and_no (
+ transaction_number_1, transaction_number_2);
}
-
-
/**
* used to compare 2 iters and sort the by credit amount first, and
* by date and no transaction after
@@ -707,7 +725,7 @@
/* if it's the same type, we sort by the content of the types */
- if ( gsb_data_transaction_get_method_of_payment_number ( transaction_number_1)== gsb_data_transaction_get_method_of_payment_number ( transaction_number_2))
+ if ( gsb_data_transaction_get_method_of_payment_number ( transaction_number_1) == gsb_data_transaction_get_method_of_payment_number ( transaction_number_2))
{
return_value = g_utf8_collate ( g_utf8_casefold ( gsb_data_transaction_get_method_of_payment_content ( transaction_number_1) ? gsb_data_transaction_get_method_of_payment_content ( transaction_number_1) : "",
-1 ),
Index: utils_font.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/utils_font.c,v
retrieving revision 1.4
retrieving revision 1.4.4.1
diff -u -d -r1.4 -r1.4.4.1
--- utils_font.c 27 Oct 2008 14:34:36 -0000 1.4
+++ utils_font.c 21 May 2010 22:39:56 -0000 1.4.4.1
@@ -34,9 +34,9 @@
/*END_INCLUDE*/
/*START_STATIC*/
-static gboolean utils_font_choose ( GtkWidget *button,
+static gboolean utils_font_choose ( GtkWidget *button,
gchar **fontname );
-static void utils_font_update_labels ( GtkWidget *button,
+static void utils_font_update_labels ( GtkWidget *button,
const gchar *fontname);
/*END_STATIC*/
Index: utils_files.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/utils_files.c,v
retrieving revision 1.54
retrieving revision 1.54.2.1
diff -u -d -r1.54 -r1.54.2.1
--- utils_files.c 5 Apr 2010 21:24:53 -0000 1.54
+++ utils_files.c 21 May 2010 22:39:56 -0000 1.54.2.1
@@ -879,6 +879,8 @@
}
i++;
} while ( all_charset_array[i] );
+ //CHARSET found in OFX file, but no match --> Exit function
+ return NULL;
}
g_free ( string );
ptr = ptr_tmp + 1;
Index: gsb_data_import_rule.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_import_rule.c,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -u -d -r1.5 -r1.5.2.1
--- gsb_data_import_rule.c 5 Apr 2010 21:24:53 -0000 1.5
+++ gsb_data_import_rule.c 21 May 2010 22:39:55 -0000 1.5.2.1
@@ -62,7 +62,7 @@
/*START_STATIC*/
-static void _gsb_data_import_rule_free ( struct_import_rule* import_rule);
+static void _gsb_data_import_rule_free ( struct_import_rule* import_rule);
static gpointer gsb_data_import_rule_get_structure ( gint import_rule_number );
static gint gsb_data_import_rule_max_number ( void );
/*END_STATIC*/
Index: etats_config.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/etats_config.c,v
retrieving revision 1.177
retrieving revision 1.177.2.1
diff -u -d -r1.177 -r1.177.2.1
--- etats_config.c 5 Apr 2010 21:24:53 -0000 1.177
+++ etats_config.c 21 May 2010 22:39:55 -0000 1.177.2.1
@@ -100,31 +100,31 @@
static void remplissage_liste_tiers_etats ( void );
static void remplit_liste_comparaisons_montants_etat ( void );
static void remplit_liste_comparaisons_textes_etat ( void );
-static gboolean report_config_budget_select_all ( GtkWidget *button,
+static gboolean report_config_budget_select_all ( GtkWidget *button,
gboolean *select_ptr );
-static gboolean report_config_budget_select_type ( GtkWidget *button,
+static gboolean report_config_budget_select_type ( GtkWidget *button,
gboolean *type_ptr );
-static GSList *report_config_categ_budget_get_selected ( gboolean is_categ );
-static gboolean report_config_categ_budget_toggled ( GtkCellRendererToggle *radio_renderer,
+static GSList *report_config_categ_budget_get_selected ( gboolean is_categ );
+static gboolean report_config_categ_budget_toggled ( GtkCellRendererToggle *radio_renderer,
gchar *path_str,
GtkTreeStore *store );
-static gboolean report_config_category_select_all ( GtkWidget *button,
+static gboolean report_config_category_select_all ( GtkWidget *button,
gboolean *select_ptr );
-static gboolean report_config_category_select_type ( GtkWidget *button,
+static gboolean report_config_category_select_type ( GtkWidget *button,
gboolean *type_ptr );
-static void report_config_category_toggle_categ ( struct_categ_budget_sel *categ_budget_struct,
+static void report_config_category_toggle_categ ( struct_categ_budget_sel *categ_budget_struct,
gboolean is_categ );
-static void report_config_category_update_treeview ( gboolean is_categ );
-static GtkWidget *report_config_create_categ_budget_list ( void );
-static gboolean report_config_fill_categ_budget_list ( gboolean is_categ );
-static gboolean report_config_mix_select_all ( GtkTreeModel *model,
+static void report_config_category_update_treeview ( gboolean is_categ );
+static GtkWidget *report_config_create_categ_budget_list ( void );
+static gboolean report_config_fill_categ_budget_list ( gboolean is_categ );
+static gboolean report_config_mix_select_all ( GtkTreeModel *model,
gboolean toggle_value );
-static gboolean report_config_mix_select_type ( gboolean is_categ,
+static gboolean report_config_mix_select_type ( gboolean is_categ,
gboolean type );
-static void report_config_mixed_list_add_div ( gboolean is_categ,
+static void report_config_mixed_list_add_div ( gboolean is_categ,
const gchar *name,
gint number );
-static void report_config_mixed_list_add_sub_div ( gboolean is_categ,
+static void report_config_mixed_list_add_sub_div ( gboolean is_categ,
const gchar *name,
gint number );
static gboolean report_tree_selectable_func (GtkTreeSelection *selection,
Index: gsb_assistant_file.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_assistant_file.c,v
retrieving revision 1.19
retrieving revision 1.19.2.1
diff -u -d -r1.19 -r1.19.2.1
--- gsb_assistant_file.c 9 Jan 2010 20:57:38 -0000 1.19
+++ gsb_assistant_file.c 21 May 2010 22:39:55 -0000 1.19.2.1
@@ -51,15 +51,15 @@
/*END_INCLUDE*/
/*START_STATIC*/
-static gboolean gsb_assistant_file_change_title ( GtkWidget *title_entry,
+static gboolean gsb_assistant_file_change_title ( GtkWidget *title_entry,
GtkWidget *filename_entry );
-static gboolean gsb_assistant_file_choose_filename ( GtkWidget *button,
+static gboolean gsb_assistant_file_choose_filename ( GtkWidget *button,
GtkWidget *entry );
-static GtkWidget *gsb_assistant_file_page_2 ( GtkWidget *assistant );
-static GtkWidget *gsb_assistant_file_page_3 ( GtkWidget *assistant );
-static GtkWidget *gsb_assistant_file_page_4 ( GtkWidget *assistant );
-static GtkWidget *gsb_assistant_file_page_5 ( GtkWidget *assistant );
-static GtkWidget *gsb_assistant_file_page_finish ( GtkWidget *assistant,
+static GtkWidget *gsb_assistant_file_page_2 ( GtkWidget *assistant );
+static GtkWidget *gsb_assistant_file_page_3 ( GtkWidget *assistant );
+static GtkWidget *gsb_assistant_file_page_4 ( GtkWidget *assistant );
+static GtkWidget *gsb_assistant_file_page_5 ( GtkWidget *assistant );
+static GtkWidget *gsb_assistant_file_page_finish ( GtkWidget *assistant,
gboolean import );
/*END_STATIC*/
Index: custom_list.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/custom_list.c,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -u -d -r1.7 -r1.7.2.1
--- custom_list.c 9 Jan 2010 20:57:38 -0000 1.7
+++ custom_list.c 21 May 2010 22:39:55 -0000 1.7.2.1
@@ -42,39 +42,39 @@
/*END_INCLUDE*/
/*START_STATIC*/
-static void custom_list_class_init (CustomListClass *klass);
+static void custom_list_class_init (CustomListClass *klass);
static void custom_list_finalize (GObject *object);
-static GType custom_list_get_column_type (GtkTreeModel *tree_model,
+static GType custom_list_get_column_type (GtkTreeModel *tree_model,
gint index);
-static GtkTreeModelFlags custom_list_get_flags (GtkTreeModel *tree_model);
-static gboolean custom_list_get_iter (GtkTreeModel *tree_model,
+static GtkTreeModelFlags custom_list_get_flags (GtkTreeModel *tree_model);
+static gboolean custom_list_get_iter (GtkTreeModel *tree_model,
GtkTreeIter *iter,
GtkTreePath *path);
-static gint custom_list_get_n_columns (GtkTreeModel *tree_model);
-static GtkTreePath *custom_list_get_path (GtkTreeModel *tree_model,
+static gint custom_list_get_n_columns (GtkTreeModel *tree_model);
+static GtkTreePath *custom_list_get_path (GtkTreeModel *tree_model,
GtkTreeIter *iter);
-static void custom_list_get_value (GtkTreeModel *tree_model,
+static void custom_list_get_value (GtkTreeModel *tree_model,
GtkTreeIter *iter,
gint column,
GValue *value);
-static void custom_list_init (CustomList *custom_list);
-static gboolean custom_list_iter_children (GtkTreeModel *tree_model,
+static void custom_list_init (CustomList *custom_list);
+static gboolean custom_list_iter_children (GtkTreeModel *tree_model,
GtkTreeIter *iter,
GtkTreeIter *parent);
-static gboolean custom_list_iter_has_child (GtkTreeModel *tree_model,
+static gboolean custom_list_iter_has_child (GtkTreeModel *tree_model,
GtkTreeIter *iter);
-static gint custom_list_iter_n_children (GtkTreeModel *tree_model,
+static gint custom_list_iter_n_children (GtkTreeModel *tree_model,
GtkTreeIter *iter);
-static gboolean custom_list_iter_next (GtkTreeModel *tree_model,
+static gboolean custom_list_iter_next (GtkTreeModel *tree_model,
GtkTreeIter *iter);
-static gboolean custom_list_iter_nth_child (GtkTreeModel *tree_model,
+static gboolean custom_list_iter_nth_child (GtkTreeModel *tree_model,
GtkTreeIter *iter,
GtkTreeIter *parent,
gint n);
-static gboolean custom_list_iter_parent (GtkTreeModel *tree_model,
+static gboolean custom_list_iter_parent (GtkTreeModel *tree_model,
GtkTreeIter *iter,
GtkTreeIter *child);
-static void custom_list_tree_model_init (GtkTreeModelIface *iface);
+static void custom_list_tree_model_init (GtkTreeModelIface *iface);
/*END_STATIC*/
/*START_EXTERN*/
Index: gsb_data_archive_store.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_archive_store.c,v
retrieving revision 1.18
retrieving revision 1.18.2.1
diff -u -d -r1.18 -r1.18.2.1
--- gsb_data_archive_store.c 7 Mar 2010 15:56:04 -0000 1.18
+++ gsb_data_archive_store.c 21 May 2010 22:39:55 -0000 1.18.2.1
@@ -69,11 +69,11 @@
/*START_STATIC*/
-static void _gsb_data_archive_store_free ( struct_store_archive *archive );
-static struct_store_archive *gsb_data_archive_store_find_struct ( gint archive_number,
+static void _gsb_data_archive_store_free ( struct_store_archive *archive );
+static struct_store_archive *gsb_data_archive_store_find_struct ( gint archive_number,
gint account_number );
-static gint gsb_data_archive_store_max_number ( void );
-static gint gsb_data_archive_store_new ( void );
+static gint gsb_data_archive_store_max_number ( void );
+static gint gsb_data_archive_store_new ( void );
/*END_STATIC*/
/*START_EXTERN*/
Index: tiers_onglet.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/tiers_onglet.c,v
retrieving revision 1.172
retrieving revision 1.172.2.1
diff -u -d -r1.172 -r1.172.2.1
--- tiers_onglet.c 3 Apr 2010 19:57:42 -0000 1.172
+++ tiers_onglet.c 21 May 2010 22:39:56 -0000 1.172.2.1
@@ -68,9 +68,9 @@
static GtkWidget *creation_barre_outils_tiers ( void );
static gboolean edit_payee ( GtkTreeView * view );
static void gsb_assistant_payees_clicked ( GtkButton *button, GtkWidget *assistant );
-static gboolean gsb_assistant_payees_enter_page_2 ( GtkWidget *assistant );
-static gboolean gsb_assistant_payees_enter_page_3 ( GtkWidget *assistant );
-static gboolean gsb_assistant_payees_enter_page_finish ( GtkWidget *assistant );
+static gboolean gsb_assistant_payees_enter_page_2 ( GtkWidget *assistant );
+static gboolean gsb_assistant_payees_enter_page_3 ( GtkWidget *assistant );
+static gboolean gsb_assistant_payees_enter_page_finish ( GtkWidget *assistant );
static void gsb_assistant_payees_entry_changed ( GtkEditable *editable,
GtkWidget *assistant );
static void gsb_assistant_payees_modifie_operations ( GSList *sup_payees,
@@ -79,9 +79,9 @@
gboolean save_notes,
gboolean extract_num,
gboolean is_transaction );
-static GtkWidget *gsb_assistant_payees_page_2 ( GtkWidget *assistant );
-static GtkWidget *gsb_assistant_payees_page_3 ( GtkWidget *assistant );
-static GtkWidget *gsb_assistant_payees_page_finish ( GtkWidget *assistant );
+static GtkWidget *gsb_assistant_payees_page_2 ( GtkWidget *assistant );
+static GtkWidget *gsb_assistant_payees_page_3 ( GtkWidget *assistant );
+static GtkWidget *gsb_assistant_payees_page_finish ( GtkWidget *assistant );
static gboolean gsb_assistant_payees_select_func (GtkTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter,
Index: gsb_data_budget.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_budget.c,v
retrieving revision 1.56
retrieving revision 1.56.2.1
diff -u -d -r1.56 -r1.56.2.1
--- gsb_data_budget.c 28 Feb 2010 08:40:57 -0000 1.56
+++ gsb_data_budget.c 21 May 2010 22:39:55 -0000 1.56.2.1
@@ -83,8 +83,8 @@
/*START_STATIC*/
-static void _gsb_data_budget_free ( struct_budget* budget );
-static void _gsb_data_sub_budget_free ( struct_sub_budget* sub_budget );
+static void _gsb_data_budget_free ( struct_budget* budget );
+static void _gsb_data_sub_budget_free ( struct_sub_budget* sub_budget );
static GSList *gsb_data_budget_append_sub_budget_to_list ( GSList *budget_list,
GSList *sub_budget_list );
static gint gsb_data_budget_get_pointer_from_name_in_glist ( struct_budget *budget,
Index: balance_estimate_config.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/balance_estimate_config.c,v
retrieving revision 1.15
retrieving revision 1.15.2.1
diff -u -d -r1.15 -r1.15.2.1
--- balance_estimate_config.c 18 Apr 2010 14:38:28 -0000 1.15
+++ balance_estimate_config.c 21 May 2010 22:39:55 -0000 1.15.2.1
@@ -30,9 +30,9 @@
/*START_INCLUDE*/
#include "balance_estimate_config.h"
-#include "./balance_estimate_tab.h"
#include "./balance_estimate_data.h"
#include "./balance_estimate_hist.h"
+#include "./balance_estimate_tab.h"
#include "./utils_dates.h"
#include "./gsb_account.h"
#include "./gsb_automem.h"
@@ -43,6 +43,7 @@
[...1037 lines suppressed...]
+ widget = g_object_get_data ( G_OBJECT ( account_page ), "Data_for_forecast" );
+ gtk_widget_hide_all ( widget );
+ widget = g_object_get_data ( G_OBJECT ( account_page ), "Data_for_historical" );
+ gtk_widget_hide_all ( widget );
+ }
+
+ if ( gsb_gui_navigation_get_current_account ( ) == account_number )
+ bet_data_select_bet_pages ( account_number );
+}
+
+
+/**
+ *
+ *
+ *
+ *
+ * */
/* Local Variables: */
/* c-basic-offset: 4 */
/* End: */
Index: balance_estimate_config.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/balance_estimate_config.h,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -u -d -r1.5 -r1.5.2.1
--- balance_estimate_config.h 5 Apr 2010 21:24:53 -0000 1.5
+++ balance_estimate_config.h 21 May 2010 22:39:55 -0000 1.5.2.1
@@ -7,14 +7,15 @@
/* END_INCLUDE_H */
/* START_DECLARATION */
-GtkWidget *bet_config_create_account_page ( void );
-GtkWidget *bet_config_create_general_page ( void );
+GtkWidget *bet_config_account_create_account_page ( void );
+GtkWidget *bet_config_general_create_general_page ( void );
void bet_config_duration_button_clicked ( GtkWidget *togglebutton,
GtkWidget *spin_button );
gboolean bet_config_duration_number_changed ( GtkWidget *spin_button,
gpointer data );
void bet_config_fyear_clicked ( GtkWidget *combo, gpointer data );
void bet_config_origin_data_clicked ( GtkWidget *togglebutton, gpointer data );
+GtkWidget *bet_config_get_duration_widget ( gint origin );
/* END_DECLARATION */
Index: balance_estimate_tab.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/balance_estimate_tab.h,v
retrieving revision 1.15
retrieving revision 1.15.2.1
diff -u -d -r1.15 -r1.15.2.1
--- balance_estimate_tab.h 18 Apr 2010 07:53:06 -0000 1.15
+++ balance_estimate_tab.h 21 May 2010 22:39:55 -0000 1.15.2.1
@@ -27,14 +27,12 @@
/* START_DECLARATION */
GtkWidget *bet_array_create_page ( void );
-gboolean bet_array_initializes_account_settings ( gint account_number );
void bet_array_list_add_new_hist_line ( GtkTreeModel *tab_model,
GtkTreeModel *model,
GtkTreeIter *iter,
GDate *date_min,
GDate *date_max );
-void bet_array_refresh_estimate_tab ( gint account_number );
-void bet_array_update_estimate_tab ( gint account_number );
+void bet_array_update_estimate_tab ( gint account_number, gint type_maj );
/* END_DECLARATION */
#endif /*_BALANCE_ESTIMATE_TAB_H*/
Index: gsb_payment_method.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_payment_method.c,v
retrieving revision 1.23
retrieving revision 1.23.2.1
diff -u -d -r1.23 -r1.23.2.1
--- gsb_payment_method.c 5 Apr 2010 21:24:53 -0000 1.23
+++ gsb_payment_method.c 21 May 2010 22:39:55 -0000 1.23.2.1
@@ -31,10 +31,12 @@
/*START_INCLUDE*/
#include "gsb_payment_method.h"
#include "./gsb_data_account.h"
+#include "./gsb_data_mix.h"
#include "./gsb_data_payment.h"
#include "./gsb_form.h"
#include "./gsb_form_widget.h"
#include "./gsb_data_payment.h"
+#include "./gsb_form.h"
#include "./gsb_data_form.h"
#include "./erreur.h"
/*END_INCLUDE*/
@@ -408,18 +410,33 @@
{
if ( gsb_form_widget_check_empty (cheque_entry) )
{
- gchar* tmpstr;
+ gchar* tmp_str;
+ gint transaction_number;
+ gboolean is_transaction;
+
+ transaction_number = GPOINTER_TO_INT ( g_object_get_data (
+ G_OBJECT ( gsb_form_get_form_widget ( ) ),
+ "transaction_number_in_form" ) );
+ if ( gsb_form_get_origin () == ORIGIN_VALUE_SCHEDULED )
+ is_transaction = FALSE;
+ else
+ is_transaction = TRUE;
+ if ( gsb_data_mix_get_mother_transaction_number ( transaction_number,
+ is_transaction ) == 0 )
+ {
+ tmp_str = gsb_data_payment_incremente_last_number ( payment_number, 1 );
+ }
+ else
+ tmp_str = g_strdup ( gsb_data_payment_get_last_number ( payment_number ) );
gsb_form_entry_get_focus (cheque_entry);
- tmpstr = gsb_data_payment_incremente_last_number ( payment_number, 1 );
- gtk_entry_set_text ( GTK_ENTRY (cheque_entry), tmpstr);
- g_free ( tmpstr );
+ gtk_entry_set_text ( GTK_ENTRY (cheque_entry), tmp_str);
+ g_free ( tmp_str );
}
}
else
{
- gtk_entry_set_text ( GTK_ENTRY (cheque_entry),
- "" );
+ gtk_entry_set_text ( GTK_ENTRY (cheque_entry), "" );
gsb_form_entry_lose_focus ( cheque_entry,
FALSE,
GINT_TO_POINTER ( TRANSACTION_FORM_CHEQUE ));
Index: balance_estimate_tab.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/balance_estimate_tab.c,v
retrieving revision 1.66
retrieving revision 1.66.2.1
diff -u -d -r1.66 -r1.66.2.1
--- balance_estimate_tab.c 24 Apr 2010 05:39:25 -0000 1.66
+++ balance_estimate_tab.c 21 May 2010 22:39:55 -0000 1.66.2.1
@@ -49,6 +49,7 @@
#include "./gsb_data_account.h"
#include "./gsb_data_budget.h"
#include "./gsb_data_category.h"
+#include "./gsb_data_partial_balance.h"
#include "./gsb_data_payee.h"
#include "./gsb_data_scheduled.h"
#include "./gsb_data_transaction.h"
@@ -59,14 +60,13 @@
#include "./gsb_transactions_list.h"
#include "./traitement_variables.h"
#include "./transaction_list_select.h"
[...972 lines suppressed...]
+ &&
+ transfert -> sub_budgetary_number == tmp_sub_budget_number )
+ {
+ if ( g_date_compare ( date, transfert -> date ) == 0 )
+ {
+ gtk_tree_store_remove ( GTK_TREE_STORE ( tab_model ), &iter );
+ break;
+ }
+ tmp_iter = gtk_tree_iter_copy ( &iter );
+ }
+ }
+ }
+ while ( gtk_tree_model_iter_next ( GTK_TREE_MODEL ( tab_model ), &iter ) );
+ }
+
+ return FALSE;
+}
/* Local Variables: */
/* c-basic-offset: 4 */
/* End: */
Index: transaction_list_sort.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/transaction_list_sort.h,v
retrieving revision 1.1
retrieving revision 1.1.4.1
diff -u -d -r1.1 -r1.1.4.1
--- transaction_list_sort.h 28 Aug 2008 21:49:40 -0000 1.1
+++ transaction_list_sort.h 21 May 2010 22:39:56 -0000 1.1.4.1
@@ -8,10 +8,10 @@
/* START_DECLARATION */
void transaction_list_sort (void);
void transaction_list_sort_get_column ( gint *sort_col,
- GtkSortType *sort_order );
+ GtkSortType *sort_order );
gboolean transaction_list_sort_get_reconcile_sort ( void );
void transaction_list_sort_set_column ( gint new_sort_col,
- GtkSortType new_sort_order );
+ GtkSortType new_sort_order );
void transaction_list_sort_set_reconcile_sort ( gboolean use_reconcile_sort );
/* END_DECLARATION */
#endif
Index: parse_cmdline.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/parse_cmdline.c,v
retrieving revision 1.17
retrieving revision 1.17.2.1
diff -u -d -r1.17 -r1.17.2.1
--- parse_cmdline.c 24 Apr 2010 18:38:27 -0000 1.17
+++ parse_cmdline.c 21 May 2010 22:39:56 -0000 1.17.2.1
@@ -33,7 +33,7 @@
static CMDLINE_ERRNO parse_tab_parameters(char *tab_parameters, cmdline_options* pOpt);
static void show_errstr(gint errval, gchar* extra);
static void show_help(void);
-static void show_usage(gint errval, gchar* extra);
+static void show_usage ( gint errval, gchar* extra );
static void show_version(void);
/*END_STATIC*/
@@ -166,7 +166,7 @@
void show_version(void)
{
#ifdef HAVE_PLUGINS
- gsb_plugins_scan_dir ( PLUGINS_DIRECTORY );
+ gsb_plugins_scan_dir ( PLUGINS_DIR );
#endif
g_print(N_("Grisbi version %s, %s\n"), VERSION, gsb_plugin_get_list());
Index: gsb_archive_config.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_archive_config.c,v
retrieving revision 1.29
retrieving revision 1.29.2.1
diff -u -d -r1.29 -r1.29.2.1
--- gsb_archive_config.c 10 Jan 2010 20:11:37 -0000 1.29
+++ gsb_archive_config.c 21 May 2010 22:39:55 -0000 1.29.2.1
@@ -67,14 +67,14 @@
/*START_STATIC*/
-static gboolean gsb_archive_config_delete_archive ( GtkWidget *button,
+static gboolean gsb_archive_config_delete_archive ( GtkWidget *button,
GtkWidget *tree_view );
-static gboolean gsb_archive_config_destroy_archive ( GtkWidget *button,
+static gboolean gsb_archive_config_destroy_archive ( GtkWidget *button,
GtkWidget *tree_view );
-static void gsb_archive_config_fill_list ( GtkListStore *store );
-static gboolean gsb_archive_config_name_changed ( GtkWidget *entry,
+static void gsb_archive_config_fill_list ( GtkListStore *store );
+static gboolean gsb_archive_config_name_changed ( GtkWidget *entry,
GtkWidget *tree_view );
-static gboolean gsb_archive_config_select ( GtkTreeSelection *selection,
+static gboolean gsb_archive_config_select ( GtkTreeSelection *selection,
GtkWidget *paddingbox );
/*END_STATIC*/
Index: gsb_automem.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_automem.c,v
retrieving revision 1.28
retrieving revision 1.28.2.1
diff -u -d -r1.28 -r1.28.2.1
--- gsb_automem.c 5 Apr 2010 21:24:53 -0000 1.28
+++ gsb_automem.c 21 May 2010 22:39:55 -0000 1.28.2.1
@@ -45,11 +45,11 @@
/*END_INCLUDE*/
/*START_STATIC*/
-static gboolean gsb_automem_checkbutton_changed ( GtkWidget *checkbutton,
+static gboolean gsb_automem_checkbutton_changed ( GtkWidget *checkbutton,
gpointer null );
-static gboolean gsb_automem_entry_changed (GtkWidget *entry,
+static gboolean gsb_automem_entry_changed (GtkWidget *entry,
gpointer null );
-static gboolean gsb_automem_spin_button_changed ( GtkWidget *spin,
+static gboolean gsb_automem_spin_button_changed ( GtkWidget *spin,
gpointer null);
static GtkWidget *gsb_automem_spin_button_new_full ( gint *value,
gdouble lower, gdouble upper,
@@ -57,7 +57,7 @@
gdouble page_size,
gdouble climb_rate,
GCallback hook, gpointer data );
-static gboolean gsb_automem_textview_changed ( GtkTextBuffer *buffer,
+static gboolean gsb_automem_textview_changed ( GtkTextBuffer *buffer,
gpointer null );
/*END_STATIC*/
Index: utils_dates.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/utils_dates.c,v
retrieving revision 1.68
retrieving revision 1.68.2.1
diff -u -d -r1.68 -r1.68.2.1
--- utils_dates.c 5 Apr 2010 21:24:53 -0000 1.68
+++ utils_dates.c 21 May 2010 22:39:56 -0000 1.68.2.1
@@ -66,12 +66,13 @@
{
if (!last_date)
{
- GDate *date;
- gchar date_str[SIZEOF_FORMATTED_STRING_DATE];
+ GDate *date;
+ gchar date_str[SIZEOF_FORMATTED_STRING_DATE];
- date = gdate_today();
- g_date_strftime ( date_str, SIZEOF_FORMATTED_STRING_DATE, "%x", date );
- gsb_date_set_last_date (date_str);
+ date = gdate_today();
+ g_date_strftime ( date_str, SIZEOF_FORMATTED_STRING_DATE, "%x", date );
+ gsb_date_set_last_date (date_str);
+ g_date_free( date );
}
return (last_date);
}
@@ -446,6 +447,7 @@
else
{
g_date_free ( date );
+ g_strfreev ( tab_date );
return NULL;
}
break;
@@ -458,6 +460,7 @@
else
{
g_date_free ( date );
+ g_strfreev ( tab_date );
return NULL;
}
break;
@@ -484,18 +487,20 @@
else
{
g_date_free ( date );
+ g_strfreev ( tab_date );
return NULL;
}
break;
default:
g_printerr ( ">> Unknown format '%c'\n", date_tokens [ i ] );
g_date_free ( date );
+ g_strfreev ( tab_date );
return NULL;
break;
}
}
/* comment for random crash. Memory allocation problem in split_unique_datefield () */
- //~ g_strfreev ( tab_date );
+ g_strfreev ( tab_date );
/* need here to check if the date is valid, else an error occurs when
* write for example only 31, and the current month has only 30 days... */
Index: gsb_data_scheduled.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_scheduled.c,v
retrieving revision 1.34
retrieving revision 1.34.2.1
diff -u -d -r1.34 -r1.34.2.1
--- gsb_data_scheduled.c 5 Apr 2010 21:24:53 -0000 1.34
+++ gsb_data_scheduled.c 21 May 2010 22:39:55 -0000 1.34.2.1
@@ -35,6 +35,7 @@
#include "./utils_dates.h"
#include "./utils_str.h"
#include "./include.h"
+#include "./gsb_real.h"
/*END_INCLUDE*/
@@ -82,7 +83,7 @@
/*START_STATIC*/
-static void _gsb_data_scheduled_free ( struct_scheduled *scheduled );
+static void _gsb_data_scheduled_free ( struct_scheduled *scheduled );
static void gsb_data_scheduled_delete_all_scheduled ();
static gint gsb_data_scheduled_get_last_number (void);
static gint gsb_data_scheduled_get_last_white_number (void);
Index: gsb_data_bank.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_bank.c,v
retrieving revision 1.14
retrieving revision 1.14.4.1
diff -u -d -r1.14 -r1.14.4.1
--- gsb_data_bank.c 12 Jun 2009 19:06:56 -0000 1.14
+++ gsb_data_bank.c 21 May 2010 22:39:55 -0000 1.14.4.1
@@ -61,7 +61,7 @@
} struct_bank;
/*START_STATIC*/
-static void _gsb_data_bank_free ( struct_bank* bank);
+static void _gsb_data_bank_free ( struct_bank* bank);
static gpointer gsb_data_bank_get_structure ( gint bank_number );
/*END_STATIC*/
Index: gsb_form.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_form.c,v
retrieving revision 1.161
retrieving revision 1.161.2.1
diff -u -d -r1.161 -r1.161.2.1
--- gsb_form.c 25 Apr 2010 05:48:16 -0000 1.161
+++ gsb_form.c 21 May 2010 22:39:55 -0000 1.161.2.1
@@ -71,6 +71,7 @@
#include "./transaction_list.h"
#include "./transaction_list_select.h"
#include "./utils_operations.h"
+#include "./balance_estimate_data.h"
#include "./fenetre_principale.h"
#include "./gsb_data_payment.h"
#include "./gtk_combofix.h"
@@ -82,8 +83,8 @@
#include "./include.h"
#include "./structures.h"
#include "./erreur.h"
-#include "./gsb_form_widget.h"
#include "./gsb_real.h"
+#include "./gsb_form_widget.h"
/*END_INCLUDE*/
/*START_STATIC*/
@@ -97,7 +98,8 @@
gint new_transaction,
gboolean is_transaction );
static gboolean gsb_form_hide ( void );
-static gboolean gsb_form_size_allocate ( GtkWidget *widget,
+static void gsb_form_set_current_date_into_date_entry ( void );
+static gboolean gsb_form_size_allocate ( GtkWidget *widget,
GtkAllocation *allocation,
gpointer null );
static void gsb_form_take_datas_from_form ( gint transaction_number,
@@ -1197,9 +1199,6 @@
/* if each account has a separate form, get it here,
* else, get the form of the first account */
- //~ if (etat.formulaire_distinct_par_compte)
- //~ form_account_number = account_number;
- //~ else
form_account_number = gsb_data_account_first_number ();
rows_number = gsb_data_form_get_nb_rows (form_account_number);
@@ -2641,28 +2640,29 @@
/* as we modify or create a transaction, we invalidate the current report */
gsb_report_set_current ( 0 );
-#ifdef ENABLE_BALANCE_ESTIMATE
/* force the update module budget */
- bet_data_set_maj ( account_number, BET_MAJ_ESTIMATE );
-#endif /* ENABLE_BALANCE_ESTIMATE */
+ gsb_data_account_set_bet_maj ( account_number, BET_MAJ_ALL );
if ( etat.modification_fichier == 0 )
modification_fichier ( TRUE );
/* Si l'origine de l'opération est un modèle alors on sélectionne une ligne vide */
- if ( GPOINTER_TO_INT (g_object_get_data ( G_OBJECT ( transaction_form ),
- "transaction_selected_in_form" ) ) == -1 )
- {
- g_object_set_data ( G_OBJECT ( transaction_form ), "transaction_selected_in_form", NULL );
- transaction_list_select ( -1 );
- return FALSE;
- }
-
+ //~ if ( GPOINTER_TO_INT (g_object_get_data ( G_OBJECT ( transaction_form ),
+ //~ "transaction_selected_in_form" ) ) == -1 )
+ //~ {
+ //~ g_object_set_data ( G_OBJECT ( transaction_form ), "transaction_selected_in_form", NULL );
+ //~ transaction_list_select ( -1 );
+ //~ return FALSE;
+ //~ }
/* give the focus to the date widget */
- if ( is_transaction )
- gsb_form_widget_set_focus ( TRANSACTION_FORM_DATE );
- else
- gsb_scheduler_list_edit_transaction (gsb_scheduler_list_get_current_scheduled_number ());
+ //~ if ( is_transaction )
+ //~ {
+ gsb_form_escape_form ( );
+ gsb_form_set_current_date_into_date_entry ( );
+ gsb_form_widget_set_focus ( TRANSACTION_FORM_DATE );
+ //~ }
+ //~ else
+ //~ gsb_scheduler_list_edit_transaction (gsb_scheduler_list_get_current_scheduled_number ());
return FALSE;
}
@@ -2758,9 +2758,11 @@
if ( gsb_form_widget_check_empty ( widget ) == TRUE
||
number.mantissa == 0 )
+ {
dialogue_error ( _("You must enter an amount.") );
- return (FALSE);
+ return (FALSE);
+ }
}
}
@@ -2860,18 +2862,21 @@
if (!question_yes_no ( _("Selected method of payment has an automatic incremental number\nbut doesn't contain any number.\nContinue anyway?"), GTK_RESPONSE_CANCEL))
return (FALSE);
}
- else
+ else if ( mother_number == 0 )
{
/* check that the number is not used */
gint tmp_transaction_number;
- tmp_transaction_number = gsb_data_transaction_check_content_payment (payment, utils_str_atoi (gtk_entry_get_text (GTK_ENTRY (widget))));
+ tmp_transaction_number = gsb_data_transaction_check_content_payment (
+ payment, utils_str_atoi (
+ gtk_entry_get_text ( GTK_ENTRY ( widget ) ) ) );
if ( tmp_transaction_number
- &&
- tmp_transaction_number != transaction_number
- &&
- !question_yes_no ( _("Warning: this cheque number is already used.\nContinue anyway?"), GTK_RESPONSE_CANCEL))
+ &&
+ tmp_transaction_number != transaction_number
+ &&
+ !question_yes_no ( _("Warning: this cheque number is already used.\nContinue anyway?"),
+ GTK_RESPONSE_CANCEL ) )
return FALSE;
}
}
@@ -3547,6 +3552,24 @@
}
+void gsb_form_set_current_date_into_date_entry ( void )
+{
+ GtkWidget *date_entry;
+
+ date_entry = gsb_form_widget_get_widget ( TRANSACTION_FORM_DATE );
+ if ( gsb_form_widget_check_empty ( date_entry ) )
+ {
+ if ( save_form_date )
+ gtk_entry_set_text ( GTK_ENTRY ( date_entry ),
+ gsb_format_gdate ( save_form_date ) );
+ else
+ gtk_entry_set_text ( GTK_ENTRY ( date_entry ),
+ gsb_date_today ( ) );
+
+ gsb_form_widget_set_empty ( date_entry, FALSE );
+ }
+}
+
/* Local Variables: */
/* c-basic-offset: 4 */
/* End: */
Index: parametres.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/parametres.c,v
retrieving revision 1.214
retrieving revision 1.214.2.1
diff -u -d -r1.214 -r1.214.2.1
--- parametres.c 5 Apr 2010 21:24:53 -0000 1.214
+++ parametres.c 21 May 2010 22:39:56 -0000 1.214.2.1
@@ -64,7 +64,7 @@
/*START_STATIC*/
static GtkWidget * create_preferences_tree ( );
-static GtkWidget *gsb_config_scheduler_page ( void );
+static GtkWidget *gsb_config_scheduler_page ( void );
static gboolean gsb_config_scheduler_switch_balances_with_scheduled ( void );
static gboolean gsb_gui_delete_msg_toggled ( GtkCellRendererToggle *cell, gchar *path_str,
GtkTreeModel * model );
@@ -544,7 +544,7 @@
1, BET_GENERAL_PAGE,
2, 400,
-1);
- gtk_notebook_append_page (preference_frame, bet_config_create_general_page (), NULL);
+ gtk_notebook_append_page (preference_frame, bet_config_general_create_general_page (), NULL);
gtk_tree_store_append (GTK_TREE_STORE (preference_tree_model), &iter2, &iter);
gtk_tree_store_set (GTK_TREE_STORE (preference_tree_model),
@@ -553,7 +553,7 @@
1, BET_ACCOUNT_PAGE,
2, 400,
-1);
- gtk_notebook_append_page (preference_frame, bet_config_create_account_page (), NULL);
+ gtk_notebook_append_page (preference_frame, bet_config_account_create_account_page (), NULL);
#endif
Index: gsb_data_archive.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_archive.c,v
retrieving revision 1.16
retrieving revision 1.16.2.1
diff -u -d -r1.16 -r1.16.2.1
--- gsb_data_archive.c 14 Feb 2010 17:48:50 -0000 1.16
+++ gsb_data_archive.c 21 May 2010 22:39:55 -0000 1.16.2.1
@@ -62,7 +62,7 @@
} struct_archive;
/*START_STATIC*/
-static void _gsb_data_archive_free ( struct_archive* archive);
+static void _gsb_data_archive_free ( struct_archive* archive);
static gpointer gsb_data_archive_get_structure ( gint archive_number );
static gint gsb_data_archive_max_number ( void );
/*END_STATIC*/
Index: gsb_data_reconcile.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_reconcile.c,v
retrieving revision 1.22
retrieving revision 1.22.2.1
diff -u -d -r1.22 -r1.22.2.1
--- gsb_data_reconcile.c 10 Jan 2010 20:11:37 -0000 1.22
+++ gsb_data_reconcile.c 21 May 2010 22:39:55 -0000 1.22.2.1
@@ -57,7 +57,7 @@
/*START_STATIC*/
-static void _gsb_data_reconcile_free ( struct_reconcile *reconcile );
+static void _gsb_data_reconcile_free ( struct_reconcile *reconcile );
static gint gsb_data_reconcile_cmp_int (struct_reconcile *reconcile_1,
struct_reconcile *reconcile_2);
static gpointer gsb_data_reconcile_get_structure ( gint reconcile_number );
Index: gsb_data_report.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_report.c,v
retrieving revision 1.34
retrieving revision 1.34.4.1
diff -u -d -r1.34 -r1.34.4.1
--- gsb_data_report.c 24 Aug 2009 13:40:57 -0000 1.34
+++ gsb_data_report.c 21 May 2010 22:39:55 -0000 1.34.4.1
@@ -156,7 +156,7 @@
/*START_STATIC*/
-static void _gsb_data_report_free ( struct_report *report );
+static void _gsb_data_report_free ( struct_report *report );
static GSList *gsb_data_report_copy_categ_budget_struct (GSList *orig_categ_budget_list);
static struct_report *gsb_data_report_get_structure ( gint report_number );
/*END_STATIC*/
Index: navigation.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/navigation.c,v
retrieving revision 1.143
retrieving revision 1.143.2.1
diff -u -d -r1.143 -r1.143.2.1
--- navigation.c 5 Apr 2010 21:24:53 -0000 1.143
+++ navigation.c 21 May 2010 22:39:56 -0000 1.143.2.1
@@ -64,11 +64,11 @@
static gboolean gsb_gui_navigation_check_key_press ( GtkWidget *tree_view,
GdkEventKey *ev,
GtkTreeModel *model );
-static gboolean gsb_gui_navigation_remove_account_iterator ( GtkTreeModel * tree_model,
+static gboolean gsb_gui_navigation_remove_account_iterator ( GtkTreeModel * tree_model,
GtkTreePath *path,
GtkTreeIter *iter,
gpointer data );
-static gboolean gsb_gui_navigation_remove_report_iterator ( GtkTreeModel * tree_model,
+static gboolean gsb_gui_navigation_remove_report_iterator ( GtkTreeModel * tree_model,
GtkTreePath *path,
GtkTreeIter *iter,
gpointer data );
@@ -80,14 +80,14 @@
static void gsb_gui_navigation_update_account_iter ( GtkTreeModel * model,
GtkTreeIter * account_iter,
gint account_number );
-static gboolean gsb_gui_navigation_update_account_iterator ( GtkTreeModel * tree_model,
+static gboolean gsb_gui_navigation_update_account_iterator ( GtkTreeModel * tree_model,
GtkTreePath *path,
GtkTreeIter *iter,
gpointer data );
static void gsb_gui_navigation_update_report_iter ( GtkTreeModel * model,
GtkTreeIter * report_iter,
gint report_number );
-static gboolean gsb_gui_navigation_update_report_iterator ( GtkTreeModel * tree_model,
+static gboolean gsb_gui_navigation_update_report_iterator ( GtkTreeModel * tree_model,
GtkTreePath *path,
GtkTreeIter *iter,
gpointer data );
@@ -100,6 +100,7 @@
/*START_EXTERN*/
+extern GtkWidget *account_page;
extern gchar *initial_holder_title;
extern GtkWidget *label_last_statement;
extern GtkWidget *menu_import_rules;
@@ -1096,7 +1097,6 @@
gboolean gsb_gui_navigation_select_line ( GtkTreeSelection *selection,
GtkTreeModel *model )
{
- GtkWidget * account_notebook;
gint account_number, page_number;
gint report_number;
gchar * title = NULL;
@@ -1160,10 +1160,9 @@
gsb_menu_update_view_menu ( account_number );
/* set the form */
- account_notebook = g_object_get_data ( G_OBJECT (notebook_general), "account_notebook" );
- gsb_gui_on_account_switch_page ( GTK_NOTEBOOK ( account_notebook ),
+ gsb_gui_on_account_switch_page ( GTK_NOTEBOOK ( account_page ),
NULL,
- gtk_notebook_get_current_page ( GTK_NOTEBOOK ( account_notebook ) ),
+ gtk_notebook_get_current_page ( GTK_NOTEBOOK ( account_page ) ),
NULL );
gsb_form_show ( FALSE );
Index: menu.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/menu.c,v
retrieving revision 1.151
retrieving revision 1.151.2.1
diff -u -d -r1.151 -r1.151.2.1
--- menu.c 28 Mar 2010 14:40:29 -0000 1.151
+++ menu.c 21 May 2010 22:39:55 -0000 1.151.2.1
@@ -65,7 +65,7 @@
static gboolean help_quick_start ( void );
static gboolean help_translation ( void );
static gboolean help_website ( void );
-static void menu_add_widget (GtkUIManager * p_uiManager, GtkWidget * p_widget,
+static void menu_add_widget (GtkUIManager * p_uiManager, GtkWidget * p_widget,
GtkContainer * p_box) ;
/*END_STATIC*/
Index: barre_outils.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/barre_outils.c,v
retrieving revision 1.133
retrieving revision 1.133.2.1
diff -u -d -r1.133 -r1.133.2.1
--- barre_outils.c 5 Apr 2010 21:24:53 -0000 1.133
+++ barre_outils.c 21 May 2010 22:39:55 -0000 1.133.2.1
@@ -51,7 +51,7 @@
static gboolean popup_scheduled_view_mode_menu ( GtkWidget * button );
static gboolean popup_transaction_rules_menu ( GtkWidget * button,
gpointer null );
-static gboolean popup_transaction_view_mode_menu ( GtkWidget * button,
+static gboolean popup_transaction_view_mode_menu ( GtkWidget * button,
gpointer null );
/*END_STATIC*/
Index: gsb_assistant_archive.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_assistant_archive.c,v
retrieving revision 1.44
retrieving revision 1.44.2.1
diff -u -d -r1.44 -r1.44.2.1
--- gsb_assistant_archive.c 3 Apr 2010 19:57:41 -0000 1.44
+++ gsb_assistant_archive.c 21 May 2010 22:39:55 -0000 1.44.2.1
@@ -54,21 +54,21 @@
/*END_INCLUDE*/
/*START_STATIC*/
-static void gsb_assistant_archive_add_children_to_list ( gint transaction_number );
-static void gsb_assistant_archive_add_contra_transaction_to_list ( gint transaction_number );
-static void gsb_assistant_archive_add_transaction_to_list ( gpointer transaction_pointer );
-static GtkWidget *gsb_assistant_archive_page_archive_name ( GtkWidget *assistant );
-static GtkWidget *gsb_assistant_archive_page_menu ( GtkWidget *assistant );
-static GtkWidget *gsb_assistant_archive_page_success ( void );
-static gboolean gsb_assistant_archive_switch_to_archive_name ( GtkWidget *assistant,
+static void gsb_assistant_archive_add_children_to_list ( gint transaction_number );
+static void gsb_assistant_archive_add_contra_transaction_to_list ( gint transaction_number );
+static void gsb_assistant_archive_add_transaction_to_list ( gpointer transaction_pointer );
+static GtkWidget *gsb_assistant_archive_page_archive_name ( GtkWidget *assistant );
+static GtkWidget *gsb_assistant_archive_page_menu ( GtkWidget *assistant );
+static GtkWidget *gsb_assistant_archive_page_success ( void );
+static gboolean gsb_assistant_archive_switch_to_archive_name ( GtkWidget *assistant,
gint new_page );
-static gboolean gsb_assistant_archive_switch_to_intro ( GtkWidget *assistant,
+static gboolean gsb_assistant_archive_switch_to_intro ( GtkWidget *assistant,
gint new_page );
-static gboolean gsb_assistant_archive_switch_to_menu ( GtkWidget *assistant,
+static gboolean gsb_assistant_archive_switch_to_menu ( GtkWidget *assistant,
gint new_page );
-static gboolean gsb_assistant_archive_switch_to_succes ( GtkWidget *assistant,
+static gboolean gsb_assistant_archive_switch_to_succes ( GtkWidget *assistant,
gint new_page );
-static gboolean gsb_assistant_archive_update_labels ( GtkWidget *assistant );
+static gboolean gsb_assistant_archive_update_labels ( GtkWidget *assistant );
/*END_STATIC*/
/*START_EXTERN*/
Index: gsb_data_transaction.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_transaction.c,v
retrieving revision 1.88
retrieving revision 1.88.2.1
diff -u -d -r1.88 -r1.88.2.1
--- gsb_data_transaction.c 24 Apr 2010 05:39:25 -0000 1.88
+++ gsb_data_transaction.c 21 May 2010 22:39:55 -0000 1.88.2.1
@@ -45,8 +45,10 @@
#include "./utils_dates.h"
#include "./gsb_real.h"
#include "./utils_str.h"
+#include "./balance_estimate_data.h"
#include "./include.h"
#include "./structures.h"
+#include "./gsb_real.h"
/*END_INCLUDE*/
@@ -101,7 +103,7 @@
/*START_STATIC*/
static void gsb_data_transaction_delete_all_transactions ( void );
-static void gsb_data_transaction_free ( struct_transaction *transaction);
+static void gsb_data_transaction_free ( struct_transaction *transaction);
static gint gsb_data_transaction_get_last_white_number (void);
static struct_transaction *gsb_data_transaction_get_transaction_by_no ( gint transaction_number );
static gboolean gsb_data_transaction_save_transaction_pointer ( gpointer transaction );
@@ -2200,6 +2202,8 @@
g_free ( transaction -> notes );
if ( transaction -> voucher )
g_free ( transaction -> voucher );
+ if ( transaction -> bank_references )
+ g_free ( transaction -> bank_references );
if ( transaction -> date )
g_date_free ( transaction -> date );
if ( transaction -> value_date )
@@ -2310,10 +2314,8 @@
gsb_data_transaction_free (transaction);
-#ifdef ENABLE_BALANCE_ESTIMATE
/* force the update module budget */
- bet_data_set_maj ( transaction -> account_number, BET_MAJ_ESTIMATE );
-#endif /* ENABLE_BALANCE_ESTIMATE */
+ gsb_data_account_set_bet_maj ( transaction -> account_number, BET_MAJ_ALL );
return TRUE;
}
Index: main.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/main.c,v
retrieving revision 1.173
retrieving revision 1.173.2.1
diff -u -d -r1.173 -r1.173.2.1
--- main.c 24 Apr 2010 18:38:27 -0000 1.173
+++ main.c 21 May 2010 22:39:55 -0000 1.173.2.1
@@ -63,8 +63,8 @@
static gboolean gsb_grisbi_change_state_window ( GtkWidget *window,
GdkEventWindowState *event,
gpointer null );
-static gboolean main_window_delete_event (GtkWidget *window, gpointer data);
-static void main_window_destroy_event( GObject* obj, gpointer data);
+static gboolean main_window_delete_event (GtkWidget *window, gpointer data);
+static void main_window_destroy_event( GObject* obj, gpointer data);
/*END_STATIC*/
/* vbox ajoutée dans la fenetre de base, contient le menu et la fenetre d'utilisation */
@@ -83,13 +83,17 @@
LPWSTR lpCmdLine,
int nCmdShow)
{
- int argc, nLen;
+ int argc, nLen, i;
LPWSTR * argvP;
- char ** argv = malloc(sizeof(char**));
+ char ** argv;
argvP = CommandLineToArgvW(GetCommandLineW(), &(argc));
- nLen = WideCharToMultiByte(CP_UTF8, 0,argvP[0], -1, NULL, 0, NULL, NULL);
- *argv = malloc((nLen + 1) * sizeof(char));
- WideCharToMultiByte(CP_UTF8, 0, argvP[0], -1, *argv, nLen, NULL, NULL);
+ argv = malloc (argc* sizeof(char *));
+ for (i = 0 ; i<argc ; i++)
+ {
+ nLen = WideCharToMultiByte(CP_UTF8, 0,argvP[i], -1, NULL, 0, NULL, NULL);
+ argv[i] = malloc((nLen + 1) * sizeof(char));
+ WideCharToMultiByte(CP_UTF8, 0, argvP[i], -1, argv[i], nLen, NULL, NULL);
+ }
return main(argc, argv);
}
#endif
@@ -120,25 +124,6 @@
gchar *gtkrc_file;
#endif
-#ifdef G_OS_UNIX
- if ( g_file_test ( PLUGINS_DIR, G_FILE_TEST_IS_DIR ) )
- PLUGINS_DIRECTORY = g_strdup ( PLUGINS_DIR );
-
- else
- {
- gchar *ptr;
- gchar *dir_name;
-
- ptr = g_strrstr ( PLUGINS_DIR, "/grisbi" );
- dir_name = g_strndup ( PLUGINS_DIR, ( ptr - PLUGINS_DIR ) );
- dir_name = g_strconcat ( dir_name, "64/grisbi", NULL );
-
- if ( g_file_test ( dir_name, G_FILE_TEST_IS_DIR ) )
- PLUGINS_DIRECTORY = dir_name;
- }
-#endif
-
-
#if GSB_GMEMPROFILE
g_mem_set_vtable(glib_mem_profiler_table);
#endif
@@ -195,7 +180,7 @@
}
#ifdef HAVE_PLUGINS
- gsb_plugins_scan_dir ( PLUGINS_DIRECTORY );
+ gsb_plugins_scan_dir ( PLUGINS_DIR );
#endif
/* create the icon of grisbi (set in the panel of gnome or other) */
@@ -325,7 +310,7 @@
nom_fichier_comptes = NULL;
}
-#ifdef IS_DEVELOPMENT_VERSION
+#if IS_DEVELOPMENT_VERSION == 1
dialog_message ( "development-version", VERSION );
#endif
@@ -345,7 +330,6 @@
gtk_main ();
gsb_plugins_release ( );
- g_free ( PLUGINS_DIRECTORY );
/* sauvegarde les raccourcis claviers */
gtk_accel_map_save (path);
Index: transaction_list_select.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/transaction_list_select.c,v
retrieving revision 1.10
retrieving revision 1.10.2.1
diff -u -d -r1.10 -r1.10.2.1
--- transaction_list_select.c 5 Apr 2010 21:24:53 -0000 1.10
+++ transaction_list_select.c 21 May 2010 22:39:56 -0000 1.10.2.1
@@ -40,7 +40,7 @@
/*END_INCLUDE*/
/*START_STATIC*/
-static gboolean transaction_list_select_record ( CustomRecord *record );
+static gboolean transaction_list_select_record ( CustomRecord *record );
/*END_STATIC*/
/*START_EXTERN*/
Index: utils.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/utils.h,v
retrieving revision 1.29
retrieving revision 1.29.2.1
diff -u -d -r1.29 -r1.29.2.1
--- utils.h 5 Apr 2010 21:24:53 -0000 1.29
+++ utils.h 21 May 2010 22:39:56 -0000 1.29.2.1
@@ -25,6 +25,5 @@
gboolean sensitive_widget ( gpointer object,
GtkWidget *widget );
void update_ecran ( void );
-GtkWidget *utils_get_child_widget_by_name ( GtkWidget *ancestor, const gchar *name );
/* END_DECLARATION */
#endif
Index: affichage_liste.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/affichage_liste.c,v
retrieving revision 1.122
retrieving revision 1.122.2.1
diff -u -d -r1.122 -r1.122.2.1
--- affichage_liste.c 5 Apr 2010 21:24:53 -0000 1.122
+++ affichage_liste.c 21 May 2010 22:39:55 -0000 1.122.2.1
@@ -46,7 +46,7 @@
/*END_INCLUDE*/
/*START_STATIC*/
-static gboolean display_mode_button_changed ( GtkWidget *button,
+static gboolean display_mode_button_changed ( GtkWidget *button,
gint *line_ptr );
static gboolean gsb_transactions_list_display_change_max_items ( GtkWidget *entry,
gpointer null );
Index: print_report.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/print_report.c,v
retrieving revision 1.11
retrieving revision 1.11.2.1
diff -u -d -r1.11 -r1.11.2.1
--- print_report.c 14 Feb 2010 17:48:50 -0000 1.11
+++ print_report.c 21 May 2010 22:39:56 -0000 1.11.2.1
@@ -49,15 +49,15 @@
static gboolean print_report_begin ( GtkPrintOperation *operation,
GtkPrintContext *context,
gpointer null );
-static void print_report_draw_column ( GtkTableChild *child,
+static void print_report_draw_column ( GtkTableChild *child,
gint line_position );
-static void print_report_draw_line ( GtkTableChild *child,
+static void print_report_draw_line ( GtkTableChild *child,
gint line_position );
static gboolean print_report_draw_page ( GtkPrintOperation *operation,
GtkPrintContext *context,
gint page,
gpointer null );
-static void print_report_draw_row ( GtkPrintContext *context,
+static void print_report_draw_row ( GtkPrintContext *context,
GtkTableChild *child,
gint line_position,
gint is_title );
Index: utils.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/utils.c,v
retrieving revision 1.64
retrieving revision 1.64.2.1
diff -u -d -r1.64 -r1.64.2.1
--- utils.c 5 Apr 2010 21:24:53 -0000 1.64
+++ utils.c 21 May 2010 22:39:56 -0000 1.64.2.1
@@ -484,50 +484,6 @@
return version;
}
-/**
- * This function returns a child widget whose name is passed as parameter
- *
- * /parameter ancestor
- * /parameter name of the child
- *
- * /return the child or NULL
- */
-GtkWidget *utils_get_child_widget_by_name ( GtkWidget *ancestor, const gchar *name )
-{
- GtkWidget *widget;
- GList *list;
-
- list = gtk_container_get_children ( GTK_CONTAINER ( ancestor ) );
- if ( list == NULL )
- return NULL;
-
- do
- {
- const gchar *tmp_str;
-
- widget = list -> data;
-
- tmp_str = gtk_widget_get_name ( GTK_WIDGET ( widget ) );
- if ( tmp_str && g_strcmp0 ( name, tmp_str ) == 0 )
- return widget;
-
- if ( GTK_IS_CONTAINER ( widget ) == TRUE )
- {
- widget = utils_get_child_widget_by_name ( widget, name );
- if ( widget )
- {
- tmp_str = gtk_widget_get_name ( GTK_WIDGET ( widget ) );
- if ( tmp_str && g_strcmp0 ( name, tmp_str ) == 0 )
- return widget;
- }
- }
-
- list = g_list_next ( list );
- } while ( list );
-
- return NULL;
-}
-
/* Local Variables: */
/* c-basic-offset: 4 */
/* End: */
Index: gsb_data_currency.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_currency.c,v
retrieving revision 1.19
retrieving revision 1.19.4.1
diff -u -d -r1.19 -r1.19.4.1
--- gsb_data_currency.c 13 May 2009 20:15:55 -0000 1.19
+++ gsb_data_currency.c 21 May 2010 22:39:55 -0000 1.19.4.1
@@ -48,7 +48,7 @@
} struct_currency;
/*START_STATIC*/
-static void _gsb_data_currency_free ( struct_currency *currency );
+static void _gsb_data_currency_free ( struct_currency *currency );
static gpointer gsb_data_currency_get_structure ( gint currency_number );
static gboolean gsb_data_currency_set_default_currency ( gint currency_number );
/*END_STATIC*/
Index: gsb_bank.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_bank.c,v
retrieving revision 1.26
retrieving revision 1.26.2.1
diff -u -d -r1.26 -r1.26.2.1
--- gsb_bank.c 10 Jan 2010 20:11:37 -0000 1.26
+++ gsb_bank.c 21 May 2010 22:39:55 -0000 1.26.2.1
@@ -46,31 +46,31 @@
/*END_INCLUDE*/
/*START_STATIC*/
-static gboolean gsb_bank_add ( GtkWidget *button,
+static gboolean gsb_bank_add ( GtkWidget *button,
gpointer null );
-static void gsb_bank_bic_code_changed ( GtkEntry *entry, gpointer data );
-static void gsb_bank_code_changed ( GtkEntry *entry, gpointer data );
-static gboolean gsb_bank_combobox_changed ( GtkWidget *combobox,
+static void gsb_bank_bic_code_changed ( GtkEntry *entry, gpointer data );
+static void gsb_bank_code_changed ( GtkEntry *entry, gpointer data );
+static gboolean gsb_bank_combobox_changed ( GtkWidget *combobox,
gboolean default_func (gint, gint));
-static gboolean gsb_bank_create_combobox_model ( void );
-static GtkWidget *gsb_bank_create_form ( GtkWidget *parent,
+static gboolean gsb_bank_create_combobox_model ( void );
+static GtkWidget *gsb_bank_create_form ( GtkWidget *parent,
GtkWidget *combobox );
-static gboolean gsb_bank_delete ( GtkWidget *button,
+static gboolean gsb_bank_delete ( GtkWidget *button,
gpointer null );
-static gboolean gsb_bank_edit_bank ( gint bank_number,
+static gboolean gsb_bank_edit_bank ( gint bank_number,
GtkWidget *combobox );
-static gboolean gsb_bank_list_change_selection ( GtkTreeSelection *selection,
+static gboolean gsb_bank_list_change_selection ( GtkTreeSelection *selection,
GtkWidget *container );
-static gboolean gsb_bank_list_changed ( GtkWidget *combobox,
+static gboolean gsb_bank_list_changed ( GtkWidget *combobox,
gpointer null );
-static gboolean gsb_bank_list_check_separator ( GtkTreeModel *model,
+static gboolean gsb_bank_list_check_separator ( GtkTreeModel *model,
GtkTreeIter *iter,
gpointer null );
-static gboolean gsb_bank_update_form ( gint bank_number,
+static gboolean gsb_bank_update_form ( gint bank_number,
GtkWidget *frame );
-static gboolean gsb_bank_update_selected_line ( GtkEntry *entry,
+static gboolean gsb_bank_update_selected_line ( GtkEntry *entry,
GtkWidget *combobox );
-static gboolean gsb_bank_update_selected_line_model ( GtkWidget *combobox );
+static gboolean gsb_bank_update_selected_line_model ( GtkWidget *combobox );
/*END_STATIC*/
static GtkWidget *bank_list_tree_view;
Index: gsb_file_config.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_config.c,v
retrieving revision 1.96
retrieving revision 1.96.2.1
diff -u -d -r1.96 -r1.96.2.1
--- gsb_file_config.c 5 Apr 2010 21:24:53 -0000 1.96
+++ gsb_file_config.c 21 May 2010 22:39:55 -0000 1.96.2.1
@@ -55,7 +55,7 @@
gpointer user_data,
GError **error);
static gboolean gsb_file_config_load_last_xml_config ( gchar *filename );
-static void gsb_file_config_remove_old_config_file ( gchar *filename );
+static void gsb_file_config_remove_old_config_file ( gchar *filename );
/*END_STATIC*/
More information about the cvs
mailing list