Skip to content

Commit

Permalink
Bug 1534: Button to open Edit file mask dialog on Select and Filters …
Browse files Browse the repository at this point in the history
…dialogs

https://winscp.net/tracker/1534

Source commit: 210fb1d4d5f3ec80ad9cc1b0dcb1311e03b48adf
  • Loading branch information
martinprikryl committed Jan 28, 2018
1 parent b256d2a commit b7f49ec
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 11 deletions.
9 changes: 9 additions & 0 deletions source/forms/SelectMask.cpp
Expand Up @@ -167,3 +167,12 @@ void __fastcall TSelectMaskDialog::FormShow(TObject * /*Sender*/)
CenterFormOn(this, FParent);
}
//---------------------------------------------------------------------------
void __fastcall TSelectMaskDialog::MaskButtonClick(TObject * /*Sender*/)
{
TFileMasks Masks = MaskEdit->Text;
if (DoEditMaskDialog(Masks))
{
MaskEdit->Text = Masks.Masks;
}
}
//---------------------------------------------------------------------------
32 changes: 21 additions & 11 deletions source/forms/SelectMask.dfm
Expand Up @@ -7,27 +7,27 @@ object SelectMaskDialog: TSelectMaskDialog
BorderStyle = bsDialog
Caption = 'SelectX'
ClientHeight = 142
ClientWidth = 361
ClientWidth = 417
Color = clBtnFace
ParentFont = True
OldCreateOrder = True
Position = poDesigned
OnCloseQuery = FormCloseQuery
OnShow = FormShow
DesignSize = (
361
417
142)
PixelsPerInch = 96
TextHeight = 13
object MaskGroup: TGroupBox
Left = 8
Top = 6
Width = 345
Width = 401
Height = 94
Anchors = [akLeft, akTop, akRight, akBottom]
TabOrder = 0
DesignSize = (
345
401
94)
object Label3: TLabel
Left = 16
Expand All @@ -43,12 +43,12 @@ object SelectMaskDialog: TSelectMaskDialog
Width = 209
Height = 17
Caption = 'Apply to &directories'
TabOrder = 2
TabOrder = 3
end
object MaskEdit: THistoryComboBox
Left = 16
Top = 36
Width = 313
Width = 283
Height = 21
AutoComplete = False
Anchors = [akLeft, akTop, akRight]
Expand All @@ -58,7 +58,7 @@ object SelectMaskDialog: TSelectMaskDialog
OnExit = MaskEditExit
end
object HintText: TStaticText
Left = 224
Left = 194
Top = 64
Width = 105
Height = 17
Expand All @@ -69,9 +69,19 @@ object SelectMaskDialog: TSelectMaskDialog
TabOrder = 1
TabStop = True
end
object MaskButton: TButton
Left = 305
Top = 34
Width = 80
Height = 25
Anchors = [akTop, akRight]
Caption = '&Edit...'
TabOrder = 2
OnClick = MaskButtonClick
end
end
object OKBtn: TButton
Left = 109
Left = 165
Top = 109
Width = 75
Height = 25
Expand All @@ -82,7 +92,7 @@ object SelectMaskDialog: TSelectMaskDialog
TabOrder = 2
end
object CancelBtn: TButton
Left = 194
Left = 250
Top = 109
Width = 75
Height = 25
Expand All @@ -93,7 +103,7 @@ object SelectMaskDialog: TSelectMaskDialog
TabOrder = 3
end
object HelpButton: TButton
Left = 277
Left = 333
Top = 109
Width = 75
Height = 25
Expand All @@ -103,7 +113,7 @@ object SelectMaskDialog: TSelectMaskDialog
OnClick = HelpButtonClick
end
object ClearButton: TButton
Left = 24
Left = 84
Top = 109
Width = 75
Height = 25
Expand Down
2 changes: 2 additions & 0 deletions source/forms/SelectMask.h
Expand Up @@ -24,11 +24,13 @@ class TSelectMaskDialog : public TForm
TButton *HelpButton;
TStaticText *HintText;
TButton *ClearButton;
TButton *MaskButton;
void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
void __fastcall MaskEditExit(TObject *Sender);
void __fastcall HelpButtonClick(TObject *Sender);
void __fastcall ClearButtonClick(TObject *Sender);
void __fastcall FormShow(TObject *Sender);
void __fastcall MaskButtonClick(TObject *Sender);
private:
TFileFilter FFileFilter;
TControl * FParent;
Expand Down

0 comments on commit b7f49ec

Please sign in to comment.