salut tous le monde

j'essaye de compiler un petit programme qui ouvre un fichiers dans le disque dur en utilisant gtk_file_chosser_dialog_new. et ensuite affiche le repertoire du fichiers selectionné dans une boite de message.
quand je clique sur le fichier la boite de dialogue affiche le repertoire mais la fenetre pricipale coince . et la console m'affiche l'erreur suivante :
(gtk test.exe:1056): Gtk-WARNING **: file_system_win32=010AA020 still has handle=0108E078 at finalization which is NOT CANCELLED!

puis-je avoir une indication sur l'endroit de l'erreur.
et merci les gars


et voila mon code

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#include<stdlib.h>
#include<gtk/gtk.h>
 
void onajout(GtkWidget *butt,gpointer contextid);
 
int main(int argc,char **argv)
{
        GtkWidget *paboutbutt=NULL;
        GtkWidget *pwindow=NULL;
 
    /* initialisation du bibliotheque GTK+ */
    gtk_init(&argc,&argv);
    /* Creation de la fenetre "pwindow"*/
    pwindow=gtk_window_new(GTK_WINDOW_TOPLEVEL);
    gtk_window_set_title(GTK_WINDOW(pwindow),"fenetre exemple 1");
    gtk_window_set_default_size(GTK_WINDOW(pwindow),320,200);
 
    g_signal_connect(G_OBJECT(pwindow),"destroy",G_CALLBACK(gtk_main_quit),NULL);
 
   paboutbutt=gtk_button_new_with_label("Explorer");
    gtk_container_add(GTK_CONTAINER(pwindow),paboutbutt);
    g_signal_connect(G_OBJECT(paboutbutt),"clicked",G_CALLBACK(onajout),NULL);
 
    gtk_widget_show_all(pwindow);
    gtk_main();
    return EXIT_SUCCESS;
}
void onajout(GtkWidget *butt,gpointer data)
{
    GtkWidget *pfileex;
    GtkWidget *parent;
    GtkWidget * dialog;
    gchar *chemin;
    parent=gtk_widget_get_toplevel(butt);
 
    pfileex=gtk_file_chooser_dialog_new("Ouvrir...",GTK_WINDOW(parent),GTK_FILE_CHOOSER_ACTION_OPEN,GTK_STOCK_CANCEL,GTK_RESPONSE_CANCEL,GTK_STOCK_OPEN,GTK_RESPONSE_OK,NULL);
	gtk_window_set_modal(GTK_WINDOW(pfileex),TRUE);
    switch (gtk_dialog_run(GTK_DIALOG(pfileex)))
    {
        case GTK_RESPONSE_OK:
			chemin=gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(pfileex));
			dialog=gtk_message_dialog_new(GTK_WINDOW(pfileex),GTK_DIALOG_MODAL,GTK_MESSAGE_INFO,GTK_BUTTONS_OK,"Le chemin est \n %s",chemin);
			gtk_dialog_run(GTK_DIALOG(dialog));
			gtk_widget_destroy(dialog);
			g_free(chemin);
        break;
		default:
        break;
 
    }
	gtk_widget_destroy(pfileex);
 
 
}