Projet

Général

Profil

Demande #1327 » patch-unfuck-grisbi.patch

Benjamin Drieu, 12/07/2013 16:57

Voir les différences:

grisbi-0.5.9.benj/src/affichage.c 2013-07-10 16:52:14.000000000 +0200
3 3
/* affichage.c */
4 4

  
5 5
/*     Copyright (C)	2000-2003 Cédric Auger (cedric@grisbi.org) */
6
/*			2003-2004 Benjamin Drieu (bdrieu@april.org) */
6
/*			2003-2013 Benjamin Drieu (bdrieu@april.org) */
7 7
/* 			http://www.grisbi.org */
8 8

  
9 9
/*     This program is free software; you can redistribute it and/or modify */
......
509 509
	/* 	on recharge l'ancien logo */
510 510

  
511 511
	if ( !chemin_logo ||
512
	     !strlen ( g_strstrip ( g_strdup ( chemin_logo )) ) )
512
	     !strlen ( my_strstrip ( g_strdup ( chemin_logo )) ) )
513 513
	{
514 514
	    chemin_logo = NULL;
515 515
	    if ( logo_accueil && GTK_IS_WIDGET ( logo_accueil ))
......
880 880
        chemin_logo = g_strdup ( (gchar *) selected_filename );
881 881

  
882 882
	if ( !chemin_logo ||
883
	     !strlen ( g_strstrip ( chemin_logo )) )
883
	     !strlen ( my_strstrip ( chemin_logo )) )
884 884
	{
885 885
	    chemin_logo = NULL;
886 886
	    if ( logo_accueil && GTK_IS_WIDGET ( logo_accueil ))
......
941 941

  
942 942
    if ( !etat.fichier_animation_attente
943 943
	 ||
944
	 !strlen ( g_strstrip (etat.fichier_animation_attente )) )
944
	 !strlen ( my_strstrip (etat.fichier_animation_attente )) )
945 945
	etat.fichier_animation_attente = NULL;
946 946

  
947 947
    /* Update preview */
grisbi-0.5.9.benj/src/calendar.c 2013-07-10 16:52:14.000000000 +0200
67 67
    gtk_container_add ( GTK_CONTAINER ( frame ), pVBox );
68 68
    gtk_widget_show ( pVBox );
69 69

  
70
    if ( !( strlen ( g_strstrip ( ( gchar * ) gtk_entry_get_text ( GTK_ENTRY ( entry )))) &&
70
    if ( !( strlen ( my_strstrip ( ( gchar * ) gtk_entry_get_text ( GTK_ENTRY ( entry )))) &&
71 71
	    sscanf ( ( gchar * ) gtk_entry_get_text ( GTK_ENTRY ( entry )),
72 72
		     "%d/%d/%d",
73 73
		     &jour,
......
460 460
    if ( !format_date ( entree ) )
461 461
	return;
462 462

  
463
    tableau_char = g_strsplit ( g_strstrip ( ( gchar * ) gtk_entry_get_text ( GTK_ENTRY ( entree ))),
463
    tableau_char = g_strsplit ( my_strstrip ( ( gchar * ) gtk_entry_get_text ( GTK_ENTRY ( entree ))),
464 464
				"/",
465 465
				3 );
466 466

  
grisbi-0.5.9.benj/src/categories_onglet.c 2013-07-10 16:52:14.000000000 +0200
1488 1488
				       "adr_struct_categ" );
1489 1489

  
1490 1490

  
1491
	if ( strcmp ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom_categ ))),
1491
	if ( strcmp ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom_categ ))),
1492 1492
		      categ -> nom_categ ))
1493 1493
	{
1494 1494
	    free ( categ -> nom_categ );
1495 1495

  
1496
	    categ -> nom_categ = g_strdup ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom_categ ))) );
1496
	    categ -> nom_categ = g_strdup ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom_categ ))) );
1497 1497

  
1498 1498

  
1499 1499
	    node = GTK_CTREE_NODE ( ( GTK_CLIST ( arbre_categ ) -> selection ) -> data );
......
1531 1531

  
1532 1532
	free ( sous_categ -> nom_sous_categ );
1533 1533

  
1534
	sous_categ -> nom_sous_categ = g_strdup ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom_categ ))) );
1534
	sous_categ -> nom_sous_categ = g_strdup ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom_categ ))) );
1535 1535

  
1536 1536

  
1537 1537
	node = GTK_CTREE_NODE ( ( GTK_CLIST ( arbre_categ ) -> selection ) -> data );
......
2652 2652
				  sizeof ( struct struct_categ ));
2653 2653

  
2654 2654
    nouvelle_categorie -> no_categ = ++no_derniere_categorie;
2655
    nouvelle_categorie -> nom_categ = g_strdup ( g_strstrip ( categorie ));
2655
    nouvelle_categorie -> nom_categ = g_strdup ( my_strstrip ( categorie ));
2656 2656
    nouvelle_categorie -> no_derniere_sous_categ = 0;
2657 2657
    nouvelle_categorie -> liste_sous_categ = NULL;
2658 2658

  
......
2682 2682
    nouvelle_sous_categorie = malloc ( sizeof ( struct struct_sous_categ ));
2683 2683

  
2684 2684
    nouvelle_sous_categorie -> no_sous_categ = ++( categorie->no_derniere_sous_categ );
2685
    nouvelle_sous_categorie -> nom_sous_categ = g_strdup ( g_strstrip ( sous_categorie ));
2685
    nouvelle_sous_categorie -> nom_sous_categ = g_strdup ( my_strstrip ( sous_categorie ));
2686 2686

  
2687 2687
    categorie -> liste_sous_categ = g_slist_append ( categorie -> liste_sous_categ,
2688 2688
						     nouvelle_sous_categorie );
grisbi-0.5.9.benj/src/comptes_gestion.c 2013-07-10 16:52:14.000000000 +0200
3 3
/*			gestion_comptes.c				      */
4 4
/*                                                                            */
5 5
/*     Copyright (C)	2000-2003 Cédric Auger (cedric@grisbi.org)	      */
6
/*			2004-2005 Benjamin Drieu (bdrieu@april.org) 	      */
6
/*			2004-2013 Benjamin Drieu (bdrieu@april.org) 	      */
7 7
/*			2003-2004 Alain Portal (dionysos@grisbi.org) 	      */
8 8
/*			http://www.grisbi.org   			      */
9 9
/*                                                                            */
......
884 884
	if ( i == compte_courant_onglet )
885 885
	    continue;
886 886
	p_tab_nom_de_compte_variable = p_tab_nom_de_compte + i;
887
	if ( !strcmp ( g_strstrip ( (gchar*) gtk_entry_get_text ( GTK_ENTRY ( detail_nom_compte ))), NOM_DU_COMPTE ))
887
	if ( !strcmp ( my_strstrip ( (gchar*) gtk_entry_get_text ( GTK_ENTRY ( detail_nom_compte ))), NOM_DU_COMPTE ))
888 888
	{
889 889
	    dialogue( g_strdup_printf ( _("Account \"%s\" already exists!"), gtk_entry_get_text ( GTK_ENTRY ( detail_nom_compte ))));
890 890
	    return;
......
896 896

  
897 897
    /* récupération du titulaire */
898 898

  
899
    TITULAIRE = g_strdup ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_titulaire_compte ))));
899
    TITULAIRE = g_strdup ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_titulaire_compte ))));
900 900

  
901 901
    if ( !strlen ( TITULAIRE ))
902 902
	TITULAIRE = NULL;
......
1019 1019

  
1020 1020
    /* enregistrement du no de guichet */
1021 1021

  
1022
    NO_GUICHET = g_strdup ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_guichet ))));
1022
    NO_GUICHET = g_strdup ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_guichet ))));
1023 1023

  
1024 1024
    if ( !strlen ( NO_GUICHET ))
1025 1025
	NO_GUICHET = NULL;
1026 1026

  
1027 1027
    /* enregistrement du no de compte */
1028 1028

  
1029
    NO_COMPTE_BANQUE = g_strdup ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_no_compte ))));
1029
    NO_COMPTE_BANQUE = g_strdup ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_no_compte ))));
1030 1030

  
1031 1031
    if ( !strlen ( NO_COMPTE_BANQUE ))
1032 1032
	NO_COMPTE_BANQUE = NULL;
1033 1033

  
1034 1034
    /* enregistrement de la clé du compte */
1035 1035

  
1036
    CLE_COMPTE = g_strdup ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_cle_compte ))));
1036
    CLE_COMPTE = g_strdup ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_cle_compte ))));
1037 1037

  
1038 1038
    if ( !strlen ( CLE_COMPTE ))
1039 1039
	CLE_COMPTE = NULL;
......
1053 1053

  
1054 1054
    /* vérification du solde initial */
1055 1055

  
1056
    if ( SOLDE_INIT != my_strtod ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_solde_init ))),
1056
    if ( SOLDE_INIT != my_strtod ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_solde_init ))),
1057 1057
				   NULL ) )
1058 1058
    {
1059 1059
	gint value;
1060 1060

  
1061
	SOLDE_INIT = my_strtod ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_solde_init ))),
1061
	SOLDE_INIT = my_strtod ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_solde_init ))),
1062 1062
				 NULL );
1063 1063

  
1064 1064
	value = gtk_clist_get_vadjustment ( GTK_CLIST ( CLIST_OPERATIONS )) -> value;
......
1075 1075

  
1076 1076
    /* vérification du solde mini autorisé */
1077 1077

  
1078
    if ( SOLDE_MINI != my_strtod ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_solde_mini_autorise ))),
1078
    if ( SOLDE_MINI != my_strtod ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_solde_mini_autorise ))),
1079 1079
				   NULL ) )
1080 1080
    {
1081
	SOLDE_MINI = my_strtod ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_solde_mini_autorise ))),
1081
	SOLDE_MINI = my_strtod ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_solde_mini_autorise ))),
1082 1082
				 NULL );
1083 1083
	MESSAGE_SOUS_MINI = 0;
1084 1084

  
......
1091 1091

  
1092 1092
    /* vérification du solde mini voulu */
1093 1093

  
1094
    if ( SOLDE_MINI_VOULU != my_strtod ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_solde_mini_voulu ))),
1094
    if ( SOLDE_MINI_VOULU != my_strtod ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_solde_mini_voulu ))),
1095 1095
					 NULL ) )
1096 1096
    {
1097
	SOLDE_MINI_VOULU = my_strtod ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_solde_mini_voulu ))),
1097
	SOLDE_MINI_VOULU = my_strtod ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_solde_mini_voulu ))),
1098 1098
				       NULL );
1099 1099
	MESSAGE_SOUS_MINI_VOULU = 0;
1100 1100

  
......
1130 1130

  
1131 1131
    if ( !NOM_DU_COMPTE
1132 1132
	 ||
1133
	 strcmp ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_nom_compte ))),
1133
	 strcmp ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_nom_compte ))),
1134 1134
		  NOM_DU_COMPTE ) )
1135 1135
    {
1136
	NOM_DU_COMPTE = g_strdup ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_nom_compte ))));
1136
	NOM_DU_COMPTE = g_strdup ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( detail_nom_compte ))));
1137 1137

  
1138 1138
	reaffiche_liste_comptes ();
1139 1139
	reaffiche_liste_comptes_onglet ();
grisbi-0.5.9.benj/src/devises.c 2013-07-10 16:52:14.000000000 +0200
2 2
/* s'occupe de tout ce qui concerne les devises */
3 3

  
4 4
/*     Copyright (C)	2000-2003 Cédric Auger (cedric@grisbi.org) */
5
/*			2003 Benjamin Drieu (bdrieu@april.org) */
5
/*			2013 Benjamin Drieu (bdrieu@april.org) */
6 6
/* 			http://www.grisbi.org */
7 7

  
8 8
/*     This program is free software; you can redistribute it and/or modify */
......
789 789
    {
790 790
	case 1 :
791 791

  
792
	    nom_devise = g_strstrip ( g_strdup ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom ))));
793
	    code_devise = g_strstrip ( g_strdup ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_code ))));
794
	    code_iso4217_devise = g_strstrip ( g_strdup ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_iso_code ))));
792
	    nom_devise = my_strstrip ( g_strdup ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom ))));
793
	    code_devise = my_strstrip ( g_strdup ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_code ))));
794
	    code_iso4217_devise = my_strstrip ( g_strdup ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_iso_code ))));
795 795

  
796 796
	    if ( strlen ( nom_devise ) && 
797 797
		 (strlen ( code_devise ) ||
......
807 807
		devise -> une_devise_1_egale_x_devise_2 = 0;
808 808

  
809 809
		if ( devise -> passage_euro )
810
		    devise -> change = my_strtod ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_conversion_euro ))),
810
		    devise -> change = my_strtod ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_conversion_euro ))),
811 811
						   NULL );
812 812
		else
813 813
		    devise -> change = 0;
......
889 889
{
890 890
    gchar *nom_devise;
891 891

  
892
    nom_devise = g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )));
892
    nom_devise = my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )));
893 893

  
894 894
    if ( nom_devise || !strlen (nom_devise) )
895 895
    {
......
2155 2155
    devise = gtk_clist_get_row_data ( GTK_CLIST ( clist_devises_parametres ),
2156 2156
				      ligne_selection_devise );
2157 2157

  
2158
    devise -> nom_devise = g_strdup ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom_devise_parametres ))));
2158
    devise -> nom_devise = g_strdup ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom_devise_parametres ))));
2159 2159

  
2160 2160
    gtk_clist_set_text ( GTK_CLIST ( clist_devises_parametres ),
2161 2161
			 ligne_selection_devise,
......
2175 2175
    devise = gtk_clist_get_row_data ( GTK_CLIST ( clist_devises_parametres ),
2176 2176
				      ligne_selection_devise );
2177 2177

  
2178
    devise -> code_devise = g_strdup ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_code_devise_parametres ))));
2178
    devise -> code_devise = g_strdup ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_code_devise_parametres ))));
2179 2179

  
2180 2180
    gtk_clist_set_text ( GTK_CLIST ( clist_devises_parametres ),
2181 2181
			 ligne_selection_devise,
......
2194 2194
    devise = gtk_clist_get_row_data ( GTK_CLIST ( clist_devises_parametres ),
2195 2195
				      ligne_selection_devise );
2196 2196

  
2197
    devise -> code_iso4217_devise = g_strdup ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_iso_code_devise_parametres ))));
2197
    devise -> code_iso4217_devise = g_strdup ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_iso_code_devise_parametres ))));
2198 2198

  
2199 2199
    gtk_clist_set_text ( GTK_CLIST ( clist_devises_parametres ),
2200 2200
			 ligne_selection_devise,
grisbi-0.5.9.benj/src/dialog.c 2013-07-10 16:52:14.000000000 +0200
4 4
/*                                  dialog.c                                  */
5 5
/*                                                                            */
6 6
/*     Copyright (C)	2000-2003 Cédric Auger (cedric@grisbi.org)	      */
7
/*			2003-2004 Benjamin Drieu (bdrieu@april.org)	      */
7
/*			2003-2013 Benjamin Drieu (bdrieu@april.org)	      */
8 8
/*			2005 Alain Portal (aportal@univ-montp2.fr) 	      */
9 9
/* 			http://www.grisbi.org				      */
10 10
/*                                                                            */
......
416 416
	return ( NULL );
417 417
    }
418 418

  
419
    retour = g_strstrip ( g_strdup ( gtk_entry_get_text ( GTK_ENTRY ( entree ))));
419
    retour = my_strstrip ( g_strdup ( gtk_entry_get_text ( GTK_ENTRY ( entree ))));
420 420

  
421 421
    gtk_widget_destroy ( GTK_WIDGET ( dialog ));
422 422
    return ( retour );
grisbi-0.5.9.benj/src/echeancier_formulaire.c 2013-07-10 16:52:14.000000000 +0200
890 890
    {
891 891
	/* 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 */
892 892
	case SCHEDULER_FORM_DATE :
893
	    if ( strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
893
	    if ( strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
894 894
	    {
895 895
		modifie_date ( entree );
896 896

  
......
908 908
	    /* on sort du tiers : soit vide soit complète le reste de l'opé */
909 909

  
910 910
	case SCHEDULER_FORM_PARTY :
911
	    if ( strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
911
	    if ( strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
912 912
		completion_operation_par_tiers_echeancier ();
913 913
	    else
914 914
		texte = _("Third party");
......
919 919

  
920 920
	case SCHEDULER_FORM_DEBIT :
921 921

  
922
	    if ( strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
922
	    if ( strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
923 923
	    {
924 924
		/* on commence par virer ce qu'il y avait dans les crédits */
925 925

  
......
979 979
	       s'il n'y a aucun tiers ( <=> nouveau tiers ) */
980 980

  
981 981
	case SCHEDULER_FORM_CREDIT :
982
	    if ( strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
982
	    if ( strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
983 983
	    {
984 984
		/* on commence par virer ce qu'il y avait dans les débits */
985 985

  
......
1040 1040
	    /*       sort des catégories */
1041 1041

  
1042 1042
	case SCHEDULER_FORM_CATEGORY :
1043
	    if ( !strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
1043
	    if ( !strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
1044 1044
		texte = _("Categories : Sub-categories");
1045 1045
	    else
1046
		if ( !strcmp ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree ))),
1046
		if ( !strcmp ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree ))),
1047 1047
			       _("Breakdown of transaction") ))
1048 1048
		{
1049 1049
		    if ( !etat.formulaire_echeance_dans_fenetre )
......
1058 1058
	    break;
1059 1059

  
1060 1060
	case SCHEDULER_FORM_CHEQUE :
1061
	    if ( !strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
1061
	    if ( !strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
1062 1062
		texte = _("Transfer reference");
1063 1063
	    break;
1064 1064

  
1065 1065
	case SCHEDULER_FORM_BUDGETARY :
1066
	    if ( !strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
1066
	    if ( !strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
1067 1067
		texte = _("Budgetary line");
1068 1068
	    break;
1069 1069

  
......
1071 1071
	    break;
1072 1072

  
1073 1073
	case SCHEDULER_FORM_VOUCHER :
1074
	    if ( !strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
1074
	    if ( !strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
1075 1075
		texte = _("Voucher");
1076 1076

  
1077 1077
	    break;
1078 1078

  
1079 1079
	case SCHEDULER_FORM_NOTES :
1080
	    if ( !strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
1080
	    if ( !strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
1081 1081
		texte = _("Notes");
1082 1082
	    break;
1083 1083

  
1084 1084
	    /* on sort de la date limite, soit c'est vide, soit on la vérifie,
1085 1085
	       la complète si nécessaire */
1086 1086
	case SCHEDULER_FORM_FINAL_DATE :
1087
	    if ( strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
1087
	    if ( strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
1088 1088
		modifie_date ( entree );
1089 1089
	    else
1090 1090
		texte = _("Limit date");
......
1485 1485

  
1486 1486
    if ( gtk_widget_get_style ( widget_formulaire_echeancier[SCHEDULER_FORM_FINAL_DATE] ) == style_entree_formulaire[ENCLAIR]
1487 1487
	 &&
1488
	 strcmp ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_FINAL_DATE] ))),
1488
	 strcmp ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_FINAL_DATE] ))),
1489 1489
		  _("None") ))
1490 1490
	if ( !modifie_date ( widget_formulaire_echeancier[SCHEDULER_FORM_FINAL_DATE] ))
1491 1491
	{
......
1501 1501
    /* si c'est le cas, si la liste des ventilation existe (soit adr de liste, soit -1), on va l'enregistrer plus tard */
1502 1502
    /* sinon on va ventiler tout de suite */
1503 1503

  
1504
    if ( !strcmp ( g_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_CATEGORY] ))),
1504
    if ( !strcmp ( my_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_CATEGORY] ))),
1505 1505
		   _("Breakdown of transaction") )
1506 1506
	 &&
1507 1507
	 !gtk_object_get_data ( GTK_OBJECT ( formulaire_echeancier ),
......
1510 1510
	enregistre_ope_au_retour_echeances = 1;
1511 1511

  
1512 1512
	if ( gtk_widget_get_style ( widget_formulaire_echeancier[TRANSACTION_FORM_DEBIT] ) == style_entree_formulaire[ENCLAIR] )
1513
	    ventiler_operation_echeances ( -my_strtod ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_DEBIT] ))),
1513
	    ventiler_operation_echeances ( -my_strtod ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_DEBIT] ))),
1514 1514
							NULL ));
1515 1515
	else
1516
	    ventiler_operation_echeances ( my_strtod ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_CREDIT] ))),
1516
	    ventiler_operation_echeances ( my_strtod ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_CREDIT] ))),
1517 1517
						       NULL ));
1518 1518

  
1519 1519
	return;
......
1522 1522

  
1523 1523
    /* vérification que ce n'est pas un virement sur lui-même */
1524 1524

  
1525
    if ( !g_strcasecmp ( g_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_CATEGORY] ))),
1525
    if ( !g_strcasecmp ( my_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_CATEGORY] ))),
1526 1526
			 g_strconcat ( COLON(_("Transfer")),
1527 1527
				       COMPTE_ECHEANCE,
1528 1528
				       NULL )))
......
1534 1534
    /*     si c'est une ventilation, vérifie qu'aucune ventilation n'est un virement sur lui-même */
1535 1535
    /* 	peut arriver si modifie le compte d'une échéance */
1536 1536

  
1537
    if ( !strcmp ( g_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_CATEGORY] ))),
1537
    if ( !strcmp ( my_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_CATEGORY] ))),
1538 1538
		   _("Breakdown of transaction") ))
1539 1539
    {
1540 1540
	GSList *liste_ventil;
......
1568 1568
    /* si c'est un virement, on vérifie que le compte existe  */
1569 1569

  
1570 1570

  
1571
    pointeur_char = g_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_CATEGORY] )));
1571
    pointeur_char = my_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_CATEGORY] )));
1572 1572

  
1573 1573
    if ( !g_strncasecmp ( pointeur_char, _("Transfer"), 8 ))
1574 1574
    {
......
1587 1587

  
1588 1588
	if ( tableau_char[1] )
1589 1589
	{
1590
	    tableau_char[1] = g_strstrip ( tableau_char[1] );
1590
	    tableau_char[1] = my_strstrip ( tableau_char[1] );
1591 1591

  
1592 1592
	    p_tab_nom_de_compte_variable = p_tab_nom_de_compte;
1593 1593

  
......
1638 1638
	/* récupère la date */
1639 1639

  
1640 1640

  
1641
	pointeur_char = g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY (widget_formulaire_echeancier[SCHEDULER_FORM_DATE] )));
1641
	pointeur_char = my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY (widget_formulaire_echeancier[SCHEDULER_FORM_DATE] )));
1642 1642

  
1643 1643
	tableau_char = g_strsplit ( pointeur_char,
1644 1644
				    "/",
......
1663 1663

  
1664 1664
	if ( gtk_widget_get_style ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_PARTY] ) -> entry ) == style_entree_formulaire[ENCLAIR] )
1665 1665
	{
1666
	    pointeur_char = g_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_PARTY] )));
1666
	    pointeur_char = my_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_PARTY] )));
1667 1667

  
1668 1668
	    if ( ( pointeur_liste = g_slist_find_custom ( liste_struct_tiers,
1669 1669
							  pointeur_char,
......
1681 1681
	/* récupération du montant */
1682 1682

  
1683 1683
	if ( gtk_widget_get_style ( widget_formulaire_echeancier[SCHEDULER_FORM_DEBIT] ) == style_entree_formulaire[ENCLAIR] )
1684
	    echeance -> montant = -my_strtod ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_DEBIT] ))),
1684
	    echeance -> montant = -my_strtod ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_DEBIT] ))),
1685 1685
					       NULL );
1686 1686
	else
1687
	    echeance -> montant = my_strtod ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_CREDIT] ))),
1687
	    echeance -> montant = my_strtod ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_CREDIT] ))),
1688 1688
					      NULL );
1689 1689

  
1690 1690
	/* récupération de la devise */
......
1705 1705
	{
1706 1706
	    struct struct_categ *categ;
1707 1707

  
1708
	    tableau_char = g_strsplit ( g_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_CATEGORY] ))),
1708
	    tableau_char = g_strsplit ( my_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_CATEGORY] ))),
1709 1709
					":",
1710 1710
					2 );
1711 1711

  
1712
	    tableau_char[0] = g_strstrip ( tableau_char[0] );
1712
	    tableau_char[0] = my_strstrip ( tableau_char[0] );
1713 1713

  
1714 1714
	    if ( tableau_char[1] )
1715
		tableau_char[1] = g_strstrip ( tableau_char[1] );
1715
		tableau_char[1] = my_strstrip ( tableau_char[1] );
1716 1716

  
1717 1717

  
1718 1718
	    if ( strlen ( tableau_char[0] ) )
......
1822 1822
	    if ( GTK_WIDGET_VISIBLE ( widget_formulaire_echeancier[SCHEDULER_FORM_CHEQUE] )
1823 1823
		 &&
1824 1824
		 gtk_widget_get_style ( widget_formulaire_echeancier[SCHEDULER_FORM_CHEQUE] ) == style_entree_formulaire[ENCLAIR] )
1825
		echeance -> contenu_type = g_strdup ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_CHEQUE] ))));
1825
		echeance -> contenu_type = g_strdup ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_CHEQUE] ))));
1826 1826
	}
1827 1827

  
1828 1828
	/* récupération du no d'exercice */
......
1842 1842
					":",
1843 1843
					2 );
1844 1844

  
1845
	    tableau_char[0] = g_strstrip ( tableau_char[0] );
1845
	    tableau_char[0] = my_strstrip ( tableau_char[0] );
1846 1846

  
1847 1847
	    if ( tableau_char[1] )
1848
		tableau_char[1] = g_strstrip ( tableau_char[1] );
1848
		tableau_char[1] = my_strstrip ( tableau_char[1] );
1849 1849

  
1850 1850
	    pointeur_liste = g_slist_find_custom ( liste_struct_imputation,
1851 1851
						   tableau_char[0],
......
1895 1895
	/* récupération des notes */
1896 1896

  
1897 1897
	if ( gtk_widget_get_style ( widget_formulaire_echeancier[SCHEDULER_FORM_NOTES] ) == style_entree_formulaire[ENCLAIR] )
1898
	    echeance -> notes = g_strdup ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_NOTES] ))));
1898
	    echeance -> notes = g_strdup ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_NOTES] ))));
1899 1899

  
1900 1900

  
1901 1901
	/* récupération de la fréquence */
......
1918 1918
	{
1919 1919
	    /* traitement de la date limite */
1920 1920

  
1921
	    tableau_char = g_strsplit ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_FINAL_DATE] ))),
1921
	    tableau_char = g_strsplit ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_FINAL_DATE] ))),
1922 1922
					"/",
1923 1923
					3 );
1924 1924

  
......
1960 1960
	/* récupère la date */
1961 1961

  
1962 1962

  
1963
	pointeur_char = g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY (widget_formulaire_echeancier[SCHEDULER_FORM_DATE] )));
1963
	pointeur_char = my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY (widget_formulaire_echeancier[SCHEDULER_FORM_DATE] )));
1964 1964

  
1965 1965
	tableau_char = g_strsplit ( pointeur_char,
1966 1966
				    "/",
......
1988 1988

  
1989 1989
	if ( gtk_widget_get_style ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_PARTY] ) -> entry ) == style_entree_formulaire[ENCLAIR] )
1990 1990
	{
1991
	    pointeur_char = g_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_PARTY] )));
1991
	    pointeur_char = my_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_PARTY] )));
1992 1992

  
1993 1993
	    if ( ( pointeur_liste = g_slist_find_custom ( liste_struct_tiers,
1994 1994
							  pointeur_char,
......
2005 2005
	/* récupération du montant */
2006 2006

  
2007 2007
	if ( gtk_widget_get_style ( widget_formulaire_echeancier[SCHEDULER_FORM_DEBIT] ) == style_entree_formulaire[ENCLAIR] )
2008
	    operation -> montant = -my_strtod ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_DEBIT] ))),
2008
	    operation -> montant = -my_strtod ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_DEBIT] ))),
2009 2009
						NULL );
2010 2010
	else
2011
	    operation -> montant = my_strtod ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_CREDIT] ))),
2011
	    operation -> montant = my_strtod ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_CREDIT] ))),
2012 2012
					       NULL );
2013 2013

  
2014 2014
	/* récupération de la devise */
......
2063 2063
	{
2064 2064
	    struct struct_categ *categ = NULL;
2065 2065

  
2066
	    tableau_char = g_strsplit ( g_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_CATEGORY] ))),
2066
	    tableau_char = g_strsplit ( my_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_CATEGORY] ))),
2067 2067
					":",
2068 2068
					2 );
2069 2069

  
2070
	    tableau_char[0] = g_strstrip ( tableau_char[0] );
2070
	    tableau_char[0] = my_strstrip ( tableau_char[0] );
2071 2071

  
2072 2072
	    if ( tableau_char[1] )
2073
		tableau_char[1] = g_strstrip ( tableau_char[1] );
2073
		tableau_char[1] = my_strstrip ( tableau_char[1] );
2074 2074

  
2075 2075

  
2076 2076
	    if ( strlen ( tableau_char[0] ) )
......
2155 2155
		type = gtk_object_get_data ( GTK_OBJECT ( GTK_OPTION_MENU ( widget_formulaire_echeancier[SCHEDULER_FORM_TYPE] ) -> menu_item ),
2156 2156
					     "adr_type" );
2157 2157

  
2158
		operation -> contenu_type = g_strdup ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_CHEQUE] ))));
2158
		operation -> contenu_type = g_strdup ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_CHEQUE] ))));
2159 2159

  
2160 2160
		if ( type -> numerotation_auto )
2161 2161
		    type -> no_en_cours = ( my_atoi ( operation -> contenu_type ));
......
2185 2185
					":",
2186 2186
					2 );
2187 2187

  
2188
	    tableau_char[0] = g_strstrip ( tableau_char[0] );
2188
	    tableau_char[0] = my_strstrip ( tableau_char[0] );
2189 2189

  
2190 2190
	    if ( tableau_char[1] )
2191
		tableau_char[1] = g_strstrip ( tableau_char[1] );
2191
		tableau_char[1] = my_strstrip ( tableau_char[1] );
2192 2192

  
2193 2193
	    pointeur_liste = g_slist_find_custom ( liste_struct_imputation,
2194 2194
						   tableau_char[0],
......
2238 2238
	/* récupération des notes */
2239 2239

  
2240 2240
	if ( gtk_widget_get_style ( widget_formulaire_echeancier[SCHEDULER_FORM_NOTES] ) == style_entree_formulaire[ENCLAIR] )
2241
	    operation -> notes = g_strdup ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_NOTES] ))));
2241
	    operation -> notes = g_strdup ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_NOTES] ))));
2242 2242

  
2243 2243

  
2244 2244
	/*   on a fini de remplir l'opé, on peut l'ajouter à la liste */
......
2827 2827

  
2828 2828

  
2829 2829
    liste_tmp = g_slist_find_custom ( liste_struct_tiers,
2830
				      g_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_PARTY]))),
2830
				      my_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_PARTY]))),
2831 2831
				      ( GCompareFunc ) recherche_tiers_par_nom );
2832 2832

  
2833 2833
    /*   si nouveau tiers,  on s'en va simplement */
......
3143 3143
    enregistre_ope_au_retour_echeances = 0;
3144 3144

  
3145 3145
    if ( gtk_widget_get_style ( widget_formulaire_echeancier[SCHEDULER_FORM_DEBIT] ) == style_entree_formulaire[ENCLAIR] )
3146
	ventiler_operation_echeances  ( -my_strtod ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_DEBIT] ))),
3146
	ventiler_operation_echeances  ( -my_strtod ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_DEBIT] ))),
3147 3147
						     NULL ));
3148 3148
    else
3149
	ventiler_operation_echeances  ( my_strtod ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_CREDIT] ))),
3149
	ventiler_operation_echeances  ( my_strtod ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_echeancier[SCHEDULER_FORM_CREDIT] ))),
3150 3150
						    NULL ));
3151 3151
}
3152 3152
/******************************************************************************/
grisbi-0.5.9.benj/src/echeancier_liste.c 2013-07-10 16:52:14.000000000 +0200
4 4
/*                                                                            */
5 5
/*     Copyright (C)	2000-2003 Cédric Auger (cedric@grisbi.org)	      */
6 6
/*			2004-2005 Alain Portal (aportal@univ-montp2.fr)	      */
7
/*			2006 Benjamin Drieu (bdrieu@april.org)  	      */
7
/*			2013 Benjamin Drieu (bdrieu@april.org)  	      */
8 8
/* 			http://www.grisbi.org   			      */
9 9
/*                                                                            */
10 10
/*  This program is free software; you can redistribute it and/or modify      */
......
2197 2197

  
2198 2198
	case 5:
2199 2199

  
2200
	    affichage_echeances_perso_nb_libre = my_atoi ( g_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree_personnalisation_affichage_echeances ))));
2200
	    affichage_echeances_perso_nb_libre = my_atoi ( my_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree_personnalisation_affichage_echeances ))));
2201 2201

  
2202 2202
	    break;
2203 2203

  
grisbi-0.5.9.benj/src/echeancier_ventilation.c 2013-07-10 16:52:14.000000000 +0200
748 748
    {
749 749
	/* on sort des catégories */
750 750
	case SCHEDULER_BREAKDOWN_FORM_CATEGORY :
751
	    if ( strlen ( g_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
751
	    if ( strlen ( my_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
752 752
	    {
753 753
		/* si c'est un virement, on met le menu des types de l'autre compte */
754 754
		/* si ce menu n'est pas déjà affiché */
......
759 759
					    ":",
760 760
					    2 );
761 761

  
762
		tableau_char[0] = g_strstrip ( tableau_char[0] );
762
		tableau_char[0] = my_strstrip ( tableau_char[0] );
763 763

  
764 764
		if ( tableau_char[1] )
765
		    tableau_char[1] = g_strstrip ( tableau_char[1] );
765
		    tableau_char[1] = my_strstrip ( tableau_char[1] );
766 766

  
767 767

  
768 768
		if ( strlen ( tableau_char[0] ) )
......
860 860
	    /* sort des notes */
861 861

  
862 862
	case SCHEDULER_BREAKDOWN_FORM_NOTES :
863
	    if ( !strlen ( g_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
863
	    if ( !strlen ( my_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
864 864
		texte = _("Notes");
865 865
	    break;
866 866

  
......
869 869

  
870 870
	case SCHEDULER_BREAKDOWN_FORM_DEBIT :
871 871

  
872
	    if ( strlen ( g_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree ))))
872
	    if ( strlen ( my_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree ))))
873 873
		 &&
874 874
		 gtk_widget_get_style ( widget_formulaire_ventilation_echeances[SCHEDULER_BREAKDOWN_FORM_DEBIT] ) == style_entree_formulaire[ENCLAIR] )
875 875
	    {
......
916 916
	    /* sort du crédit */
917 917

  
918 918
	case SCHEDULER_BREAKDOWN_FORM_CREDIT :
919
	    if ( strlen ( g_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree ))))
919
	    if ( strlen ( my_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree ))))
920 920
		 &&
921 921
		 gtk_widget_get_style ( widget_formulaire_ventilation_echeances[SCHEDULER_BREAKDOWN_FORM_CREDIT] ) == style_entree_formulaire[ENCLAIR])
922 922
	    {
......
963 963
	    /* sort de l'ib */
964 964

  
965 965
	case SCHEDULER_BREAKDOWN_FORM_BUDGETARY :
966
	    if ( !strlen ( g_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
966
	    if ( !strlen ( my_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
967 967
		texte = _("Budgetary line");
968 968
	    break;
969 969

  
970 970
	    /* sort de la pièce comptable */
971 971

  
972 972
	case SCHEDULER_BREAKDOWN_FORM_VOUCHER :
973
	    if ( !strlen ( g_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
973
	    if ( !strlen ( my_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
974 974
		texte = _("Voucher");
975 975
	    break;
976 976

  
......
1565 1565
    {
1566 1566
	/*       on split déjà les catég, sans libérer la variable, pour la récupérer ensuite pour les categ */
1567 1567

  
1568
	tableau_char = g_strsplit ( g_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_ventilation_echeances[SCHEDULER_BREAKDOWN_FORM_CATEGORY] ))),
1568
	tableau_char = g_strsplit ( my_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_ventilation_echeances[SCHEDULER_BREAKDOWN_FORM_CATEGORY] ))),
1569 1569
				    ":",
1570 1570
				    2 );
1571 1571
	if ( tableau_char[0]  )
1572 1572
	{
1573
	    tableau_char[0] = g_strstrip ( tableau_char[0] );
1573
	    tableau_char[0] = my_strstrip ( tableau_char[0] );
1574 1574

  
1575 1575
	    if ( tableau_char[1] )
1576
		tableau_char[1] = g_strstrip ( tableau_char[1] );
1576
		tableau_char[1] = my_strstrip ( tableau_char[1] );
1577 1577

  
1578 1578

  
1579 1579
	    if ( !strcmp ( tableau_char[0],
......
1654 1654
    {
1655 1655
	struct struct_categ *categ;
1656 1656

  
1657
       tableau_char = g_strsplit ( g_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_ventilation_echeances[SCHEDULER_BREAKDOWN_FORM_CATEGORY] ))),
1657
       tableau_char = g_strsplit ( my_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_ventilation_echeances[SCHEDULER_BREAKDOWN_FORM_CATEGORY] ))),
1658 1658
                                   ":",
1659 1659
                                   2 );
1660 1660

  
1661
       tableau_char[0] = g_strstrip ( tableau_char[0] );
1661
       tableau_char[0] = my_strstrip ( tableau_char[0] );
1662 1662

  
1663 1663
       if ( tableau_char[1] )
1664
	   tableau_char[1] = g_strstrip ( tableau_char[1] );
1664
	   tableau_char[1] = my_strstrip ( tableau_char[1] );
1665 1665

  
1666 1666
	if ( strlen ( tableau_char[0] ) )
1667 1667
	{
......
1786 1786
    /* récupération des notes */
1787 1787

  
1788 1788
    if ( gtk_widget_get_style ( widget_formulaire_ventilation_echeances[SCHEDULER_BREAKDOWN_FORM_NOTES] ) == style_entree_formulaire[ENCLAIR] )
1789
	operation -> notes = g_strdup ( g_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_ventilation_echeances[SCHEDULER_BREAKDOWN_FORM_NOTES] ))));
1789
	operation -> notes = g_strdup ( my_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_ventilation_echeances[SCHEDULER_BREAKDOWN_FORM_NOTES] ))));
1790 1790
    else
1791 1791
	operation -> notes = NULL;
1792 1792

  
......
1795 1795

  
1796 1796
    if ( gtk_widget_get_style ( widget_formulaire_ventilation_echeances[SCHEDULER_BREAKDOWN_FORM_DEBIT] ) == style_entree_formulaire[ENCLAIR] )
1797 1797
	/* c'est un débit */
1798
	operation -> montant = -my_strtod ( g_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_ventilation_echeances[SCHEDULER_BREAKDOWN_FORM_DEBIT] ))),
1798
	operation -> montant = -my_strtod ( my_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_ventilation_echeances[SCHEDULER_BREAKDOWN_FORM_DEBIT] ))),
1799 1799
					    NULL );
1800 1800
    else
1801
	operation -> montant = my_strtod ( g_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_ventilation_echeances[SCHEDULER_BREAKDOWN_FORM_CREDIT] ))),
1801
	operation -> montant = my_strtod ( my_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_ventilation_echeances[SCHEDULER_BREAKDOWN_FORM_CREDIT] ))),
1802 1802
					   NULL );
1803 1803

  
1804 1804

  
......
1815 1815
				    ":",
1816 1816
				    2 );
1817 1817

  
1818
	tableau_char[0] = g_strstrip ( tableau_char[0] );
1818
	tableau_char[0] = my_strstrip ( tableau_char[0] );
1819 1819

  
1820 1820
	if ( tableau_char[1] )
1821
	    tableau_char[1] = g_strstrip ( tableau_char[1] );
1821
	    tableau_char[1] = my_strstrip ( tableau_char[1] );
1822 1822

  
1823 1823
	pointeur_liste = g_slist_find_custom ( liste_struct_imputation,
1824 1824
					       tableau_char[0],
......
1879 1879
    /* récupération du no de pièce comptable */
1880 1880

  
1881 1881
    if ( gtk_widget_get_style ( widget_formulaire_ventilation_echeances[SCHEDULER_BREAKDOWN_FORM_VOUCHER] ) == style_entree_formulaire[ENCLAIR] )
1882
	operation -> no_piece_comptable = g_strdup ( g_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_ventilation_echeances[SCHEDULER_BREAKDOWN_FORM_VOUCHER] ))));
1882
	operation -> no_piece_comptable = g_strdup ( my_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_ventilation_echeances[SCHEDULER_BREAKDOWN_FORM_VOUCHER] ))));
1883 1883
    else
1884 1884
	operation -> no_piece_comptable = NULL;
1885 1885

  
grisbi-0.5.9.benj/src/equilibrage.c 2013-07-10 16:52:14.000000000 +0200
3 3
/* 			equilibrage.c                                         */
4 4
/*                                                                            */
5 5
/*     Copyright (C)	2000-2003 Cédric Auger (cedric@grisbi.org)	      */
6
/*			2003 Benjamin Drieu (bdrieu@april.org)		      */
6
/*			2013 Benjamin Drieu (bdrieu@april.org)		      */
7 7
/*			2004 Alain Portal (aportal@univ-montp2.fr) 	      */
8 8
/*			http://www.grisbi.org   			      */
9 9
/*                                                                            */
......
645 645
{
646 646
    /* si l'entrée contenant la date est vide, alors on met la date du jour */
647 647

  
648
    if ( strlen ( g_strstrip ( (gchar*) gtk_entry_get_text ( GTK_ENTRY ( entree )))) == 0  )
648
    if ( strlen ( my_strstrip ( (gchar*) gtk_entry_get_text ( GTK_ENTRY ( entree )))) == 0  )
649 649
	gtk_entry_set_text ( GTK_ENTRY ( entree ), gsb_today() );
650 650

  
651 651
    format_date ( entree );
......
979 979
    /*   récupération du no de rapprochement, */
980 980
    /*     s'il n'existe pas,on le crée */
981 981

  
982
    if ( strlen ( g_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree_no_rapprochement )))))
982
    if ( strlen ( my_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree_no_rapprochement )))))
983 983
    {
984 984
	struct struct_no_rapprochement *rapprochement;
985 985
	GSList *liste_tmp;
986 986
	gchar *rap_txt;
987 987

  
988
	rap_txt = g_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree_no_rapprochement )));
988
	rap_txt = my_strstrip ( (char *) gtk_entry_get_text ( GTK_ENTRY ( entree_no_rapprochement )));
989 989

  
990 990
	liste_tmp = g_slist_find_custom ( liste_no_rapprochements,
991 991
					  rap_txt,
grisbi-0.5.9.benj/src/etat_io.c 2013-07-10 16:52:14.000000000 +0200
753 753
    struct struct_devise *devise;
754 754

  
755 755
    liste_tmp = g_slist_find_custom ( liste_struct_devises,
756
				      g_strstrip ( nom ),
756
				      my_strstrip ( nom ),
757 757
				      (GCompareFunc) recherche_devise_par_nom );
758 758

  
759 759
    if ( liste_tmp )
......
794 794

  
795 795

  
796 796
    liste_tmp = g_slist_find_custom ( liste_struct_exercices,
797
				      g_strstrip ( nom ),
797
				      my_strstrip ( nom ),
798 798
				      (GCompareFunc) recherche_exercice_par_nom  );
799 799

  
800 800
    if ( liste_tmp )
......
883 883

  
884 884

  
885 885
    liste_tmp = g_slist_find_custom ( liste_struct_categories,
886
				      g_strstrip ( nom ),
886
				      my_strstrip ( nom ),
887 887
				      (GCompareFunc) recherche_categorie_par_nom  );
888 888

  
889 889
    if ( liste_tmp )
......
926 926

  
927 927

  
928 928
    liste_tmp = g_slist_find_custom ( liste_struct_imputation,
929
				      g_strstrip ( nom ),
929
				      my_strstrip ( nom ),
930 930
				      (GCompareFunc) recherche_imputation_par_nom  );
931 931

  
932 932
    if ( liste_tmp )
......
970 970

  
971 971

  
972 972
    liste_tmp = g_slist_find_custom ( liste_struct_tiers,
973
				      g_strstrip ( nom ),
973
				      my_strstrip ( nom ),
974 974
				      (GCompareFunc) recherche_tiers_par_nom  );
975 975

  
976 976
    if ( liste_tmp )
grisbi-0.5.9.benj/src/etats_config.c 2013-07-10 16:52:14.000000000 +0200
960 960
    /* on récupère maintenant toutes les données */
961 961
    /* récupération du nom du rapport */
962 962

  
963
    pointeur_char = g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom_etat )));
963
    pointeur_char = my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom_etat )));
964 964

  
965 965
    if ( strlen ( pointeur_char )
966 966
	 &&
......
1113 1113

  
1114 1114
    etat_courant -> no_plage_date = GPOINTER_TO_INT ( GTK_CLIST ( liste_plages_dates_etat ) -> selection -> data );
1115 1115

  
1116
    if ( strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_date_init_etat ))))
1116
    if ( strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_date_init_etat ))))
1117 1117
	 &&
1118 1118
	 format_date ( entree_date_init_etat ))
1119 1119
    {
1120 1120
	gint jour, mois, annee;
1121 1121

  
1122
	sscanf ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_date_init_etat ))),
1122
	sscanf ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_date_init_etat ))),
1123 1123
		 "%d/%d/%d",
1124 1124
		 &jour,
1125 1125
		 &mois,
......
1130 1130
							    annee );
1131 1131
    }
1132 1132

  
1133
    if ( strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_date_finale_etat ))))
1133
    if ( strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_date_finale_etat ))))
1134 1134
	 &&
1135 1135
	 format_date ( entree_date_finale_etat ))
1136 1136
    {
1137 1137
	gint jour, mois, annee;
1138 1138

  
1139
	sscanf ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_date_finale_etat ))),
1139
	sscanf ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_date_finale_etat ))),
1140 1140
		 "%d/%d/%d",
1141 1141
		 &jour,
1142 1142
		 &mois,
......
1388 1388
	comp_textes -> utilise_txt = gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( comp_textes -> bouton_utilise_txt ));
1389 1389
	comp_textes -> operateur = GPOINTER_TO_INT ( gtk_object_get_data ( GTK_OBJECT ( GTK_OPTION_MENU ( comp_textes -> bouton_operateur ) -> menu_item ),
1390 1390
									   "no_operateur" ));
1391
	comp_textes -> texte = g_strstrip ( g_strdup ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( comp_textes -> entree_txt ))));
1391
	comp_textes -> texte = my_strstrip ( g_strdup ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( comp_textes -> entree_txt ))));
1392 1392
	if ( !strlen ( comp_textes -> texte ))
1393 1393
	    comp_textes -> texte = NULL;
1394 1394

  
......
1418 1418

  
1419 1419
    if ( g_slist_length ( etat_courant -> liste_struct_comparaison_montants ) == 1
1420 1420
	 &&
1421
	 !strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( comp_montants -> entree_montant_1 ))))
1421
	 !strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( comp_montants -> entree_montant_1 ))))
1422 1422
	 &&
1423
	 !strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( comp_montants -> entree_montant_2 ))))
1423
	 !strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( comp_montants -> entree_montant_2 ))))
1424 1424
	 &&
1425 1425
	 GTK_WIDGET_SENSITIVE ( comp_montants -> entree_montant_1 )
1426 1426
	 &&
......
2151 2151
{
2152 2152
    /* si l'entrée contenant la date est vide, alors on met la date du jour */
2153 2153

  
2154
    if ( strlen ( g_strstrip ( (gchar*) gtk_entry_get_text ( GTK_ENTRY ( entree )))) == 0  )
2154
    if ( strlen ( my_strstrip ( (gchar*) gtk_entry_get_text ( GTK_ENTRY ( entree )))) == 0  )
2155 2155
	gtk_entry_set_text ( GTK_ENTRY ( entree ), gsb_today() );
2156 2156

  
2157 2157
    format_date ( entree );
grisbi-0.5.9.benj/src/exercice.c 2013-07-10 16:52:14.000000000 +0200
2 2
/* exercice.c */
3 3

  
4 4
/*     Copyright (C)	2000-2003 Cédric Auger (cedric@grisbi.org) */
5
/*			2003 Benjamin Drieu (bdrieu@april.org) */
5
/*			2013 Benjamin Drieu (bdrieu@april.org) */
6 6
/* 			http://www.grisbi.org */
7 7

  
8 8
/*     This program is free software; you can redistribute it and/or modify */
......
456 456
    exercice = gtk_clist_get_row_data ( GTK_CLIST ( liste ),
457 457
					ligne_selection_exercice );
458 458

  
459
    if ( !strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( nom_exercice )))))
459
    if ( !strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( nom_exercice )))))
460 460
    {
461 461
	dialogue ( _("The financial year must have a name.") );
462 462
	return;
......
468 468
	nb_exercices_tmp++;
469 469
    }
470 470

  
471
    exercice -> nom_exercice = g_strdup ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( nom_exercice ))));
471
    exercice -> nom_exercice = g_strdup ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( nom_exercice ))));
472 472

  
473
    if ( !strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( debut_exercice )))))
473
    if ( !strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( debut_exercice )))))
474 474
	exercice -> date_debut = NULL;
475 475
    else
476 476
    {
......
478 478
	{
479 479
	    gint jour, mois, an;
480 480

  
481
	    sscanf ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( debut_exercice ))),
481
	    sscanf ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( debut_exercice ))),
482 482
		     "%02d/%02d/%04d",
483 483
		     &jour,
484 484
		     &mois,
......
492 492
	    return;
493 493
    }
494 494

  
495
    if ( !strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( fin_exercice )))))
495
    if ( !strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( fin_exercice )))))
496 496
	exercice -> date_fin = NULL;
497 497
    else
498 498
    {
......
500 500
	{
501 501
	    gint jour, mois, an;
502 502

  
503
	    sscanf ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( fin_exercice ))),
503
	    sscanf ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( fin_exercice ))),
504 504
		     "%02d/%02d/%04d",
505 505
		     &jour,
506 506
		     &mois,
grisbi-0.5.9.benj/src/fichiers_io.c 2013-07-10 16:52:14.000000000 +0200
2 2
/* Contient toutes les procédures relatives à l'accès au disque */
3 3

  
4 4
/*     Copyright (C)	2000-2003 Cédric Auger (cedric@grisbi.org) */
5
/*			2003-2006 Benjamin Drieu (bdrieu@april.org) */
5
/*			2003-2013 Benjamin Drieu (bdrieu@april.org) */
6 6
/* 			http://www.grisbi.org */
7 7

  
8 8
/*     This program is free software; you can redistribute it and/or modify */
......
1684 1684
			    rapprochement -> nom_rapprochement = latin2utf8(xmlGetProp ( node_detail,
1685 1685
											 "Nom" ));
1686 1686

  
1687
			    rapprochement -> nom_rapprochement = g_strstrip ( rapprochement -> nom_rapprochement);
1687
			    rapprochement -> nom_rapprochement = my_strstrip ( rapprochement -> nom_rapprochement);
1688 1688

  
1689 1689
			    liste_no_rapprochements = g_slist_append ( liste_no_rapprochements,
1690 1690
								       rapprochement );
......
3564 3564
			    rapprochement -> nom_rapprochement = xmlGetProp ( node_detail,
3565 3565
									      "Nom" );
3566 3566

  
3567
			    rapprochement -> nom_rapprochement = g_strstrip ( rapprochement -> nom_rapprochement);
3567
			    rapprochement -> nom_rapprochement = my_strstrip ( rapprochement -> nom_rapprochement);
3568 3568

  
3569 3569
			    liste_no_rapprochements = g_slist_append ( liste_no_rapprochements,
3570 3570
								       rapprochement );
......
5815 5815
			    rapprochement -> nom_rapprochement = xmlGetProp ( node_detail,
5816 5816
									      "Nom" );
5817 5817

  
5818
			    rapprochement -> nom_rapprochement = g_strstrip ( rapprochement -> nom_rapprochement);
5818
			    rapprochement -> nom_rapprochement = my_strstrip ( rapprochement -> nom_rapprochement);
5819 5819

  
5820 5820
			    liste_no_rapprochements = g_slist_append ( liste_no_rapprochements,
5821 5821
								       rapprochement );
grisbi-0.5.9.benj/src/gtk_combofix.c 2013-07-10 16:52:14.000000000 +0200
1 1
/* ComboFix Widget
2 2
 *
3 3
 *     Copyright (C)	2001 Cédric Auger (cedric@grisbi.org) 
4
 *			2003 Benjamin Drieu (bdrieu@april.org) 
4
 *			2013 Benjamin Drieu (bdrieu@april.org) 
5 5
 *			2005 Alain Portal (aportal@univ-montp2.fr) 
6 6
 * 			http://www.grisbi.org
7 7
 *
......
1420 1420
	gchar *chaine;
1421 1421
	GSList *liste_tmp;
1422 1422

  
1423
	chaine = g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( combofix -> entry ) ) );
1423
	chaine = my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( combofix -> entry ) ) );
1424 1424

  
1425 1425
	if ( !chaine || !strlen ( chaine ) )
1426 1426
	    return TRUE;
grisbi-0.5.9.benj/src/import.c 2013-07-10 16:52:14.000000000 +0200
1048 1048
		    p_tab_nom_de_compte_variable = p_tab_nom_de_compte + j;
1049 1049

  
1050 1050
		    if ( ( !g_strcasecmp ( g_strconcat ( "[", NOM_DU_COMPTE, "]", NULL ),
1051
					   g_strstrip ( g_strdup ( operation -> info_banque_guichet )))) ||
1051
					   my_strstrip ( g_strdup ( operation -> info_banque_guichet )))) ||
1052 1052
			 ( !g_strcasecmp ( NOM_DU_COMPTE ,
1053
					   g_strstrip ( g_strdup ( operation -> info_banque_guichet )))))
1053
					   my_strstrip ( g_strdup ( operation -> info_banque_guichet )))))
1054 1054
			 
1055 1055
			compte_trouve = j;
1056 1056
		}
......
1088 1088
			     operation_2 -> info_banque_guichet
1089 1089
			     &&
1090 1090
			     (!g_strcasecmp ( g_strconcat ("[", nom_compte_courant, "]", NULL),
1091
					      g_strstrip ( g_strdup ( operation_2 -> info_banque_guichet ))) ||
1091
					      my_strstrip ( g_strdup ( operation_2 -> info_banque_guichet ))) ||
1092 1092
			      !g_strcasecmp ( nom_compte_courant,
1093
					      g_strstrip ( g_strdup ( operation_2 -> info_banque_guichet ))))
1093
					      my_strstrip ( g_strdup ( operation_2 -> info_banque_guichet ))))
1094 1094
			     &&
1095 1095
			     ( !same_currency || fabs ( operation -> montant ) == fabs ( operation_2 -> montant ))
1096 1096
			     &&
......
1198 1198
    /* met le nom du compte */
1199 1199

  
1200 1200
    if ( compte_import -> nom_de_compte )
1201
	compte -> nom_de_compte = g_strstrip ( compte_import -> nom_de_compte );
1201
	compte -> nom_de_compte = my_strstrip ( compte_import -> nom_de_compte );
1202 1202
    else
1203 1203
	compte -> nom_de_compte = g_strdup ( _("Imported account"));
1204 1204

  
......
1314 1314

  
1315 1315
	if ( operation_import -> tiers
1316 1316
	     &&
1317
	     strlen ( g_strstrip ( operation_import -> tiers )))
1317
	     strlen ( my_strstrip ( operation_import -> tiers )))
1318 1318
	{
1319 1319
	    pointeur_tmp = g_slist_find_custom ( liste_struct_tiers,
1320
						 g_strstrip ( operation_import -> tiers ),
1320
						 my_strstrip ( operation_import -> tiers ),
1321 1321
						 (GCompareFunc) recherche_tiers_par_nom );
1322 1322

  
1323 1323
	    /* si le tiers n'existait pas, on le crée */
......
1345 1345

  
1346 1346
	    if ( operation_import -> categ
1347 1347
		 &&
1348
		 strlen ( g_strstrip (operation_import -> categ)) )
1348
		 strlen ( my_strstrip (operation_import -> categ)) )
1349 1349
	    {
1350 1350
		if ( operation_import -> categ[0] == '[' )
1351 1351
		{
......
1372 1372
		    /* récupération ou création de la catégorie */
1373 1373

  
1374 1374
		    if ( !g_slist_find_custom ( liste_struct_categories,
1375
						g_strstrip ( tab_str[0] ),
1375
						my_strstrip ( tab_str[0] ),
1376 1376
						(GCompareFunc) recherche_categorie_par_nom ))
1377 1377
		    {
1378 1378
			categ = calloc ( 1,
1379 1379
					 sizeof ( struct struct_categ ));
1380 1380

  
1381 1381
			categ -> no_categ = ++no_derniere_categorie;
1382
			categ -> nom_categ = g_strdup ( g_strstrip ( tab_str[0] ) );
1382
			categ -> nom_categ = g_strdup ( my_strstrip ( tab_str[0] ) );
1383 1383

  
1384 1384
			if ( operation_import -> montant < 0 )
1385 1385
			    categ -> type_categ = 1;
......
1393 1393
		    }
1394 1394
		    else
1395 1395
			categ = g_slist_find_custom ( liste_struct_categories,
1396
						      g_strstrip ( tab_str[0] ),
1396
						      my_strstrip ( tab_str[0] ),
1397 1397
						      (GCompareFunc) recherche_categorie_par_nom ) -> data;
1398 1398

  
1399 1399

  
......
1405 1405
		    if ( tab_str[1] )
1406 1406
		    {
1407 1407
			if ( !g_slist_find_custom ( categ -> liste_sous_categ,
1408
						    g_strstrip ( tab_str[1] ),
1408
						    my_strstrip ( tab_str[1] ),
1409 1409
						    (GCompareFunc) recherche_sous_categorie_par_nom ))
1410 1410
			{
1411 1411
			    sous_categ = calloc ( 1,
1412 1412
						  sizeof ( struct struct_sous_categ ));
1413 1413

  
1414 1414
			    sous_categ -> no_sous_categ = ++( categ -> no_derniere_sous_categ );
1415
			    sous_categ -> nom_sous_categ = g_strdup ( g_strstrip ( tab_str[1] ));
1415
			    sous_categ -> nom_sous_categ = g_strdup ( my_strstrip ( tab_str[1] ));
1416 1416

  
1417 1417
			    categ -> liste_sous_categ = g_slist_append ( categ -> liste_sous_categ,
1418 1418
									 sous_categ );
1419 1419
			}
1420 1420
			else
1421 1421
			    sous_categ = g_slist_find_custom ( categ -> liste_sous_categ,
1422
							       g_strstrip ( tab_str[1] ),
1422
							       my_strstrip ( tab_str[1] ),
1423 1423
							       (GCompareFunc) recherche_sous_categorie_par_nom ) -> data;
1424 1424

  
1425 1425
			operation -> sous_categorie = sous_categ -> no_sous_categ;
......
2046 2046
    if ( operation_import -> tiers )
2047 2047
    {
2048 2048
	pointeur_tmp = g_slist_find_custom ( liste_struct_tiers,
2049
					     g_strstrip ( operation_import -> tiers ),
2049
					     my_strstrip ( operation_import -> tiers ),
2050 2050
					     (GCompareFunc) recherche_tiers_par_nom );
2051 2051

  
2052 2052
	/* si le tiers n'existait pas, on le crée */
......
2074 2074

  
2075 2075
	if ( operation_import -> categ
2076 2076
	     &&
2077
	     strlen ( g_strstrip (operation_import -> categ)) )
2077
	     strlen ( my_strstrip (operation_import -> categ)) )
2078 2078
	{
2079 2079
	    if ( operation_import -> categ[0] == '[' )
2080 2080
	    {
......
2101 2101
		/* récupération ou création de la catégorie */
2102 2102

  
2103 2103
		if ( !g_slist_find_custom ( liste_struct_categories,
2104
					    g_strstrip ( tab_str[0] ),
2104
					    my_strstrip ( tab_str[0] ),
2105 2105
					    (GCompareFunc) recherche_categorie_par_nom ))
2106 2106
		{
2107 2107
		    categ = calloc ( 1,
2108 2108
				     sizeof ( struct struct_categ ));
2109 2109

  
2110 2110
		    categ -> no_categ = ++no_derniere_categorie;
2111
		    categ -> nom_categ = g_strdup ( g_strstrip ( tab_str[0] ) );
2111
		    categ -> nom_categ = g_strdup ( my_strstrip ( tab_str[0] ) );
2112 2112

  
2113 2113
		    if ( operation_import -> montant < 0 )
2114 2114
			categ -> type_categ = 1;
......
2122 2122
		}
2123 2123
		else
2124 2124
		    categ = g_slist_find_custom ( liste_struct_categories,
2125
						  g_strstrip ( tab_str[0] ),
2125
						  my_strstrip ( tab_str[0] ),
2126 2126
						  (GCompareFunc) recherche_categorie_par_nom ) -> data;
2127 2127

  
2128 2128

  
......
2134 2134
		if ( tab_str[1] )
2135 2135
		{
2136 2136
		    if ( !g_slist_find_custom ( categ -> liste_sous_categ,
2137
						g_strstrip ( tab_str[1] ),
2137
						my_strstrip ( tab_str[1] ),
2138 2138
						(GCompareFunc) recherche_sous_categorie_par_nom ))
2139 2139
		    {
2140 2140
			sous_categ = calloc ( 1,
2141 2141
					      sizeof ( struct struct_sous_categ ));
2142 2142

  
2143 2143
			sous_categ -> no_sous_categ = ++( categ -> no_derniere_sous_categ );
2144
			sous_categ -> nom_sous_categ = g_strdup ( g_strstrip ( tab_str[1] ));
2144
			sous_categ -> nom_sous_categ = g_strdup ( my_strstrip ( tab_str[1] ));
2145 2145

  
2146 2146
			categ -> liste_sous_categ = g_slist_append ( categ -> liste_sous_categ,
2147 2147
								     sous_categ );
2148 2148
		    }
2149 2149
		    else
2150 2150
			sous_categ = g_slist_find_custom ( categ -> liste_sous_categ,
2151
							   g_strstrip ( tab_str[1] ),
2151
							   my_strstrip ( tab_str[1] ),
2152 2152
							   (GCompareFunc) recherche_sous_categorie_par_nom ) -> data;
2153 2153

  
2154 2154
		    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
3 3
/* 			imputation_budgetaire.c                               */
4 4
/*                                                                            */
5 5
/*     Copyright (C)	2000-2003 Cédric Auger (cedric@grisbi.org)	      */
6
/*			2004 Benjamin Drieu (bdrieu@april.org)		      */
6
/*			2013 Benjamin Drieu (bdrieu@april.org)		      */
7 7
/*			2004 Alain Portal (aportal@univ-montp2.fr) 	      */
8 8
/*			http://www.grisbi.org   			      */
9 9
/*                                                                            */
......
1391 1391
					    "adr_struct_imputation" );
1392 1392

  
1393 1393

  
1394
	if ( strcmp ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom_imputation ))),
1394
	if ( strcmp ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom_imputation ))),
1395 1395
		      imputation -> nom_imputation ))
1396 1396
	{
1397 1397
	    free ( imputation -> nom_imputation );
1398 1398

  
1399
	    imputation -> nom_imputation = g_strdup ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom_imputation ))) );
1399
	    imputation -> nom_imputation = g_strdup ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom_imputation ))) );
1400 1400

  
1401 1401

  
1402 1402
	    node = GTK_CTREE_NODE ( ( GTK_CLIST ( arbre_imputation ) -> selection ) -> data );
......
1434 1434

  
1435 1435
	free ( sous_imputation -> nom_sous_imputation );
1436 1436

  
1437
	sous_imputation -> nom_sous_imputation = g_strdup ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom_imputation ))) );
1437
	sous_imputation -> nom_sous_imputation = g_strdup ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree_nom_imputation ))) );
1438 1438

  
1439 1439

  
1440 1440
	node = GTK_CTREE_NODE ( ( GTK_CLIST ( arbre_imputation ) -> selection ) -> data );
......
2320 2320
    nouvelle_imputation = calloc ( 1, sizeof ( struct struct_imputation ));
2321 2321

  
2322 2322
    nouvelle_imputation -> no_imputation = ++no_derniere_imputation;
2323
    nouvelle_imputation -> nom_imputation = g_strdup ( g_strstrip ( imputation ));
2323
    nouvelle_imputation -> nom_imputation = g_strdup ( my_strstrip ( imputation ));
2324 2324

  
2325 2325
    liste_struct_imputation = g_slist_append ( liste_struct_imputation,
2326 2326
					       nouvelle_imputation );
......
2359 2359
	return NULL;
2360 2360
      }
2361 2361

  
2362
    nouvelle_sous_imputation -> nom_sous_imputation = g_strdup ( g_strstrip ( sous_imputation ));
2362
    nouvelle_sous_imputation -> nom_sous_imputation = g_strdup ( my_strstrip ( sous_imputation ));
2363 2363

  
2364 2364
    imputation -> liste_sous_imputation = g_slist_append ( imputation -> liste_sous_imputation,
2365 2365
							   nouvelle_sous_imputation );
grisbi-0.5.9.benj/src/operations_formulaire.c 2013-07-10 16:52:14.000000000 +0200
3 3
/* 			formulaire.c                                          */
4 4
/*                                                                            */
5 5
/*     Copyright (C)	2000-2003 Cédric Auger (cedric@grisbi.org)	      */
6
/*			2003-2004 Benjamin Drieu (bdrieu@april.org)	      */
6
/*			2003-2013 Benjamin Drieu (bdrieu@april.org)	      */
7 7
/*			2004 Alain Portal (aportal@univ-montp2.fr)	      */
8 8
/*			http://www.grisbi.org   			      */
9 9
/*                                                                            */
......
775 775
	   la complète si nécessaire et met à jour l'exercice */
776 776
	case TRANSACTION_FORM_DATE :
777 777

  
778
	    if ( strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
778
	    if ( strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
779 779
	    {
780 780
		modifie_date ( entree );
781 781

  
......
794 794

  
795 795
	case TRANSACTION_FORM_PARTY :
796 796

  
797
	    if ( strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
797
	    if ( strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
798 798
		completion_operation_par_tiers ();
799 799
	    else
800 800
		texte = _("Third party");
......
804 804

  
805 805
	case TRANSACTION_FORM_DEBIT :
806 806

  
807
	    if ( strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
807
	    if ( strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
808 808
	    {
809 809
		/* on commence par virer ce qu'il y avait dans les crédits */
810 810

  
......
896 896

  
897 897
	case TRANSACTION_FORM_CREDIT :
898 898

  
899
	    if ( strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
899
	    if ( strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
900 900
	    {
901 901
		/* on commence par virer ce qu'il y avait dans les débits */
902 902

  
......
977 977
	    break;
978 978

  
979 979
	case TRANSACTION_FORM_VALUE_DATE :
980
	    if ( strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
980
	    if ( strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
981 981
		modifie_date ( entree );
982 982
	    else
983 983
		texte = _("Value date");
......
988 988

  
989 989
	case TRANSACTION_FORM_CATEGORY :
990 990

  
991
	    if ( strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
991
	    if ( strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
992 992
	    {
993
		if ( strcmp ( g_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_operations[TRANSACTION_FORM_CATEGORY] ))),
993
		if ( strcmp ( my_strstrip ( gtk_combofix_get_text ( GTK_COMBOFIX ( widget_formulaire_operations[TRANSACTION_FORM_CATEGORY] ))),
994 994
			      _("Breakdown of transaction") ))
995 995
		{
996 996
		    gchar **tableau_char;
......
1003 1003
						":",
1004 1004
						2 );
1005 1005

  
1006
		    tableau_char[0] = g_strstrip ( tableau_char[0] );
1006
		    tableau_char[0] = my_strstrip ( tableau_char[0] );
1007 1007

  
1008 1008
		    if ( tableau_char[1] )
1009
			tableau_char[1] = g_strstrip ( tableau_char[1] );
1009
			tableau_char[1] = my_strstrip ( tableau_char[1] );
1010 1010

  
1011 1011

  
1012 1012
		    if ( strlen ( tableau_char[0] ) )
......
1109 1109

  
1110 1110
	case TRANSACTION_FORM_CHEQUE :
1111 1111

  
1112
	    if ( !strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
1112
	    if ( !strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
1113 1113
		texte = _("Cheque/Transfer number");
1114 1114
	    break;
1115 1115

  
1116 1116
	case TRANSACTION_FORM_BUDGET :
1117 1117

  
1118
	    if ( !strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
1118
	    if ( !strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
1119 1119
		texte = _("Budgetary line");
1120 1120
	    break;
1121 1121

  
1122 1122
	case TRANSACTION_FORM_VOUCHER :
1123 1123

  
1124
	    if ( !strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
1124
	    if ( !strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
1125 1125
		texte = _("Voucher");
1126 1126

  
1127 1127
	    break;
1128 1128

  
1129 1129
	case TRANSACTION_FORM_NOTES :
1130 1130

  
1131
	    if ( !strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
1131
	    if ( !strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
1132 1132
		texte = _("Notes");
1133 1133
	    break;
1134 1134

  
1135 1135
	case TRANSACTION_FORM_BANK :
1136 1136

  
1137
	    if ( !strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
1137
	    if ( !strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )))))
1138 1138
		texte = _("Bank references");
1139 1139
	    break;
1140 1140

  
......
1394 1394
		/* si c'est la date d'opération et que le champ est vide, alors on
1395 1395
		   récupère la date du jour comme date d'opération */
1396 1396
		if ( origine == TRANSACTION_FORM_DATE &&
1397
		     strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_operations[origine] ) ) ) ) == 0 )
1397
		     strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_operations[origine] ) ) ) ) == 0 )
1398 1398
		    gtk_entry_set_text ( GTK_ENTRY ( widget_formulaire_operations[TRANSACTION_FORM_DATE] ), gsb_today() );
1399 1399

  
1400 1400
		/* si c'est la date de valeur et que le champ est vide, alors on
1401 1401
		   récupère la date d'opération comme date de valeur */
1402 1402
		if ( origine == TRANSACTION_FORM_VALUE_DATE &&
1403
		     strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_operations[origine] ) ) ) ) == 0 )
1403
		     strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_operations[origine] ) ) ) ) == 0 )
1404 1404
		{
1405 1405
		    /* si la date d'opération est vide elle aussi, alors on récupère
1406 1406
		       la date du jour comme date de valeur */
1407
		    if ( strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_operations[TRANSACTION_FORM_DATE] ) ) ) ) == 0 ||
1408
			 g_strcasecmp ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_operations[TRANSACTION_FORM_DATE] ) ) ),  _("Date") ) == 0 )
1407
		    if ( strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_operations[TRANSACTION_FORM_DATE] ) ) ) ) == 0 ||
1408
			 g_strcasecmp ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_operations[TRANSACTION_FORM_DATE] ) ) ),  _("Date") ) == 0 )
1409 1409
			gtk_entry_set_text ( GTK_ENTRY ( widget_formulaire_operations[TRANSACTION_FORM_VALUE_DATE] ), gsb_today() );
1410 1410
		    else
1411
			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] ) ) ) );
1411
			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] ) ) ) );
1412 1412
		}
1413 1413

  
1414 1414
		if ( ( ev -> state & GDK_SHIFT_MASK ) != GDK_SHIFT_MASK ||
......
1444 1444
		/* si c'est la date d'opération et que le champ est vide, alors on
1445 1445
		   récupère la date du jour comme date d'opération */
1446 1446
		if ( origine == TRANSACTION_FORM_DATE &&
1447
		     strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_operations[origine] ) ) ) ) == 0 )
1447
		     strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_operations[origine] ) ) ) ) == 0 )
1448 1448
		    gtk_entry_set_text ( GTK_ENTRY ( widget_formulaire_operations[TRANSACTION_FORM_DATE] ), gsb_today() );
1449 1449

  
1450 1450
		/* si c'est la date de valeur et que le champ est vide, alors on
1451 1451
		   récupère la date d'opération comme date de valeur */
1452 1452
		if ( origine == TRANSACTION_FORM_VALUE_DATE &&
1453
		     strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_operations[origine] ) ) ) ) == 0 )
1453
		     strlen ( my_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_operations[origine] ) ) ) ) == 0 )
1454 1454
		{
1455 1455
		    /* si la date d'opération est vide elle aussi, alors on récupère
1456 1456
		       la date du jour comme date de valeur */
1457
		    if ( strlen ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_operations[TRANSACTION_FORM_DATE] ) ) ) ) == 0 ||
1458
			 g_strcasecmp ( g_strstrip ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( widget_formulaire_operations[TRANSACTION_FORM_DATE] ) ) ),  _("Date") ) == 0 )
... Ce différentiel a été tronqué car il excède la taille maximale pouvant être affichée.
(1-1/2)