GNOME Bugzilla – Bug 440562
Setting XmlContent over dbus leads to unformatted notes
Last modified: 2008-02-26 20:51:29 UTC
When setting XmlContent over dbus i've found that any formatting i had in the XML data i'm specifying is not applied.
Created attachment 88638 [details] Script reproducing the problem Here is a python script to demonstrate the problem - it has some valid XML from a formatted note. Injecting this into a note with the SetNoteContentXML leads to unformatted text.
Created attachment 88639 [details] [review] Patch of little understanding Here is an attempt at fixing it - my test case behaves correctly with this patch applied. However i'm not really familiar with Tomboy so suspect that there are unknown issues potentially hiding here.
Created attachment 88640 [details] [review] Patch of little understanding Here is an attempt at fixing it - my test case behaves correctly with this patch applied. However i'm not really familiar with Tomboy so suspect that there are unknown issues potentially hiding here.
Quick update: John's patch will work for formatting, but probably not for things like tags and other metadata. This bug needs to be fixed completely for sync to work, so I'm looking at it, too.
(In reply to comment #4) > Quick update: John's patch will work for formatting, but probably not for > things like tags and other metadata. This bug needs to be fixed completely for > sync to work, so I'm looking at it, too. > As far as I can see, NoteBuffer doesn't deal with any of the extra metadata. So as far as this call goes, XmlContent just deals with the XML inside of the <note-content> tag. The DBUS interface should really be split up into objects so that a user could set metadata and XmlContent with separate calls.
I applied this patch in r1244 of the tomboy-sync branch. There's also a DBUS method to set ALL note XML at once (using Note.LoadForeignNoteXml), but so far no methods for individual pieces of metadata. Shouldn't be any trouble to add methods for manipulating tags, etc. This will probably get merged into the trunk soonish. Really appreciate the patch, John; it saved me a LOT of experimentation time!
Committed to trunk in r1287 (part of a larger commit). I'm leaving this open for now because if the content contains text that matches an existing note title, it should automatically become an internal link. This does not happen, though. It's on the sync TODO list.
Yeah, this was fixed a million years ago, unless I'm missing something. Sorry for any confusion.