From dc3c42586733e84bc5d92c037f837f5a83e96bd9 Mon Sep 17 00:00:00 2001 From: tobigun Date: Wed, 21 Apr 2010 23:58:40 +0000 Subject: - cleanup - made TSortingType an enum git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2271 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/base/USongs.pas | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/base/USongs.pas') diff --git a/src/base/USongs.pas b/src/base/USongs.pas index baeec13a..0056d75b 100644 --- a/src/base/USongs.pas +++ b/src/base/USongs.pas @@ -61,6 +61,7 @@ uses {$ENDIF} UPath, USong, + UIni, UCatCovers; type @@ -111,7 +112,7 @@ type procedure BrowseDir(Dir: IPath); // should return number of songs in the future procedure BrowseTXTFiles(Dir: IPath); procedure BrowseXMLFiles(Dir: IPath); - procedure Sort(Order: integer); + procedure Sort(Order: TSortingType); property Processing: boolean read fProcessing; end; @@ -162,7 +163,6 @@ uses UFiles, UGraphic, UMain, - UIni, UPathUtils, UNote, UFilesystem, @@ -394,7 +394,7 @@ begin Result := UTF8CompareText(TSong(Song1).Language, TSong(Song2).Language); end; -procedure TSongs.Sort(Order: integer); +procedure TSongs.Sort(Order: TSortingType); var CompareFunc: TListSortCompare; begin @@ -428,7 +428,7 @@ end; procedure TCatSongs.SortSongs(); begin - case Ini.Sorting of + case TSortingType(Ini.Sorting) of sEdition: begin Songs.Sort(sTitle); Songs.Sort(sArtist); @@ -528,7 +528,7 @@ begin // if tabs are on, add section buttons for each new section if (Ini.Tabs = 1) then begin - case (Ini.Sorting) of + case (TSortingType(Ini.Sorting)) of sEdition: begin if (CompareText(CurCategory, CurSong.Edition) <> 0) then begin -- cgit v1.2.3