[Bug 158868] Non natural album sorting

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Bug 158868] Non natural album sorting

Peter Penz
http://bugs.kde.org/show_bug.cgi?id=158868


Peter Penz peter penz gmx at changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]




--- Comment #6 from Peter Penz <peter penz gmx at>  2008-12-03 15:09:59 ---
@Gilles: I wanted to provide a patch for this issue (svn trunk), but I've a
crash in Xine when starting Digikam :-(

Anyhow: Also with the KDE3 code is should be straight forward having a natural
sorting. Just use the static method KStringHandler::naturalCompare() from
kstringhandler in kdelibs.

I did a quick search in Digikam and I think replacing the calls

case(AlbumSettings::ByIName):
{
    return d->info.name().localeAwareCompare(iconItem->d->info.name());
}

with

case(AlbumSettings::ByIName):
{
    return KStringHandler::naturalCompare(d->info.name(),
iconItem->d->info.name());
}

inside albumiconinfo.cpp (method AlbumIconItem::compare()) might be sufficient.

If you have any questions how Dolphin does the sorting, please drop me a mail
:-) Thanks!


--
Configure bugmail: http://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel