At 13:59 24.11.03 -0600, Lars Clausen wrote:
>On 24 Nov 2003, W. Michael Petullo wrote:
>>> Two so far: Shouldn't Gnome fall back on normal file opening if VFS
>>> fails?
>>
>> I'm of the opinion that it should not. GNOME's VFS is a pretty
>> fundamental module within the desktop. If file:///foo.dia can't be
>> opened then I think it should be assumed that it doesn't exist. Falling
>> back to stdio seems like it would just add complexity.
>
>Not if VFS lookup fails, but if VFS itself fails to load. The #define
>GNOME area in your patch just bails out when it can't find VFS, where it
>could just fall back on ordinary fopen.
>
>>> And the bit about creating a tmp file is the way it is for Win32
>>> compatibility.
>>
Not really. It is about any OS which does not assume the temporary
folder to be a harcoded path but settable. From glib/gutils.c :
/* Return a directory to be used to store temporary files. This is the
* value of the TMPDIR, TMP or TEMP environment variables (they are
* checked in that order). If none of those exist, use P_tmpdir from
* stdio.h. If that isn't defined, return "/tmp" on POSIXly systems,
* and C:\ on Windows.
*/
>> The new code will have to be used when GNOME is #define'd until I find
>> a gsf/gnomevfs-happy mkstemp. I'll put the Win32 code back in as the
>> default, though.
>
It will be also used on *NIX for people not doing a Dia/GNOME build,
e.g. me using the 'pure' Dia/Gtk build even when compiling under
Linux, even with Gnome as the prefered desktop environemnt ...
>Good. I don't think Gnome exists under Win32, anyway.
>
And yes Lars, you are right, there is no gnome on win32 but there
is no gnome on IRIX either (at least not by default, though there
you probably could install it).
>>> The import and export filters ought to be redone to call just one file
>>> opening function, then. We don't want to have this complexity in 15
>>> different places.
>>
>> Right. I did a quick analysis of dia's plugins and this is what I
>> discovered:
[..., removed list of C plug-ins]
But there are some other plug-ins, e.g. diasvg.py, diasvg_import.py
and at least two sample export-*.py
Before providing a more detailed patch could you just reiterate
(in short) the benefits of using gnome-vfs at all.
Do you want to use it via file open/save dialogs ? If so shouldn't
it just wait for the new ablities coming with Gtk 2.4 ?
Or should it be used by something like drag and drop from e.g.
Nautilus. Than it probably should be handled at other places
in Dia's source than what you appear to be modifying, maybe
some central points where those alien become accesible by
stdio, i.e creating temporary files ...
Thanks,
Hans
-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to
get along without it. -- Dilbert