SFML community forums

General => General discussions => Topic started by: on July 31, 2011, 04:57:29 pm

Title: SFML and GTK+ - how to create GtkFileChooserDialog
Post by: on July 31, 2011, 04:57:29 pm
Hi,

I'm writing map editor using SFML and I have a problem. I want to use GTK+ to create file chooser dialogs. I have this code:

Code: [Select]
   gtk_init(&argc, &argv);

    GtkWidget *dialog;
    dialog = gtk_file_chooser_dialog_new ("Open file...", NULL, GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL);
    gtk_dialog_run (GTK_DIALOG (dialog));


And the dialog is showing, but it doesn't get destroyed :(

Please help
Thanks in advance
Regards