Bug 95669 - Sort collections combo box in ablum properties
Summary: Sort collections combo box in ablum properties
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Albums-Filters (show other bugs)
Version: 0.7.1
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-22 14:59 UTC by Richard Taylor
Modified: 2017-07-15 16:16 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Taylor 2004-12-22 14:59:03 UTC
Version:           0.7.1-beta1 (using KDE 3.3.1, Gentoo)
Compiler:          gcc version 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)
OS:                Linux (i686) release 2.6.8-gentoo-r3

When setting the Collection in the Album Properties it would make it easier to locate a particular Collection is the combo box was sorted alphabetically.
Comment 1 Renchi Raju 2004-12-22 20:49:38 UTC
CVS commit by pahlibar: 


* sort collections by names
* fix an issue with empty collections showing up if the saved collection list
  has an empty collection
BUG: 95669


  M +1 -1      albumfolderview.cpp   1.70
  M +1 -0      albumpropsedit.cpp   1.20
  M +4 -0      albumsettings.cpp   1.26


--- kdeextragear-3/digikam/digikam/albumfolderview.cpp  #1.69:1.70
@@ -322,5 +322,5 @@ AlbumFolderItem* AlbumFolderView::findPa
     QString collection = album->getCollection();
 
-    if (!collectionList.contains(collection))
+    if (collection.isEmpty() || !collectionList.contains(collection))
         collection = i18n("Uncategorized Albums");
 

--- kdeextragear-3/digikam/digikam/albumpropsedit.cpp  #1.19:1.20
@@ -209,4 +209,5 @@ QStringList AlbumPropsEdit::albumCollect
     }
 
+    collections.sort();
     return collections;
 }

--- kdeextragear-3/digikam/digikam/albumsettings.cpp  #1.25:1.26
@@ -110,4 +110,5 @@ void AlbumSettings::init()
     d->albumCollectionNames.append(i18n("Todo"));
     d->albumCollectionNames.append(i18n("Miscellaneous"));
+    d->albumCollectionNames.sort();
 
     d->albumSortOrder = AlbumSettings::ByFolder;
@@ -150,5 +151,8 @@ void AlbumSettings::readSettings()
         config->readListEntry("Album Collections");
     if (!collectionList.isEmpty())
+    {
+        collectionList.sort();
         d->albumCollectionNames = collectionList;
+    }
 
     d->albumSortOrder =