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 440562 - Setting XmlContent over dbus leads to unformatted notes
Setting XmlContent over dbus leads to unformatted notes
Status: RESOLVED FIXED
Product: tomboy
Classification: Applications
Component: General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Tomboy Maintainers
Tomboy Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-05-22 20:38 UTC by John Carr
Modified: 2008-02-26 20:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Script reproducing the problem (1009 bytes, text/plain)
2007-05-22 20:40 UTC, John Carr
  Details
Patch of little understanding (432 bytes, patch)
2007-05-22 20:48 UTC, John Carr
committed Details | Review
Patch of little understanding (432 bytes, patch)
2007-05-22 20:49 UTC, John Carr
none Details | Review

Description John Carr 2007-05-22 20:38:11 UTC
When setting XmlContent over dbus i've found that any formatting i had in the XML data i'm specifying is not applied.
Comment 1 John Carr 2007-05-22 20:40:33 UTC
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.
Comment 2 John Carr 2007-05-22 20:48:21 UTC
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.
Comment 3 John Carr 2007-05-22 20:49:28 UTC
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.
Comment 4 Sandy Armstrong 2007-06-05 13:59:52 UTC
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.
Comment 5 Boyd Timothy 2007-06-25 22:13:29 UTC
(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.
Comment 6 Sandy Armstrong 2007-06-28 07:02:11 UTC
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!
Comment 7 Sandy Armstrong 2007-07-05 06:13:02 UTC
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.
Comment 8 Sandy Armstrong 2007-10-13 17:21:42 UTC
Yeah, this was fixed a million years ago, unless I'm missing something.  Sorry for any confusion.