GNOME Bugzilla – Bug 767964
daemon: Set G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE attribute
Last modified: 2016-06-28 08:54:25 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.
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.
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?
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).
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?
I agree that it is a filesystem attribute.
Comment on attachment 330234 [details] [review] daemon: Set G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE attribute Pushed as commit 96771e1 .