rem: gtk_clist_set_compare_func ( GTK_CLIST ( arbre_categ ), (GtkCListCompareFunc) classement_alphabetique_tree );
context: GtkWidget *onglet_categories ( void ){    GtkTreeViewColumn *column;    GtkCellRenderer *cell;    static GtkTargetEntry row_targets[] = {	{ "GTK_TREE_MODEL_ROW", GTK_TARGET_SAME_WIDGET, 0 }    };    GtkWidget *onglet;    GtkWidget *scroll_window;    GtkWidget *vbox;    GtkWidget *frame;    GtkWidget *vbox_frame;    GtkWidget *hbox;    GtkWidget *label;    GtkWidget *separateur;    GtkWidget *bouton;    GtkTreeDragDestIface * dst_iface;    GtkTreeDragSourceIface * src_iface;    /* création de la fenêtre qui sera renvoyée */    onglet = gtk_hbox_new ( FALSE,			    5 );    gtk_container_set_border_width ( GTK_CONTAINER ( onglet ),				     10 );    gtk_widget_show ( onglet );    /*   création 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 );    /* mise en place du gtk_text */    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 ( SPACIFY(COLON(_("Information"))) );    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_categ = gtk_entry_new ();    gtk_widget_set_sensitive ( entree_nom_categ,			       FALSE );    gtk_signal_connect ( GTK_OBJECT ( entree_nom_categ ),			 "changed",			 GTK_SIGNAL_FUNC ( modification_du_texte_categ),			 NULL );    gtk_box_pack_start ( GTK_BOX ( vbox_frame ),			 entree_nom_categ,			 FALSE,			 FALSE,			 10 );    gtk_widget_show ( entree_nom_categ );    /* création des radio bouton débit/crédit */    separateur = gtk_hseparator_new ();    gtk_box_pack_start ( GTK_BOX ( vbox_frame ),			 separateur,			 FALSE,			 FALSE,			 0 );    gtk_widget_show ( separateur );    label = gtk_label_new ( COLON(_("Sorting")) );    gtk_box_pack_start ( GTK_BOX ( vbox_frame ),			 label,			 FALSE,			 FALSE,			 10 );    gtk_widget_show ( label );    bouton_categ_debit = gtk_radio_button_new_with_label ( NULL,							   _("Debit") );    gtk_widget_set_sensitive ( bouton_categ_debit,			       FALSE );    gtk_signal_connect ( GTK_OBJECT ( bouton_categ_debit ),			 "toggled",			 GTK_SIGNAL_FUNC ( modification_du_texte_categ),			 NULL );    gtk_box_pack_start ( GTK_BOX ( vbox_frame ),			 bouton_categ_debit,			 FALSE,			 FALSE,			 0 );    gtk_widget_show ( bouton_categ_debit );    bouton_categ_credit = gtk_radio_button_new_with_label_from_widget ( GTK_RADIO_BUTTON ( bouton_categ_debit ),									_("Credit") );    gtk_widget_set_sensitive ( bouton_categ_credit,			       FALSE );    gtk_box_pack_start ( GTK_BOX ( vbox_frame ),			 bouton_categ_credit,			 FALSE,			 FALSE,			 0 );    gtk_widget_show ( bouton_categ_credit );    separateur = gtk_hseparator_new ();    gtk_box_pack_start ( GTK_BOX ( vbox_frame ),			 separateur,			 FALSE,			 FALSE,			 10 );    gtk_widget_show ( separateur );    /*   création 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_categ_modifier = gtk_button_new_from_stock (GTK_STOCK_APPLY);    gtk_button_set_relief ( GTK_BUTTON ( bouton_modif_categ_modifier ),			    GTK_RELIEF_NONE );    gtk_widget_set_sensitive ( bouton_modif_categ_modifier,			       FALSE );    gtk_signal_connect ( GTK_OBJECT ( bouton_modif_categ_modifier ),			 "clicked",			 GTK_SIGNAL_FUNC ( clique_sur_modifier_categ ),			 NULL );    gtk_box_pack_start ( GTK_BOX ( hbox ),			 bouton_modif_categ_modifier,			 FALSE,			 FALSE,			 0 );    gtk_widget_show ( bouton_modif_categ_modifier );    bouton_modif_categ_annuler = gtk_button_new_from_stock (GTK_STOCK_CANCEL);    gtk_button_set_relief ( GTK_BUTTON ( bouton_modif_categ_annuler ),			    GTK_RELIEF_NONE );    gtk_signal_connect ( GTK_OBJECT ( bouton_modif_categ_annuler ),			 "clicked",			 GTK_SIGNAL_FUNC ( clique_sur_annuler_categ ),			 NULL );    gtk_widget_set_sensitive ( bouton_modif_categ_annuler,			       FALSE );    gtk_box_pack_start ( GTK_BOX ( hbox ),			 bouton_modif_categ_annuler,			 FALSE,			 FALSE,			 0 );    gtk_widget_show ( bouton_modif_categ_annuler);    bouton_supprimer_categ = gtk_button_new_from_stock (GTK_STOCK_REMOVE);    gtk_button_set_relief ( GTK_BUTTON ( bouton_supprimer_categ ),			    GTK_RELIEF_NONE );    gtk_widget_set_sensitive ( bouton_supprimer_categ,			       FALSE );    gtk_signal_connect ( GTK_OBJECT ( bouton_supprimer_categ ),			 "clicked",			 GTK_SIGNAL_FUNC ( supprimer_categ ),			 NULL );    gtk_box_pack_start ( GTK_BOX ( vbox_frame ),			 bouton_supprimer_categ,			 FALSE,			 FALSE,			 0 );    gtk_widget_show ( bouton_supprimer_categ );    /* mise en place des boutons ajout d'1 categ / sous-categ */    bouton_ajouter_categorie = gtk_button_new_with_label ( _("Add a category") );    gtk_button_set_relief ( GTK_BUTTON ( bouton_ajouter_categorie ),			    GTK_RELIEF_NONE );    gtk_signal_connect ( GTK_OBJECT ( bouton_ajouter_categorie ),			 "clicked",			 GTK_SIGNAL_FUNC ( appui_sur_ajout_categorie ),			 NULL );    gtk_box_pack_start ( GTK_BOX ( vbox ),			 bouton_ajouter_categorie,			 FALSE,			 FALSE,			 0 );    gtk_widget_show ( bouton_ajouter_categorie );    bouton_ajouter_sous_categorie = gtk_button_new_with_label ( _("Add a subcategory") );    gtk_button_set_relief ( GTK_BUTTON ( bouton_ajouter_sous_categorie ),			    GTK_RELIEF_NONE );    gtk_widget_set_sensitive ( bouton_ajouter_sous_categorie,			       FALSE );    gtk_signal_connect ( GTK_OBJECT ( bouton_ajouter_sous_categorie ),			 "clicked",			 GTK_SIGNAL_FUNC ( appui_sur_ajout_sous_categorie ),			 NULL );    gtk_box_pack_start ( GTK_BOX ( vbox ),			 bouton_ajouter_sous_categorie,			 FALSE,			 FALSE,			 0 );    gtk_widget_show ( bouton_ajouter_sous_categorie );    separateur = gtk_hseparator_new ();    gtk_box_pack_start ( GTK_BOX ( vbox ),			 separateur,			 FALSE,			 FALSE,			 0 );    gtk_widget_show ( separateur );    /* on met le bouton exporter */    bouton = gtk_button_new_with_label ( _("Export") );    gtk_button_set_relief ( GTK_BUTTON ( bouton ),			    GTK_RELIEF_NONE );    gtk_signal_connect ( GTK_OBJECT ( bouton ),			 "clicked",			 GTK_SIGNAL_FUNC ( exporter_categ ),			 NULL );    gtk_box_pack_start ( GTK_BOX ( vbox ),			 bouton,			 FALSE,			 FALSE,			 0 );    gtk_widget_show ( bouton );    /* on met le bouton importer */    bouton = gtk_button_new_with_label ( _("Import") );    gtk_button_set_relief ( GTK_BUTTON ( bouton ),			    GTK_RELIEF_NONE );    gtk_signal_connect ( GTK_OBJECT ( bouton ),			 "clicked",			 GTK_SIGNAL_FUNC ( importer_categ ),			 NULL );    gtk_box_pack_start ( GTK_BOX ( vbox ),			 bouton,			 FALSE,			 FALSE,			 0 );    gtk_widget_show ( bouton );    /*   création 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 );    vbox = gtk_vbox_new ( FALSE,			  5 );    gtk_container_set_border_width ( GTK_CONTAINER ( vbox ),				     10 );    gtk_container_add ( GTK_CONTAINER ( frame ),			vbox );    gtk_widget_show ( vbox );    /* on y ajoute la barre d'outils */    gtk_box_pack_start ( GTK_BOX ( vbox ),			 creation_barre_outils_categ(),			 FALSE,			 FALSE,			 0 );    /* création de l'arbre principal */    scroll_window = gtk_scrolled_window_new ( NULL,					      NULL );    gtk_scrolled_window_set_policy ( GTK_SCROLLED_WINDOW ( scroll_window ),				     GTK_POLICY_AUTOMATIC,				     GTK_POLICY_AUTOMATIC );    gtk_scrolled_window_set_shadow_type ( GTK_SCROLLED_WINDOW(scroll_window), 					  GTK_SHADOW_IN );    gtk_box_pack_start ( GTK_BOX ( vbox ),			 scroll_window,			 TRUE,			 TRUE,			 0 );    gtk_widget_show ( scroll_window );    /* Create model */    categ_tree_model = gtk_tree_store_new ( META_TREE_NUM_COLUMNS, 					    G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, 					    G_TYPE_POINTER, G_TYPE_INT, G_TYPE_INT, 					    G_TYPE_INT, G_TYPE_FLOAT );    gtk_tree_sortable_set_sort_column_id ( GTK_TREE_SORTABLE(categ_tree_model), 					   META_TREE_TEXT_COLUMN, GTK_SORT_ASCENDING );    /* Create container + TreeView */    arbre_categ = gtk_tree_view_new();    gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (arbre_categ), TRUE);    gtk_tree_view_enable_model_drag_source(GTK_TREE_VIEW(arbre_categ),					   GDK_BUTTON1_MASK, row_targets, 1,					   GDK_ACTION_MOVE );    gtk_tree_view_enable_model_drag_dest ( GTK_TREE_VIEW(arbre_categ), row_targets,					   1, GDK_ACTION_MOVE );    gtk_tree_view_set_reorderable (GTK_TREE_VIEW(arbre_categ), TRUE);    gtk_tree_selection_set_mode ( gtk_tree_view_get_selection ( GTK_TREE_VIEW(arbre_categ)),				  GTK_SELECTION_MULTIPLE );    gtk_tree_view_set_model (GTK_TREE_VIEW (arbre_categ), 			     GTK_TREE_MODEL (categ_tree_model));    /* Make category column */    cell = gtk_cell_renderer_text_new ();    column = gtk_tree_view_column_new_with_attributes ("Category", cell, 						       "text", META_TREE_TEXT_COLUMN, 						       "weight", META_TREE_FONT_COLUMN,						       NULL);#if GTK_CHECK_VERSION(2,4,0)    gtk_tree_view_column_set_expand ( column, TRUE );#endif    gtk_tree_view_append_column ( GTK_TREE_VIEW ( arbre_categ ), 				  GTK_TREE_VIEW_COLUMN ( column ) );    /* Make account column */    cell = gtk_cell_renderer_text_new ();    column = gtk_tree_view_column_new_with_attributes ("Account", cell, 						       "text", META_TREE_ACCOUNT_COLUMN, 						       "weight", META_TREE_FONT_COLUMN,						       NULL);    gtk_tree_view_append_column ( GTK_TREE_VIEW ( arbre_categ ), 				  GTK_TREE_VIEW_COLUMN ( column ) );    /* Make balance column */    cell = gtk_cell_renderer_text_new ();    column = gtk_tree_view_column_new_with_attributes ("Balance", cell, 						       "text", META_TREE_BALANCE_COLUMN,						       "weight", META_TREE_FONT_COLUMN,						       "xalign", META_TREE_XALIGN_COLUMN,						       NULL);    gtk_tree_view_append_column ( GTK_TREE_VIEW ( arbre_categ ), 				  GTK_TREE_VIEW_COLUMN ( column ) );    gtk_container_add ( GTK_CONTAINER ( scroll_window ), arbre_categ );    gtk_widget_show ( arbre_categ );    /* Connect to signals */    g_signal_connect ( G_OBJECT(arbre_categ), "row-expanded", 		       G_CALLBACK(categ_column_expanded), NULL );    g_signal_connect( G_OBJECT(arbre_categ), "row-activated",		      G_CALLBACK(categ_activated), NULL);    dst_iface = GTK_TREE_DRAG_DEST_GET_IFACE (categ_tree_model);    if ( dst_iface )    {	dst_iface -> drag_data_received = &categ_drag_data_received;	dst_iface -> row_drop_possible = &categ_row_drop_possible;    }    src_iface = GTK_TREE_DRAG_SOURCE_GET_IFACE (categ_tree_model);    if ( src_iface )    {	gtk_selection_add_target (arbre_categ,				  GDK_SELECTION_PRIMARY,				  GDK_SELECTION_TYPE_ATOM,				  1);	src_iface -> drag_data_get = &categ_drag_data_get;    }    /* on met la fontion de tri alphabétique en prenant en compte les accents */    gtk_clist_set_compare_func ( GTK_CLIST ( arbre_categ ),				 (GtkCListCompareFunc) classement_alphabetique_tree );    /* la 1ère fois qu'on affichera les catég, il faudra remplir la liste */    modif_categ = 1;    return ( onglet );}