mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-28 10:02:14 +00:00
ADD: Some code for file associations manager
This commit is contained in:
parent
18b91982c4
commit
71bfecd1c4
2 changed files with 7 additions and 8 deletions
|
|
@ -14,7 +14,6 @@ object frmFileAssoc: TfrmFileAssoc
|
|||
Font.Color = clBlack
|
||||
Font.Height = 13
|
||||
Font.Pitch = fpVariable
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
Position = poDesktopCenter
|
||||
object gbFileTypes: TGroupBox
|
||||
|
|
|
|||
|
|
@ -71,7 +71,6 @@ type
|
|||
procedure btnRemoveTypeClick(Sender: TObject);
|
||||
procedure btnRenameTypeClick(Sender: TObject);
|
||||
procedure btnUpActClick(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure lbActionsSelectionChange(Sender: TObject; User: boolean);
|
||||
procedure lbFileTypesDrawItem(Control: TWinControl; Index: Integer;
|
||||
|
|
@ -95,7 +94,12 @@ uses LCLType, uGlobsPaths, uGlobs, uPixMapManager;
|
|||
|
||||
procedure ShowFileAssocDlg;
|
||||
begin
|
||||
TfrmFileAssoc.Create(nil).Show;
|
||||
with TfrmFileAssoc.Create(Application) do
|
||||
try
|
||||
ShowModal;
|
||||
finally
|
||||
Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TfrmFileAssoc }
|
||||
|
|
@ -211,6 +215,7 @@ begin
|
|||
slActions := TStringList(lbActions.Items.Objects[iIndex]);
|
||||
ledAction.Text := slActions.Names[iIndex];
|
||||
fneCommand.FileName := slActions.ValueFromIndex[iIndex];
|
||||
UpdateEnabledButtons;
|
||||
end;
|
||||
|
||||
procedure TfrmFileAssoc.lbFileTypesDrawItem(Control: TWinControl;
|
||||
|
|
@ -470,11 +475,6 @@ begin
|
|||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmFileAssoc.FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
begin
|
||||
CloseAction := caFree;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I ffileassoc.lrs}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue