wired problem with Gtk::FileChooserDialog



Hi, 

I am using in my application the Gtk::FileChooserDialog. So far I had no
problems. But when I made some changes to another part in my program I
suddenly recived segmentation faults. And allways at the same part. At the
execution of the Gtk::FileChooserDialog. When I run it the first time to
open a file it works fine. But at the second run I get the segmentation
fault. While compiling I have no errors or warnings. 
I made at the initialization of the dialog one change to the book. I don't
use
        dialog.set_transient_for(main_window);
, because I excluded all my dialogs in a seperate class. 

Here is an example of my code: 
	Gtk::FileChooserDialog dlg("Please choose a file",
Gtk::FILE_CHOOSER_ACTION_OPEN);
	
	dlg.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
	dlg.add_button("Select", Gtk::RESPONSE_OK);
	
	// Filter for special file ending/-s
	Gtk::FileFilter filter_imr;
	filter_imr.set_name("IMR files");
	filter_imr.add_pattern("*.imr");
	dlg.add_filter(filter_imr);
	
	Gtk::FileFilter filter_any;
	filter_any.set_name("Any files");
	filter_any.add_pattern("*");
	dlg.add_filter(filter_any);
	
	int result = dlg.run();	// run file choosing dialog 
	switch (result)
	{...

Thank you in advance for your help. 
Greets Alexander
-- 
View this message in context: http://www.nabble.com/wired-problem-with-Gtk%3A%3AFileChooserDialog-tf2750275.html#a7673330
Sent from the Gtkmm mailing list archive at Nabble.com.




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