Demande #1327 » patch-unfuck-grisbi.patch
grisbi-0.5.9.benj/src/affichage.c 2013-07-10 16:52:14.000000000 +0200 | ||
---|---|---|
/* affichage.c */
|
||
/* Copyright (C) 2000-2003 Cédric Auger (cedric@grisbi.org) */
|
||
/* 2003-2004 Benjamin Drieu (bdrieu@april.org) */
|
||
/* 2003-2013 Benjamin Drieu (bdrieu@april.org) */
|
||
/* http://www.grisbi.org */
|
||
/* This program is free software; you can redistribute it and/or modify */
|
||
... | ... | |
/* on recharge l'ancien logo */
|
||
if ( !chemin_logo ||
|
||
!strlen ( g_strstrip ( g_strdup ( chemin_logo )) ) )
|
||
!strlen ( my_strstrip ( g_strdup ( chemin_logo )) ) )
|
||
{
|
||
chemin_logo = NULL;
|
||
if ( logo_accueil && GTK_IS_WIDGET ( logo_accueil ))
|
||
... | ... | |
chemin_logo = g_strdup ( (gchar *) selected_filename );
|
||
if ( !chemin_logo ||
|
||
!strlen ( g_strstrip ( chemin_logo )) )
|
||
!strlen ( my_strstrip ( chemin_logo )) )
|
||
{
|
||
chemin_logo = NULL;
|
||
if ( logo_accueil && GTK_IS_WIDGET ( logo_accueil ))
|
||
... | ... | |
if ( !etat.fichier_animation_attente
|
||
||
|
||
!strlen ( g_strstrip (etat.fichier_animation_attente )) )
|
||
!strlen ( my_strstrip (etat.fichier_animation_attente )) )
|
||
etat.fichier_animation_attente = NULL;
|
||
/* Update preview */
|
grisbi-0.5.9.benj/src/calendar.c 2013-07-10 16:52:14.000000000 +0200 | ||
---|---|---|
gtk_container_add ( GTK_CONTAINER ( frame ), pVBox );
|
||
gtk_widget_show ( pVBox );
|
||
if ( !( strlen ( g_strstrip ( ( gchar * ) gtk_entry_get_text ( GTK_ENTRY ( entry )))) &&
|
||
if ( !( strlen ( my_strstrip ( ( gchar * ) gtk_entry_get_text ( GTK_ENTRY ( entry )))) &&
|
||
sscanf ( ( gchar * ) gtk_entry_get_text ( GTK_ENTRY ( entry )),
|
||
"%d/%d/%d",
|
||
&jour,
|
||
... | ... | |
if ( !format_date ( entree ) )
|
||
return;
|
||
tableau_char = g_strsplit ( g_strstrip ( ( gchar * ) gtk_entry_get_text ( GTK_ENTRY ( entree ))),
|
||
tableau_char = g_strsplit ( my_strstrip ( ( gchar * ) gtk_entry_get_text ( GTK_ENTRY ( entree ))),
|
||
"/",
|
||
3 );
|
||
grisbi-0.5.9.benj/src/categories_onglet.c 2013-07-10 16:52:14.000000000 +0200 | ||
---|---|---|
"adr_struct_categ" );
|
||
if ( strcmp ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom_categ ))),
|
||
if ( strcmp ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom_categ ))),
|
||
categ -> nom_categ ))
|
||
{
|
||
free ( categ -> nom_categ );
|
||
categ -> nom_categ = g_strdup ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom_categ ))) );
|
||
categ -> nom_categ = g_strdup ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom_categ ))) );
|
||
node = GTK_CTREE_NODE ( ( GTK_CLIST ( arbre_categ ) -> selection ) -> data );
|
||
... | ... | |
free ( sous_categ -> nom_sous_categ );
|
||
sous_categ -> nom_sous_categ = g_strdup ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom_categ ))) );
|
||
sous_categ -> nom_sous_categ = g_strdup ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom_categ ))) );
|
||
node = GTK_CTREE_NODE ( ( GTK_CLIST ( arbre_categ ) -> selection ) -> data );
|
||
... | ... | |
sizeof ( struct struct_categ ));
|
||
nouvelle_categorie -> no_categ = ++no_derniere_categorie;
|
||
nouvelle_categorie -> nom_categ = g_strdup ( g_strstrip ( categorie ));
|
||
nouvelle_categorie -> nom_categ = g_strdup ( my_strstrip ( categorie ));
|
||
nouvelle_categorie -> no_derniere_sous_categ = 0;
|
||
nouvelle_categorie -> liste_sous_categ = NULL;
|
||
... | ... | |
nouvelle_sous_categorie = malloc ( sizeof ( struct struct_sous_categ ));
|
||
nouvelle_sous_categorie -> no_sous_categ = ++( categorie->no_derniere_sous_categ );
|
||
nouvelle_sous_categorie -> nom_sous_categ = g_strdup ( g_strstrip ( sous_categorie ));
|
||
nouvelle_sous_categorie -> nom_sous_categ = g_strdup ( my_strstrip ( sous_categorie ));
|
||
categorie -> liste_sous_categ = g_slist_append ( categorie -> liste_sous_categ,
|
||
nouvelle_sous_categorie );
|
grisbi-0.5.9.benj/src/comptes_gestion.c 2013-07-10 16:52:14.000000000 +0200 | ||
---|---|---|
/* gestion_comptes.c */
|
||
/* */
|
||
/* Copyright (C) 2000-2003 Cédric Auger (cedric@grisbi.org) */
|
||
/* 2004-2005 Benjamin Drieu (bdrieu@april.org) */
|
||
/* 2004-2013 Benjamin Drieu (bdrieu@april.org) */
|
||
/* 2003-2004 Alain Portal (dionysos@grisbi.org) */
|
||
/* http://www.grisbi.org */
|
||
/* */
|
||
... | ... | |
if ( i == compte_courant_onglet )
|
||
continue;
|
||
p_tab_nom_de_compte_variable = p_tab_nom_de_compte + i;
|
||
if ( !strcmp ( g_strstrip ( (gchar*) gtk_entry_get_text ( GTK_ENTRY ( detail_nom_compte ))), NOM_DU_COMPTE ))
|
||
if ( !strcmp ( my_strstrip ( (gchar*) gtk_entry_get_text ( GTK_ENTRY ( detail_nom_compte ))), NOM_DU_COMPTE ))
|
||
{
|
||
dialogue( g_strdup_printf ( _("Account \"%s\" already exists!"), gtk_entry_get_text ( GTK_ENTRY ( detail_nom_compte ))));
|
||
return;
|
||
... | ... | |
/* récupération du titulaire */
|
||
TITULAIRE = g_strdup ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_titulaire_compte ))));
|
||
TITULAIRE = g_strdup ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_titulaire_compte ))));
|
||
if ( !strlen ( TITULAIRE ))
|
||
TITULAIRE = NULL;
|
||
... | ... | |
/* enregistrement du no de guichet */
|
||
NO_GUICHET = g_strdup ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_guichet ))));
|
||
NO_GUICHET = g_strdup ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_guichet ))));
|
||
if ( !strlen ( NO_GUICHET ))
|
||
NO_GUICHET = NULL;
|
||
/* enregistrement du no de compte */
|
||
NO_COMPTE_BANQUE = g_strdup ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_no_compte ))));
|
||
NO_COMPTE_BANQUE = g_strdup ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_no_compte ))));
|
||
if ( !strlen ( NO_COMPTE_BANQUE ))
|
||
NO_COMPTE_BANQUE = NULL;
|
||
/* enregistrement de la clé du compte */
|
||
CLE_COMPTE = g_strdup ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_cle_compte ))));
|
||
CLE_COMPTE = g_strdup ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_cle_compte ))));
|
||
if ( !strlen ( CLE_COMPTE ))
|
||
CLE_COMPTE = NULL;
|
||
... | ... | |
/* vérification du solde initial */
|
||
if ( SOLDE_INIT != my_strtod ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_solde_init ))),
|
||
if ( SOLDE_INIT != my_strtod ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_solde_init ))),
|
||
NULL ) )
|
||
{
|
||
gint value;
|
||
SOLDE_INIT = my_strtod ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_solde_init ))),
|
||
SOLDE_INIT = my_strtod ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_solde_init ))),
|
||
NULL );
|
||
value = gtk_clist_get_vadjustment ( GTK_CLIST ( CLIST_OPERATIONS )) -> value;
|
||
... | ... | |
/* vérification du solde mini autorisé */
|
||
if ( SOLDE_MINI != my_strtod ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_solde_mini_autorise ))),
|
||
if ( SOLDE_MINI != my_strtod ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_solde_mini_autorise ))),
|
||
NULL ) )
|
||
{
|
||
SOLDE_MINI = my_strtod ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_solde_mini_autorise ))),
|
||
SOLDE_MINI = my_strtod ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_solde_mini_autorise ))),
|
||
NULL );
|
||
MESSAGE_SOUS_MINI = 0;
|
||
... | ... | |
/* vérification du solde mini voulu */
|
||
if ( SOLDE_MINI_VOULU != my_strtod ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_solde_mini_voulu ))),
|
||
if ( SOLDE_MINI_VOULU != my_strtod ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_solde_mini_voulu ))),
|
||
NULL ) )
|
||
{
|
||
SOLDE_MINI_VOULU = my_strtod ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_solde_mini_voulu ))),
|
||
SOLDE_MINI_VOULU = my_strtod ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_solde_mini_voulu ))),
|
||
NULL );
|
||
MESSAGE_SOUS_MINI_VOULU = 0;
|
||
... | ... | |
if ( !NOM_DU_COMPTE
|
||
||
|
||
strcmp ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_nom_compte ))),
|
||
strcmp ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_nom_compte ))),
|
||
NOM_DU_COMPTE ) )
|
||
{
|
||
NOM_DU_COMPTE = g_strdup ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_nom_compte ))));
|
||
NOM_DU_COMPTE = g_strdup ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_nom_compte ))));
|
||
reaffiche_liste_comptes ();
|
||
reaffiche_liste_comptes_onglet ();
|
grisbi-0.5.9.benj/src/devises.c 2013-07-10 16:52:14.000000000 +0200 | ||
---|---|---|
/* s'occupe de tout ce qui concerne les devises */
|
||
/* Copyright (C) 2000-2003 Cédric Auger (cedric@grisbi.org) */
|
||
/* 2003 Benjamin Drieu (bdrieu@april.org) */
|
||
/* 2013 Benjamin Drieu (bdrieu@april.org) */
|
||
/* http://www.grisbi.org */
|
||
/* This program is free software; you can redistribute it and/or modify */
|
||
... | ... | |
{
|
||
case 1 :
|
||
nom_devise = g_strstrip ( g_strdup ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom ))));
|
||
code_devise = g_strstrip ( g_strdup ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_code ))));
|
||
code_iso4217_devise = g_strstrip ( g_strdup ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_iso_code ))));
|
||
nom_devise = my_strstrip ( g_strdup ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom ))));
|
||
code_devise = my_strstrip ( g_strdup ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_code ))));
|
||
code_iso4217_devise = my_strstrip ( g_strdup ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_iso_code ))));
|
||
if ( strlen ( nom_devise ) &&
|
||
(strlen ( code_devise ) ||
|
||
... | ... | |
devise -> une_devise_1_egale_x_devise_2 = 0;
|
||
if ( devise -> passage_euro )
|
||
devise -> change = my_strtod ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_conversion_euro ))),
|
||
devise -> change = my_strtod ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_conversion_euro ))),
|
||
NULL );
|
||
else
|
||
devise -> change = 0;
|
||
... | ... | |
{
|
||
gchar *nom_devise;
|
||
nom_devise = g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )));
|
||
nom_devise = my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )));
|
||
if ( nom_devise || !strlen (nom_devise) )
|
||
{
|
||
... | ... | |
devise = gtk_clist_get_row_data ( GTK_CLIST ( clist_devises_parametres ),
|
||
ligne_selection_devise );
|
||
devise -> nom_devise = g_strdup ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom_devise_parametres ))));
|
||
devise -> nom_devise = g_strdup ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom_devise_parametres ))));
|
||
gtk_clist_set_text ( GTK_CLIST ( clist_devises_parametres ),
|
||
ligne_selection_devise,
|
||
... | ... | |
devise = gtk_clist_get_row_data ( GTK_CLIST ( clist_devises_parametres ),
|
||
ligne_selection_devise );
|
||
devise -> code_devise = g_strdup ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_code_devise_parametres ))));
|
||
devise -> code_devise = g_strdup ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_code_devise_parametres ))));
|
||
gtk_clist_set_text ( GTK_CLIST ( clist_devises_parametres ),
|
||
ligne_selection_devise,
|
||
... | ... | |
devise = gtk_clist_get_row_data ( GTK_CLIST ( clist_devises_parametres ),
|
||
ligne_selection_devise );
|
||
devise -> code_iso4217_devise = g_strdup ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_iso_code_devise_parametres ))));
|
||
devise -> code_iso4217_devise = g_strdup ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_iso_code_devise_parametres ))));
|
||
gtk_clist_set_text ( GTK_CLIST ( clist_devises_parametres ),
|
||
ligne_selection_devise,
|
grisbi-0.5.9.benj/src/dialog.c 2013-07-10 16:52:14.000000000 +0200 | ||
---|---|---|
/* dialog.c */
|
||
/* */
|
||
/* Copyright (C) 2000-2003 Cédric Auger (cedric@grisbi.org) */
|
||
/* 2003-2004 Benjamin Drieu (bdrieu@april.org) */
|
||
/* 2003-2013 Benjamin Drieu (bdrieu@april.org) */
|
||
/* 2005 Alain Portal (aportal@univ-montp2.fr) */
|
||
/* http://www.grisbi.org */
|
||
/* */
|
||
... | ... | |
return ( NULL );
|
||
}
|
||
retour = g_strstrip ( g_strdup ( gtk_entry_get_text ( GTK_ENTRY ( entree ))));
|
||
retour = my_strstrip ( g_strdup ( gtk_entry_get_text ( GTK_ENTRY ( entree ))));
|
||
gtk_widget_destroy ( GTK_WIDGET ( dialog ));
|
||
return ( retour );
|
grisbi-0.5.9.benj/src/echeancier_formulaire.c 2013-07-10 16:52:14.000000000 +0200 | ||
---|---|---|
{
|
||
/* on sort de la date, soit c'est vide, soit on la vérifie, la complète si nécessaire et met à jour l'exercice */
|
||
case SCHEDULER_FORM_DATE :
|
||
if ( strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
if ( strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
{
|
||
modifie_date ( entree );
|
||
... | ... | |
/* on sort du tiers : soit vide soit complète le reste de l'opé */
|
||
case SCHEDULER_FORM_PARTY :
|
||
if ( strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
if ( strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
completion_operation_par_tiers_echeancier ();
|
||
else
|
||
texte = _("Third party");
|
||
... | ... | |
case SCHEDULER_FORM_DEBIT :
|
||
if ( strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
if ( strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
{
|
||
/* on commence par virer ce qu'il y avait dans les crédits */
|
||
... | ... | |
s'il n'y a aucun tiers ( <=> nouveau tiers ) */
|
||
case SCHEDULER_FORM_CREDIT :
|
||
if ( strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
if ( strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
{
|
||
/* on commence par virer ce qu'il y avait dans les débits */
|
||
... | ... | |
/* sort des catégories */
|
||
case SCHEDULER_FORM_CATEGORY :
|
||
if ( !strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
if ( !strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
texte = _("Categories : Sub-categories");
|
||
else
|
||
if ( !strcmp ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree ))),
|
||
if ( !strcmp ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree ))),
|
||
_("Breakdown of transaction") ))
|
||
{
|
||
if ( !etat.formulaire_echeance_dans_fenetre )
|
||
... | ... | |
break;
|
||
case SCHEDULER_FORM_CHEQUE :
|
||
if ( !strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
if ( !strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
texte = _("Transfer reference");
|
||
break;
|
||
case SCHEDULER_FORM_BUDGETARY :
|
||
if ( !strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
if ( !strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
texte = _("Budgetary line");
|
||
break;
|
||
... | ... | |
break;
|
||
case SCHEDULER_FORM_VOUCHER :
|
||
if ( !strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
if ( !strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
texte = _("Voucher");
|
||
break;
|
||
case SCHEDULER_FORM_NOTES :
|
||
if ( !strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
if ( !strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
texte = _("Notes");
|
||
break;
|
||
/* on sort de la date limite, soit c'est vide, soit on la vérifie,
|
||
la complète si nécessaire */
|
||
case SCHEDULER_FORM_FINAL_DATE :
|
||
if ( strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
if ( strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
modifie_date ( entree );
|
||
else
|
||
texte = _("Limit date");
|
||
... | ... | |
if ( gtk_widget_get_style ( widget_formulaire_echeancier[SCHEDULER_FORM_FINAL_DATE] ) == style_entree_formulaire[ENCLAIR]
|
||
&&
|
||
strcmp ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_FINAL_DATE] ))),
|
||
strcmp ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_FINAL_DATE] ))),
|
||
_("None") ))
|
||
if ( !modifie_date ( widget_formulaire_echeancier[SCHEDULER_FORM_FINAL_DATE] ))
|
||
{
|
||
... | ... | |
/* si c'est le cas, si la liste des ventilation existe (soit adr de liste, soit -1), on va l'enregistrer plus tard */
|
||
/* sinon on va ventiler tout de suite */
|
||
if ( !strcmp ( g_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_CATEGORY] ))),
|
||
if ( !strcmp ( my_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_CATEGORY] ))),
|
||
_("Breakdown of transaction") )
|
||
&&
|
||
!gtk_object_get_data ( GTK_OBJECT ( formulaire_echeancier ),
|
||
... | ... | |
enregistre_ope_au_retour_echeances = 1;
|
||
if ( gtk_widget_get_style ( widget_formulaire_echeancier[TRANSACTION_FORM_DEBIT] ) == style_entree_formulaire[ENCLAIR] )
|
||
ventiler_operation_echeances ( -my_strtod ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_DEBIT] ))),
|
||
ventiler_operation_echeances ( -my_strtod ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_DEBIT] ))),
|
||
NULL ));
|
||
else
|
||
ventiler_operation_echeances ( my_strtod ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_CREDIT] ))),
|
||
ventiler_operation_echeances ( my_strtod ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_CREDIT] ))),
|
||
NULL ));
|
||
return;
|
||
... | ... | |
/* vérification que ce n'est pas un virement sur lui-même */
|
||
if ( !g_strcasecmp ( g_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_CATEGORY] ))),
|
||
if ( !g_strcasecmp ( my_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_CATEGORY] ))),
|
||
g_strconcat ( COLON(_("Transfer")),
|
||
COMPTE_ECHEANCE,
|
||
NULL )))
|
||
... | ... | |
/* si c'est une ventilation, vérifie qu'aucune ventilation n'est un virement sur lui-même */
|
||
/* peut arriver si modifie le compte d'une échéance */
|
||
if ( !strcmp ( g_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_CATEGORY] ))),
|
||
if ( !strcmp ( my_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_CATEGORY] ))),
|
||
_("Breakdown of transaction") ))
|
||
{
|
||
GSList *liste_ventil;
|
||
... | ... | |
/* si c'est un virement, on vérifie que le compte existe */
|
||
pointeur_char = g_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_CATEGORY] )));
|
||
pointeur_char = my_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_CATEGORY] )));
|
||
if ( !g_strncasecmp ( pointeur_char, _("Transfer"), 8 ))
|
||
{
|
||
... | ... | |
if ( tableau_char[1] )
|
||
{
|
||
tableau_char[1] = g_strstrip ( tableau_char[1] );
|
||
tableau_char[1] = my_strstrip ( tableau_char[1] );
|
||
p_tab_nom_de_compte_variable = p_tab_nom_de_compte;
|
||
... | ... | |
/* récupère la date */
|
||
pointeur_char = g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY (widget_formulaire_echeancier[SCHEDULER_FORM_DATE] )));
|
||
pointeur_char = my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY (widget_formulaire_echeancier[SCHEDULER_FORM_DATE] )));
|
||
tableau_char = g_strsplit ( pointeur_char,
|
||
"/",
|
||
... | ... | |
if ( gtk_widget_get_style ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_PARTY] ) -> entry ) == style_entree_formulaire[ENCLAIR] )
|
||
{
|
||
pointeur_char = g_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_PARTY] )));
|
||
pointeur_char = my_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_PARTY] )));
|
||
if ( ( pointeur_liste = g_slist_find_custom ( liste_struct_tiers,
|
||
pointeur_char,
|
||
... | ... | |
/* récupération du montant */
|
||
if ( gtk_widget_get_style ( widget_formulaire_echeancier[SCHEDULER_FORM_DEBIT] ) == style_entree_formulaire[ENCLAIR] )
|
||
echeance -> montant = -my_strtod ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_DEBIT] ))),
|
||
echeance -> montant = -my_strtod ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_DEBIT] ))),
|
||
NULL );
|
||
else
|
||
echeance -> montant = my_strtod ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_CREDIT] ))),
|
||
echeance -> montant = my_strtod ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_CREDIT] ))),
|
||
NULL );
|
||
/* récupération de la devise */
|
||
... | ... | |
{
|
||
struct struct_categ *categ;
|
||
tableau_char = g_strsplit ( g_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_CATEGORY] ))),
|
||
tableau_char = g_strsplit ( my_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_CATEGORY] ))),
|
||
":",
|
||
2 );
|
||
tableau_char[0] = g_strstrip ( tableau_char[0] );
|
||
tableau_char[0] = my_strstrip ( tableau_char[0] );
|
||
if ( tableau_char[1] )
|
||
tableau_char[1] = g_strstrip ( tableau_char[1] );
|
||
tableau_char[1] = my_strstrip ( tableau_char[1] );
|
||
if ( strlen ( tableau_char[0] ) )
|
||
... | ... | |
if ( GTK_WIDGET_VISIBLE ( widget_formulaire_echeancier[SCHEDULER_FORM_CHEQUE] )
|
||
&&
|
||
gtk_widget_get_style ( widget_formulaire_echeancier[SCHEDULER_FORM_CHEQUE] ) == style_entree_formulaire[ENCLAIR] )
|
||
echeance -> contenu_type = g_strdup ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_CHEQUE] ))));
|
||
echeance -> contenu_type = g_strdup ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_CHEQUE] ))));
|
||
}
|
||
/* récupération du no d'exercice */
|
||
... | ... | |
":",
|
||
2 );
|
||
tableau_char[0] = g_strstrip ( tableau_char[0] );
|
||
tableau_char[0] = my_strstrip ( tableau_char[0] );
|
||
if ( tableau_char[1] )
|
||
tableau_char[1] = g_strstrip ( tableau_char[1] );
|
||
tableau_char[1] = my_strstrip ( tableau_char[1] );
|
||
pointeur_liste = g_slist_find_custom ( liste_struct_imputation,
|
||
tableau_char[0],
|
||
... | ... | |
/* récupération des notes */
|
||
if ( gtk_widget_get_style ( widget_formulaire_echeancier[SCHEDULER_FORM_NOTES] ) == style_entree_formulaire[ENCLAIR] )
|
||
echeance -> notes = g_strdup ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_NOTES] ))));
|
||
echeance -> notes = g_strdup ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_NOTES] ))));
|
||
/* récupération de la fréquence */
|
||
... | ... | |
{
|
||
/* traitement de la date limite */
|
||
tableau_char = g_strsplit ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_FINAL_DATE] ))),
|
||
tableau_char = g_strsplit ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_FINAL_DATE] ))),
|
||
"/",
|
||
3 );
|
||
... | ... | |
/* récupère la date */
|
||
pointeur_char = g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY (widget_formulaire_echeancier[SCHEDULER_FORM_DATE] )));
|
||
pointeur_char = my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY (widget_formulaire_echeancier[SCHEDULER_FORM_DATE] )));
|
||
tableau_char = g_strsplit ( pointeur_char,
|
||
"/",
|
||
... | ... | |
if ( gtk_widget_get_style ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_PARTY] ) -> entry ) == style_entree_formulaire[ENCLAIR] )
|
||
{
|
||
pointeur_char = g_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_PARTY] )));
|
||
pointeur_char = my_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_PARTY] )));
|
||
if ( ( pointeur_liste = g_slist_find_custom ( liste_struct_tiers,
|
||
pointeur_char,
|
||
... | ... | |
/* récupération du montant */
|
||
if ( gtk_widget_get_style ( widget_formulaire_echeancier[SCHEDULER_FORM_DEBIT] ) == style_entree_formulaire[ENCLAIR] )
|
||
operation -> montant = -my_strtod ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_DEBIT] ))),
|
||
operation -> montant = -my_strtod ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_DEBIT] ))),
|
||
NULL );
|
||
else
|
||
operation -> montant = my_strtod ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_CREDIT] ))),
|
||
operation -> montant = my_strtod ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_CREDIT] ))),
|
||
NULL );
|
||
/* récupération de la devise */
|
||
... | ... | |
{
|
||
struct struct_categ *categ = NULL;
|
||
tableau_char = g_strsplit ( g_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_CATEGORY] ))),
|
||
tableau_char = g_strsplit ( my_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_CATEGORY] ))),
|
||
":",
|
||
2 );
|
||
tableau_char[0] = g_strstrip ( tableau_char[0] );
|
||
tableau_char[0] = my_strstrip ( tableau_char[0] );
|
||
if ( tableau_char[1] )
|
||
tableau_char[1] = g_strstrip ( tableau_char[1] );
|
||
tableau_char[1] = my_strstrip ( tableau_char[1] );
|
||
if ( strlen ( tableau_char[0] ) )
|
||
... | ... | |
type = gtk_object_get_data ( GTK_OBJECT ( GTK_OPTION_MENU ( widget_formulaire_echeancier[SCHEDULER_FORM_TYPE] ) -> menu_item ),
|
||
"adr_type" );
|
||
operation -> contenu_type = g_strdup ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_CHEQUE] ))));
|
||
operation -> contenu_type = g_strdup ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_CHEQUE] ))));
|
||
if ( type -> numerotation_auto )
|
||
type -> no_en_cours = ( my_atoi ( operation -> contenu_type ));
|
||
... | ... | |
":",
|
||
2 );
|
||
tableau_char[0] = g_strstrip ( tableau_char[0] );
|
||
tableau_char[0] = my_strstrip ( tableau_char[0] );
|
||
if ( tableau_char[1] )
|
||
tableau_char[1] = g_strstrip ( tableau_char[1] );
|
||
tableau_char[1] = my_strstrip ( tableau_char[1] );
|
||
pointeur_liste = g_slist_find_custom ( liste_struct_imputation,
|
||
tableau_char[0],
|
||
... | ... | |
/* récupération des notes */
|
||
if ( gtk_widget_get_style ( widget_formulaire_echeancier[SCHEDULER_FORM_NOTES] ) == style_entree_formulaire[ENCLAIR] )
|
||
operation -> notes = g_strdup ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_NOTES] ))));
|
||
operation -> notes = g_strdup ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_NOTES] ))));
|
||
/* on a fini de remplir l'opé, on peut l'ajouter à la liste */
|
||
... | ... | |
liste_tmp = g_slist_find_custom ( liste_struct_tiers,
|
||
g_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_PARTY]))),
|
||
my_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_PARTY]))),
|
||
( GCompareFunc ) recherche_tiers_par_nom );
|
||
/* si nouveau tiers, on s'en va simplement */
|
||
... | ... | |
enregistre_ope_au_retour_echeances = 0;
|
||
if ( gtk_widget_get_style ( widget_formulaire_echeancier[SCHEDULER_FORM_DEBIT] ) == style_entree_formulaire[ENCLAIR] )
|
||
ventiler_operation_echeances ( -my_strtod ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_DEBIT] ))),
|
||
ventiler_operation_echeances ( -my_strtod ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_DEBIT] ))),
|
||
NULL ));
|
||
else
|
||
ventiler_operation_echeances ( my_strtod ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_CREDIT] ))),
|
||
ventiler_operation_echeances ( my_strtod ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_CREDIT] ))),
|
||
NULL ));
|
||
}
|
||
/******************************************************************************/
|
grisbi-0.5.9.benj/src/echeancier_liste.c 2013-07-10 16:52:14.000000000 +0200 | ||
---|---|---|
/* */
|
||
/* Copyright (C) 2000-2003 Cédric Auger (cedric@grisbi.org) */
|
||
/* 2004-2005 Alain Portal (aportal@univ-montp2.fr) */
|
||
/* 2006 Benjamin Drieu (bdrieu@april.org) */
|
||
/* 2013 Benjamin Drieu (bdrieu@april.org) */
|
||
/* http://www.grisbi.org */
|
||
/* */
|
||
/* This program is free software; you can redistribute it and/or modify */
|
||
... | ... | |
case 5:
|
||
affichage_echeances_perso_nb_libre = my_atoi ( g_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree_personnalisation_affichage_echeances ))));
|
||
affichage_echeances_perso_nb_libre = my_atoi ( my_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree_personnalisation_affichage_echeances ))));
|
||
break;
|
||
grisbi-0.5.9.benj/src/echeancier_ventilation.c 2013-07-10 16:52:14.000000000 +0200 | ||
---|---|---|
{
|
||
/* on sort des catégories */
|
||
case SCHEDULER_BREAKDOWN_FORM_CATEGORY :
|
||
if ( strlen ( g_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
if ( strlen ( my_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
{
|
||
/* si c'est un virement, on met le menu des types de l'autre compte */
|
||
/* si ce menu n'est pas déjà affiché */
|
||
... | ... | |
":",
|
||
2 );
|
||
tableau_char[0] = g_strstrip ( tableau_char[0] );
|
||
tableau_char[0] = my_strstrip ( tableau_char[0] );
|
||
if ( tableau_char[1] )
|
||
tableau_char[1] = g_strstrip ( tableau_char[1] );
|
||
tableau_char[1] = my_strstrip ( tableau_char[1] );
|
||
if ( strlen ( tableau_char[0] ) )
|
||
... | ... | |
/* sort des notes */
|
||
case SCHEDULER_BREAKDOWN_FORM_NOTES :
|
||
if ( !strlen ( g_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
if ( !strlen ( my_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
texte = _("Notes");
|
||
break;
|
||
... | ... | |
case SCHEDULER_BREAKDOWN_FORM_DEBIT :
|
||
if ( strlen ( g_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree ))))
|
||
if ( strlen ( my_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree ))))
|
||
&&
|
||
gtk_widget_get_style ( widget_formulaire_ventilation_echeances[SCHEDULER_BREAKDOWN_FORM_DEBIT] ) == style_entree_formulaire[ENCLAIR] )
|
||
{
|
||
... | ... | |
/* sort du crédit */
|
||
case SCHEDULER_BREAKDOWN_FORM_CREDIT :
|
||
if ( strlen ( g_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree ))))
|
||
if ( strlen ( my_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree ))))
|
||
&&
|
||
gtk_widget_get_style ( widget_formulaire_ventilation_echeances[SCHEDULER_BREAKDOWN_FORM_CREDIT] ) == style_entree_formulaire[ENCLAIR])
|
||
{
|
||
... | ... | |
/* sort de l'ib */
|
||
case SCHEDULER_BREAKDOWN_FORM_BUDGETARY :
|
||
if ( !strlen ( g_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
if ( !strlen ( my_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
texte = _("Budgetary line");
|
||
break;
|
||
/* sort de la pièce comptable */
|
||
case SCHEDULER_BREAKDOWN_FORM_VOUCHER :
|
||
if ( !strlen ( g_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
if ( !strlen ( my_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
texte = _("Voucher");
|
||
break;
|
||
... | ... | |
{
|
||
/* on split déjà les catég, sans libérer la variable, pour la récupérer ensuite pour les categ */
|
||
tableau_char = g_strsplit ( g_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_ventilation_echeances[SCHEDULER_BREAKDOWN_FORM_CATEGORY] ))),
|
||
tableau_char = g_strsplit ( my_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_ventilation_echeances[SCHEDULER_BREAKDOWN_FORM_CATEGORY] ))),
|
||
":",
|
||
2 );
|
||
if ( tableau_char[0] )
|
||
{
|
||
tableau_char[0] = g_strstrip ( tableau_char[0] );
|
||
tableau_char[0] = my_strstrip ( tableau_char[0] );
|
||
if ( tableau_char[1] )
|
||
tableau_char[1] = g_strstrip ( tableau_char[1] );
|
||
tableau_char[1] = my_strstrip ( tableau_char[1] );
|
||
if ( !strcmp ( tableau_char[0],
|
||
... | ... | |
{
|
||
struct struct_categ *categ;
|
||
tableau_char = g_strsplit ( g_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_ventilation_echeances[SCHEDULER_BREAKDOWN_FORM_CATEGORY] ))),
|
||
tableau_char = g_strsplit ( my_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_ventilation_echeances[SCHEDULER_BREAKDOWN_FORM_CATEGORY] ))),
|
||
":",
|
||
2 );
|
||
tableau_char[0] = g_strstrip ( tableau_char[0] );
|
||
tableau_char[0] = my_strstrip ( tableau_char[0] );
|
||
if ( tableau_char[1] )
|
||
tableau_char[1] = g_strstrip ( tableau_char[1] );
|
||
tableau_char[1] = my_strstrip ( tableau_char[1] );
|
||
if ( strlen ( tableau_char[0] ) )
|
||
{
|
||
... | ... | |
/* récupération des notes */
|
||
if ( gtk_widget_get_style ( widget_formulaire_ventilation_echeances[SCHEDULER_BREAKDOWN_FORM_NOTES] ) == style_entree_formulaire[ENCLAIR] )
|
||
operation -> notes = g_strdup ( g_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_ventilation_echeances[SCHEDULER_BREAKDOWN_FORM_NOTES] ))));
|
||
operation -> notes = g_strdup ( my_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_ventilation_echeances[SCHEDULER_BREAKDOWN_FORM_NOTES] ))));
|
||
else
|
||
operation -> notes = NULL;
|
||
... | ... | |
if ( gtk_widget_get_style ( widget_formulaire_ventilation_echeances[SCHEDULER_BREAKDOWN_FORM_DEBIT] ) == style_entree_formulaire[ENCLAIR] )
|
||
/* c'est un débit */
|
||
operation -> montant = -my_strtod ( g_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_ventilation_echeances[SCHEDULER_BREAKDOWN_FORM_DEBIT] ))),
|
||
operation -> montant = -my_strtod ( my_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_ventilation_echeances[SCHEDULER_BREAKDOWN_FORM_DEBIT] ))),
|
||
NULL );
|
||
else
|
||
operation -> montant = my_strtod ( g_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_ventilation_echeances[SCHEDULER_BREAKDOWN_FORM_CREDIT] ))),
|
||
operation -> montant = my_strtod ( my_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_ventilation_echeances[SCHEDULER_BREAKDOWN_FORM_CREDIT] ))),
|
||
NULL );
|
||
... | ... | |
":",
|
||
2 );
|
||
tableau_char[0] = g_strstrip ( tableau_char[0] );
|
||
tableau_char[0] = my_strstrip ( tableau_char[0] );
|
||
if ( tableau_char[1] )
|
||
tableau_char[1] = g_strstrip ( tableau_char[1] );
|
||
tableau_char[1] = my_strstrip ( tableau_char[1] );
|
||
pointeur_liste = g_slist_find_custom ( liste_struct_imputation,
|
||
tableau_char[0],
|
||
... | ... | |
/* récupération du no de pièce comptable */
|
||
if ( gtk_widget_get_style ( widget_formulaire_ventilation_echeances[SCHEDULER_BREAKDOWN_FORM_VOUCHER] ) == style_entree_formulaire[ENCLAIR] )
|
||
operation -> no_piece_comptable = g_strdup ( g_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_ventilation_echeances[SCHEDULER_BREAKDOWN_FORM_VOUCHER] ))));
|
||
operation -> no_piece_comptable = g_strdup ( my_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_ventilation_echeances[SCHEDULER_BREAKDOWN_FORM_VOUCHER] ))));
|
||
else
|
||
operation -> no_piece_comptable = NULL;
|
||
grisbi-0.5.9.benj/src/equilibrage.c 2013-07-10 16:52:14.000000000 +0200 | ||
---|---|---|
/* equilibrage.c */
|
||
/* */
|
||
/* Copyright (C) 2000-2003 Cédric Auger (cedric@grisbi.org) */
|
||
/* 2003 Benjamin Drieu (bdrieu@april.org) */
|
||
/* 2013 Benjamin Drieu (bdrieu@april.org) */
|
||
/* 2004 Alain Portal (aportal@univ-montp2.fr) */
|
||
/* http://www.grisbi.org */
|
||
/* */
|
||
... | ... | |
{
|
||
/* si l'entrée contenant la date est vide, alors on met la date du jour */
|
||
if ( strlen ( g_strstrip ( (gchar*) gtk_entry_get_text ( GTK_ENTRY ( entree )))) == 0 )
|
||
if ( strlen ( my_strstrip ( (gchar*) gtk_entry_get_text ( GTK_ENTRY ( entree )))) == 0 )
|
||
gtk_entry_set_text ( GTK_ENTRY ( entree ), gsb_today() );
|
||
format_date ( entree );
|
||
... | ... | |
/* récupération du no de rapprochement, */
|
||
/* s'il n'existe pas,on le crée */
|
||
if ( strlen ( g_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree_no_rapprochement )))))
|
||
if ( strlen ( my_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree_no_rapprochement )))))
|
||
{
|
||
struct struct_no_rapprochement *rapprochement;
|
||
GSList *liste_tmp;
|
||
gchar *rap_txt;
|
||
rap_txt = g_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree_no_rapprochement )));
|
||
rap_txt = my_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree_no_rapprochement )));
|
||
liste_tmp = g_slist_find_custom ( liste_no_rapprochements,
|
||
rap_txt,
|
grisbi-0.5.9.benj/src/etat_io.c 2013-07-10 16:52:14.000000000 +0200 | ||
---|---|---|
struct struct_devise *devise;
|
||
liste_tmp = g_slist_find_custom ( liste_struct_devises,
|
||
g_strstrip ( nom ),
|
||
my_strstrip ( nom ),
|
||
(GCompareFunc) recherche_devise_par_nom );
|
||
if ( liste_tmp )
|
||
... | ... | |
liste_tmp = g_slist_find_custom ( liste_struct_exercices,
|
||
g_strstrip ( nom ),
|
||
my_strstrip ( nom ),
|
||
(GCompareFunc) recherche_exercice_par_nom );
|
||
if ( liste_tmp )
|
||
... | ... | |
liste_tmp = g_slist_find_custom ( liste_struct_categories,
|
||
g_strstrip ( nom ),
|
||
my_strstrip ( nom ),
|
||
(GCompareFunc) recherche_categorie_par_nom );
|
||
if ( liste_tmp )
|
||
... | ... | |
liste_tmp = g_slist_find_custom ( liste_struct_imputation,
|
||
g_strstrip ( nom ),
|
||
my_strstrip ( nom ),
|
||
(GCompareFunc) recherche_imputation_par_nom );
|
||
if ( liste_tmp )
|
||
... | ... | |
liste_tmp = g_slist_find_custom ( liste_struct_tiers,
|
||
g_strstrip ( nom ),
|
||
my_strstrip ( nom ),
|
||
(GCompareFunc) recherche_tiers_par_nom );
|
||
if ( liste_tmp )
|
grisbi-0.5.9.benj/src/etats_config.c 2013-07-10 16:52:14.000000000 +0200 | ||
---|---|---|
/* on récupère maintenant toutes les données */
|
||
/* récupération du nom du rapport */
|
||
pointeur_char = g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom_etat )));
|
||
pointeur_char = my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom_etat )));
|
||
if ( strlen ( pointeur_char )
|
||
&&
|
||
... | ... | |
etat_courant -> no_plage_date = GPOINTER_TO_INT ( GTK_CLIST ( liste_plages_dates_etat ) -> selection -> data );
|
||
if ( strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_date_init_etat ))))
|
||
if ( strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_date_init_etat ))))
|
||
&&
|
||
format_date ( entree_date_init_etat ))
|
||
{
|
||
gint jour, mois, annee;
|
||
sscanf ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_date_init_etat ))),
|
||
sscanf ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_date_init_etat ))),
|
||
"%d/%d/%d",
|
||
&jour,
|
||
&mois,
|
||
... | ... | |
annee );
|
||
}
|
||
if ( strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_date_finale_etat ))))
|
||
if ( strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_date_finale_etat ))))
|
||
&&
|
||
format_date ( entree_date_finale_etat ))
|
||
{
|
||
gint jour, mois, annee;
|
||
sscanf ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_date_finale_etat ))),
|
||
sscanf ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_date_finale_etat ))),
|
||
"%d/%d/%d",
|
||
&jour,
|
||
&mois,
|
||
... | ... | |
comp_textes -> utilise_txt = gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( comp_textes -> bouton_utilise_txt ));
|
||
comp_textes -> operateur = GPOINTER_TO_INT ( gtk_object_get_data ( GTK_OBJECT ( GTK_OPTION_MENU ( comp_textes -> bouton_operateur ) -> menu_item ),
|
||
"no_operateur" ));
|
||
comp_textes -> texte = g_strstrip ( g_strdup ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( comp_textes -> entree_txt ))));
|
||
comp_textes -> texte = my_strstrip ( g_strdup ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( comp_textes -> entree_txt ))));
|
||
if ( !strlen ( comp_textes -> texte ))
|
||
comp_textes -> texte = NULL;
|
||
... | ... | |
if ( g_slist_length ( etat_courant -> liste_struct_comparaison_montants ) == 1
|
||
&&
|
||
!strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( comp_montants -> entree_montant_1 ))))
|
||
!strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( comp_montants -> entree_montant_1 ))))
|
||
&&
|
||
!strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( comp_montants -> entree_montant_2 ))))
|
||
!strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( comp_montants -> entree_montant_2 ))))
|
||
&&
|
||
GTK_WIDGET_SENSITIVE ( comp_montants -> entree_montant_1 )
|
||
&&
|
||
... | ... | |
{
|
||
/* si l'entrée contenant la date est vide, alors on met la date du jour */
|
||
if ( strlen ( g_strstrip ( (gchar*) gtk_entry_get_text ( GTK_ENTRY ( entree )))) == 0 )
|
||
if ( strlen ( my_strstrip ( (gchar*) gtk_entry_get_text ( GTK_ENTRY ( entree )))) == 0 )
|
||
gtk_entry_set_text ( GTK_ENTRY ( entree ), gsb_today() );
|
||
format_date ( entree );
|
grisbi-0.5.9.benj/src/exercice.c 2013-07-10 16:52:14.000000000 +0200 | ||
---|---|---|
/* exercice.c */
|
||
/* Copyright (C) 2000-2003 Cédric Auger (cedric@grisbi.org) */
|
||
/* 2003 Benjamin Drieu (bdrieu@april.org) */
|
||
/* 2013 Benjamin Drieu (bdrieu@april.org) */
|
||
/* http://www.grisbi.org */
|
||
/* This program is free software; you can redistribute it and/or modify */
|
||
... | ... | |
exercice = gtk_clist_get_row_data ( GTK_CLIST ( liste ),
|
||
ligne_selection_exercice );
|
||
if ( !strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( nom_exercice )))))
|
||
if ( !strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( nom_exercice )))))
|
||
{
|
||
dialogue ( _("The financial year must have a name.") );
|
||
return;
|
||
... | ... | |
nb_exercices_tmp++;
|
||
}
|
||
exercice -> nom_exercice = g_strdup ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( nom_exercice ))));
|
||
exercice -> nom_exercice = g_strdup ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( nom_exercice ))));
|
||
if ( !strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( debut_exercice )))))
|
||
if ( !strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( debut_exercice )))))
|
||
exercice -> date_debut = NULL;
|
||
else
|
||
{
|
||
... | ... | |
{
|
||
gint jour, mois, an;
|
||
sscanf ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( debut_exercice ))),
|
||
sscanf ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( debut_exercice ))),
|
||
"%02d/%02d/%04d",
|
||
&jour,
|
||
&mois,
|
||
... | ... | |
return;
|
||
}
|
||
if ( !strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( fin_exercice )))))
|
||
if ( !strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( fin_exercice )))))
|
||
exercice -> date_fin = NULL;
|
||
else
|
||
{
|
||
... | ... | |
{
|
||
gint jour, mois, an;
|
||
sscanf ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( fin_exercice ))),
|
||
sscanf ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( fin_exercice ))),
|
||
"%02d/%02d/%04d",
|
||
&jour,
|
||
&mois,
|
grisbi-0.5.9.benj/src/fichiers_io.c 2013-07-10 16:52:14.000000000 +0200 | ||
---|---|---|
/* Contient toutes les procédures relatives à l'accès au disque */
|
||
/* Copyright (C) 2000-2003 Cédric Auger (cedric@grisbi.org) */
|
||
/* 2003-2006 Benjamin Drieu (bdrieu@april.org) */
|
||
/* 2003-2013 Benjamin Drieu (bdrieu@april.org) */
|
||
/* http://www.grisbi.org */
|
||
/* This program is free software; you can redistribute it and/or modify */
|
||
... | ... | |
rapprochement -> nom_rapprochement = latin2utf8(xmlGetProp ( node_detail,
|
||
"Nom" ));
|
||
rapprochement -> nom_rapprochement = g_strstrip ( rapprochement -> nom_rapprochement);
|
||
rapprochement -> nom_rapprochement = my_strstrip ( rapprochement -> nom_rapprochement);
|
||
liste_no_rapprochements = g_slist_append ( liste_no_rapprochements,
|
||
rapprochement );
|
||
... | ... | |
rapprochement -> nom_rapprochement = xmlGetProp ( node_detail,
|
||
"Nom" );
|
||
rapprochement -> nom_rapprochement = g_strstrip ( rapprochement -> nom_rapprochement);
|
||
rapprochement -> nom_rapprochement = my_strstrip ( rapprochement -> nom_rapprochement);
|
||
liste_no_rapprochements = g_slist_append ( liste_no_rapprochements,
|
||
rapprochement );
|
||
... | ... | |
rapprochement -> nom_rapprochement = xmlGetProp ( node_detail,
|
||
"Nom" );
|
||
rapprochement -> nom_rapprochement = g_strstrip ( rapprochement -> nom_rapprochement);
|
||
rapprochement -> nom_rapprochement = my_strstrip ( rapprochement -> nom_rapprochement);
|
||
liste_no_rapprochements = g_slist_append ( liste_no_rapprochements,
|
||
rapprochement );
|
grisbi-0.5.9.benj/src/gtk_combofix.c 2013-07-10 16:52:14.000000000 +0200 | ||
---|---|---|
/* ComboFix Widget
|
||
*
|
||
* Copyright (C) 2001 Cédric Auger (cedric@grisbi.org)
|
||
* 2003 Benjamin Drieu (bdrieu@april.org)
|
||
* 2013 Benjamin Drieu (bdrieu@april.org)
|
||
* 2005 Alain Portal (aportal@univ-montp2.fr)
|
||
* http://www.grisbi.org
|
||
*
|
||
... | ... | |
gchar *chaine;
|
||
GSList *liste_tmp;
|
||
chaine = g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( combofix -> entry ) ) );
|
||
chaine = my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( combofix -> entry ) ) );
|
||
if ( !chaine || !strlen ( chaine ) )
|
||
return TRUE;
|
grisbi-0.5.9.benj/src/import.c 2013-07-10 16:52:14.000000000 +0200 | ||
---|---|---|
p_tab_nom_de_compte_variable = p_tab_nom_de_compte + j;
|
||
if ( ( !g_strcasecmp ( g_strconcat ( "[", NOM_DU_COMPTE, "]", NULL ),
|
||
g_strstrip ( g_strdup ( operation -> info_banque_guichet )))) ||
|
||
my_strstrip ( g_strdup ( operation -> info_banque_guichet )))) ||
|
||
( !g_strcasecmp ( NOM_DU_COMPTE ,
|
||
g_strstrip ( g_strdup ( operation -> info_banque_guichet )))))
|
||
my_strstrip ( g_strdup ( operation -> info_banque_guichet )))))
|
||
|
||
compte_trouve = j;
|
||
}
|
||
... | ... | |
operation_2 -> info_banque_guichet
|
||
&&
|
||
(!g_strcasecmp ( g_strconcat ("[", nom_compte_courant, "]", NULL),
|
||
g_strstrip ( g_strdup ( operation_2 -> info_banque_guichet ))) ||
|
||
my_strstrip ( g_strdup ( operation_2 -> info_banque_guichet ))) ||
|
||
!g_strcasecmp ( nom_compte_courant,
|
||
g_strstrip ( g_strdup ( operation_2 -> info_banque_guichet ))))
|
||
my_strstrip ( g_strdup ( operation_2 -> info_banque_guichet ))))
|
||
&&
|
||
( !same_currency || fabs ( operation -> montant ) == fabs ( operation_2 -> montant ))
|
||
&&
|
||
... | ... | |
/* met le nom du compte */
|
||
if ( compte_import -> nom_de_compte )
|
||
compte -> nom_de_compte = g_strstrip ( compte_import -> nom_de_compte );
|
||
compte -> nom_de_compte = my_strstrip ( compte_import -> nom_de_compte );
|
||
else
|
||
compte -> nom_de_compte = g_strdup ( _("Imported account"));
|
||
... | ... | |
if ( operation_import -> tiers
|
||
&&
|
||
strlen ( g_strstrip ( operation_import -> tiers )))
|
||
strlen ( my_strstrip ( operation_import -> tiers )))
|
||
{
|
||
pointeur_tmp = g_slist_find_custom ( liste_struct_tiers,
|
||
g_strstrip ( operation_import -> tiers ),
|
||
my_strstrip ( operation_import -> tiers ),
|
||
(GCompareFunc) recherche_tiers_par_nom );
|
||
/* si le tiers n'existait pas, on le crée */
|
||
... | ... | |
if ( operation_import -> categ
|
||
&&
|
||
strlen ( g_strstrip (operation_import -> categ)) )
|
||
strlen ( my_strstrip (operation_import -> categ)) )
|
||
{
|
||
if ( operation_import -> categ[0] == '[' )
|
||
{
|
||
... | ... | |
/* récupération ou création de la catégorie */
|
||
if ( !g_slist_find_custom ( liste_struct_categories,
|
||
g_strstrip ( tab_str[0] ),
|
||
my_strstrip ( tab_str[0] ),
|
||
(GCompareFunc) recherche_categorie_par_nom ))
|
||
{
|
||
categ = calloc ( 1,
|
||
sizeof ( struct struct_categ ));
|
||
categ -> no_categ = ++no_derniere_categorie;
|
||
categ -> nom_categ = g_strdup ( g_strstrip ( tab_str[0] ) );
|
||
categ -> nom_categ = g_strdup ( my_strstrip ( tab_str[0] ) );
|
||
if ( operation_import -> montant < 0 )
|
||
categ -> type_categ = 1;
|
||
... | ... | |
}
|
||
else
|
||
categ = g_slist_find_custom ( liste_struct_categories,
|
||
g_strstrip ( tab_str[0] ),
|
||
my_strstrip ( tab_str[0] ),
|
||
(GCompareFunc) recherche_categorie_par_nom ) -> data;
|
||
... | ... | |
if ( tab_str[1] )
|
||
{
|
||
if ( !g_slist_find_custom ( categ -> liste_sous_categ,
|
||
g_strstrip ( tab_str[1] ),
|
||
my_strstrip ( tab_str[1] ),
|
||
(GCompareFunc) recherche_sous_categorie_par_nom ))
|
||
{
|
||
sous_categ = calloc ( 1,
|
||
sizeof ( struct struct_sous_categ ));
|
||
sous_categ -> no_sous_categ = ++( categ -> no_derniere_sous_categ );
|
||
sous_categ -> nom_sous_categ = g_strdup ( g_strstrip ( tab_str[1] ));
|
||
sous_categ -> nom_sous_categ = g_strdup ( my_strstrip ( tab_str[1] ));
|
||
categ -> liste_sous_categ = g_slist_append ( categ -> liste_sous_categ,
|
||
sous_categ );
|
||
}
|
||
else
|
||
sous_categ = g_slist_find_custom ( categ -> liste_sous_categ,
|
||
g_strstrip ( tab_str[1] ),
|
||
my_strstrip ( tab_str[1] ),
|
||
(GCompareFunc) recherche_sous_categorie_par_nom ) -> data;
|
||
operation -> sous_categorie = sous_categ -> no_sous_categ;
|
||
... | ... | |
if ( operation_import -> tiers )
|
||
{
|
||
pointeur_tmp = g_slist_find_custom ( liste_struct_tiers,
|
||
g_strstrip ( operation_import -> tiers ),
|
||
my_strstrip ( operation_import -> tiers ),
|
||
(GCompareFunc) recherche_tiers_par_nom );
|
||
/* si le tiers n'existait pas, on le crée */
|
||
... | ... | |
if ( operation_import -> categ
|
||
&&
|
||
strlen ( g_strstrip (operation_import -> categ)) )
|
||
strlen ( my_strstrip (operation_import -> categ)) )
|
||
{
|
||
if ( operation_import -> categ[0] == '[' )
|
||
{
|
||
... | ... | |
/* récupération ou création de la catégorie */
|
||
if ( !g_slist_find_custom ( liste_struct_categories,
|
||
g_strstrip ( tab_str[0] ),
|
||
my_strstrip ( tab_str[0] ),
|
||
(GCompareFunc) recherche_categorie_par_nom ))
|
||
{
|
||
categ = calloc ( 1,
|
||
sizeof ( struct struct_categ ));
|
||
categ -> no_categ = ++no_derniere_categorie;
|
||
categ -> nom_categ = g_strdup ( g_strstrip ( tab_str[0] ) );
|
||
categ -> nom_categ = g_strdup ( my_strstrip ( tab_str[0] ) );
|
||
if ( operation_import -> montant < 0 )
|
||
categ -> type_categ = 1;
|
||
... | ... | |
}
|
||
else
|
||
categ = g_slist_find_custom ( liste_struct_categories,
|
||
g_strstrip ( tab_str[0] ),
|
||
my_strstrip ( tab_str[0] ),
|
||
(GCompareFunc) recherche_categorie_par_nom ) -> data;
|
||
... | ... | |
if ( tab_str[1] )
|
||
{
|
||
if ( !g_slist_find_custom ( categ -> liste_sous_categ,
|
||
g_strstrip ( tab_str[1] ),
|
||
my_strstrip ( tab_str[1] ),
|
||
(GCompareFunc) recherche_sous_categorie_par_nom ))
|
||
{
|
||
sous_categ = calloc ( 1,
|
||
sizeof ( struct struct_sous_categ ));
|
||
sous_categ -> no_sous_categ = ++( categ -> no_derniere_sous_categ );
|
||
sous_categ -> nom_sous_categ = g_strdup ( g_strstrip ( tab_str[1] ));
|
||
sous_categ -> nom_sous_categ = g_strdup ( my_strstrip ( tab_str[1] ));
|
||
categ -> liste_sous_categ = g_slist_append ( categ -> liste_sous_categ,
|
||
sous_categ );
|
||
}
|
||
else
|
||
sous_categ = g_slist_find_custom ( categ -> liste_sous_categ,
|
||
g_strstrip ( tab_str[1] ),
|
||
my_strstrip ( tab_str[1] ),
|
||
(GCompareFunc) recherche_sous_categorie_par_nom ) -> data;
|
||
operation -> sous_categorie = sous_categ -> no_sous_categ;
|
grisbi-0.5.9.benj/src/imputation_budgetaire.c 2013-07-10 16:52:14.000000000 +0200 | ||
---|---|---|
/* imputation_budgetaire.c */
|
||
/* */
|
||
/* Copyright (C) 2000-2003 Cédric Auger (cedric@grisbi.org) */
|
||
/* 2004 Benjamin Drieu (bdrieu@april.org) */
|
||
/* 2013 Benjamin Drieu (bdrieu@april.org) */
|
||
/* 2004 Alain Portal (aportal@univ-montp2.fr) */
|
||
/* http://www.grisbi.org */
|
||
/* */
|
||
... | ... | |
"adr_struct_imputation" );
|
||
if ( strcmp ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom_imputation ))),
|
||
if ( strcmp ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom_imputation ))),
|
||
imputation -> nom_imputation ))
|
||
{
|
||
free ( imputation -> nom_imputation );
|
||
imputation -> nom_imputation = g_strdup ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom_imputation ))) );
|
||
imputation -> nom_imputation = g_strdup ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom_imputation ))) );
|
||
node = GTK_CTREE_NODE ( ( GTK_CLIST ( arbre_imputation ) -> selection ) -> data );
|
||
... | ... | |
free ( sous_imputation -> nom_sous_imputation );
|
||
sous_imputation -> nom_sous_imputation = g_strdup ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom_imputation ))) );
|
||
sous_imputation -> nom_sous_imputation = g_strdup ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom_imputation ))) );
|
||
node = GTK_CTREE_NODE ( ( GTK_CLIST ( arbre_imputation ) -> selection ) -> data );
|
||
... | ... | |
nouvelle_imputation = calloc ( 1, sizeof ( struct struct_imputation ));
|
||
nouvelle_imputation -> no_imputation = ++no_derniere_imputation;
|
||
nouvelle_imputation -> nom_imputation = g_strdup ( g_strstrip ( imputation ));
|
||
nouvelle_imputation -> nom_imputation = g_strdup ( my_strstrip ( imputation ));
|
||
liste_struct_imputation = g_slist_append ( liste_struct_imputation,
|
||
nouvelle_imputation );
|
||
... | ... | |
return NULL;
|
||
}
|
||
nouvelle_sous_imputation -> nom_sous_imputation = g_strdup ( g_strstrip ( sous_imputation ));
|
||
nouvelle_sous_imputation -> nom_sous_imputation = g_strdup ( my_strstrip ( sous_imputation ));
|
||
imputation -> liste_sous_imputation = g_slist_append ( imputation -> liste_sous_imputation,
|
||
nouvelle_sous_imputation );
|
grisbi-0.5.9.benj/src/operations_formulaire.c 2013-07-10 16:52:14.000000000 +0200 | ||
---|---|---|
/* formulaire.c */
|
||
/* */
|
||
/* Copyright (C) 2000-2003 Cédric Auger (cedric@grisbi.org) */
|
||
/* 2003-2004 Benjamin Drieu (bdrieu@april.org) */
|
||
/* 2003-2013 Benjamin Drieu (bdrieu@april.org) */
|
||
/* 2004 Alain Portal (aportal@univ-montp2.fr) */
|
||
/* http://www.grisbi.org */
|
||
/* */
|
||
... | ... | |
la complète si nécessaire et met à jour l'exercice */
|
||
case TRANSACTION_FORM_DATE :
|
||
if ( strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
if ( strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
{
|
||
modifie_date ( entree );
|
||
... | ... | |
case TRANSACTION_FORM_PARTY :
|
||
if ( strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
if ( strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
completion_operation_par_tiers ();
|
||
else
|
||
texte = _("Third party");
|
||
... | ... | |
case TRANSACTION_FORM_DEBIT :
|
||
if ( strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
if ( strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
{
|
||
/* on commence par virer ce qu'il y avait dans les crédits */
|
||
... | ... | |
case TRANSACTION_FORM_CREDIT :
|
||
if ( strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
if ( strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
{
|
||
/* on commence par virer ce qu'il y avait dans les débits */
|
||
... | ... | |
break;
|
||
case TRANSACTION_FORM_VALUE_DATE :
|
||
if ( strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
if ( strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
modifie_date ( entree );
|
||
else
|
||
texte = _("Value date");
|
||
... | ... | |
case TRANSACTION_FORM_CATEGORY :
|
||
if ( strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
if ( strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
{
|
||
if ( strcmp ( g_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_operations[TRANSACTION_FORM_CATEGORY] ))),
|
||
if ( strcmp ( my_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_operations[TRANSACTION_FORM_CATEGORY] ))),
|
||
_("Breakdown of transaction") ))
|
||
{
|
||
gchar **tableau_char;
|
||
... | ... | |
":",
|
||
2 );
|
||
tableau_char[0] = g_strstrip ( tableau_char[0] );
|
||
tableau_char[0] = my_strstrip ( tableau_char[0] );
|
||
if ( tableau_char[1] )
|
||
tableau_char[1] = g_strstrip ( tableau_char[1] );
|
||
tableau_char[1] = my_strstrip ( tableau_char[1] );
|
||
if ( strlen ( tableau_char[0] ) )
|
||
... | ... | |
case TRANSACTION_FORM_CHEQUE :
|
||
if ( !strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
if ( !strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
texte = _("Cheque/Transfer number");
|
||
break;
|
||
case TRANSACTION_FORM_BUDGET :
|
||
if ( !strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
if ( !strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
texte = _("Budgetary line");
|
||
break;
|
||
case TRANSACTION_FORM_VOUCHER :
|
||
if ( !strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
if ( !strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
texte = _("Voucher");
|
||
break;
|
||
case TRANSACTION_FORM_NOTES :
|
||
if ( !strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
if ( !strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
texte = _("Notes");
|
||
break;
|
||
case TRANSACTION_FORM_BANK :
|
||
if ( !strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
if ( !strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
|
||
texte = _("Bank references");
|
||
break;
|
||
... | ... | |
/* si c'est la date d'opération et que le champ est vide, alors on
|
||
récupère la date du jour comme date d'opération */
|
||
if ( origine == TRANSACTION_FORM_DATE &&
|
||
strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_operations[origine] ) ) ) ) == 0 )
|
||
strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_operations[origine] ) ) ) ) == 0 )
|
||
gtk_entry_set_text ( GTK_ENTRY ( widget_formulaire_operations[TRANSACTION_FORM_DATE] ), gsb_today() );
|
||
/* si c'est la date de valeur et que le champ est vide, alors on
|
||
récupère la date d'opération comme date de valeur */
|
||
if ( origine == TRANSACTION_FORM_VALUE_DATE &&
|
||
strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_operations[origine] ) ) ) ) == 0 )
|
||
strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_operations[origine] ) ) ) ) == 0 )
|
||
{
|
||
/* si la date d'opération est vide elle aussi, alors on récupère
|
||
la date du jour comme date de valeur */
|
||
if ( strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_operations[TRANSACTION_FORM_DATE] ) ) ) ) == 0 ||
|
||
g_strcasecmp ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_operations[TRANSACTION_FORM_DATE] ) ) ), _("Date") ) == 0 )
|
||
if ( strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_operations[TRANSACTION_FORM_DATE] ) ) ) ) == 0 ||
|
||
g_strcasecmp ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_operations[TRANSACTION_FORM_DATE] ) ) ), _("Date") ) == 0 )
|
||
gtk_entry_set_text ( GTK_ENTRY ( widget_formulaire_operations[TRANSACTION_FORM_VALUE_DATE] ), gsb_today() );
|
||
else
|
||
gtk_entry_set_text ( GTK_ENTRY ( widget_formulaire_operations[TRANSACTION_FORM_VALUE_DATE] ), g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_operations[TRANSACTION_FORM_DATE] ) ) ) );
|
||
gtk_entry_set_text ( GTK_ENTRY ( widget_formulaire_operations[TRANSACTION_FORM_VALUE_DATE] ), my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_operations[TRANSACTION_FORM_DATE] ) ) ) );
|
||
}
|
||
if ( ( ev -> state & GDK_SHIFT_MASK ) != GDK_SHIFT_MASK ||
|
||
... | ... | |
/* si c'est la date d'opération et que le champ est vide, alors on
|
||
récupère la date du jour comme date d'opération */
|
||
if ( origine == TRANSACTION_FORM_DATE &&
|
||
strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_operations[origine] ) ) ) ) == 0 )
|
||
strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_operations[origine] ) ) ) ) == 0 )
|
||
gtk_entry_set_text ( GTK_ENTRY ( widget_formulaire_operations[TRANSACTION_FORM_DATE] ), gsb_today() );
|
||
/* si c'est la date de valeur et que le champ est vide, alors on
|
||
récupère la date d'opération comme date de valeur */
|
||
if ( origine == TRANSACTION_FORM_VALUE_DATE &&
|
||
strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_operations[origine] ) ) ) ) == 0 )
|
||
strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_operations[origine] ) ) ) ) == 0 )
|
||
{
|
||
/* si la date d'opération est vide elle aussi, alors on récupère
|
||
la date du jour comme date de valeur */
|
||
if ( strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_operations[TRANSACTION_FORM_DATE] ) ) ) ) == 0 ||
|
||
g_strcasecmp ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_operations[TRANSACTION_FORM_DATE] ) ) ), _("Date") ) == 0 )
|