Question about the file selection dialog



Hi,

	I'm running into a little problem with the file selection dialog. I
created the dialog the usual way, using the 
	GtkWidget *fileDlg = gtk_file_selection_new("File selection"); 
call and bound the callback to the ok button using:
	gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(fileDlg)->ok_button),
		     "clicked", (GtkSignalFunc) exportOk, NULL);

	The callback gets called ok when I run the application, but when I try
and get rid of the dialog in the callback, after I have written the
file, the 
code seg faults. Currently I am doing this as follows:

void exportOk(GtkWidget *widget, gpointer data) {
  char *fileName = 
   
gtk_file_selection_get_filename(GTK_FILE_SELECTION(aWindow->_fileDialog));
  
  /* Write the file */
  /* ... */

  gtk_widget_destroy(widget);
}

	The gtk_widget_destroy is what is causing the seg fault....

	Any help would be greatly appreciated...

Cheers,
Achint

-- 
Achint Sandhu
Nortel Networks

FORTRAN?  The syntactically incorrect statement "DO 10 I = 1.10" 
will parse and generate code creating a variable, DO10I, as follows: 
"DO10I = 1.10"  If that doesn't terrify you, it should.



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