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 340769 - notes changes are not saved on hide or soon after modification
notes changes are not saved on hide or soon after modification
Status: RESOLVED FIXED
Product: gnome-applets
Classification: Other
Component: stickynotes
2.14.x
Other All
: Normal minor
: ---
Assigned To: gnome-applets Maintainers
gnome-applets Maintainers
Depends on:
Blocks: 340766
 
 
Reported: 2006-05-05 18:51 UTC by ergosys
Modified: 2010-01-24 01:06 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
initial patch (4.92 KB, patch)
2006-10-10 01:40 UTC, Tom Tromey
none Details | Review
updated patch - warning fix, remove schema (5.88 KB, patch)
2006-10-19 05:41 UTC, Tom Tromey
accepted-commit_now Details | Review

Description ergosys 2006-05-05 18:51:17 UTC
Please describe the problem:
It appears (via strace) that notes are saved every five minutes, or on certain
window activity.   The current behavior saves the file lots of times during note
resizes and usually doesn't save soon after changes.  This is inefficient and
can cause data loss.  It would be better if every 10s or so, the notes are saved
if the notes have been modified since the last save. 

Steps to reproduce:
1. 
2. 
3. 


Actual results:


Expected results:


Does this happen every time?


Other information:
ubuntu dapper beta
Comment 1 Tom Tromey 2006-10-10 01:36:49 UTC
Yes, this is what the code does, and I agree it is sub-optimal.
I have the start of a patch which I will attach shortly.
Comment 2 Tom Tromey 2006-10-10 01:40:31 UTC
Created attachment 74380 [details] [review]
initial patch

This patch implements this behavior to some degree.
Now a change to a text buffer starts a 10 second timer.
If there are no changes in those 10 seconds, the notes are saved.

I think this could be improved by changing other places that call
stickynotes_save() to use this same sort of timeout as well.

Also I wasn't sure what to do with the old timeout value in the
schema.  I left it there (and I left a little bit of commented-out
code to use it, as well) -- is it ok to delete this?
Comment 3 Danielle Madeley 2006-10-11 07:40:38 UTC
This looks pretty good from a first inspection. On the schema value, it should be fine to completely delete it.
Comment 4 Tom Tromey 2006-10-19 05:41:57 UTC
Created attachment 74996 [details] [review]
updated patch - warning fix, remove schema

Oops -- I've had this updated patch for a while but forgot to upload it.

This removes the schema entry.
It also fixes a warning that I'd missed earlier.
Comment 5 Danielle Madeley 2006-10-19 07:17:36 UTC
Put it in HEAD.
Comment 6 Kjartan Maraas 2006-11-16 12:13:48 UTC
Commited.