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 543593 - Reading a note triggers a save
Reading a note triggers a save
Status: RESOLVED FIXED
Product: tomboy
Classification: Applications
Component: General
unspecified
Other Linux
: High normal
: ---
Assigned To: Tomboy Maintainers
Tomboy Maintainers
Depends on:
Blocks: 552253
 
 
Reported: 2008-07-18 13:15 UTC by John Carr
Modified: 2009-04-23 02:14 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
Proposed fix (1.27 KB, patch)
2008-07-18 13:49 UTC, John Carr
committed Details | Review

Description John Carr 2008-07-18 13:15:01 UTC
Getting a notes XML (via GetCompleteNoteXml) triggers a save. This is because the current implementation just returns the contents of the note file, and the file might not exist if this is a new note.

See GetCompleteNoteXml in Note.cs

My proposed fix is to implement a method in NoteArchiver that can return a string (instead of returning a file), so that the file system isn't involved at all. GetCompleteNoteXml can use this, and so doesn't need to worry about when the note was last saved any more.

I have a patch to this effect which i'll attach when i have tested it some more.
Comment 1 John Carr 2008-07-18 13:49:56 UTC
Created attachment 114773 [details] [review]
Proposed fix

Implement proposed fix
Comment 2 Sandy Armstrong 2008-08-02 18:21:43 UTC
This patch looks great.  How thoroughly did you test it?

Bumping priority to high.
Comment 3 John Carr 2008-08-02 19:07:13 UTC
Not thoroughly enough i'm afraid.. I've not hit any regressions, but i've hardly used it.
Comment 4 Sandy Armstrong 2008-09-15 02:26:03 UTC
Works for me.  Committed in r2140.