- filter = gtk_file_filter_new ();
- gtk_file_filter_set_name (filter, _("All Files"));
- gtk_file_filter_add_pattern (filter, "*");
- gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
-
- response = gtk_dialog_run (GTK_DIALOG (dialog));
-
- if (response == GTK_RESPONSE_ACCEPT)
- {
- const char *file_name = gtk_file_chooser_get_filename
- (GTK_FILE_CHOOSER (dialog));
-
- GtkWidget *se = psppire_syntax_window_new ();
-
- if ( psppire_window_load (PSPPIRE_WINDOW (se), file_name) )
- gtk_widget_show (se);
- else
- gtk_widget_destroy (se);
- }
-
- gtk_widget_destroy (dialog);
+ if ( psppire_window_load (PSPPIRE_WINDOW (se), file_name) )
+ gtk_widget_show (se);
+ else
+ gtk_widget_destroy (se);