After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 769445 - Folder selection broken since gtk2-2.24.30+95+g876b5f7-1
Folder selection broken since gtk2-2.24.30+95+g876b5f7-1
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
2.24.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
Federico Mena Quintero
Depends on:
Blocks:
 
 
Reported: 2016-08-02 17:17 UTC by Philip Müller
Modified: 2016-09-10 13:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot of grayed out folder selection (70.23 KB, image/png)
2016-08-02 17:17 UTC, Philip Müller
Details

Description Philip Müller 2016-08-02 17:17:58 UTC
Created attachment 332588 [details]
Screenshot of grayed out folder selection

Seems within Arch (https://bugs.archlinux.org/task/49949) using a more current git version of GTK 2.24 series, introduced a new regression in file chooser.

Folders are now grayed out to choose from. Might be to those early March commits.

https://github.com/GNOME/gtk/compare/2.24.30...gtk-2-24
Comment 1 Matthias Clasen 2016-08-02 17:43:31 UTC
I can't really read that commit reference in the subject - do you _know_ of a commit affecting this, or is this just a guess ? Also, more specific reproduction instructions would be very helpful. The file chooser in gtk-demo does not  reproduce the problem here.
Comment 2 Philip Müller 2016-08-02 17:49:42 UTC
Hi Matthias,

it is a guess from my end. To find the culeprint I've to git-bisect it. We have detected it with XFCE 4.12 and some application called easymp3gain-gtk2. As in the screenshot shown the folders are grayed out and you can't select them. To reproduce install the latest gtk 2.24-git package and try to open a folder within a folder.
Comment 3 Matthias Clasen 2016-08-03 17:56:24 UTC
I've tried various testcases that use a gtk2 filechooser with the tip of the 2.24 branch, and couldn't reproduce the problem you describe.
Comment 4 Philip Müller 2016-08-03 20:57:42 UTC
I'll git-bisect it and give you the exact commit later on so we can find a proper solution. Original it was reported here:

https://forum.manjaro.org/t/xfce-cant-change-wallpaper-folder-from-last-update-2016-07-27/6848
Comment 5 Philip Müller 2016-08-06 18:09:30 UTC
I found time to git-bisect it. Here the result:

Bisecting: 13 revisions left to test after this (roughly 4 steps)
[545df1a742be804b551cb82762eac51b4db6334c] filesystemmodel: Add a toggle for whether directories are filtered
[phil@manjaro gtk+]$ git bisect good
5c03d6a9437d92acf89d43109e82e628ef822251 is the first bad commit
commit 5c03d6a9437d92acf89d43109e82e628ef822251
Author: William Jon McCann <jmccann@redhat.com>
Date:   Sun Jul 8 03:25:02 2012 -0400

    Desensitize filtered folders when in folder selection mode
    
    https://bugzilla.gnome.org/show_bug.cgi?id=679333

:040000 040000 3c97626a489266aedb8d7a95c7fd7ea37e64e26d a5d0a79637e153016beadb85da40573aebf595ae M	gtk

Seems to be an issue with XFCE and other non Gnome file managers.
Comment 6 Matthias Clasen 2016-08-07 21:50:08 UTC
that commit is 4 years old. That directly contradicts the claim that there's a 'regression in current git 2.24"
Comment 7 Matthias Clasen 2016-08-07 21:57:48 UTC
Or maybe this was cherry-picked into 2.24 later. Anyway, whats still missing here is a clear way to reproduce the problem. What is the file chooser configuration ? is it GTK_FILE_CHOOSER_ACTION_OPEN or GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER ? What filter is being used ? Do the folders come up insensitive right away, or do you need to do something to provoke this ?
Comment 8 Philip Müller 2016-08-08 06:24:38 UTC
They come right up 'insensitive' in XFCE. Seems to be within these code lines:


    /* folder: file chooser button */
    panel->btn_folder = GTK_WIDGET(gtk_builder_get_object(appearance_gxml, "btn_folder"));
    g_signal_connect(G_OBJECT(panel->btn_folder), "selection-changed",
                     G_CALLBACK(cb_folder_selection_changed), panel);

    filter = gtk_file_filter_new();
    gtk_file_filter_set_name(filter, _("Image files"));
    gtk_file_filter_add_pixbuf_formats(filter);
    gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(panel->btn_folder), filter);

    /* Get default wallpaper folder */
    path = system_data_lookup ();

    if (path != NULL) {
        file = g_file_new_for_path (path);
        uri_path = g_file_get_uri (file);

        gtk_file_chooser_add_shortcut_folder_uri (GTK_FILE_CHOOSER(panel->btn_folder),
                                                  uri_path, NULL); 

        g_free (uri_path);
        g_object_unref (file);
    }

Full code can be found here: https://git.xfce.org/xfce/xfdesktop/tree/settings/main.c#n1852
Comment 9 Philip Müller 2016-09-10 09:09:15 UTC
Same issue is still there with v2.24.31. Lets see if it is a XFCE only bug: https://bugzilla.xfce.org/show_bug.cgi?id=12832
Comment 10 Philip Müller 2016-09-10 13:53:06 UTC
Not a gtk+ issue. Fixed with https://git.xfce.org/users/eric/xfdesktop/commit/?h=the-long-road-to-gtk3&id=cc311b61b82b7510a3a6cb0952d3a331e3551e05 on XFCE side.