GNOME Bugzilla – Bug 689451
gtk 3.6 filechooser has a regression in folder mode, doesn't let to open/enter folders
Last modified: 2018-04-15 00:35:35 UTC
Created attachment 230402 [details] folders are insensitive example code below, screenshot demonstrating the problem attached. if non-default file filter function is used -- folders are insensitive. if "all files" is selected -- works correctly. this code works fine in GTK2 and GTK3.4, but not in 3.6. was tested in ubuntu and mint. GtkWidget *dlg = gtk_file_chooser_dialog_new (_("Add folder(s) to playlist..."), GTK_WINDOW (mainwin), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_OK, NULL); GtkFileFilter* flt; flt = gtk_file_filter_new (); gtk_file_filter_set_name (flt, name); gtk_file_filter_add_custom (flt, GTK_FILE_FILTER_FILENAME, file_filter_func, NULL, NULL); gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dlg), flt); gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (dlg), flt); flt = gtk_file_filter_new (); gtk_file_filter_set_name (flt, _("All files (*)")); gtk_file_filter_add_pattern (flt, "*"); gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dlg), flt); gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (dlg), TRUE); gtk_widget_destroy (dlg);
Indeed, this behavior changed due to bug #679333. The idea was to let custom filters work for folders as well, in GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, just like filters work for normal files in the "select a file" modes. One option is to restore the old behavior, and only enable the new one if you call a function (which we would have to add) like gtk_file_chooser_set_filters_act_on_folders() or something. Jon, what do you think?
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
As announced a while ago, we are migrating to gitlab, and bugs that haven't seen activity in the last year or so will be not be migrated, but closed out in bugzilla. If this bug is still relevant to you, you can open a new issue describing the symptoms and how to reproduce it with gtk 3.22.x or master in gitlab: https://gitlab.gnome.org/GNOME/gtk/issues/new