GtkFileChooserDialog do not reacts when clicking on button NEW



GtkWidget *new_archive_dialog;
        GtkWidget *hbox;
        GtkWidget *archive_types;
        int i;
new_archive_dialog = gtk_file_chooser_dialog_new ("Create a new archive", GTK_WINDOW(MainWindow), GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_NEW, GTK_RESPONSE_ACCEPT, NULL);
        
gtk_dialog_set_default_response (GTK_DIALOG (new_archive_dialog), GTK_RESPONSE_ACCEPT);
        
        hbox = gtk_hbox_new (FALSE, 20);
gtk_file_chooser_set_extra_widget (GTK_FILE_CHOOSER (new_archive_dialog), hbox); gtk_box_pack_start (GTK_BOX (hbox), gtk_label_new ("Archive type:"), FALSE, FALSE, 0);
        archive_types = gtk_combo_box_new_text ();
        
        for (i = 0; i <= 3; i++)
if (ArchiveType[i].name !=NULL) gtk_combo_box_append_text (GTK_COMBO_BOX (archive_types),ArchiveType[i].name);
        
        gtk_combo_box_set_active (GTK_COMBO_BOX (archive_types), 0);
        gtk_box_pack_start (GTK_BOX (hbox), archive_types, TRUE, TRUE, 0);
        gtk_widget_show_all (hbox);
        
g_signal_connect (G_OBJECT (new_archive_dialog),"response",G_CALLBACK (new_file_response_cb),new_archive_dialog);
        
        gtk_window_set_modal (GTK_WINDOW (new_archive_dialog),TRUE);
        gtk_widget_show_all (new_archive_dialog);
--
Colossus

Cpsed, a Linux OpenGL 3D scene editor
http://cpsed.sourceforge.net/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]