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 629699 - Template note lost on notebook rename
Template note lost on notebook rename
Status: RESOLVED FIXED
Product: tomboy
Classification: Applications
Component: General
1.2.x
Other Linux
: High normal
: 1.6.0
Assigned To: Tomboy Maintainers
Tomboy Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-09-14 19:08 UTC by Aurimas Černius
Modified: 2011-08-22 22:10 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Aurimas Černius 2010-09-14 19:08:16 UTC
If notebook has a template note, it is lost, if notebook is renamed.
This is because notebook rename is actually creating new and removing old notebook. Template note is not updated accordingly and is lost (more exactly - dead. If you rename notebook back to it's old name, template is back).
Comment 1 Sandy Armstrong 2010-09-14 19:10:12 UTC
Yuck, thanks for pointing this out.  We have some outstanding work in other bugs to improve how notebooks and templates work, and this is one issue we'll need to address as well.
Comment 2 Aurimas Černius 2010-09-16 20:33:43 UTC
I have proposed a fix for this in Gnote.

This is done in three steps:
1. Add public member to Notebook for accessing template note title (Bug 629875).
2. Add public member function to NotebookManager for moving template note between notebooks. My implementation requires (1). (Bug 629876)
3. When renaming notebook, move template note to new notebook before deleting old one. Bug 610194 contains implementation for rename, you need to rewrite this line in C#:
notebooks::NotebookManager::instance().move_template_note(new_notebook, old_notebook);


If you have other ideas, I'm interested in them.
Comment 3 Sandy Armstrong 2010-09-16 20:46:20 UTC
Please see bug #509147, bug #527183, bug #601506, bug #626296.

My summer ended up being quite busy so I haven't had time to continue this work, but see this for more details:

https://bugzilla.gnome.org/show_bug.cgi?id=509147#c9
Comment 4 Aaron D Borden 2010-11-15 05:46:46 UTC
The patch in bug 509147 should address this issue. The original patch was reviewed Needs-work. I updated it, but no one has reviewed it since. Let me know if more work is needed, I'd like to get this committed.
Comment 5 Aaron D Borden 2011-08-22 22:10:10 UTC
The patch was committed and will be included in Tomboy 1.7.4