rem: g_object_set_data ( G_OBJECT(GTK_FILE_SELECTION (file_selector)->ok_button), "entry", file_selector ); g_signal_connect ( GTK_OBJECT (GTK_FILE_SELECTION (file_selector)->ok_button), "clicked", G_CALLBACK (change_print_to_file), data);
add: switch ( gtk_dialog_run ( file_selector ) ) { case GTK_RESPONSE_OK: gtk_entry_set_text ( GTK_ENTRY(data), file_selection_get_filename (file_selector) );
context: void browse_file ( GtkButton *button, gpointer data ){    GtkWidget * file_selector;    file_selector = file_selection_new (_("Print to file"),FILE_SELECTION_IS_SAVE_DIALOG);    gtk_window_set_transient_for ( GTK_WINDOW ( file_selector ),				   GTK_WINDOW ( window ));    gtk_window_set_modal ( GTK_WINDOW ( file_selector ), TRUE );    /* Connect button click to entry change */    g_object_set_data ( G_OBJECT(GTK_FILE_SELECTION (file_selector)->ok_button),			"entry", file_selector );    g_signal_connect ( GTK_OBJECT (GTK_FILE_SELECTION (file_selector)->ok_button),		       "clicked", G_CALLBACK (change_print_to_file), data);    /* Ensure that the dialog box is destroyed when the user clicks a button. */    g_signal_connect_swapped ( GTK_OBJECT (GTK_FILE_SELECTION (file_selector)->ok_button),			       "clicked", G_CALLBACK (gtk_widget_destroy), 			       (gpointer) file_selector);     g_signal_connect_swapped ( GTK_OBJECT (GTK_FILE_SELECTION (file_selector)->cancel_button),			       "clicked", G_CALLBACK (gtk_widget_destroy),			       (gpointer) file_selector);     gtk_widget_show_all ( file_selector );}