Skip to content

Commit

Permalink
Fixed sorting issue on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Kagamma committed Dec 28, 2023
1 parent 4f9cbb4 commit 1bb20b6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/forms/form.chat.pas
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ function TFormChat.LoadServiceList: String;
ComboBoxService.ItemIndex := 0;

SL := TStringList.Create;
SL.Sorted := True;
FindAllFiles(SL, GetPhysDirPath('data/scripts/' + Save.Settings.Skin + '/services'), '*.evil', False);
for I := 0 to SL.Count - 1 do
begin
Expand Down
17 changes: 9 additions & 8 deletions src/forms/form.settings.lfm
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ object FormSettings: TFormSettings
}
Position = poScreenCenter
ShowInTaskBar = stAlways
LCLVersion = '3.99.0.0'
OnShow = FormShow
object PanelButtons: TPanel
Left = 0
Expand Down Expand Up @@ -702,8 +703,8 @@ object FormSettings: TFormSettings
Top = 16
Width = 594
Caption = 'IMAP'
ClientHeight = 204
ClientWidth = 590
ClientHeight = 206
ClientWidth = 576
TabOrder = 0
object LabelEmailServer: TLabel
Left = 24
Expand Down Expand Up @@ -800,8 +801,8 @@ object FormSettings: TFormSettings
Top = 250
Width = 594
Caption = 'SMTP'
ClientHeight = 178
ClientWidth = 590
ClientHeight = 180
ClientWidth = 576
TabOrder = 1
object LabelEmailSmtpServer: TLabel
Left = 24
Expand Down Expand Up @@ -891,8 +892,8 @@ object FormSettings: TFormSettings
Align = alTop
BorderSpacing.Left = 64
Caption = 'Vosk'
ClientHeight = 68
ClientWidth = 631
ClientHeight = 70
ClientWidth = 617
TabOrder = 0
object LabelSTTModel1: TLabel
Left = 24
Expand Down Expand Up @@ -947,8 +948,8 @@ object FormSettings: TFormSettings
Align = alTop
BorderSpacing.Left = 64
Caption = 'whisper.cpp (experimental)'
ClientHeight = 68
ClientWidth = 631
ClientHeight = 70
ClientWidth = 617
TabOrder = 2
object LabelSTTModel2: TLabel
Left = 24
Expand Down
5 changes: 5 additions & 0 deletions src/forms/form.settings.pas
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,9 @@ procedure TFormSettings.FormShow(Sender: TObject);

ComboBoxSkin.Items.Clear;
SL := TStringList.Create;
SL.Sorted := True;
SL2 := TStringList.Create;
SL2.Sorted := True;
FindAllDirectories(SL, 'data/sprites', False);
FindAllDirectories(SL, GetOSLocalDir + 'data/sprites', False);
FindAllDirectories(SL2, 'data/scripts', False);
Expand Down Expand Up @@ -299,6 +301,7 @@ procedure TFormSettings.FormShow(Sender: TObject);
// Vosk loader
ComboBoxSTTVoskModel.Clear;
SL := TStringList.Create;
SL.Sorted := True;
FindAllDirectories(SL, 'data/nn/vosk', False);
for I := 0 to SL.Count - 1 do
begin
Expand All @@ -314,6 +317,7 @@ procedure TFormSettings.FormShow(Sender: TObject);
// whisper loader
ComboBoxSTTWhisperModel.Clear;
SL := TStringList.Create;
SL.Sorted := True;
FindAllFiles(SL, 'data/nn/whisper.cpp', '*.bin', False);
for I := 0 to SL.Count - 1 do
begin
Expand All @@ -327,6 +331,7 @@ procedure TFormSettings.FormShow(Sender: TObject);
SL.Free;

SL := TStringList.Create;
SL.Sorted := True;
FindAllFiles(SL, 'data/fonts', '', False);
for I := 0 to SL.Count - 1 do
begin
Expand Down

0 comments on commit 1bb20b6

Please sign in to comment.