rem: 50 );
add: 30 );
context: GtkWidget *creation_formulaire_echeancier ( void ){    GtkWidget *menu;    GtkWidget *item;    GtkTooltips *tips;    GtkWidget *bouton;    GtkWidget *table;    gint no_compte;    /* on crée le tooltips */    tips = gtk_tooltips_new ();    formulaire_echeancier = gtk_vbox_new ( FALSE,					   5 );    gtk_widget_show ( formulaire_echeancier );    /*   création de la table */    table = gtk_table_new ( 6,			    4,			    FALSE );    gtk_container_set_border_width ( GTK_CONTAINER ( table ),				     10 );    gtk_table_set_col_spacings ( GTK_TABLE ( table ),				 5 );    gtk_widget_set_usize ( table,			   1,			   FALSE );    gtk_box_pack_start ( GTK_BOX ( formulaire_echeancier ),			 table,			 TRUE,			 TRUE,			 0 );    gtk_widget_show ( table );    /* création du label saisie / modif */    label_saisie_modif = gtk_label_new ( "" );    gtk_table_attach ( GTK_TABLE ( table ),		       label_saisie_modif,		       0, 1,		       0, 1,		       GTK_SHRINK | GTK_FILL | GTK_EXPAND,		       GTK_SHRINK | GTK_FILL,		       0,0);    /* création de l'entrée de la date */    widget_formulaire_echeancier[SCHEDULER_FORM_DATE] = gtk_entry_new_with_max_length ( 10 );    gtk_table_attach ( GTK_TABLE ( table ),		       widget_formulaire_echeancier[SCHEDULER_FORM_DATE],		       1, 2,		       0, 1,		       GTK_SHRINK | GTK_FILL | GTK_EXPAND,		       GTK_SHRINK | GTK_FILL,		       0, 0);    gtk_signal_connect ( GTK_OBJECT ( widget_formulaire_echeancier[SCHEDULER_FORM_DATE] ),			 "key-press-event",			 GTK_SIGNAL_FUNC ( pression_touche_formulaire_echeancier ),			 GINT_TO_POINTER ( SCHEDULER_FORM_DATE ) );    gtk_signal_connect ( GTK_OBJECT ( widget_formulaire_echeancier[SCHEDULER_FORM_DATE] ),			 "button-press-event",			 GTK_SIGNAL_FUNC ( clique_champ_formulaire_echeancier ),			 NULL );    gtk_signal_connect ( GTK_OBJECT ( widget_formulaire_echeancier[SCHEDULER_FORM_DATE] ),			 "focus-in-event",			 GTK_SIGNAL_FUNC ( entree_prend_focus ),			 NULL );    gtk_signal_connect ( GTK_OBJECT ( widget_formulaire_echeancier[SCHEDULER_FORM_DATE] ),			 "focus-out-event",			 GTK_SIGNAL_FUNC ( entree_perd_focus_echeancier ),			 NULL );    gtk_widget_show ( widget_formulaire_echeancier[SCHEDULER_FORM_DATE] );    /* création du combofix des tiers */    widget_formulaire_echeancier[SCHEDULER_FORM_PARTY] = gtk_combofix_new (  liste_tiers_combofix_echeancier,									     FALSE,									     TRUE,									     TRUE,									     50 );    gtk_signal_connect ( GTK_OBJECT ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_PARTY] ) -> entry ),			 "key-press-event",			 GTK_SIGNAL_FUNC ( pression_touche_formulaire_echeancier ),			 GINT_TO_POINTER ( SCHEDULER_FORM_PARTY ) );    gtk_signal_connect_object ( GTK_OBJECT ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_PARTY]) -> entry),				"focus-in-event",				GTK_SIGNAL_FUNC ( entree_prend_focus ),				GTK_WIDGET ( widget_formulaire_echeancier[SCHEDULER_FORM_PARTY] ) );    gtk_signal_connect ( GTK_OBJECT ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_PARTY] ) -> entry ),			 "focus-out-event",			 GTK_SIGNAL_FUNC ( entree_perd_focus_echeancier ),			 GINT_TO_POINTER ( SCHEDULER_FORM_PARTY ) );    gtk_signal_connect ( GTK_OBJECT ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_PARTY] ) -> entry ),			 "button-press-event",			 GTK_SIGNAL_FUNC ( clique_champ_formulaire_echeancier ),			 GINT_TO_POINTER ( SCHEDULER_FORM_PARTY ) );    gtk_signal_connect ( GTK_OBJECT ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_PARTY] ) -> arrow ),			 "button-press-event",			 GTK_SIGNAL_FUNC ( clique_champ_formulaire_echeancier ),			 GINT_TO_POINTER ( SCHEDULER_FORM_PARTY ) );    gtk_table_attach ( GTK_TABLE ( table ),		       widget_formulaire_echeancier[SCHEDULER_FORM_PARTY],		       2, 3,		       0, 1,		       GTK_SHRINK | GTK_FILL | GTK_EXPAND,		       GTK_SHRINK | GTK_FILL,		       0, 0);    gtk_widget_show ( widget_formulaire_echeancier[SCHEDULER_FORM_PARTY] );    /* création de l'entrée des débits */    widget_formulaire_echeancier[SCHEDULER_FORM_DEBIT] = gtk_entry_new ();    gtk_signal_connect ( GTK_OBJECT ( widget_formulaire_echeancier[SCHEDULER_FORM_DEBIT] ),			 "key-press-event",			 GTK_SIGNAL_FUNC ( pression_touche_formulaire_echeancier ),			 GINT_TO_POINTER ( SCHEDULER_FORM_DEBIT ) );    gtk_signal_connect ( GTK_OBJECT ( widget_formulaire_echeancier[SCHEDULER_FORM_DEBIT] ),			 "button-press-event",			 GTK_SIGNAL_FUNC ( clique_champ_formulaire_echeancier ),			 GINT_TO_POINTER ( SCHEDULER_FORM_DEBIT ) );    gtk_signal_connect ( GTK_OBJECT (widget_formulaire_echeancier[SCHEDULER_FORM_DEBIT]),			 "focus-in-event",			 GTK_SIGNAL_FUNC ( entree_prend_focus ),			 NULL );    gtk_signal_connect ( GTK_OBJECT ( widget_formulaire_echeancier[SCHEDULER_FORM_DEBIT] ),			 "focus-out-event",			 GTK_SIGNAL_FUNC ( entree_perd_focus_echeancier ),			 GINT_TO_POINTER ( SCHEDULER_FORM_DEBIT ) );    gtk_table_attach ( GTK_TABLE ( table ),		       widget_formulaire_echeancier[SCHEDULER_FORM_DEBIT],		       3, 4,		       0, 1,		       GTK_SHRINK | GTK_FILL | GTK_EXPAND,		       GTK_SHRINK | GTK_FILL,		       0, 0);    gtk_widget_show ( widget_formulaire_echeancier[SCHEDULER_FORM_DEBIT] );    /* création de l'entrée des crédits */    widget_formulaire_echeancier[SCHEDULER_FORM_CREDIT] = gtk_entry_new ();    gtk_signal_connect ( GTK_OBJECT ( widget_formulaire_echeancier[SCHEDULER_FORM_CREDIT] ),			 "key-press-event",			 GTK_SIGNAL_FUNC ( pression_touche_formulaire_echeancier ),			 GINT_TO_POINTER ( SCHEDULER_FORM_CREDIT ) );    gtk_signal_connect ( GTK_OBJECT ( widget_formulaire_echeancier[SCHEDULER_FORM_CREDIT] ),			 "button-press-event",			 GTK_SIGNAL_FUNC ( clique_champ_formulaire_echeancier ),			 GINT_TO_POINTER ( SCHEDULER_FORM_CREDIT ) );    gtk_signal_connect ( GTK_OBJECT ( widget_formulaire_echeancier[SCHEDULER_FORM_CREDIT] ),			 "focus-in-event",			 GTK_SIGNAL_FUNC ( entree_prend_focus ),			 NULL );    gtk_signal_connect ( GTK_OBJECT ( widget_formulaire_echeancier[SCHEDULER_FORM_CREDIT] ),			 "focus-out-event",			 GTK_SIGNAL_FUNC ( entree_perd_focus_echeancier ),			 GINT_TO_POINTER ( SCHEDULER_FORM_CREDIT ) );    gtk_table_attach ( GTK_TABLE ( table ),		       widget_formulaire_echeancier[SCHEDULER_FORM_CREDIT],		       4, 5,		       0, 1,		       GTK_SHRINK | GTK_FILL | GTK_EXPAND,		       GTK_SHRINK | GTK_FILL,		       0, 0);    gtk_widget_show ( widget_formulaire_echeancier[SCHEDULER_FORM_CREDIT] );    /* met l'option menu des devises */    widget_formulaire_echeancier[SCHEDULER_FORM_DEVISE] = gtk_option_menu_new ();    gtk_tooltips_set_tip ( GTK_TOOLTIPS ( tips ),			   widget_formulaire_echeancier[SCHEDULER_FORM_DEVISE],			   _("Choose currency"),			   _("Choose currency") );    menu = creation_option_menu_devises ( -1,					  liste_struct_devises );    gtk_option_menu_set_menu ( GTK_OPTION_MENU ( widget_formulaire_echeancier[SCHEDULER_FORM_DEVISE] ),			       menu );    gtk_signal_connect ( GTK_OBJECT ( widget_formulaire_echeancier[SCHEDULER_FORM_DEVISE] ),			 "key-press-event",			 GTK_SIGNAL_FUNC ( pression_touche_formulaire_echeancier ),			 GINT_TO_POINTER ( SCHEDULER_FORM_DEVISE ) );    gtk_table_attach ( GTK_TABLE ( table ),		       widget_formulaire_echeancier[SCHEDULER_FORM_DEVISE],		       5, 7,		       0, 1,		       GTK_SHRINK | GTK_FILL | GTK_EXPAND,		       GTK_SHRINK | GTK_FILL,		       0, 0);    gtk_widget_show ( widget_formulaire_echeancier[SCHEDULER_FORM_DEVISE] );    /* Mise en place du menu des comptes */    widget_formulaire_echeancier[SCHEDULER_FORM_ACCOUNT] = gtk_option_menu_new ();    gtk_tooltips_set_tip ( GTK_TOOLTIPS ( tips ),			   widget_formulaire_echeancier[SCHEDULER_FORM_ACCOUNT],			   _("Choose the account"),			   _("Choose the account") );    menu = creation_option_menu_comptes ( GTK_SIGNAL_FUNC(changement_choix_compte_echeancier), TRUE, FALSE );    gtk_option_menu_set_menu ( GTK_OPTION_MENU ( widget_formulaire_echeancier[SCHEDULER_FORM_ACCOUNT] ),			       menu );    gtk_option_menu_set_history ( GTK_OPTION_MENU ( widget_formulaire_echeancier[SCHEDULER_FORM_ACCOUNT] ),				  0);    gtk_signal_connect ( GTK_OBJECT ( widget_formulaire_echeancier[SCHEDULER_FORM_ACCOUNT] ),			 "key-press-event",			 GTK_SIGNAL_FUNC ( pression_touche_formulaire_echeancier ),			 GINT_TO_POINTER ( SCHEDULER_FORM_ACCOUNT ) );    gtk_table_attach ( GTK_TABLE ( table ),		       widget_formulaire_echeancier[SCHEDULER_FORM_ACCOUNT],		       0, 2,		       1, 2,		       GTK_SHRINK | GTK_FILL | GTK_EXPAND,		       GTK_SHRINK | GTK_FILL,		       0, 0);    gtk_widget_show ( widget_formulaire_echeancier[SCHEDULER_FORM_ACCOUNT] );    /* Affiche les catégories / sous-catégories */    widget_formulaire_echeancier[SCHEDULER_FORM_CATEGORY] = gtk_combofix_new_complex ( liste_categories_combofix,										       FALSE,										       TRUE,										       TRUE,										       0 );    gtk_signal_connect ( GTK_OBJECT ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_CATEGORY] ) -> entry ),			 "key-press-event",			 GTK_SIGNAL_FUNC ( pression_touche_formulaire_echeancier ),			 GINT_TO_POINTER ( SCHEDULER_FORM_CATEGORY ) );    gtk_signal_connect ( GTK_OBJECT ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_CATEGORY] ) -> entry ),			 "button-press-event",			 GTK_SIGNAL_FUNC ( clique_champ_formulaire_echeancier ),			 GINT_TO_POINTER ( SCHEDULER_FORM_CATEGORY ) );    gtk_signal_connect ( GTK_OBJECT ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_CATEGORY] ) -> arrow ),			 "button-press-event",			 GTK_SIGNAL_FUNC ( clique_champ_formulaire_echeancier ),			 GINT_TO_POINTER ( SCHEDULER_FORM_CATEGORY ) );    gtk_signal_connect_object ( GTK_OBJECT ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_CATEGORY] ) -> entry ),				"focus-in-event",				GTK_SIGNAL_FUNC ( entree_prend_focus ),				widget_formulaire_echeancier[SCHEDULER_FORM_CATEGORY] );    gtk_signal_connect ( GTK_OBJECT ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_CATEGORY] ) -> entry ),			 "focus-out-event",			 GTK_SIGNAL_FUNC ( entree_perd_focus_echeancier ),			 GINT_TO_POINTER ( SCHEDULER_FORM_CATEGORY ) );    gtk_table_attach ( GTK_TABLE ( table ),		       widget_formulaire_echeancier[SCHEDULER_FORM_CATEGORY],		       2, 3,		       1, 2,		       GTK_SHRINK | GTK_FILL | GTK_EXPAND,		       GTK_SHRINK | GTK_FILL,		       0, 0);    gtk_widget_show ( widget_formulaire_echeancier[SCHEDULER_FORM_CATEGORY] );    /* Création de l'entrée du chèque, non affichée pour le moment       à créer avant l'option menu du type d'opé */    widget_formulaire_echeancier[SCHEDULER_FORM_CHEQUE] = gtk_entry_new();    gtk_signal_connect ( GTK_OBJECT ( widget_formulaire_echeancier[SCHEDULER_FORM_CHEQUE] ),			 "key-press-event",			 GTK_SIGNAL_FUNC ( pression_touche_formulaire_echeancier ),			 GINT_TO_POINTER( SCHEDULER_FORM_CHEQUE ) );    gtk_signal_connect ( GTK_OBJECT ( widget_formulaire_echeancier[SCHEDULER_FORM_CHEQUE] ),			 "button-press-event",			 GTK_SIGNAL_FUNC ( clique_champ_formulaire_echeancier ),			 GINT_TO_POINTER ( SCHEDULER_FORM_CHEQUE ) );    gtk_signal_connect ( GTK_OBJECT ( widget_formulaire_echeancier[SCHEDULER_FORM_CHEQUE] ),			 "focus-in-event",			 GTK_SIGNAL_FUNC ( entree_prend_focus ),			 NULL );    gtk_signal_connect ( GTK_OBJECT ( widget_formulaire_echeancier[SCHEDULER_FORM_CHEQUE] ),			 "focus-out-event",			 GTK_SIGNAL_FUNC ( entree_perd_focus_echeancier ),			 GINT_TO_POINTER ( SCHEDULER_FORM_CHEQUE ) );    gtk_table_attach ( GTK_TABLE ( table ),		       widget_formulaire_echeancier[SCHEDULER_FORM_CHEQUE],		       5, 7,		       1, 2,		       GTK_SHRINK | GTK_FILL | GTK_EXPAND,		       GTK_SHRINK | GTK_FILL,		       0, 0);    gtk_widget_show ( widget_formulaire_echeancier[SCHEDULER_FORM_CHEQUE] );    /*  Affiche l'option menu des types */    widget_formulaire_echeancier[SCHEDULER_FORM_TYPE] = gtk_option_menu_new ();    gtk_tooltips_set_tip ( GTK_TOOLTIPS ( tips ),			   widget_formulaire_echeancier[SCHEDULER_FORM_TYPE],			   _("Choose the method of payment"),			   _("Choose the method of payment") );    gtk_signal_connect ( GTK_OBJECT ( widget_formulaire_echeancier[SCHEDULER_FORM_TYPE] ),			 "key-press-event",			 GTK_SIGNAL_FUNC ( pression_touche_formulaire_echeancier ),			 GINT_TO_POINTER ( SCHEDULER_FORM_TYPE ) );    gtk_table_attach ( GTK_TABLE (table),		       widget_formulaire_echeancier[SCHEDULER_FORM_TYPE],		       3, 5,		       1, 2,		       GTK_SHRINK | GTK_FILL | GTK_EXPAND,		       GTK_SHRINK | GTK_FILL,		       0, 0);    /* le menu par défaut est celui des débits */    no_compte = recupere_no_compte ( widget_formulaire_echeancier[SCHEDULER_FORM_ACCOUNT] );    if ( ( menu = creation_menu_types ( 1,					no_compte,					1 )))    {	gtk_option_menu_set_menu ( GTK_OPTION_MENU ( widget_formulaire_echeancier[SCHEDULER_FORM_TYPE] ),				   menu );	gtk_option_menu_set_history ( GTK_OPTION_MENU ( widget_formulaire_echeancier[SCHEDULER_FORM_TYPE] ),				      cherche_no_menu_type_echeancier ( gsb_account_get_default_debit (no_compte) ) );	gtk_widget_show ( widget_formulaire_echeancier[SCHEDULER_FORM_TYPE] );    }    /* met l'option menu de l'exercice */    widget_formulaire_echeancier[SCHEDULER_FORM_EXERCICE] = gtk_option_menu_new ();    gtk_tooltips_set_tip ( GTK_TOOLTIPS ( tips ),			   widget_formulaire_echeancier[SCHEDULER_FORM_EXERCICE],			   _("Choose the financial year"),			   _("Choose the financial year") );    menu = gtk_menu_new ();    gtk_option_menu_set_menu ( GTK_OPTION_MENU ( widget_formulaire_echeancier[SCHEDULER_FORM_EXERCICE] ),			       creation_menu_exercices (1) );    gtk_signal_connect ( GTK_OBJECT ( widget_formulaire_echeancier[SCHEDULER_FORM_EXERCICE] ),			 "key-press-event",			 GTK_SIGNAL_FUNC ( pression_touche_formulaire_echeancier ),			 GINT_TO_POINTER( SCHEDULER_FORM_EXERCICE ) );    gtk_table_attach ( GTK_TABLE ( table ),		       widget_formulaire_echeancier[SCHEDULER_FORM_EXERCICE],		       0, 2,		       2, 3,		       GTK_SHRINK | GTK_FILL | GTK_EXPAND,		       GTK_SHRINK | GTK_FILL,		       0, 0);    gtk_widget_show ( widget_formulaire_echeancier[SCHEDULER_FORM_EXERCICE] );    /*  Affiche l'imputation budgétaire */    widget_formulaire_echeancier[SCHEDULER_FORM_BUDGETARY] = gtk_combofix_new_complex ( liste_imputations_combofix,											FALSE,											TRUE,											TRUE ,											0);    gtk_table_attach ( GTK_TABLE ( table ),		       widget_formulaire_echeancier[SCHEDULER_FORM_BUDGETARY],		       2, 3,		       2, 3,		       GTK_SHRINK | GTK_FILL | GTK_EXPAND,		       GTK_SHRINK | GTK_FILL,		       0, 0);    gtk_signal_connect ( GTK_OBJECT ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_BUDGETARY] ) -> entry),			 "key-press-event",			 GTK_SIGNAL_FUNC ( pression_touche_formulaire_echeancier ),			 GINT_TO_POINTER( SCHEDULER_FORM_BUDGETARY ) );    gtk_signal_connect ( GTK_OBJECT ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_BUDGETARY] ) -> entry ),			 "button-press-event",			 GTK_SIGNAL_FUNC ( clique_champ_formulaire_echeancier ),			 GINT_TO_POINTER ( SCHEDULER_FORM_BUDGETARY ) );    gtk_signal_connect ( GTK_OBJECT ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_BUDGETARY] ) -> arrow ),			 "button-press-event",			 GTK_SIGNAL_FUNC ( clique_champ_formulaire_echeancier ),			 GINT_TO_POINTER ( SCHEDULER_FORM_BUDGETARY ) );    gtk_signal_connect_object ( GTK_OBJECT ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_BUDGETARY] ) -> entry ),				"focus-in-event",				GTK_SIGNAL_FUNC ( entree_prend_focus ),				widget_formulaire_echeancier[SCHEDULER_FORM_BUDGETARY] );    gtk_signal_connect ( GTK_OBJECT ( GTK_COMBOFIX ( widget_formulaire_echeancier[SCHEDULER_FORM_BUDGETARY] ) -> entry ),			 "focus-out-event",			 GTK_SIGNAL_FUNC ( entree_perd_focus_echeancier ),			 GINT_TO_POINTER ( SCHEDULER_FORM_BUDGETARY ) );    gtk_widget_show ( widget_formulaire_echeancier[SCHEDULER_FORM_BUDGETARY] );    /* bouton ventilation, pour accéder à la fenetre de ventil de l'échéance */    widget_formulaire_echeancier[SCHEDULER_FORM_BREAKDOWN] = gtk_button_new_with_label ( _("Breakdown"));    gtk_button_set_relief ( GTK_BUTTON ( widget_formulaire_echeancier[SCHEDULER_FORM_BREAKDOWN] ),			    GTK_RELIEF_NONE );    gtk_table_attach ( GTK_TABLE ( table ),		       widget_formulaire_echeancier[SCHEDULER_FORM_BREAKDOWN],		       3, 5, 2, 3,		       GTK_SHRINK | GTK_FILL,		       GTK_SHRINK | GTK_FILL,		       0, 0);    gtk_signal_connect ( GTK_OBJECT ( widget_formulaire_echeancier[SCHEDULER_FORM_BREAKDOWN] ),			 "clicked",			 GTK_SIGNAL_FUNC ( basculer_vers_ventilation_echeances ),			 NULL );    gtk_signal_connect ( GTK_OBJECT ( widget_formulaire_echeancier[SCHEDULER_FORM_BREAKDOWN]),			 "key-press-event",			 GTK_SIGNAL_FUNC ( pression_touche_formulaire_echeancier ),			 GINT_TO_POINTER ( SCHEDULER_FORM_BREAKDOWN ) );    /* création de l'entrée du no de pièce comptable       à ne pas mettre, mais on réserve encore le widget n°       ne pas l'effacer pour respecter les tabulations */    widget_formulaire_echeancier[SCHEDULER_FORM_VOUCHER] = gtk_entry_new();    /*       gtk_table_attach ( GTK_TABLE ( table ),       widget_formulaire_echeancier[SCHEDULER_FORM_VOUCHER],       5, 7, 2, 3,       GTK_SHRINK | GTK_FILL | GTK_EXPAND,       GTK_SHRINK | GTK_FILL,       0, 0);       gtk_signal_connect ( GTK_OBJECT ( widget_formulaire_echeancier[SCHEDULER_FORM_VOUCHER] ),       "button-press-event",       GTK_SIGNAL_FUNC ( clique_champ_formulaire_echeancier ),       GINT_TO_POINTER ( SCHEDULER_FORM_VOUCHER ) );       gtk_signal_connect ( GTK_OBJECT ( widget_formulaire_echeancier[SCHEDULER_FORM_VOUCHER]),       "key-press-event",       GTK_SIGNAL_FUNC ( pression_touche_formulaire_echeancier ),       GINT_TO_POINTER ( SCHEDULER_FORM_VOUCHER ) );       gtk_signal_connect ( GTK_OBJECT ( widget_formulaire_echeancier[SCHEDULER_FORM_VOUCHER]),       "focus-in-event",       GTK_SIGNAL_FUNC ( entree_prend_focus ),       NULL );       gtk_signal_connect_after ( GTK_OBJECT ( widget_formulaire_echeancier[SCHEDULER_FORM_VOUCHER]),       "focus-out-event",       GTK_SIGNAL_FUNC ( entree_perd_focus_echeancier ),       GINT_TO_POINTER ( SCHEDULER_FORM_VOUCHER ) );       if ( etat.utilise_piece_comptable )       gtk_widget_show ( widget_formulaire_echeancier[SCHEDULER_FORM_VOUCHER] );       */    /* Mise en place du menu automatique/manuel */    widget_formulaire_echeancier[SCHEDULER_FORM_MODE] = gtk_option_menu_new ();    gtk_tooltips_set_tip ( GTK_TOOLTIPS ( tips ),			   widget_formulaire_echeancier[SCHEDULER_FORM_MODE],			   _("Automatic/manual scheduled transaction"),			   _("Automatic/manual scheduled transaction") );    gtk_signal_connect ( GTK_OBJECT ( widget_formulaire_echeancier[SCHEDULER_FORM_MODE] ),			 "key-press-event",			 GTK_SIGNAL_FUNC ( pression_touche_formulaire_echeancier ),			 GINT_TO_POINTER ( SCHEDULER_FORM_MODE ) );    menu = gtk_menu_new ();    item = gtk_menu_item_new_with_label ( _("Manual"));    gtk_object_set_data ( GTK_OBJECT ( item ),			  "auto_man",			  GINT_TO_POINTER ( 0 ));    gtk_menu_append ( GTK_MENU ( menu ),		      item );    gtk_widget_show ( item );    item = gtk_menu_item_new_with_label ( _("Automatic"));    gtk_object_set_data ( GTK_OBJECT ( item ),			  "auto_man",			  GINT_TO_POINTER ( 1 ));    gtk_menu_append ( GTK_MENU ( menu ),		      item );    gtk_widget_show ( item );    gtk_option_menu_set_menu ( GTK_OPTION_MENU ( widget_formulaire_echeancier[SCHEDULER_FORM_MODE] ),			       menu );    gtk_option_menu_set_history ( GTK_OPTION_MENU ( widget_formulaire_echeancier[SCHEDULER_FORM_MODE] ),				  0);    gtk_table_attach ( GTK_TABLE ( table ),		       widget_formulaire_echeancier[SCHEDULER_FORM_MODE],		       0, 2,		       3, 4,		       GTK_SHRINK | GTK_FILL | GTK_EXPAND,		       GTK_SHRINK | GTK_FILL,		       0, 0);    gtk_widget_show ( widget_formulaire_echeancier[SCHEDULER_FORM_MODE] );    /*  Affiche les notes */    widget_formulaire_echeancier[SCHEDULER_FORM_NOTES] = gtk_entry_new ();    gtk_signal_connect ( GTK_OBJECT ( widget_formulaire_echeancier[SCHEDULER_FORM_NOTES] ),			 "key-press-event",			 GTK_SIGNAL_FUNC ( pression_touche_formulaire_echeancier ),			 GINT_TO_POINTER ( SCHEDULER_FORM_NOTES ) );    gtk_signal_connect ( GTK_OBJECT ( widget_formulaire_echeancier[SCHEDULER_FORM_NOTES] ),			 "button-press-event",			 GTK_SIGNAL_FUNC ( clique_champ_formulaire_echeancier ),			 GINT_TO_POINTER ( SCHEDULER_FORM_NOTES ) );    gtk_signal_connect ( GTK_OBJECT ( widget_formulaire_echeancier[SCHEDULER_FORM_NOTES] ),			 "focus-in-event",			 GTK_SIGNAL_FUNC ( entree_prend_focus ),			 NULL );    gtk_signal_connect_after ( GTK_OBJECT ( widget_formulaire_echeancier[SCHEDULER_FORM_NOTES] ),			       "focus-out-event",			       GTK_SIGNAL_FUNC ( entree_perd_focus_echeancier ),			       GINT_TO_POINTER ( SCHEDULER_FORM_NOTES ) );    gtk_table_attach ( GTK_TABLE ( table ),		       widget_formulaire_echeancier[SCHEDULER_FORM_NOTES],		       2, 3,		       3, 4,		       GTK_SHRINK | GTK_FILL | GTK_EXPAND,		       GTK_SHRINK | GTK_FILL,		       0, 0);    gtk_widget_show ( widget_formulaire_echeancier[SCHEDULER_FORM_NOTES] );    /* Mise en place du menu de la fréquence */    widget_formulaire_echeancier[SCHEDULER_FORM_FREQUENCY] = gtk_option_menu_new ();    gtk_tooltips_set_tip ( GTK_TOOLTIPS ( tips ),			   widget_formulaire_echeancier[SCHEDULER_FORM_FREQUENCY],			   _("Frequency"),			   _("Frequency") );    gtk_signal_connect ( GTK_OBJECT ( widget_formulaire_echeancier[SCHEDULER_FORM_FREQUENCY] ),			 "key-press-event",			 GTK_SIGNAL_FUNC ( pression_touche_formulaire_echeancier ),			 GINT_TO_POINTER ( SCHEDULER_FORM_FREQUENCY ) );    menu = gtk_menu_new ();    item = gtk_menu_item_new_with_label ( _("Once"));    gtk_object_set_data ( GTK_OBJECT  ( item ),			  "periodicite",			  GINT_TO_POINTER ( 0 ));    gtk_menu_append ( GTK_MENU ( menu ),		      item );    gtk_signal_connect ( GTK_OBJECT  ( item ),			 "activate",			 GTK_SIGNAL_FUNC ( cache_date_limite_echeancier ),			 NULL );    gtk_signal_connect ( GTK_OBJECT  ( item ),			 "activate",			 GTK_SIGNAL_FUNC ( cache_personnalisation_echeancier ),			 NULL );    gtk_widget_show ( item );    item = gtk_menu_item_new_with_label ( _("Weekly"));    gtk_object_set_data ( GTK_OBJECT  ( item ),			  "periodicite",			  GINT_TO_POINTER ( 1 ));    gtk_menu_append ( GTK_MENU ( menu ),		      item );    gtk_signal_connect ( GTK_OBJECT  ( item ),			 "activate",			 GTK_SIGNAL_FUNC ( affiche_date_limite_echeancier ),			 NULL );    gtk_signal_connect ( GTK_OBJECT  ( item ),			 "activate",			 GTK_SIGNAL_FUNC ( cache_personnalisation_echeancier ),			 NULL );    gtk_widget_show ( item );    item = gtk_menu_item_new_with_label ( _("Monthly"));    gtk_object_set_data ( GTK_OBJECT  ( item ),			  "periodicite",			  GINT_TO_POINTER ( 2 ));    gtk_menu_append ( GTK_MENU ( menu ),		      item );    gtk_signal_connect ( GTK_OBJECT  ( item ),			 "activate",			 GTK_SIGNAL_FUNC ( affiche_date_limite_echeancier ),			 NULL );    gtk_signal_connect ( GTK_OBJECT  ( item ),			 "activate",			 GTK_SIGNAL_FUNC ( cache_personnalisation_echeancier ),			 NULL );    gtk_widget_show ( item );    item = gtk_menu_item_new_with_label ( _("Yearly"));    gtk_object_set_data ( GTK_OBJECT  ( item ),			  "periodicite",			  GINT_TO_POINTER ( 3 ));    gtk_menu_append ( GTK_MENU ( menu ),		      item );    gtk_signal_connect ( GTK_OBJECT  ( item ),			 "activate",			 GTK_SIGNAL_FUNC ( affiche_date_limite_echeancier ),			 NULL );    gtk_signal_connect ( GTK_OBJECT  ( item ),			 "activate",			 GTK_SIGNAL_FUNC ( cache_personnalisation_echeancier ),			 NULL );    gtk_widget_show ( item );    item = gtk_menu_item_new_with_label ( _("Custom"));    gtk_object_set_data ( GTK_OBJECT  ( item ),			  "periodicite",			  GINT_TO_POINTER ( 4 ));    gtk_menu_append ( GTK_MENU ( menu ),		      item );    gtk_signal_connect ( GTK_OBJECT  ( item ),			 "activate",			 GTK_SIGNAL_FUNC ( affiche_date_limite_echeancier ),			 NULL );    gtk_signal_connect ( GTK_OBJECT  ( item ),			 "activate",			 GTK_SIGNAL_FUNC ( affiche_personnalisation_echeancier ),			 NULL );    gtk_widget_show ( item );    gtk_option_menu_set_menu ( GTK_OPTION_MENU ( widget_formulaire_echeancier[SCHEDULER_FORM_FREQUENCY] ),			       menu );    gtk_option_menu_set_history ( GTK_OPTION_MENU ( widget_formulaire_echeancier[SCHEDULER_FORM_FREQUENCY] ),				  0);    gtk_table_attach ( GTK_TABLE ( table ),		       widget_formulaire_echeancier[SCHEDULER_FORM_FREQUENCY],		       3, 4,		       3, 4,		       GTK_SHRINK | GTK_FILL | GTK_EXPAND,		       GTK_SHRINK | GTK_FILL,		       0, 0);    gtk_widget_show ( widget_formulaire_echeancier[SCHEDULER_FORM_FREQUENCY] );    /* entrée de la date limite, non affichée au départ */    widget_formulaire_echeancier[SCHEDULER_FORM_FINAL_DATE] = gtk_entry_new_with_max_length (11);    gtk_signal_connect ( GTK_OBJECT ( widget_formulaire_echeancier[SCHEDULER_FORM_FINAL_DATE] ),			 "key-press-event",			 GTK_SIGNAL_FUNC ( pression_touche_formulaire_echeancier ),			 GINT_TO_POINTER ( SCHEDULER_FORM_FINAL_DATE ) );    gtk_signal_connect ( GTK_OBJECT ( widget_formulaire_echeancier[SCHEDULER_FORM_FINAL_DATE] ),			 "button-press-event",			 GTK_SIGNAL_FUNC ( clique_champ_formulaire_echeancier ),			 GINT_TO_POINTER ( SCHEDULER_FORM_FINAL_DATE ) );    gtk_signal_connect ( GTK_OBJECT (widget_formulaire_echeancier[SCHEDULER_FORM_FINAL_DATE]),			 "focus-in-event",			 GTK_SIGNAL_FUNC ( entree_prend_focus ),			 NULL );    gtk_signal_connect_after ( GTK_OBJECT (widget_formulaire_echeancier[SCHEDULER_FORM_FINAL_DATE]),			       "focus-out-event",			       GTK_SIGNAL_FUNC ( entree_perd_focus_echeancier ),			       GINT_TO_POINTER ( SCHEDULER_FORM_FINAL_DATE ) );    gtk_table_attach ( GTK_TABLE ( table ),		       widget_formulaire_echeancier[SCHEDULER_FORM_FINAL_DATE],		       4, 5,		       3, 4,		       GTK_SHRINK | GTK_FILL | GTK_EXPAND,		       GTK_SHRINK | GTK_FILL,		       0, 0);    gtk_widget_show ( widget_formulaire_echeancier[SCHEDULER_FORM_FINAL_DATE] );    /* et la gtk entry quand la fréquence est personnalisée, non affiché au départ */    widget_formulaire_echeancier[SCHEDULER_FORM_FREQ_CUSTOM_NB] = gtk_entry_new ();    gtk_tooltips_set_tip ( GTK_TOOLTIPS ( tips ),			   widget_formulaire_echeancier[SCHEDULER_FORM_FREQ_CUSTOM_NB],			   _("Custom frequency"),			   _("Custom frequency") );    gtk_signal_connect ( GTK_OBJECT ( widget_formulaire_echeancier[SCHEDULER_FORM_FREQ_CUSTOM_NB] ),			 "key-press-event",			 GTK_SIGNAL_FUNC ( pression_touche_formulaire_echeancier ),			 GINT_TO_POINTER ( SCHEDULER_FORM_FREQ_CUSTOM_NB ) );    gtk_table_attach ( GTK_TABLE ( table ),		       widget_formulaire_echeancier[SCHEDULER_FORM_FREQ_CUSTOM_NB],		       5, 6,		       3, 4,		       GTK_SHRINK | GTK_FILL | GTK_EXPAND,		       GTK_SHRINK | GTK_FILL,		       0, 0);    gtk_widget_show ( widget_formulaire_echeancier[SCHEDULER_FORM_FREQ_CUSTOM_NB] );    /* le menu jour / mois / année */    widget_formulaire_echeancier[SCHEDULER_FORM_FREQ_CUSTOM_MENU] = gtk_option_menu_new ();    gtk_tooltips_set_tip ( GTK_TOOLTIPS ( tips ),			   widget_formulaire_echeancier[SCHEDULER_FORM_FREQ_CUSTOM_MENU],			   _("Custom frequency"),			   _("Custom frequency") );    gtk_signal_connect ( GTK_OBJECT ( widget_formulaire_echeancier[SCHEDULER_FORM_FREQ_CUSTOM_MENU] ),			 "key-press-event",			 GTK_SIGNAL_FUNC ( pression_touche_formulaire_echeancier ),			 GINT_TO_POINTER ( SCHEDULER_FORM_FREQ_CUSTOM_MENU ) );    menu = gtk_menu_new ();    item = gtk_menu_item_new_with_label ( _("Days") );    gtk_object_set_data ( GTK_OBJECT ( item ),			  "intervalle_perso",			  GINT_TO_POINTER ( 0 ));    gtk_menu_append ( GTK_MENU ( menu ),		      item );    gtk_widget_show ( item );    item = gtk_menu_item_new_with_label ( _("Months") );    gtk_object_set_data ( GTK_OBJECT ( item ),			  "intervalle_perso",			  GINT_TO_POINTER ( 1 ));    gtk_menu_append ( GTK_MENU ( menu ),		      item );    gtk_widget_show ( item );    item = gtk_menu_item_new_with_label ( _("Years") );    gtk_object_set_data ( GTK_OBJECT ( item ),			  "intervalle_perso",			  GINT_TO_POINTER ( 2 ));    gtk_menu_append ( GTK_MENU ( menu ),		      item );    gtk_widget_show ( item );    gtk_option_menu_set_menu ( GTK_OPTION_MENU ( widget_formulaire_echeancier[SCHEDULER_FORM_FREQ_CUSTOM_MENU] ),			       menu );    gtk_table_attach ( GTK_TABLE ( table ),		       widget_formulaire_echeancier[SCHEDULER_FORM_FREQ_CUSTOM_MENU],		       6, 7,		       3, 4,		       GTK_SHRINK | GTK_FILL | GTK_EXPAND,		       GTK_SHRINK | GTK_FILL,		       0, 0);    gtk_widget_show ( widget_formulaire_echeancier[SCHEDULER_FORM_FREQ_CUSTOM_MENU] );    /* séparation d'avec les boutons */    separateur_formulaire_echeancier = gtk_hseparator_new ();    gtk_box_pack_start ( GTK_BOX ( formulaire_echeancier ),			 separateur_formulaire_echeancier,			 FALSE,			 FALSE,			 0 );    if ( etat.affiche_boutons_valider_annuler )	gtk_widget_show ( separateur_formulaire_echeancier );    /* mise en place des boutons */    hbox_valider_annuler_echeance = gtk_hbox_new ( FALSE,						   5 );    gtk_box_pack_start ( GTK_BOX ( formulaire_echeancier ),			 hbox_valider_annuler_echeance,			 FALSE,			 FALSE,			 0 );    if ( etat.affiche_boutons_valider_annuler )	gtk_widget_show ( hbox_valider_annuler_echeance );    bouton = gtk_button_new_from_stock ( GTK_STOCK_OK );    gtk_button_set_relief ( GTK_BUTTON ( bouton ), GTK_RELIEF_NONE );    gtk_signal_connect ( GTK_OBJECT ( bouton ),			 "clicked",			 GTK_SIGNAL_FUNC ( fin_edition_echeance ),			 NULL );    gtk_box_pack_end ( GTK_BOX ( hbox_valider_annuler_echeance ),		       bouton,		       FALSE,		       FALSE,		       0 );    gtk_widget_show ( bouton );    bouton = gtk_button_new_from_stock (GTK_STOCK_CANCEL);    gtk_button_set_relief ( GTK_BUTTON ( bouton ), GTK_RELIEF_NONE );    gtk_signal_connect ( GTK_OBJECT ( bouton ),			 "clicked",			 GTK_SIGNAL_FUNC ( echap_formulaire_echeancier ),			 NULL );    gtk_box_pack_end ( GTK_BOX ( hbox_valider_annuler_echeance ),		       bouton,		       FALSE,		       FALSE,		       0 );    gtk_widget_show ( bouton );    /* on associe au formulaire l'adr de l'échéance courante */    gtk_object_set_data ( GTK_OBJECT ( formulaire_echeancier ),			  "adr_echeance",			  NULL );    formulaire_echeancier_a_zero ();    return ( formulaire_echeancier);}