[Digikam-users] More questions about sort order in folders

Chris G cl at isbd.net
Tue Jul 8 12:12:22 BST 2008


I have been looking at the code that Arnd pointed me at in reply to my
previous E-Mail about this:-

    > - I want "View-Sort Albums-By
    > Date" to do *exactly* that.  I.e. I want the view option to simply
    > change the sort order of my albums in the 'normal' view of my albums.
    > Preserve all the hierarchy I have carefully created by sorting each level
    > within that hiearchy by date.  This is surely quite simple

    The relevant code is in
      digikam/albumfolderview.cpp
    namely void AlbumFolderView::resort() which in turn makes
    use of AlbumFolderViewItem* AlbumFolderView::findParent(...)
    with calls depending on the value of getAlbumSortOrder().


So I have the 0.9.4rc2 version downloaded and compiling and I'm
looking at albumfolderview.cpp.  Specifically I'm looking at
findParentByFolder() which is called by findParent(...) when the album
sort is set to "By Folder".

Where does the actual sorting take place?  I.e. when it's set to sort
"By Folder" who/what/where does the alphabetic sort take place?  I
want to dive in and change the sort for "View-Sort Albums-By Folder"
so that I can have the folder hierarchy with a different sort order.

If I find I can change the code fairly easily to do what I want then I
might even get clever and add the required extra menu items.  It needs
really to be a sub-menu which appears when you select "View-Sort Albums-By
Folder" to allow changing to different sort orders within the original
albums/folders.

(I am actually a C/C++ programmer, it's been my job since the early 
1980s)

-- 
Chris Green



More information about the Digikam-users mailing list