Re: GTK+2 - GtkFileChooserButton shows (none) as selected folde r and crashes



Thanks for the reply, Paul

So you are telling me that this could be a known bug in versions prior to 2.24?
In this case there is a problem. The application is actually a GIMP plugin and it must be compatible with a wide set of GTK versions. For example, the latest branch of GIMP 2.8.x for Windows still depends on GTK+ 2.16 / 2.22.
Does it mean that the problem won’t be solved for such environment unless someone will upgrade the dependency to > GTK 2.24? Am I right? Other solutions?

Also, is there a bug report opened for this issue somewhere?

Ale

Da: Paul Davis
Data invio: ‎sabato‎ ‎19‎ ‎ottobre‎ ‎2013 ‎13‎:‎20
A: Alessandro Francesconi
Cc: gtk-devel-list gnome org




On Sat, Oct 19, 2013 at 4:48 AM, Alessandro Francesconi <alessandrofrancesconi live it> wrote:

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?


Sounds a lot like the kinds of ridonkulously broken behaviour that got into gtk+-2-24 at various points in the last 6 months but that are now believed to be fixed.
 


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