[grisbi-cvs] grisbi/src balance_estimate_tab.c, 1.27, 1.28 gsb_account_property.c, 1.49, 1.50
Pierre Biava
pbiava at users.sourceforge.net
Fri Jan 15 00:02:08 CET 2010
- Previous message: [grisbi-cvs] grisbi/po cs.po, 1.81, 1.82 da.po, 1.88, 1.89 de.po, 1.158, 1.159 el.po, 1.52, 1.53 eo.po, 1.45, 1.46 es.po, 1.150, 1.151 fa.po, 1.75, 1.76 fr.po, 1.218, 1.219 grisbi.pot, 1.123, 1.124 he.po, 1.81, 1.82 it.po, 1.81, 1.82 nl.po, 1.80, 1.81 pl.po, 1.86, 1.87 pt_BR.po, 1.83, 1.84 ro.po, 1.82, 1.83 ru.po, 1.80, 1.81 zh_CN.po, 1.76, 1.77
- Next message: [grisbi-cvs] grisbi/src gsb_data_transaction.c, 1.79, 1.80 gsb_form_widget.c, 1.42, 1.43 utils_str.c, 1.76, 1.77
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/grisbi/grisbi/src
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv12799/src
Modified Files:
balance_estimate_tab.c gsb_account_property.c
Log Message:
modification of duration of the estimation
Index: balance_estimate_tab.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/balance_estimate_tab.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- balance_estimate_tab.c 9 Jan 2010 20:57:38 -0000 1.27
+++ balance_estimate_tab.c 14 Jan 2010 23:02:06 -0000 1.28
@@ -578,18 +578,21 @@
/* calculatextern gboolean balances_with_scheduled;e date_max with user choice */
data = g_object_get_data ( G_OBJECT ( bet_container ), "bet_months" );
months = ( data ) ? GPOINTER_TO_INT ( data ): 1;
- data = g_object_get_data ( G_OBJECT ( bet_container ), "bet_period" );
+ data = g_object_get_data ( G_OBJECT ( bet_container ), "bet_deb_period" );
period = ( data ) ? GPOINTER_TO_INT ( data ): 2;
date_min = gdate_today ();
+ if ( period == 1 )
+ g_date_set_day ( date_min, 1 );
+
+ data = g_object_get_data ( G_OBJECT ( bet_container ), "bet_end_period" );
+ period = ( data ) ? GPOINTER_TO_INT ( data ): 2;
+
date_max = gdate_today ();
g_date_add_months (date_max, months );
if ( period == 1 )
- {
- g_date_set_day ( date_min, 1 );
date_max = gsb_date_get_last_day_of_month ( date_max );
- }
/* set the graph title and the array title */
str_date_min = gsb_format_gdate ( date_min );
@@ -890,17 +893,22 @@
*/
static void bet_duration_period_clicked ( GtkWidget *togglebutton, gpointer data )
{
- gint period = 0;
const gchar *name;
name = gtk_widget_get_name ( GTK_WIDGET ( togglebutton ) );
if ( g_strcmp0 ( name, "button_1" ) == 0 )
- period = 1;
- else
- period = 2;
+ g_object_set_data ( G_OBJECT ( bet_container ), "bet_deb_period",
+ GINT_TO_POINTER ( 1 ) );
+ else if ( g_strcmp0 ( name, "button_2" ) == 0 )
+ g_object_set_data ( G_OBJECT ( bet_container ), "bet_deb_period",
+ GINT_TO_POINTER ( 2 ) );
+ else if ( g_strcmp0 ( name, "button_3" ) == 0 )
+ g_object_set_data ( G_OBJECT ( bet_container ), "bet_end_period",
+ GINT_TO_POINTER ( 1 ) );
- g_object_set_data ( G_OBJECT ( bet_container ), "bet_period",
- GINT_TO_POINTER ( period ) );
+ else if ( g_strcmp0 ( name, "button_4" ) == 0 )
+ g_object_set_data ( G_OBJECT ( bet_container ), "bet_end_period",
+ GINT_TO_POINTER ( 2 ) );
bet_estimate_refresh ( );
}
@@ -1044,42 +1052,85 @@
{
GtkWidget* main_vbox;
GtkWidget *label;
- GtkWidget *spin_button, *button_1, *button_2;
+ GtkWidget *spin_button, *button_1, *button_2, *button_3, *button_4;
GtkWidget *widget;
GtkWidget *vbox;
GtkWidget *hbox;
GtkWidget *previous = NULL;
+ GtkSizeGroup * size_group;
gint iduration;
+ size_group = gtk_size_group_new ( GTK_SIZE_GROUP_HORIZONTAL );
+
main_vbox = gtk_vbox_new ( FALSE, 5 );
gtk_box_pack_start ( GTK_BOX ( container ), main_vbox, FALSE, FALSE, 5) ;
label = gtk_label_new ( _("Calculation of period") );
gtk_box_pack_start ( GTK_BOX ( main_vbox ), label, FALSE, FALSE, 5) ;
- vbox = gtk_vbox_new ( FALSE, 5 );
+ label = gtk_label_new ( _("Beginning of period") );
+ gtk_misc_set_alignment ( GTK_MISC ( label ), 0, 0.5);
+ gtk_label_set_justify ( GTK_LABEL ( label ), GTK_JUSTIFY_LEFT );
+ gtk_box_pack_start ( GTK_BOX ( main_vbox ), label, FALSE, FALSE, 5) ;
+
+ vbox = gtk_hbox_new ( FALSE, 5 );
gtk_box_pack_start ( GTK_BOX ( main_vbox ), vbox, FALSE, FALSE, 5) ;
button_1 = gtk_radio_button_new_with_label ( NULL,
- _("1st day of month to last day of the month concerned") );
+ _("1st day of month") );
gtk_widget_set_name ( button_1, "button_1" );
+ gtk_size_group_add_widget ( GTK_SIZE_GROUP ( size_group ), button_1 );
g_signal_connect (G_OBJECT ( button_1 ),
"released",
G_CALLBACK ( bet_duration_period_clicked ),
NULL );
- g_object_set_data ( G_OBJECT ( bet_container ), "bet_period", GINT_TO_POINTER ( 1 ) );
+ g_object_set_data ( G_OBJECT ( bet_container ), "bet_deb_period",
+ GINT_TO_POINTER ( 1 ) );
button_2 = gtk_radio_button_new_with_label_from_widget (
GTK_RADIO_BUTTON ( button_1 ),
- _("From date to date") );
+ _("date today") );
gtk_widget_set_name ( button_2, "button_2" );
+
g_signal_connect (G_OBJECT ( button_2 ),
"released",
G_CALLBACK ( bet_duration_period_clicked ),
NULL );
- gtk_box_pack_start ( GTK_BOX ( vbox ), button_1, FALSE, FALSE, 5) ;
+ gtk_box_pack_start ( GTK_BOX ( vbox ), button_1, FALSE, FALSE, 5) ;
gtk_box_pack_start ( GTK_BOX ( vbox ), button_2, FALSE, FALSE, 5) ;
+
+ label = gtk_label_new ( _("End of period") );
+ gtk_misc_set_alignment ( GTK_MISC ( label ), 0, 0.5);
+ gtk_label_set_justify ( GTK_LABEL ( label ), GTK_JUSTIFY_LEFT );
+ gtk_box_pack_start ( GTK_BOX ( main_vbox ), label, FALSE, FALSE, 5) ;
+
+ vbox = gtk_hbox_new ( FALSE, 5 );
+ gtk_box_pack_start ( GTK_BOX ( main_vbox ), vbox, FALSE, FALSE, 5) ;
+
+ button_3 = gtk_radio_button_new_with_label ( NULL,
+ _("last day of the month") );
+ gtk_widget_set_name ( button_3, "button_3" );
+ gtk_size_group_add_widget ( GTK_SIZE_GROUP ( size_group ), button_3 );
+
+ g_signal_connect (G_OBJECT ( button_3 ),
+ "released",
+ G_CALLBACK ( bet_duration_period_clicked ),
+ NULL );
+ g_object_set_data ( G_OBJECT ( bet_container ), "bet_end_period",
+ GINT_TO_POINTER ( 1 ) );
+ button_4 = gtk_radio_button_new_with_label_from_widget (
+ GTK_RADIO_BUTTON ( button_3 ),
+ _("From date to date") );
+ gtk_widget_set_name ( button_4, "button_4" );
+ g_signal_connect (G_OBJECT ( button_4 ),
+ "released",
+ G_CALLBACK ( bet_duration_period_clicked ),
+ NULL );
+
+ gtk_box_pack_start ( GTK_BOX ( vbox ), button_3, FALSE, FALSE, 5) ;
+ gtk_box_pack_start ( GTK_BOX ( vbox ), button_4, FALSE, FALSE, 5) ;
+
/* partie mensuelle */
label = gtk_label_new ( _("Duration estimation") );
Index: gsb_account_property.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_account_property.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- gsb_account_property.c 10 Jan 2010 20:11:37 -0000 1.49
+++ gsb_account_property.c 14 Jan 2010 23:02:06 -0000 1.50
@@ -345,7 +345,6 @@
NULL,
0 );
gtk_button_set_alignment ( GTK_BUTTON (button_holder_address), 0.0, 0.0 );
- gtk_size_group_add_widget ( GTK_SIZE_GROUP ( size_group ), button_holder_address );
gtk_box_pack_start ( GTK_BOX(vbox2), button_holder_address, FALSE, FALSE, 0);
/* if un-select the holder's button address, we need to erase the tree_view,
- Previous message: [grisbi-cvs] grisbi/po cs.po, 1.81, 1.82 da.po, 1.88, 1.89 de.po, 1.158, 1.159 el.po, 1.52, 1.53 eo.po, 1.45, 1.46 es.po, 1.150, 1.151 fa.po, 1.75, 1.76 fr.po, 1.218, 1.219 grisbi.pot, 1.123, 1.124 he.po, 1.81, 1.82 it.po, 1.81, 1.82 nl.po, 1.80, 1.81 pl.po, 1.86, 1.87 pt_BR.po, 1.83, 1.84 ro.po, 1.82, 1.83 ru.po, 1.80, 1.81 zh_CN.po, 1.76, 1.77
- Next message: [grisbi-cvs] grisbi/src gsb_data_transaction.c, 1.79, 1.80 gsb_form_widget.c, 1.42, 1.43 utils_str.c, 1.76, 1.77
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cvs
mailing list