[Geany-devel] [ geany-Bugs-2519094 ] GFileMonitor and g_object_ref

Enrico Tröger enrico.troeger at xxxxx
Wed Jan 21 15:56:14 UTC 2009


On Mon, 19 Jan 2009 23:59:15 +0100, Colomban Wendling
<ban-ubuntu at club-internet.fr> wrote:

>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>Comment By: Enrico Tröger (eht16)
>> Completely unrelated to Geany.
>> HTTP usually doesn't support write operations, right? So how do you
>> want to write files to it or even mount it?
>Opening a file through HTTP works with g_file_new_for_uri(), but yes,
>write operations will fail.

Btw, gvfs-cat http://host.tld/file will show the contents of the URI.
Similarly, gvfs-copy will copy it to a file.
Both are similar to what 'wget' does but after all, unrelated to
Geany :).

>> Instead, use dav:// assuming your server supports it. Then you can
>> mount it as usual and after having mounted it, you can open and edit
>> files on it.
>I dunno how to do it "as usual" since I use Nautilus 2.22 for now that
>AFAIK doesn't really support GIO, and I dunno how to mount a location
>with GVFS without Nautilus… But yes, I understand the meaning :)

You can easily mount resources on the command line, try:

gvfs-mount sftp://username@host.tld/
gvfs-mount ftp://username@host.tld/
gvfs-mount dav://host.tld/
gvfs-mount davs://host.tld/

(when the username is omitted, gvfs-open will ask for it if necessary,
note that when using dav or davs for some reason you can't specify an
username in the URI, at least it doesn't work for me, just as a hint)

When you need a GUI, use Nautilus 2.24 or Sion
(http://goodies.xfce.org/projects/applications/sion, there are no
Xfce-deps).


>> Yes, that's the way. And when we save the file in Geany, we set an
>> ignore flag to ignore the next 'file has changed' signal. And there
>> probably begin the problems.
>> Also, this works only if the file was actually only changed which
>> happens when saving with Geany. When you save the file with Gedit,
>> it (probably) won't work because Gedit first saves the file into a
>> temp file, then move it to the real file. So, the real file is never
>> 'changed' but 'created'. And the 'created' notification is currently
>> ignored at all.
>Hum… I've just tried with Gedit modifying an opened file in Geany, and
>the tab becomes orange, but when I start to modify it again, Geany
>tells me that the file was not found on the disk, asking me whether I
>want to save it… and if I say yes, then ask me if I want to overwrite
>the existing file. Well, not perfect (but I personally don't mind
>about that since this feature helps me mostly for files modified by a
>script).

Hmm, strange.
I just fixed a couple of issues in SVN r3495. It's still not 100%
perfect but should be much better now.




Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20090121/2153be28/attachment.pgp>


More information about the Devel mailing list