After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 693547 - sourceview: use etag to only emit "changed" when file was externally modified
sourceview: use etag to only emit "changed" when file was externally modified
Status: RESOLVED FIXED
Product: anjuta
Classification: Applications
Component: plugins: editor: gtksourceview
unspecified
Other All
: Normal normal
: ---
Assigned To: Johannes Schmid
Anjuta maintainers
: 564661 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-02-10 20:21 UTC by Carl-Anton Ingmarsson
Modified: 2013-02-11 21:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
sourceview: use etag to only emit "changed" when file was externally modified (6.69 KB, patch)
2013-02-10 20:21 UTC, Carl-Anton Ingmarsson
committed Details | Review
sourceview: use etag to only emit "changed" when file was externally modified (6.83 KB, patch)
2013-02-11 21:07 UTC, Carl-Anton Ingmarsson
none Details | Review

Description Carl-Anton Ingmarsson 2013-02-10 20:21:03 UTC
See attached patch.
Comment 1 Carl-Anton Ingmarsson 2013-02-10 20:21:05 UTC
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.
Comment 2 Johannes Schmid 2013-02-11 11:59:14 UTC
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.
Comment 3 Johannes Schmid 2013-02-11 11:59:38 UTC
Review of attachment 235643 [details] [review]:

Please commit.
Comment 4 Johannes Schmid 2013-02-11 12:01:31 UTC
*** Bug 564661 has been marked as a duplicate of this bug. ***
Comment 5 Carl-Anton Ingmarsson 2013-02-11 20:03:59 UTC
Attachment 235643 [details] pushed as 411ae98 - sourceview: use etag to only emit "changed" when file was externally modified
Comment 6 Carl-Anton Ingmarsson 2013-02-11 21:07:06 UTC
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.