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 767964 - daemon: Set G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE attribute
daemon: Set G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE attribute
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: daemon
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on: 767963
Blocks: 767965
 
 
Reported: 2016-06-23 06:29 UTC by Ondrej Holy
Modified: 2016-06-28 08:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
daemon: Set G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE attribute (14.33 KB, patch)
2016-06-23 06:29 UTC, Ondrej Holy
committed Details | Review

Description Ondrej Holy 2016-06-23 06:29:51 UTC
Created attachment 330234 [details] [review]
daemon: Set G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE attribute

GTK+ contains helper function _gtk_file_consider_as_remote  for remote locations, which is based on hardcoded list of filesystem types:
https://git.gnome.org/browse/gtk+/tree/gtk/gtkfilesystem.c#n905

It would be really nice to provide this information directly from GIO layer and do not use hardcoded lists as suggested by Matthias:
https://bugzilla.gnome.org/show_bug.cgi?id=754746#c3

Let's add/set/use G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE for this need.

I tested the patches successfully using gtk+/tests/testfilechooser.
Comment 1 Bastien Nocera 2016-06-23 11:22:21 UTC
Would we have a way to get this information for files as well? This would make it easier to know whether a file "is remote" after having opened it, or when gathering information.
Comment 2 Ondrej Holy 2016-06-23 13:10:40 UTC
What do you mean with the way to get this for files? You can obtain the information easily using g_file_query_filesystem_info for files... do you want to have this available from g_file_query_info, or directly over GFileIface somehow?
Comment 3 Bastien Nocera 2016-06-23 13:15:29 UTC
g_file_query_filesystem_info() is another separate call. I'm thinking this information should be in the g_file_query_info() output as well (and g_file_input_stream_query_info() too).
Comment 4 Ondrej Holy 2016-06-27 10:05:34 UTC
Ok, I see your concern, but it seems to me rather more like filesystem attribute. This information is needed only for filechooser currently and there is not problem to call g_file_query_filesystem_info. Also Matthias has already approved the patches for GLib/GTK+. I am about to push it as is and reconsider in future if needed. Matthias, what do you think about it?
Comment 5 Matthias Clasen 2016-06-27 13:34:46 UTC
I agree that it is a filesystem attribute.
Comment 6 Ondrej Holy 2016-06-28 08:54:16 UTC
Comment on attachment 330234 [details] [review]
daemon: Set G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE attribute

Pushed as commit 96771e1 .