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 625041 - GtkFileChooserButton uses previously selected path when choosing a unmounted device
GtkFileChooserButton uses previously selected path when choosing a unmounted ...
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
Federico Mena Quintero
Depends on:
Blocks:
 
 
Reported: 2010-07-22 15:00 UTC by Muflone
Modified: 2018-05-02 14:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
the files are found in home folder while Lucid is an unmounted device (35.75 KB, image/png)
2010-07-22 15:02 UTC, Muflone
  Details
Patch to gtkfilechooserbutton.c that excludes unmounted volumes. (1.17 KB, patch)
2010-10-01 08:35 UTC, ayan.george
needs-work Details | Review

Description Muflone 2010-07-22 15:00:51 UTC
Overview:
While the FileChooserButton is not expanded (the FileChooserDialog is not shown, just the list in the ComboBox) and the user selects a unmounted device, the previously selected paths is automatically assumed.

Steps to reproduce:
1) Open gnome-search-tool (or similar tool which uses GtkFileChooserButton)
2) Select a valid path like the home folder
3) Select an unmounted device
4) Press the search button

Actual result:
The search is made in the previously selected path (eg. Home folder).
No warnings or errors are reported about the unmounted device.
Using the widget from PyGTK I've checked that no signals are fired if the user choose an unmounted device and get_uri reports the previous path.

Expected result:
The chooser should warn or deny to choose an unmounted device.
Some signals should inform the developer that an invalid path was selected OR BOTH get_uri and get_filename should return the correct unmounted path AND all signals should be fired to let the developer to decide if such path is valid/mounted.

Build Date & Platform:
Tested with:
GTK 2.14.4 from OpenSuse 11.1
GTK 2.16.1 from Ubuntu 9.04
GTK 2.18.3 from Ubuntu 9.10
GTK 2.20.1 from Debian sid
GTK 2.21.2 from Ubuntu 10.10 alpha 2

Additional information:
This bug is not strictly related to gnome-search-tool, it's reproducible with every app that uses GtkFileChooserButton.
Comment 1 Muflone 2010-07-22 15:02:30 UTC
Created attachment 166396 [details]
the files are found in home folder while Lucid is an unmounted device
Comment 2 ayan.george 2010-10-01 08:34:41 UTC
Should GtkFileChooserButton display unmounted volumes at all?  I don't think so.  I'm attaching a patch that excludes them from the combo box.
Comment 3 ayan.george 2010-10-01 08:35:35 UTC
Created attachment 171471 [details] [review]
Patch to gtkfilechooserbutton.c that excludes unmounted volumes.
Comment 4 Federico Mena Quintero 2010-11-15 19:12:23 UTC
Review of attachment 171471 [details] [review]:

::: gtk/gtkfilechooserbutton.c
@@ +1771,3 @@
       volume = l->data;
 
+      if (_gtk_file_system_volume_is_mounted (volume))

Surely you mean "if (!_gtk_file_...)" here?
Comment 5 Holger 2017-11-12 21:22:50 UTC
Duplicate of bug 432904 ?
Comment 6 GNOME Infrastructure Team 2018-05-02 14:59:20 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/344.