Skip to content

Commit 731853f

Browse files
committed
Added sorting.
1 parent 16f3b1e commit 731853f

File tree

2 files changed

+43
-31
lines changed

2 files changed

+43
-31
lines changed

src/umain.lfm

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
object frmMain: TfrmMain
22
Left = 1683
3-
Height = 354
3+
Height = 531
44
Top = 1067
5-
Width = 426
5+
Width = 639
66
AllowDropFiles = True
77
AlphaBlend = True
88
Caption = 'Image Viewer Main'
9-
ClientHeight = 354
10-
ClientWidth = 426
9+
ClientHeight = 531
10+
ClientWidth = 639
1111
Color = clSilver
12+
DesignTimePPI = 144
1213
OnActivate = FormActivate
1314
OnClick = FormClick
1415
OnCloseQuery = FormCloseQuery
@@ -27,12 +28,12 @@ object frmMain: TfrmMain
2728
OnShow = FormShow
2829
PopupMode = pmAuto
2930
Position = poScreenCenter
30-
LCLVersion = '3.4.0.0'
31+
LCLVersion = '3.8.0.0'
3132
object Image1: TImage
3233
Left = 0
33-
Height = 354
34+
Height = 531
3435
Top = 0
35-
Width = 426
36+
Width = 639
3637
Align = alClient
3738
AutoSize = True
3839
Center = True
@@ -47,27 +48,27 @@ object frmMain: TfrmMain
4748
end
4849
object ScrollBox1: TScrollBox
4950
Left = 0
50-
Height = 354
51+
Height = 531
5152
Top = 0
52-
Width = 426
53-
HorzScrollBar.Page = 320
53+
Width = 639
54+
HorzScrollBar.Page = 480
5455
HorzScrollBar.Tracking = True
55-
VertScrollBar.Page = 241
56+
VertScrollBar.Page = 362
5657
VertScrollBar.Tracking = True
5758
Align = alClient
5859
BorderStyle = bsNone
59-
ClientHeight = 354
60-
ClientWidth = 426
60+
ClientHeight = 531
61+
ClientWidth = 639
6162
ParentBackground = False
6263
TabOrder = 0
6364
Visible = False
6465
OnMouseWheelDown = ScrollBox1MouseWheelDown
6566
OnMouseWheelUp = ScrollBox1MouseWheelUp
6667
object PaintBox1: TPaintBox
6768
Left = 0
68-
Height = 241
69+
Height = 362
6970
Top = 0
70-
Width = 320
71+
Width = 480
7172
OnPaint = PaintBox1Paint
7273
end
7374
end
@@ -9440,13 +9441,13 @@ object frmMain: TfrmMain
94409441
426082
94419442
}
94429443
OnDblClick = TrayIcon1DblClick
9443-
Left = 282
9444-
Top = 198
9444+
Left = 423
9445+
Top = 297
94459446
end
94469447
object PopupMenuMain: TPopupMenu
94479448
OnPopup = PopupMenuMainPopup
9448-
Left = 198
9449-
Top = 102
9449+
Left = 297
9450+
Top = 153
94509451
object MenuItemNext: TMenuItem
94519452
Caption = 'Next'
94529453
ShortCut = 39
@@ -9524,27 +9525,27 @@ object frmMain: TfrmMain
95249525
ExceptionDialog = aedOkMessageBox
95259526
ShowMainForm = False
95269527
OnException = ApplicationProperties1Exception
9527-
Left = 282
9528-
Top = 13
9528+
Left = 423
9529+
Top = 20
95299530
end
95309531
object OpenPictureDialog1: TOpenPictureDialog
95319532
Title = 'Open picture(s)'
95329533
Filter = 'All (*.jpeg;*.jpg;*.jpe;*.jfif;*.png;*.gif)|*.jpeg;*.jpg;*.jpe;*.jfif;*.png;*.gif|Joint Picture Expert Group (*.jpeg;*.jpg;*.jpe;*.jfif)|*.jpeg;*.jpg;*.jpe;*.jfif|Portable Network Graphics (*.png)|*.png|Graphics Interchange Format (*.gif)|*.gif'
95339534
Options = [ofFileMustExist, ofNoTestFileCreate, ofEnableSizing, ofDontAddToRecent, ofAutoPreview]
9534-
Left = 51
9535-
Top = 19
9535+
Left = 77
9536+
Top = 29
95369537
end
95379538
object XMLConfig: TXMLConfig
95389539
StartEmpty = False
95399540
RootName = 'Application'
95409541
ReadOnly = False
9541-
Left = 84
9542-
Top = 166
9542+
Left = 126
9543+
Top = 249
95439544
end
95449545
object PopupMenuSystem: TPopupMenu
95459546
OnPopup = PopupMenuSystemPopup
9546-
Left = 230
9547-
Top = 198
9547+
Left = 345
9548+
Top = 297
95489549
object MenuItemSysAbout: TMenuItem
95499550
Caption = 'About'
95509551
OnClick = MenuItemSysAboutClick
@@ -9561,14 +9562,14 @@ object frmMain: TfrmMain
95619562
Enabled = False
95629563
Interval = 1
95639564
OnTimer = TimerDelayStartTimer
9564-
Left = 141
9565-
Top = 102
9565+
Left = 212
9566+
Top = 153
95669567
end
95679568
object TimerEffectStart: TTimer
95689569
Enabled = False
95699570
Interval = 1
95709571
OnTimer = TimerEffectStartTimer
9571-
Left = 84
9572-
Top = 102
9572+
Left = 126
9573+
Top = 153
95739574
end
95749575
end

src/umain.pas

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,9 @@ procedure TfrmMain.FormCreate(Sender: TObject);
674674
end;
675675
end;
676676

677+
// sort
678+
FstPlaylistList.Sort;
679+
677680
// Search inside folder(s)
678681
LoadDirectories(FstDirectoryList, FstFileList);
679682

@@ -995,6 +998,10 @@ procedure TfrmMain.LoadDirectories(const Dirs: TStringList; FList: TStringList);
995998
try
996999
// Recursively search files
9971000
folderfiles := FindAllFiles(Dirs[i], fileSearchMask, FOptIncludeSubFolders);
1001+
1002+
// sort
1003+
folderfiles.Sort;
1004+
9981005
for j:=0 to folderfiles.Count - 1 do
9991006
begin
10001007
// MacOS has a bad habit of leaving garbages like this. So, skipping files start with ".".
@@ -1040,6 +1047,10 @@ procedure TfrmMain.LoadSiblings(const FName: string; FList: TStringList);
10401047
try
10411048
// Find siblings.
10421049
folderfiles := FindAllFiles(fileFolder, fileSearchMask, false);
1050+
1051+
// sort
1052+
folderfiles.Sort;
1053+
10431054
for j:=0 to folderfiles.Count - 1 do
10441055
begin
10451056
// MacOS has a bad habit of leaving garbages like this. So, skipping files start with ".".

0 commit comments

Comments
 (0)