[grisbi-cvs] grisbi/src accueil.c, 1.198, 1.199 classement_echeances.c, 1.10, 1.11 classement_echeances.h, 1.5, 1.6 gsb_form_transaction.c, 1.46, 1.47
Pierre Biava
pbiava at users.sourceforge.net
Sun Jun 28 08:41:09 CEST 2009
Update of /cvsroot/grisbi/grisbi/src
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1030/src
Modified Files:
accueil.c classement_echeances.c classement_echeances.h
gsb_form_transaction.c
Log Message:
correction display of the planned automatic transactions by date
Index: classement_echeances.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/classement_echeances.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- classement_echeances.c 14 Jun 2009 19:02:20 -0000 1.10
+++ classement_echeances.c 28 Jun 2009 06:41:07 -0000 1.11
@@ -4,6 +4,7 @@
/* Copyright (C) 2000-2003 Cédric Auger (cedric at grisbi.org) */
/* 2003-2004 Benjamin Drieu (bdrieu at april.org) */
/* 2003-2004 Alain Portal (aportal at univ-montp2.fr) */
+/* 2008-2009 Pierre Biava (grisbi at pierre.biava.name) */
/* http://www.grisbi.org */
/* */
/* This program is free software; you can redistribute it and/or modify */
@@ -28,6 +29,7 @@
/*START_INCLUDE*/
#include "classement_echeances.h"
#include "./gsb_data_scheduled.h"
+#include "./gsb_data_transaction.h"
/*END_INCLUDE*/
/*START_STATIC*/
@@ -44,13 +46,22 @@
/* Classement de deux échéances d'opérations par date */
/* ************************************************************************* */
gint classement_sliste_echeance_par_date ( gint scheduled_number_1,
- gint scheduled_number_2 )
+ gint scheduled_number_2 )
{
return ( g_date_compare ( gsb_data_scheduled_get_date (scheduled_number_1),
- gsb_data_scheduled_get_date (scheduled_number_2) ));
+ gsb_data_scheduled_get_date (scheduled_number_2) ));
}
+/* ************************************************************************* */
+/* Classement de deux opérations par date */
+/* ************************************************************************* */
+gint classement_sliste_transactions_par_date ( gint transaction_number_1,
+ gint transaction_number_2 )
+{
+ return ( g_date_compare ( gsb_data_transaction_get_date (transaction_number_1),
+ gsb_data_transaction_get_date (transaction_number_2) ));
+}
/* Local Variables: */
/* c-basic-offset: 4 */
Index: accueil.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/accueil.c,v
retrieving revision 1.198
retrieving revision 1.199
diff -u -d -r1.198 -r1.199
--- accueil.c 21 May 2009 21:58:55 -0000 1.198
+++ accueil.c 28 Jun 2009 06:41:07 -0000 1.199
@@ -1382,7 +1382,8 @@
gtk_container_add ( GTK_CONTAINER ( frame_etat_echeances_auto_accueil ), vbox);
gtk_widget_show ( vbox);
- pointeur_liste = scheduled_transactions_taken;
+ pointeur_liste = g_slist_sort( scheduled_transactions_taken,
+ (GCompareFunc) classement_sliste_transactions_par_date );
while ( pointeur_liste )
{
Index: classement_echeances.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/classement_echeances.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- classement_echeances.h 18 Feb 2007 12:37:14 -0000 1.5
+++ classement_echeances.h 28 Jun 2009 06:41:07 -0000 1.6
@@ -6,6 +6,8 @@
/* START_DECLARATION */
gint classement_sliste_echeance_par_date ( gint scheduled_number_1,
- gint scheduled_number_2 );
+ gint scheduled_number_2 );
+gint classement_sliste_transactions_par_date ( gint transaction_number_1,
+ gint transaction_number_2 );
/* END_DECLARATION */
#endif
Index: gsb_form_transaction.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_form_transaction.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- gsb_form_transaction.c 27 Jun 2009 19:17:53 -0000 1.46
+++ gsb_form_transaction.c 28 Jun 2009 06:41:07 -0000 1.47
@@ -166,6 +166,7 @@
}
else if ( element -> element_number == TRANSACTION_FORM_TYPE )
{
+ GtkWidget *widget;
gint number;
number = gsb_data_mix_get_mother_transaction_number (transaction_number, TRUE);
@@ -175,7 +176,7 @@
/* ok, now number contains either the transaction_number, either the mother transaction number,
* we can check the sign with it */
- GtkWidget *widget = gsb_form_widget_get_widget (element -> element_number);
+ widget = gsb_form_widget_get_widget ( TRANSACTION_FORM_TYPE );
if ( gsb_data_mix_get_amount ( number, TRUE ).mantissa < 0 )
gsb_payment_method_create_combo_list ( widget,
GSB_PAYMENT_DEBIT,
@@ -202,7 +203,7 @@
}
}
else
- gtk_widget_hide ( gsb_form_widget_get_widget (TRANSACTION_FORM_CHEQUE));
+ gtk_widget_hide ( gsb_form_widget_get_widget ( TRANSACTION_FORM_CHEQUE ) );
}
tmp_list = tmp_list -> next;
More information about the cvs
mailing list