Re: GtkFileSystemGnomeVFS
- From: Alexander Larsson <alexl redhat com>
- To: Federico Mena Quintero <federico ximian com>
- Cc: Owen Taylor <otaylor redhat com>, "gtk-devel-list gnome org" <gtk-devel-list gnome org>
- Subject: Re: GtkFileSystemGnomeVFS
- Date: 12 Feb 2004 13:47:08 +0100
On Wed, 2004-02-11 at 17:38, Federico Mena Quintero wrote:
> Hi, Alex, Owen,
>
> How do we install GtkFileSystemGnomeVFS? In theory, you should get it
> for free if your app calls gnome_vfs_init(). Should we have
>
> 1. gtk_file_chooser_set_default_file_system_type (GType type)
>
> 2. GType _gtk_magic_variable_with_file_system_type;
>
> 3. gnome_vfs_file_chooser_dialog_new ()
I was under the impression that i would just build a gtk+ module and
install it somewhere, and all apps would be able to get gnome-vfs
support in the fileselector. Isn't this the case? If every app has to
explicitly link to libgnomevfsgtkfilesystem and call functions from it
to create vfs-using, then this code should be in libgnomeui (like I
initially argued[1]).
So, how do we do this?
Say gtk+ automatically looks in $libdir/gtk-2.0/2.4.0/filesystems/ for
filesystem implementations. Now, how do applications say they want to
use a gnome-vfs backend for a dialog? We clearly can't auto-use the vfs
backend when its installed, because a gtk-only app won't be using
gnome-vfs to read back the files returned from the fileselector (and
even in a gnome-vfs using app some uses of the fileselector might want
local files only). In fact, in the gtk-only case we'd prefer to not even
load the filesystem and its dependencies.
So, we need to set up a gtk-query-fsmodules thing that generates
$sysconfdir/gtk-2.0/gtk.fsmodules, so we can detect filesystem modules
without loading them. Given this, how do apps use this? One way is to
introduce a 'file-system-name' string property for GtkFileChooser so we
can reference the fs type without referencing the
gtk_file_system_gnome_vfs_get_type symbol. If loading the vfs module
fails we fall back to the unix one, and the app won't notice the
difference (except it only gets file: uris).
I think the encoding for file uris differ between gnome-vfs and glib.
This could cause problems. Gnome-vfs uses the raw on-disk bytes, escaped
as needed for the uri, while i think glib uses the escaped utf8 version
of the filenames. The way glib does this is problematic for gnome-vfs,
since you can't e.g. use such uris to rename a wrongly encoded filename.
Plus, it feels wrong for the uri representation of a file to depend on a
potentially non-global setting (G_BROKEN_FILENAMES + locale).
[1] http://mail.gnome.org/archives/desktop-devel-list/2003-October/msg00702.html and
http://mail.gnome.org/archives/desktop-devel-list/2003-October/msg00708.html
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl redhat com alla lysator liu se
He's a world-famous soccer-playing werewolf who knows the secret of the alien
invasion. She's a hard-bitten African-American bounty hunter fleeing from a
Satanic cult. They fight crime!
http://mail.gnome.org/archives/desktop-devel-list/2003-October/msg00708.html
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]