GNOME Bugzilla – Bug 541044
Items in cookie/password manager are sorted confusingly
Last modified: 2011-01-06 18:17:38 UTC
There is seemingly no order to the items displayed in the cookie/password manager. The domains from my cookies are sorted like this: .arstechnica.com .episteme.arstechnica.com feeds.arstechnicha.com .biglumber.com .www.biglumber.com .ebuyer.com economist.com everything2.com .everything2.com .nuklearpower.com sd.play.com www.play.com .red-redemption.com moinmoin.wikiwikiweb.de moinmo.in lwn.net .sourceforge.net .azureus.sourceforge.net issues.apache.org bugs.freedesktop.org bugzilla.gnome.org and so on. They seem to be broadly alphabetical, but with weird subgroups being sorted separatley from the others. Passwords suffer from the same problem, but the host field is obscured even more by the addition of 'http://' and 'https://' to the start of every line. In addition, the protocol prefix makes it annoying to use type-ahead find to locate passwords from certain domains. Other information: The point of these screens are to make it easy to view and delete stored cookies/passwords. So I think the domain/host fields should simply be sorted lexographically, ignoring a leading . character. In addition, a 'search' GtkEntry that filters the displayed results (based on any part of the host/domain field) would be a welcome addition to both the cookies and passwords tabs.
They're sorted by domain.
(In reply to comment #1) > They're sorted by domain. I was going to reply "no they aren't", but then I went and looked at the code, and I see what you mean; first come all of the ".com" cookies, alphabetically by domain, then all the ".net" cookies alphabetically by domain, then all the ".org" cookies alphabetically by domain, etc. That's really non-obvious.
We could use the mozilla public suffix list (http://publicsuffix.org/) to fix this so that "something.google.com" would get sorted under "g", and "something.bbc.co.uk" would get sorted under "b". There are some other good uses for that list too, including fixing cookie acceptance policy, which was its original purpose. For that it would have to go into libsoup (or even glib/ghostutils.c?)
What I find confusing is that, when the cookies list is sorted by the Domain list, the sorting is not obvious. I don't think using the suffix list would help that. It would be OK if there was a separate visible column with the 'value used for sorting' that would contain the 'weird sort key' value, because then I could simply sort the list by domain and get what I expect to happen. The addition of a search box for filtering would also help a lot.
*** This bug has been marked as a duplicate of bug 300714 ***