[grisbi-cvs] grisbi/src balance_estimate_data.c, 1.14, 1.15 balance_estimate_future.c, 1.1, 1.2 balance_estimate_future.h, 1.1, 1.2 balance_estimate_hist.c, 1.18, 1.19 balance_estimate_tab.c, 1.55, 1.56 fenetre_principale.c, 1.130, 1.131 gsb_data_payment.c, 1.16, 1.17 gsb_transactions_list.c, 1.202, 1.203 navigation.c, 1.141, 1.142 utils_str.c, 1.82, 1.83
Pierre Biava
pbiava at users.sourceforge.net
Sat Mar 20 19:37:33 CET 2010
- Previous message: [grisbi-cvs] grisbi/po cs.po, 1.101, 1.102 da.po, 1.107, 1.108 de.po, 1.181, 1.182 el.po, 1.71, 1.72 eo.po, 1.64, 1.65 es.po, 1.178, 1.179 fa.po, 1.94, 1.95 fr.po, 1.240, 1.241 grisbi.pot, 1.142, 1.143 he.po, 1.100, 1.101 it.po, 1.100, 1.101 nl.po, 1.99, 1.100 pl.po, 1.105, 1.106 pt_BR.po, 1.102, 1.103 ro.po, 1.101, 1.102 ru.po, 1.99, 1.100 zh_CN.po, 1.95, 1.96
- Next message: [grisbi-cvs] grisbi/src balance_estimate_future.c,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/grisbi/grisbi/src
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv14785/src
Modified Files:
balance_estimate_data.c balance_estimate_future.c
balance_estimate_future.h balance_estimate_hist.c
balance_estimate_tab.c fenetre_principale.c gsb_data_payment.c
gsb_transactions_list.c navigation.c utils_str.c
Log Message:
fixed bug 1012 and minor corrections in the budgetary module
Index: fenetre_principale.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/fenetre_principale.c,v
retrieving revision 1.130
retrieving revision 1.131
diff -u -d -r1.130 -r1.131
--- fenetre_principale.c 16 Mar 2010 11:48:43 -0000 1.130
+++ fenetre_principale.c 20 Mar 2010 18:37:31 -0000 1.131
@@ -26,7 +26,6 @@
/*START_INCLUDE*/
#include "fenetre_principale.h"
#include "./balance_estimate_data.h"
-#include "./balance_estimate_future.h"
#include "./balance_estimate_hist.h"
#include "./balance_estimate_tab.h"
#include "./navigation.h"
@@ -248,9 +247,6 @@
bet_historical_create_page ( ),
gtk_label_new (SPACIFY(_("Historical data"))) );
- gtk_notebook_append_page ( GTK_NOTEBOOK ( account_page ),
- bet_future_create_page ( ),
- gtk_label_new (SPACIFY(_("Future data"))) );
#endif /* ENABLE_BALANCE_ESTIMATE */
gtk_notebook_append_page ( GTK_NOTEBOOK ( account_page ),
@@ -307,36 +303,21 @@
guint page_number,
gpointer null )
{
- const gchar *name;
-
- name = gtk_widget_get_name ( gtk_notebook_get_nth_page ( notebook, page_number ) );
-
- if ( g_utf8_collate ( name, "win_operations" ) == 0 )
+ switch ( page_number )
+ {
+ case 0:
gsb_form_set_expander_visible ( TRUE, TRUE );
+ break;
+
+ case 1:
+ case 2:
#ifdef ENABLE_BALANCE_ESTIMATE
- else if ( g_utf8_collate ( name, "bet_array_page" ) == 0 )
- {
- gsb_form_set_expander_visible ( FALSE, FALSE );
if ( bet_data_get_maj ( ) )
bet_array_update_estimate_tab ( );
- }
- else if ( g_utf8_collate ( name, "bet_historical_page" ) == 0 )
- {
- gsb_form_set_expander_visible ( FALSE, FALSE );
- if ( bet_data_get_maj ( ) )
- bet_array_update_estimate_tab ( );
- }
- else if ( g_utf8_collate ( name, "bet_future_page" ) == 0 )
- {
- //~ gsb_form_set_expander_visible ( TRUE, TRUE );
- gsb_form_set_expander_visible (FALSE, FALSE );
- if ( bet_data_get_maj ( ) )
- bet_array_update_estimate_tab ( );
- }
#endif /* ENABLE_BALANCE_ESTIMATE */
- else if ( g_utf8_collate ( name, "properties_page" ) == 0 )
- {
- gsb_form_set_expander_visible ( FALSE, FALSE );
+ case 3:
+ gsb_form_set_expander_visible (FALSE, FALSE );
+ break;
}
return ( FALSE );
Index: gsb_transactions_list.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_transactions_list.c,v
retrieving revision 1.202
retrieving revision 1.203
diff -u -d -r1.202 -r1.203
--- gsb_transactions_list.c 16 Mar 2010 11:48:43 -0000 1.202
+++ gsb_transactions_list.c 20 Mar 2010 18:37:31 -0000 1.203
@@ -285,7 +285,6 @@
/* la fenetre des opé est une vbox : la liste en haut, le solde et */
/* des boutons de conf au milieu, le transaction_form en bas */
win_operations = gtk_vbox_new ( FALSE, 6 );
- gtk_widget_set_name ( win_operations, "win_operations" );
/* création de la barre d'outils */
barre_outils = gtk_handle_box_new ();
@@ -1462,8 +1461,8 @@
/* if no P/R column, cannot really mark/unmark the transaction... */
col = find_element_col (ELEMENT_MARK);
if ( col == -1 )
- return FALSE;
-
+ return FALSE;
+printf ("etape 1\n");
/* if we are on the white line, a R transaction or a child of split, do nothing */
if ( transaction_number == -1
||
@@ -1471,19 +1470,19 @@
||
gsb_data_transaction_get_mother_transaction_number (transaction_number))
return FALSE;
-
+printf ("etape 2\n");
account_number = gsb_gui_navigation_get_current_account ();
amount = gsb_data_transaction_get_adjusted_amount (transaction_number, -1);
if (gsb_data_transaction_get_marked_transaction (transaction_number))
{
- gsb_data_transaction_set_marked_transaction ( transaction_number,
- OPERATION_NORMALE );
+ gsb_data_transaction_set_marked_transaction ( transaction_number,
+ OPERATION_NORMALE );
}
else
{
- gsb_data_transaction_set_marked_transaction ( transaction_number,
- OPERATION_POINTEE );
+ gsb_data_transaction_set_marked_transaction ( transaction_number,
+ OPERATION_POINTEE );
}
transaction_list_update_transaction (transaction_number);
@@ -1517,6 +1516,7 @@
gsb_reconcile_update_amounts (NULL, NULL);
}
/* need to update the marked amount on the home page */
+ gsb_navigation_update_statement_label ( account_number );
mise_a_jour_liste_comptes_accueil = 1;
if ( etat.modification_fichier == 0 )
Index: navigation.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/navigation.c,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -d -r1.141 -r1.142
--- navigation.c 13 Mar 2010 21:06:58 -0000 1.141
+++ navigation.c 20 Mar 2010 18:37:31 -0000 1.142
@@ -1025,7 +1025,7 @@
tmp_str1 = gsb_format_gdate ( gsb_data_reconcile_get_final_date (
reconcile_number ) );
tmp_str2 = gsb_real_get_string_with_currency (
- gsb_data_reconcile_get_final_balance ( reconcile_number ),
+ gsb_data_account_get_marked_balance ( account_number ),
gsb_data_account_get_currency ( account_number ), TRUE );
tmp_str = g_strconcat ( _("Last statement: "), tmp_str1, " - ",
Index: gsb_data_payment.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_payment.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- gsb_data_payment.c 16 Mar 2010 11:48:43 -0000 1.16
+++ gsb_data_payment.c 20 Mar 2010 18:37:31 -0000 1.17
@@ -651,7 +651,7 @@
const gchar *gsb_data_payment_get_last_number ( gint payment_number )
{
struct_payment *payment;
-devel_debug_int (payment_number);
+
payment = gsb_data_payment_get_structure ( payment_number );
if (!payment)
Index: balance_estimate_future.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/balance_estimate_future.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- balance_estimate_future.h 16 Mar 2010 11:48:42 -0000 1.1
+++ balance_estimate_future.h 20 Mar 2010 18:37:31 -0000 1.2
@@ -8,6 +8,8 @@
/* START_DECLARATION */
+gboolean bet_future_configure_form_to_future ( void );
+gboolean bet_future_configure_form_to_transaction ( void );
GtkWidget * bet_future_create_page ( void );
/* END_DECLARATION */
Index: balance_estimate_data.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/balance_estimate_data.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- balance_estimate_data.c 16 Mar 2010 11:48:42 -0000 1.14
+++ balance_estimate_data.c 20 Mar 2010 18:37:31 -0000 1.15
@@ -918,19 +918,15 @@
gtk_widget_show ( page );
page = gtk_notebook_get_nth_page ( GTK_NOTEBOOK ( notebook ), 2 );
gtk_widget_show ( page );
- page = gtk_notebook_get_nth_page ( GTK_NOTEBOOK ( notebook ), 3 );
- gtk_widget_show ( page );
bet_array_update_estimate_tab ( );
break;
case GSB_TYPE_LIABILITIES:
page = gtk_notebook_get_nth_page ( GTK_NOTEBOOK ( notebook ), 1 );
gtk_widget_show ( page );
- if ( current_page == 2 || current_page == 3 )
+ 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 );
- page = gtk_notebook_get_nth_page ( GTK_NOTEBOOK ( notebook ), 3 );
- gtk_widget_hide ( page );
bet_array_update_estimate_tab ( );
break;
case GSB_TYPE_ASSET:
@@ -940,8 +936,6 @@
gtk_widget_hide ( page );
page = gtk_notebook_get_nth_page ( GTK_NOTEBOOK ( notebook ), 2 );
gtk_widget_hide ( page );
- page = gtk_notebook_get_nth_page ( GTK_NOTEBOOK ( notebook ), 3 );
- gtk_widget_hide ( page );
break;
}
}
Index: balance_estimate_tab.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/balance_estimate_tab.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- balance_estimate_tab.c 16 Mar 2010 11:48:42 -0000 1.55
+++ balance_estimate_tab.c 20 Mar 2010 18:37:31 -0000 1.56
@@ -446,7 +446,6 @@
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, "bet_array_page" );
/* create the title */
align = gtk_alignment_new (0.5, 0.0, 0.0, 0.0);
@@ -812,12 +811,18 @@
GDate *date_max )
{
GDate *date_jour_1;
+ GDate *date_comp;
GSList *tmp_list;
//~ devel_debug (NULL);
+ /* init dates */
date_jour_1 = gdate_today ( );
if ( g_date_get_day ( date_min ) > 1 )
g_date_set_day ( date_jour_1, 1 );
+ if ( g_date_compare ( date_jour_1, date_min ) < 0 )
+ date_comp = date_jour_1;
+ else
+ date_comp = date_min;
/* search transactions of the account which are in the period */
tmp_list = gsb_data_transaction_get_transactions_list ( );
@@ -858,12 +863,8 @@
transaction_number ) != 0 )
continue;
- /* Ignore transactions that are before date_min */
- if ( g_date_compare ( date, date_min ) < 0 )
- continue;
-
- /* ignore transaction which are before date_min */
- if ( g_date_compare ( date, date_min ) < 0 )
+ /* Ignore transactions that are before date_com */
+ if ( g_date_compare ( date, date_comp ) < 0 )
continue;
/* ignores transactions replaced with historical data */
@@ -879,6 +880,11 @@
bet_array_adjust_hist_amount ( div_number, sub_div_nb, amount, tab_model );
}
+ /* ignore transaction which are before date_min */
+ if ( g_date_compare ( date, date_min ) < 0 )
+ continue;
+
+
str_date = gsb_format_gdate ( date );
g_value_init ( &date_value, G_TYPE_DATE );
g_value_set_boxed ( &date_value, date );
@@ -940,7 +946,7 @@
/**
- *
+ * Add a new line with historical data
*
*
*
Index: balance_estimate_future.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/balance_estimate_future.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- balance_estimate_future.c 16 Mar 2010 11:48:42 -0000 1.1
+++ balance_estimate_future.c 20 Mar 2010 18:37:31 -0000 1.2
@@ -118,13 +118,30 @@
}
+/**
+ *
+ *
+ *
+ *
+ * */
+gboolean bet_future_configure_form_to_future ( void )
+{
+ gtk_widget_show (form_scheduled_part);
+ return TRUE;
+}
/**
*
*
*
*
* */
+gboolean bet_future_configure_form_to_transaction ( void )
+{
+ gtk_widget_hide (form_scheduled_part);
+
+ return TRUE;
+}
/* Local Variables: */
/* c-basic-offset: 4 */
/* End: */
Index: utils_str.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/utils_str.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -r1.82 -r1.83
--- utils_str.c 14 Feb 2010 17:48:50 -0000 1.82
+++ utils_str.c 20 Mar 2010 18:37:31 -0000 1.83
@@ -173,9 +173,11 @@
gchar *ptr_1, *ptr_2;
gchar *new_str;
gchar *mon_decimal_point;
+ gchar *mon_separateur;
gchar **tab;
mon_decimal_point = g_locale_to_utf8 ( conv->mon_decimal_point, -1, NULL, NULL, NULL );
+ mon_separateur = g_locale_to_utf8 ( conv->mon_thousands_sep, -1, NULL, NULL, NULL );
if ( ( ptr_1 = g_strstr_len ( string, -1, "," ) )
&&
@@ -192,7 +194,7 @@
else
new_str = g_strdup ( string );
- if ( g_strstr_len ( new_str, -1, mon_decimal_point ) == NULL )
+ if ( mon_decimal_point && g_strstr_len ( new_str, -1, mon_decimal_point ) == NULL )
{
tab = g_strsplit_set ( new_str, ".,", 0 );
g_free ( new_str );
@@ -200,7 +202,19 @@
g_strfreev ( tab );
}
- g_free ( mon_decimal_point );
+ if ( mon_decimal_point )
+ g_free ( mon_decimal_point );
+
+ if ( mon_separateur && g_strstr_len ( new_str, -1, mon_separateur ) )
+ {
+ tab = g_strsplit ( new_str, " ", 0 );
+ g_free ( new_str );
+ new_str = g_strjoinv ( "", tab );
+ g_strfreev ( tab );
+ }
+
+ if ( mon_separateur )
+ g_free ( mon_separateur );
return new_str;
}
Index: balance_estimate_hist.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/balance_estimate_hist.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- balance_estimate_hist.c 16 Mar 2010 11:48:42 -0000 1.18
+++ balance_estimate_hist.c 20 Mar 2010 18:37:31 -0000 1.19
@@ -138,7 +138,6 @@
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, "bet_historical_page" );
/* titre de la page */
align = gtk_alignment_new (0.5, 0.0, 0.0, 0.0);
- Previous message: [grisbi-cvs] grisbi/po cs.po, 1.101, 1.102 da.po, 1.107, 1.108 de.po, 1.181, 1.182 el.po, 1.71, 1.72 eo.po, 1.64, 1.65 es.po, 1.178, 1.179 fa.po, 1.94, 1.95 fr.po, 1.240, 1.241 grisbi.pot, 1.142, 1.143 he.po, 1.100, 1.101 it.po, 1.100, 1.101 nl.po, 1.99, 1.100 pl.po, 1.105, 1.106 pt_BR.po, 1.102, 1.103 ro.po, 1.101, 1.102 ru.po, 1.99, 1.100 zh_CN.po, 1.95, 1.96
- Next message: [grisbi-cvs] grisbi/src balance_estimate_future.c,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cvs
mailing list