GNOME Bugzilla – Bug 626624
Notebook sorting not ok under notebook button
Last modified: 2010-09-06 20:33:23 UTC
I created several notebooks. In the Search All Notes screen they are sorted alphabetically, so no problem. But when I open a note and want to select an existing notebook via the button the notebooks are not sorted. They seem to appear in random order as the list is not always the same. I am using Gnote 0.7.2 on Fedora 13 x86_64.
The same bug is in current version in git.
Created attachment 168156 [details] [review] Patch to solve the notebook sorting
It sounds contradictory but disabling the sort function solved the issue for me.
> It sounds contradictory but disabling the sort function solved the issue for > me. get_notebooks() return the sorted list of notebooks. The call to sort() sorts pointers to notebooks, that is, notebooks are sorted by their addresses in memory :) There are two possible solutions to this: 1) The proposed patch - removing sort(), 2) Passing sort() a predicate, which compares two notebooks by their names. First solution is easier, second is more prone to possible future changes.
*** Bug 589240 has been marked as a duplicate of this bug. ***
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report. I removed the line, that causes the problem.