[Geany-devel] GIO file monitor - Re: Changed file saving implementation for systems with GIO

Eugene Arshinov earshinov at xxxxx
Sun Nov 14 09:31:59 UTC 2010


I don't know whether it was this change which caused this, but after I
updated recently to r5395 and turned on the #define in document.c which
controls using GIO file monitor, each time I save a document (I only
use local filesystems) I get a dialog telling me the file was changed.
In debug output coming from document.c:monitor_file_changed_cb() I see
that CHANGE notification is sent twice after a file is saved.  Maybe
it's g_file_replace_contents() which cause this, or it's a bug in my
GLib version, I don't know.  I changed the code of the callback to
check mtime before setting doc->file_disk_status to CHANGE, and file
saving is now works correctly for me.  If you think this change is
meaningful, consider the patch I attach.  Apart of the change in the
callback it contains some other staff (which you may wish to not

Best regards,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: geany.27.gio_filemon_handling.r5395.patch
Type: text/x-patch
Size: 4667 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20101114/82c1b174/attachment.bin>

More information about the Devel mailing list