Some of my application’s users declare a strange problem with a particular 
widget: GtkFileChooserButton.




I needed to provide a way to select a single folder, so I used the widget this 
way:




GtkWidget* button_outfolder = gtk_file_chooser_button_new(_("Select output 
folder"), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
output_folder_string = 
gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(button_outfolder)); // store the 
default value
gtk_widget_set_size_request(button_outfolder, 180, 30);






The problem is that, when the widget is displayed for the first time, it shows 
the text “(none)” instead of a default folder’s name. When the user clicks on 
it to select a valid path, the entire program crashes with a segfault (I can’t 
provide further information right now).




This thing does not happen to everyone: for example, I’ve never seen this 
behaviour with my systems (Windows 7/8, 64bit, GTK+ 2.22 and Linux 64bit with 
GTK+ 3), but some other users with apparently the same environments are 
experiencing it.




I tried to workaround this issue by forcing the default folder at startup with:




gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(button_outfolder), "");




Nothing to do, the problem remains for “someone”.




Did anyone ever experience this bug? Is it reported somewhere? Am I doing 
something wrong in my code?




Thank you!

Ale
_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list

Reply via email to