rem: gtk_container_set_border_width ( GTK_CONTAINER ( scroll_window ), 10 );
context: GtkWidget *onglet_imputations ( void ){  GtkWidget *onglet;  GtkWidget *scroll_window;  gchar *titres[] =  {    _("Liste des imputations budgtaires"),    _("Montant par IB"),    _("Montant par sous-IB"),    _("Montant par compte")  };  GtkWidget *vbox;  GtkWidget *frame;  GtkWidget *vbox_frame;  GtkWidget *hbox;  GtkWidget *label;  GtkWidget *separateur;  GtkWidget *bouton;/* cration de la fentre qui sera renvoye */  onglet = gtk_hbox_new ( FALSE,			  5 );  gtk_container_set_border_width ( GTK_CONTAINER ( onglet ),				   10 );  gtk_widget_show ( onglet );  /* mise en place de la partie de gauche *//*   cration de la frame de gauche */  frame = gtk_frame_new ( NULL );  gtk_frame_set_shadow_type ( GTK_FRAME ( frame ),			       GTK_SHADOW_IN );  gtk_box_pack_start ( GTK_BOX ( onglet ),		       frame,		       FALSE,		       FALSE,		       0 );  gtk_widget_show (frame );  vbox = gtk_vbox_new ( FALSE,			5 );  gtk_container_set_border_width ( GTK_CONTAINER ( vbox ),				   15 );  gtk_container_add ( GTK_CONTAINER ( frame ),		      vbox );  gtk_widget_show ( vbox );  frame = gtk_frame_new ( _(" Informations : ") );  gtk_box_pack_start ( GTK_BOX ( vbox ),		       frame,		       FALSE,		       FALSE,		       0 );  gtk_widget_show ( frame );  vbox_frame = gtk_vbox_new ( FALSE,			      5 );  gtk_container_set_border_width ( GTK_CONTAINER ( vbox_frame ),				   5 );  gtk_container_add ( GTK_CONTAINER ( frame ),		      vbox_frame );  gtk_widget_show ( vbox_frame );  entree_nom_imputation = gtk_entry_new ();  gtk_widget_set_sensitive ( entree_nom_imputation,			     FALSE );  gtk_signal_connect ( GTK_OBJECT ( entree_nom_imputation ),		       "changed",		       GTK_SIGNAL_FUNC ( modification_du_texte_imputation),		       NULL );  gtk_box_pack_start ( GTK_BOX ( vbox_frame ),		       entree_nom_imputation,		       FALSE,		       FALSE,		       10 );  gtk_widget_show ( entree_nom_imputation );/* cration des radio bouton dbit/crdit */  separateur = gtk_hseparator_new ();  gtk_box_pack_start ( GTK_BOX ( vbox_frame ),		       separateur,		       FALSE,		       FALSE,		       0 );  gtk_widget_show ( separateur );  label = gtk_label_new ( _("Classement :") );  gtk_box_pack_start ( GTK_BOX ( vbox_frame ),		       label,		       FALSE,		       FALSE,		       10 );  gtk_widget_show ( label );  bouton_imputation_debit = gtk_radio_button_new_with_label ( NULL,							 _("Dbit") );  gtk_widget_set_sensitive ( bouton_imputation_debit,			     FALSE );  gtk_signal_connect ( GTK_OBJECT ( bouton_imputation_debit ),		       "toggled",		       GTK_SIGNAL_FUNC ( modification_du_texte_imputation),		       NULL );  gtk_box_pack_start ( GTK_BOX ( vbox_frame ),		       bouton_imputation_debit,		       FALSE,		       FALSE,		       0 );  gtk_widget_show ( bouton_imputation_debit );  bouton_imputation_credit = gtk_radio_button_new_with_label_from_widget ( GTK_RADIO_BUTTON ( bouton_imputation_debit ),								      _("Crdit") );  gtk_widget_set_sensitive ( bouton_imputation_credit,			     FALSE );  gtk_box_pack_start ( GTK_BOX ( vbox_frame ),		       bouton_imputation_credit,		       FALSE,		       FALSE,		       0 );  gtk_widget_show ( bouton_imputation_credit );  separateur = gtk_hseparator_new ();  gtk_box_pack_start ( GTK_BOX ( vbox_frame ),		       separateur,		       FALSE,		       FALSE,		       10 );  gtk_widget_show ( separateur );/*   cration des boutons modifier et annuler */  hbox = gtk_hbox_new ( TRUE,			5 );  gtk_box_pack_start ( GTK_BOX ( vbox_frame ),		       hbox,		       FALSE,		       FALSE,		       0 );  gtk_widget_show ( hbox );  bouton_modif_imputation_modifier = gnome_stock_button ( GNOME_STOCK_BUTTON_APPLY );  gtk_button_set_relief ( GTK_BUTTON ( bouton_modif_imputation_modifier ),			  GTK_RELIEF_NONE );  gtk_widget_set_sensitive ( bouton_modif_imputation_modifier,			     FALSE );  gtk_signal_connect ( GTK_OBJECT ( bouton_modif_imputation_modifier ),		       "clicked",		       GTK_SIGNAL_FUNC ( clique_sur_modifier_imputation ),		       NULL );  gtk_box_pack_start ( GTK_BOX ( hbox ),		       bouton_modif_imputation_modifier,		       FALSE,		       FALSE,		       0 );  gtk_widget_show ( bouton_modif_imputation_modifier );  bouton_modif_imputation_annuler = gnome_stock_button ( GNOME_STOCK_BUTTON_CANCEL );  gtk_button_set_relief ( GTK_BUTTON ( bouton_modif_imputation_annuler ),			  GTK_RELIEF_NONE );  gtk_signal_connect ( GTK_OBJECT ( bouton_modif_imputation_annuler ),		       "clicked",		       GTK_SIGNAL_FUNC ( clique_sur_annuler_imputation ),		       NULL );  gtk_widget_set_sensitive ( bouton_modif_imputation_annuler,			     FALSE );  gtk_box_pack_start ( GTK_BOX ( hbox ),		       bouton_modif_imputation_annuler,		       FALSE,		       FALSE,		       0 );  gtk_widget_show ( bouton_modif_imputation_annuler);  bouton_supprimer_imputation = gnome_stock_button ( GNOME_STOCK_PIXMAP_REMOVE );  gtk_button_set_relief ( GTK_BUTTON ( bouton_supprimer_imputation ),			  GTK_RELIEF_NONE );  gtk_widget_set_sensitive ( bouton_supprimer_imputation,			     FALSE );  gtk_signal_connect ( GTK_OBJECT ( bouton_supprimer_imputation ),		       "clicked",		       GTK_SIGNAL_FUNC ( supprimer_imputation ),		       NULL );  gtk_box_pack_start ( GTK_BOX ( vbox_frame ),		       bouton_supprimer_imputation,		       FALSE,		       FALSE,		       0 );  gtk_widget_show ( bouton_supprimer_imputation );  /* mise en place des boutons ajout d'1 imput / sous-imput */  bouton_ajouter_imputation = gtk_button_new_with_label ( _("Ajouter une imputation") );  gtk_button_set_relief ( GTK_BUTTON ( bouton_ajouter_imputation ),			  GTK_RELIEF_NONE );  gtk_signal_connect ( GTK_OBJECT ( bouton_ajouter_imputation ),		       "clicked",		       GTK_SIGNAL_FUNC ( appui_sur_ajout_imputation ),		       NULL );  gtk_box_pack_start ( GTK_BOX ( vbox ),		       bouton_ajouter_imputation,		       FALSE,		       FALSE,		       0 );  gtk_widget_show ( bouton_ajouter_imputation );  bouton_ajouter_sous_imputation = gtk_button_new_with_label ( _("Ajouter une sous-imputation") );  gtk_button_set_relief ( GTK_BUTTON ( bouton_ajouter_sous_imputation ),			  GTK_RELIEF_NONE );  gtk_widget_set_sensitive ( bouton_ajouter_sous_imputation,			     FALSE );  gtk_signal_connect ( GTK_OBJECT ( bouton_ajouter_sous_imputation ),		       "clicked",		       GTK_SIGNAL_FUNC ( appui_sur_ajout_sous_imputation ),		       NULL );  gtk_box_pack_start ( GTK_BOX ( vbox ),		       bouton_ajouter_sous_imputation,		       FALSE,		       FALSE,		       0 );  gtk_widget_show ( bouton_ajouter_sous_imputation );  /* sparation */  separateur = gtk_hseparator_new ();  gtk_box_pack_start ( GTK_BOX ( vbox ),		       separateur,		       FALSE,		       FALSE,		       5 );  gtk_widget_show ( separateur );  /* mise en place du bouton fusionner avec les catgories */  bouton = gtk_button_new_with_label ( _("Fusionner les catgories") );  gtk_button_set_relief ( GTK_BUTTON ( bouton ),			  GTK_RELIEF_NONE );  gtk_signal_connect ( GTK_OBJECT ( bouton ),		       "clicked",		       GTK_SIGNAL_FUNC ( fusion_categories_imputation ),		       NULL );  gtk_box_pack_start ( GTK_BOX ( vbox ),		       bouton,		       FALSE,		       FALSE,		       0 );  gtk_widget_show ( bouton );  /* sparation */  separateur = gtk_hseparator_new ();  gtk_box_pack_start ( GTK_BOX ( vbox ),		       separateur,		       FALSE,		       FALSE,		       5 );  gtk_widget_show ( separateur );  /* mise en place du bouton exporter */  bouton = gtk_button_new_with_label ( _("Exporter ...") );  gtk_button_set_relief ( GTK_BUTTON ( bouton ),			  GTK_RELIEF_NONE );  gtk_signal_connect ( GTK_OBJECT ( bouton ),		       "clicked",		       GTK_SIGNAL_FUNC ( exporter_ib ),		       NULL );  gtk_box_pack_start ( GTK_BOX ( vbox ),		       bouton,		       FALSE,		       FALSE,		       0 );  gtk_widget_show ( bouton );  /* mise en place du bouton importer */  bouton = gtk_button_new_with_label ( _("Importer ...") );  gtk_button_set_relief ( GTK_BUTTON ( bouton ),			  GTK_RELIEF_NONE );  gtk_signal_connect ( GTK_OBJECT ( bouton ),		       "clicked",		       GTK_SIGNAL_FUNC ( importer_ib ),		       NULL );  gtk_box_pack_start ( GTK_BOX ( vbox ),		       bouton,		       FALSE,		       FALSE,		       0 );  gtk_widget_show ( bouton );/*   cration de la frame de droite */  frame = gtk_frame_new ( NULL );  gtk_frame_set_shadow_type ( GTK_FRAME ( frame ),			       GTK_SHADOW_IN );  gtk_box_pack_start ( GTK_BOX ( onglet ),		       frame,		       TRUE,		       TRUE,		       5 );  gtk_widget_show (frame );/* cration de l'arbre principal */  scroll_window = gtk_scrolled_window_new ( NULL,				     NULL );  gtk_container_set_border_width ( GTK_CONTAINER ( scroll_window ),				   10 );  gtk_scrolled_window_set_policy ( GTK_SCROLLED_WINDOW ( scroll_window ),				   GTK_POLICY_AUTOMATIC,				   GTK_POLICY_AUTOMATIC );  gtk_container_add ( GTK_CONTAINER ( frame ),		      scroll_window );  gtk_widget_show ( scroll_window );  arbre_imputation = gtk_ctree_new_with_titles ( 4,						 0,						 titres );  gtk_ctree_set_line_style ( GTK_CTREE ( arbre_imputation ),			     GTK_CTREE_LINES_DOTTED );  gtk_ctree_set_expander_style ( GTK_CTREE ( arbre_imputation ),				 GTK_CTREE_EXPANDER_CIRCULAR );  gtk_clist_column_titles_passive ( GTK_CLIST ( arbre_imputation ));  gtk_clist_set_column_justification ( GTK_CLIST ( arbre_imputation ),				       0,				       GTK_JUSTIFY_LEFT);  gtk_clist_set_column_justification ( GTK_CLIST ( arbre_imputation ),				       1,				       GTK_JUSTIFY_CENTER);  gtk_clist_set_column_justification ( GTK_CLIST ( arbre_imputation ),				       2,				       GTK_JUSTIFY_CENTER);  gtk_clist_set_column_justification ( GTK_CLIST ( arbre_imputation ),				       3,				       GTK_JUSTIFY_CENTER);  gtk_clist_set_column_resizeable ( GTK_CLIST ( arbre_imputation ),				    0,				    FALSE );  gtk_clist_set_column_resizeable ( GTK_CLIST ( arbre_imputation ),				    1,				    FALSE );  gtk_clist_set_column_resizeable ( GTK_CLIST ( arbre_imputation ),				    2,				    FALSE );  gtk_clist_set_column_resizeable ( GTK_CLIST ( arbre_imputation ),				    3,				    FALSE );  /* on met la fontion de tri alphabtique en prenant en compte les accents */  gtk_clist_set_compare_func ( GTK_CLIST ( arbre_imputation ),			       (GtkCListCompareFunc) classement_alphabetique_tree );  gtk_signal_connect ( GTK_OBJECT ( arbre_imputation ),		       "tree-select-row",		       GTK_SIGNAL_FUNC ( selection_ligne_imputation ),		       NULL );  gtk_signal_connect ( GTK_OBJECT ( arbre_imputation ),		       "tree-unselect-row",		       GTK_SIGNAL_FUNC ( enleve_selection_ligne_imputation ),		       NULL );  gtk_signal_connect_after ( GTK_OBJECT ( arbre_imputation ),			     "button-press-event",			     GTK_SIGNAL_FUNC ( verifie_double_click_imputation ),			     NULL );  gtk_signal_connect ( GTK_OBJECT ( arbre_imputation ),		       "size-allocate",		       GTK_SIGNAL_FUNC ( changement_taille_liste_tiers ),		       NULL );  gtk_signal_connect ( GTK_OBJECT ( arbre_imputation ),		       "tree-expand",		       GTK_SIGNAL_FUNC ( ouverture_node_imputation ),		       NULL );  gtk_signal_connect ( GTK_OBJECT ( arbre_imputation ),		       "tree-collapse",		       GTK_SIGNAL_FUNC ( fermeture_node_imputation ),		       NULL );  gtk_container_add ( GTK_CONTAINER (  scroll_window ),		      arbre_imputation );  gtk_widget_show ( arbre_imputation );  gtk_clist_set_compare_func ( GTK_CLIST ( arbre_imputation ),			       (GtkCListCompareFunc) classement_alphabetique_tree );  /* la 1re fois qu'on affichera les catg, il faudra remplir la liste */  modif_imputation = 1;   return ( onglet );}