GNOME Bugzilla – Bug 647888
GetNoteContents returns wrong text for notes not displayed
Last modified: 2011-10-23 15:04:11 UTC
Gnote 0.7.3 (debian testing) For a note using bulleted lists, GetNoteContents (D-Bus API) will return different text depending on whether the note has been displayed or not. Only displaying the note first will make it return the correct text (with unicode bullets). I discovered this when exporting all notes via D-Bus to my own plaintext note solution instead. A workaround was to call DisplayNote on each note before exporting it, in my case the amount of windows was pretty low (below 100?) so it worked fine.
Created attachment 199597 [details] [review] Initialize buffer before returning text_content. GetNoteContent calls Note::text_content() which returns the text from m_buffer if initialized, otherwise it just decodes the xml content. This patch will call Note::get_buffer() if its not initialized, then always return the text from the buffer (fixing the issue with expanding bullets reported in this bug).
Looks pretty simple fix, thanks. I'll take a deeper look soon.
This problem has been fixed in our software repository. The fix will go into 0.7.6 and 0.8.1 releases. Thank you for your bug report.
Thank you!