You've already forked lazarus-ccr
tvplanit: Fix wavdlg to play the selected sound file.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4739 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -667,8 +667,8 @@ begin
|
||||
try
|
||||
SoundFinder.DingPath := AlarmWavPath;
|
||||
SoundFinder.Populate;
|
||||
SoundFinder.ShowModal;
|
||||
SoundFinder.OnPlaySound := DoPlaySound;
|
||||
SoundFinder.ShowModal;
|
||||
if SoundFinder.ReturnCode = TvpEditorReturnCode(rtCommit) then begin
|
||||
if SoundFinder.CBDefault.Checked then
|
||||
AlarmWavPath := ''
|
||||
|
@ -36,7 +36,7 @@ object FrmSoundDialog: TFrmSoundDialog
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 446
|
||||
ClientWidth = 275
|
||||
TabOrder = 0
|
||||
TabOrder = 2
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Height = 34
|
||||
@ -66,7 +66,7 @@ object FrmSoundDialog: TFrmSoundDialog
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 38
|
||||
ClientWidth = 275
|
||||
TabOrder = 1
|
||||
TabOrder = 2
|
||||
object PlayButton: TSpeedButton
|
||||
Left = 8
|
||||
Height = 25
|
||||
@ -126,7 +126,7 @@ object FrmSoundDialog: TFrmSoundDialog
|
||||
ItemHeight = 0
|
||||
Mask = '*.wav'
|
||||
OnChange = FileListBox1Change
|
||||
TabOrder = 2
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object Splitter1: TSplitter
|
||||
@ -147,7 +147,8 @@ object FrmSoundDialog: TFrmSoundDialog
|
||||
BorderSpacing.Top = 4
|
||||
BorderSpacing.Bottom = 4
|
||||
FileSortType = fstNone
|
||||
TabOrder = 2
|
||||
TabOrder = 0
|
||||
OnChange = ShellTreeViewChange
|
||||
ObjectTypes = [otFolders]
|
||||
end
|
||||
end
|
||||
|
@ -70,6 +70,7 @@ type
|
||||
procedure CancelBtnClick(Sender: TObject);
|
||||
procedure FormKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
procedure ShellTreeViewChange(Sender: TObject; Node: TTreeNode);
|
||||
private
|
||||
FOnPlaySound: TVpPlaySoundEvent;
|
||||
public
|
||||
@ -129,16 +130,19 @@ begin
|
||||
end else begin
|
||||
Drive := UpCase(ExtractFileDrive(DingPath)[1]);
|
||||
if FileExists(DingPath) and (Drive in ['A'..'Z']) then begin
|
||||
// DriveComboBox1.Drive := Drive;
|
||||
// DirectoryListBox1.Directory := ExtractFileDir(DingPath);
|
||||
ShellTreeview.Path := ExtractFileDir(DingPath);
|
||||
FileListBox1.FileName := DingPath;
|
||||
end else begin
|
||||
// DirectoryListBox1.Directory := ExtractFileDir(ParamStr(0));
|
||||
ShellTreeView.Path := ExtractFileDir(ParamStr(0));
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TFrmSoundDialog.ShellTreeViewChange(Sender: TObject; Node: TTreeNode);
|
||||
begin
|
||||
FileListbox1.Directory := ShellTreeView.Path;
|
||||
end;
|
||||
|
||||
{=====}
|
||||
|
||||
procedure TFrmSoundDialog.CBDefaultClick(Sender: TObject);
|
||||
|
Reference in New Issue
Block a user