GNOME Bugzilla – Bug 693547
sourceview: use etag to only emit "changed" when file was externally modified
Last modified: 2013-02-11 21:07:06 UTC
See attached patch.
Created attachment 235643 [details] [review] sourceview: use etag to only emit "changed" when file was externally modified We store the etag of the file when it was last saved/read so that we can know if a change of the file contents was caused by us or externally. This way we don't have to remove the file monitor during a save, and we can also get rid of the five second delay when setting up the file monitor.
That's a pretty good solution to a problem we have been facing for a very long time now. Might be useful to add this to scintilla editor, too, at some point.
Review of attachment 235643 [details] [review]: Please commit.
*** Bug 564661 has been marked as a duplicate of this bug. ***
Attachment 235643 [details] pushed as 411ae98 - sourceview: use etag to only emit "changed" when file was externally modified
Created attachment 235742 [details] [review] sourceview: use etag to only emit "changed" when file was externally modified We store the etag of the file when it was last saved/read so that we can know if a change of the file contents was caused by us or externally. This way we don't have to remove the file monitor during a save, and we can also get rid of the five second delay when setting up the file monitor.