[Geany] Geany constantly informs about more recent version of a file
Thomas Martitz
thomas.martitz at xxxxx
Wed Jan 21 01:37:48 UTC 2009
Thomas Martitz wrote:
> The attached patch seems to fix it.
>
> From reading the SOURCE, ignoring stuff implies setting file status to
> FILE_OK. Several cases which were supposed to be ignored don't do this.
>
> However, I don't know GIO good enough to pretend that this is the
> proper fix, so let the pros look at it.
I found out, that if you type anything in the editor window (let it be
text or just moving cursor, or clicking in the windw) quickly after the
file was saved, the file is reported as changed (and thus the reload
message is issued).
That also means if you wait long enough, the reload message doesn't appear.
By debugging I found, that the time frame is the time between saving and
the return of file_monitor_changed_cb() (in document.c) (which is IIUC
polled every few seconds, so the time frame is variable).
That said, GIO reports G_FILE_MONITOR_EVENT_CHANGED if the typing has
taken place between saving and the regular file status update, even
though the file as is hasn't been changed after saving.
This is a bit weird, since saving files explicitly sets the file status
to FILE_IGNORE, which should result in ignoring
G_FILE_MONITOR_EVENT_CHANGED.
Apparently, typing within the mentioned time frame gets FILE_IGNORE
removed, before GIO is polled.
I have no idea yet, where the issue is, but I'm sure (I hope) Enrico
will find it quickly with this information :)
Taking this into account, the patch I supplied was rather shit ;)
--
Kind regards
--------
More information about the Users
mailing list