Re: Do FileChooser+gnome-vfs currently work?



On 23/03/2004 4:43 PM, Luca Ferretti wrote:

These properties are object properties as opposed to style properties. Putting them in your gtkrc file will have no effect.

I don't understand.

Example: I want that all my file chooser dialogs show hidden files; I
know that this feature is driven by the 'show_hidden' properties of the
widget; I belive that this widget property can be changed as well as the
'has-secondary-backward-stepper' for GtkScrollbar, via gtkrc.

Where am I wrong? Why?
There are two types of properties for a widget: object properties and style properties. Object properties are things that an application author sets (either directly through code, or set in a glade interface). In contrast, style properties control aspects of how a widget looks that a theme might want to change (such as the frequency at which the cursor flashes in an entry field, placement of buttons on a scrollbar, etc). Style properties are set in the gtkrc file, usually by the theme author.

Now a property like "local-only" is definitely not a property of the theme, since it controls the behaviour of the widget. Do you think it sensible that some app that can't open smb:// URLs should behave buggily with some themes and not others?

The "show-hidden" property is another one that doesn't really sound like something a theme should be setting. At the same time, it doesn't sound like the sort of thing I would want individual apps deciding on. Ideally the value of "show-hidden" would mirror the equivalent setting in Nautilus. It doesn't appear that it does right now though.

An application has to explicitly state that it can support non-local files. If it doesn't, then the file selector will only let the user select local files.
[snip]

So, the starting question again.
The /desktop/gnome/interface/file_chooser_backend key value is
"gnome-vfs" but all file chooser dialogs still use the "gtk+". Why?
GTK watches an XSETTINGS property to find out what file system backend to use. If everything is working correctly, gnome-settings-daemon should be exporting the value of that gconf key via XSETTINGS and things should just work. Maybe your gnome-control-center isn't up to date, or you haven't logged out and back in again since the code was added. Very few applications would need to set that property manually.

The reason that the default is local-only=True is that the failure mode is less severe.

If an app supports openning remote files but local-only=True, then the app still works (but some of its functionality is hidden). If an app only supports local files but local-only=False then the user can select files to open that the app can't handle, which is much worse.

As user, IMHO this is a not so smart behavior. Are you really saying
that remote/virtual fs support should be maneged via filechooser backend
AND application ???
that is exactly what I'm saying.

So, when GIMP will switch to GtkFileChooser, I will not have the
ability, for example, to save an image on a ftp server if gimp
developers don't set to false local_only property?
Yep. Given that Gimp doesn't currently contain code to save files to FTP servers (it doesn't use gnome-vfs), what do you think it should do if the file chooser returns an FTP URI as the target to save to.

If/when Gimp implements gnome-vfs (which would be a fair bit of work), they can simply set local-only=False and the file selector will allow users to pick remote locations.

I'm not saying that local_only is a bad property, it can be great to
prevent users to access remote stuff, but I think that its default value
should be false and it should be true only if you want to deny remote
accesses (at application or whole desktop level).
The problem with this is that the baseline file access routines on POSIX systems _are_ local only, so it makes sense to choose a default that doesn't result in a large number of broken applications.

Remember that all these details should be invisible to users. If gnome-settings-daemon isn't setting the file system backend correctly, file a bug report (when bugzilla starts working again). If an app that supports openning/saving to remote locations hasn't set local-only=False, report a bug against the application.

James.

--
Email: james daa com au
WWW:   http://www.daa.com.au/~james/





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]