mirror of
https://github.com/winscp/winscp.git
synced 2026-10-24 02:28:55 +03:00
All edit boxes with history consistently do not auto complete and show 16 entries in the drop down
Source commit: 23bb0d3bbe0fe9a8b548d2376b6fa00d8ae7f496
This commit is contained in:
@@ -1450,7 +1450,6 @@ object ConsoleDialog: TConsoleDialog
|
||||
Top = 8
|
||||
Width = 208
|
||||
Height = 23
|
||||
AutoComplete = False
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
MaxLength = 2048
|
||||
TabOrder = 0
|
||||
|
||||
@@ -41,9 +41,7 @@ object CopyDialog: TCopyDialog
|
||||
Top = 26
|
||||
Width = 427
|
||||
Height = 23
|
||||
AutoComplete = False
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
DropDownCount = 16
|
||||
TabOrder = 0
|
||||
Text = 'LocalDirectoryEdit'
|
||||
OnChange = ControlChange
|
||||
@@ -54,9 +52,7 @@ object CopyDialog: TCopyDialog
|
||||
Top = 26
|
||||
Width = 513
|
||||
Height = 23
|
||||
AutoComplete = False
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
DropDownCount = 16
|
||||
MaxLength = 1000
|
||||
TabOrder = 2
|
||||
Text = 'RemoteDirectoryEdit'
|
||||
|
||||
@@ -42,9 +42,7 @@ object CopyLocalDialog: TCopyLocalDialog
|
||||
Top = 26
|
||||
Width = 371
|
||||
Height = 23
|
||||
AutoComplete = False
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
DropDownCount = 16
|
||||
TabOrder = 0
|
||||
Text = 'DirectoryEdit'
|
||||
OnExit = DirectoryEditExit
|
||||
|
||||
@@ -58,7 +58,6 @@ object CopyParamsFrame: TCopyParamsFrame
|
||||
Top = 91
|
||||
Width = 101
|
||||
Height = 23
|
||||
AutoComplete = False
|
||||
TabOrder = 3
|
||||
Text = 'SpeedCombo'
|
||||
OnExit = SpeedComboExit
|
||||
@@ -289,7 +288,6 @@ object CopyParamsFrame: TCopyParamsFrame
|
||||
Top = 109
|
||||
Width = 255
|
||||
Height = 23
|
||||
AutoComplete = False
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
MaxLength = 1000
|
||||
TabOrder = 3
|
||||
@@ -321,7 +319,6 @@ object CopyParamsFrame: TCopyParamsFrame
|
||||
Top = 40
|
||||
Width = 346
|
||||
Height = 23
|
||||
AutoComplete = False
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
MaxLength = 3000
|
||||
TabOrder = 0
|
||||
|
||||
@@ -453,7 +453,7 @@ void __fastcall TSaveSessionDialog::Init(bool CanSavePassword,
|
||||
|
||||
FolderCombo = new TUIStateAwareComboBox(this);
|
||||
AddComboBox(FolderCombo, CreateLabel(LoadStr(SAVE_SESSION_FOLDER)));
|
||||
FolderCombo->DropDownCount = Max(FolderCombo->DropDownCount, 16);
|
||||
FolderCombo->DropDownCount = Max(FolderCombo->DropDownCount, DefaultHistoryDropDownCount);
|
||||
FolderCombo->Items->Add(FRootFolder);
|
||||
FolderCombo->Items->AddStrings(Folders.get());
|
||||
|
||||
@@ -661,7 +661,7 @@ __fastcall TSaveWorkspaceDialog::TSaveWorkspaceDialog(
|
||||
WorkspaceNameCombo = new TUIStateAwareComboBox(this);
|
||||
WorkspaceNameCombo->AutoComplete = false;
|
||||
AddComboBox(WorkspaceNameCombo, CreateLabel(LoadStr(SAVE_WORKSPACE_PROMPT)));
|
||||
WorkspaceNameCombo->DropDownCount = Max(WorkspaceNameCombo->DropDownCount, 16);
|
||||
WorkspaceNameCombo->DropDownCount = Max(WorkspaceNameCombo->DropDownCount, DefaultHistoryDropDownCount);
|
||||
|
||||
std::unique_ptr<TStrings> Workspaces(StoredSessions->GetWorkspaces());
|
||||
WorkspaceNameCombo->Items->AddStrings(Workspaces.get());
|
||||
@@ -819,7 +819,6 @@ __fastcall TRemoteMoveDialog::TRemoteMoveDialog(bool Multi, TDirectoryExistsEven
|
||||
AddImage(L"Move L to R");
|
||||
|
||||
Combo = new THistoryComboBox(this);
|
||||
Combo->AutoComplete = false;
|
||||
AddComboBox(Combo, CreateLabel(LoadStr(REMOTE_TRANSFER_PROMPT2)));
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
@@ -1190,7 +1189,6 @@ THistoryComboBox * __fastcall TCustomCommandOptionsDialog::CreateHistoryComboBox
|
||||
const TCustomCommandType::TOption & Option, const UnicodeString & Value)
|
||||
{
|
||||
THistoryComboBox * ComboBox = new THistoryComboBox(this);
|
||||
ComboBox->AutoComplete = false;
|
||||
AddComboBox(ComboBox, CreateLabel(Option.Caption));
|
||||
|
||||
UnicodeString HistoryKey = FCommand->GetOptionKey(Option, FSite);
|
||||
@@ -1535,7 +1533,7 @@ void __fastcall TSiteRawDialog::AddButtonClick(TObject *)
|
||||
AddDialog->Caption = LoadStr(SITE_RAW_ADD_CAPTION);
|
||||
TComboBox * AddComboBox = new TUIStateAwareComboBox(AddDialog.get());
|
||||
AddComboBox->Style = csDropDownList;
|
||||
AddComboBox->DropDownCount = Max(AddComboBox->DropDownCount, 16);
|
||||
AddComboBox->DropDownCount = Max(AddComboBox->DropDownCount, DefaultHistoryDropDownCount);
|
||||
AddDialog->AddComboBox(AddComboBox, CreateLabel(LoadStr(SITE_RAW_ADD_LABEL)), Names.get(), true);
|
||||
AddComboBox->ItemIndex = 0;
|
||||
if (AddDialog->Execute())
|
||||
|
||||
@@ -70,7 +70,6 @@ object CustomCommandDialog: TCustomCommandDialog
|
||||
Top = 74
|
||||
Width = 430
|
||||
Height = 23
|
||||
AutoComplete = False
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
MaxLength = 2048
|
||||
TabOrder = 1
|
||||
|
||||
@@ -85,7 +85,6 @@ object EditorPreferencesDialog: TEditorPreferencesDialog
|
||||
Top = 68
|
||||
Width = 310
|
||||
Height = 23
|
||||
AutoComplete = False
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
TabOrder = 2
|
||||
Text = 'ExternalEditorEdit'
|
||||
@@ -146,7 +145,6 @@ object EditorPreferencesDialog: TEditorPreferencesDialog
|
||||
Top = 40
|
||||
Width = 413
|
||||
Height = 23
|
||||
AutoComplete = False
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
MaxLength = 1000
|
||||
TabOrder = 0
|
||||
|
||||
@@ -1409,7 +1409,6 @@ object FileFindDialog: TFileFindDialog
|
||||
Top = 89
|
||||
Width = 374
|
||||
Height = 23
|
||||
AutoComplete = False
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
MaxLength = 1000
|
||||
TabOrder = 3
|
||||
@@ -1422,7 +1421,6 @@ object FileFindDialog: TFileFindDialog
|
||||
Top = 40
|
||||
Width = 288
|
||||
Height = 23
|
||||
AutoComplete = False
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
MaxLength = 1000
|
||||
TabOrder = 0
|
||||
|
||||
@@ -60,7 +60,6 @@ object FullSynchronizeDialog: TFullSynchronizeDialog
|
||||
Top = 87
|
||||
Width = 460
|
||||
Height = 23
|
||||
AutoComplete = False
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
MaxLength = 1000
|
||||
TabOrder = 2
|
||||
@@ -72,7 +71,6 @@ object FullSynchronizeDialog: TFullSynchronizeDialog
|
||||
Top = 40
|
||||
Width = 374
|
||||
Height = 23
|
||||
AutoComplete = False
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
MaxLength = 1000
|
||||
TabOrder = 0
|
||||
|
||||
@@ -52,7 +52,6 @@ __fastcall TInputDialog::TInputDialog(
|
||||
HistoryCombo = new THistoryComboBox(this);
|
||||
AddEditLikeControl(HistoryCombo, Label);
|
||||
HistoryCombo->MaxLength = MaxLength;
|
||||
HistoryCombo->AutoComplete = false;
|
||||
Edit = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ __fastcall TBookmarkNameDialog::TBookmarkNameDialog(TStrings * PeerBookmarks,
|
||||
|
||||
NameCombo = new TUIStateAwareComboBox(this);
|
||||
NameCombo->AutoComplete = false;
|
||||
NameCombo->DropDownCount = Max(NameCombo->DropDownCount, 16);
|
||||
NameCombo->DropDownCount = Max(NameCombo->DropDownCount, DefaultHistoryDropDownCount);
|
||||
AddComboBox(NameCombo, CreateLabel(LoadStr(ADD_BOOKMARK_PROMPT)));
|
||||
NameCombo->Items = PeerBookmarks;
|
||||
|
||||
|
||||
@@ -313,7 +313,6 @@ object LocationProfilesDialog: TLocationProfilesDialog
|
||||
Width = 461
|
||||
Height = 23
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
DropDownCount = 16
|
||||
TabOrder = 0
|
||||
Text = 'LocalDirectoryEdit'
|
||||
OnChange = DirectoryEditChange
|
||||
@@ -325,7 +324,6 @@ object LocationProfilesDialog: TLocationProfilesDialog
|
||||
Width = 547
|
||||
Height = 23
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
DropDownCount = 16
|
||||
MaxLength = 1000
|
||||
TabOrder = 2
|
||||
Text = 'RemoteDirectoryEdit'
|
||||
|
||||
@@ -51,7 +51,6 @@ object OpenDirectoryDialog: TOpenDirectoryDialog
|
||||
Width = 396
|
||||
Height = 23
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
DropDownCount = 16
|
||||
MaxLength = 1000
|
||||
TabOrder = 0
|
||||
Text = 'RemoteDirectoryEdit'
|
||||
|
||||
@@ -71,7 +71,6 @@ object RemoteTransferDialog: TRemoteTransferDialog
|
||||
Top = 77
|
||||
Width = 392
|
||||
Height = 23
|
||||
AutoComplete = False
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
MaxLength = 250
|
||||
TabOrder = 1
|
||||
|
||||
@@ -95,7 +95,6 @@ object SelectMaskDialog: TSelectMaskDialog
|
||||
Top = 25
|
||||
Width = 341
|
||||
Height = 23
|
||||
AutoComplete = False
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
MaxLength = 1000
|
||||
TabOrder = 0
|
||||
|
||||
@@ -64,7 +64,6 @@ object SynchronizeDialog: TSynchronizeDialog
|
||||
Top = 87
|
||||
Width = 444
|
||||
Height = 23
|
||||
AutoComplete = False
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
MaxLength = 1000
|
||||
TabOrder = 2
|
||||
@@ -77,7 +76,6 @@ object SynchronizeDialog: TSynchronizeDialog
|
||||
Top = 40
|
||||
Width = 358
|
||||
Height = 23
|
||||
AutoComplete = False
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
MaxLength = 1000
|
||||
TabOrder = 0
|
||||
|
||||
@@ -74,6 +74,8 @@ __fastcall THistoryComboBox::THistoryComboBox(TComponent * AOwner) :
|
||||
FMaxHistorySize = DefaultMaxHistorySize;
|
||||
FOnGetData = nullptr;
|
||||
FOnSetData = nullptr;
|
||||
DropDownCount = DefaultHistoryDropDownCount;
|
||||
AutoComplete = DefaultHistoryAutoComplete;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall THistoryComboBox::KeyDown(unsigned short & Key, TShiftState Shift)
|
||||
|
||||
@@ -30,6 +30,8 @@ typedef void __fastcall (__closure *THistoryComboHistoryEvent)(THistoryComboBox
|
||||
//---------------------------------------------------------------------------
|
||||
#define DefaultHistorySaveOn ((1 << soExit) + (1 << soDropDown))
|
||||
const int DefaultMaxHistorySize = 30;
|
||||
const int DefaultHistoryDropDownCount = 16;
|
||||
const int DefaultHistoryAutoComplete = false;
|
||||
//---------------------------------------------------------------------------
|
||||
class THistoryComboBox : public TUIStateAwareComboBox
|
||||
{
|
||||
@@ -66,6 +68,8 @@ __published:
|
||||
__property THistoryComboBoxGetData OnGetData = { read = FOnGetData, write = FOnGetData };
|
||||
__property THistoryComboBoxSetData OnSetData = { read = FOnSetData, write = FOnSetData };
|
||||
__property UnicodeString HistoryKey = { read = FHistoryKey, write = SetHistoryKey };
|
||||
__property DropDownCount = { default = DefaultHistoryDropDownCount };
|
||||
__property AutoComplete = { default = DefaultHistoryAutoComplete };
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
void SaveToHistory(TStrings * Strings, const UnicodeString & T, TObject * Data = nullptr, int MaxHistorySize = DefaultMaxHistorySize);
|
||||
|
||||
@@ -1208,7 +1208,7 @@ void __fastcall InitializeShortCutCombo(TComboBox * ComboBox,
|
||||
}
|
||||
|
||||
ComboBox->Style = csDropDownList;
|
||||
ComboBox->DropDownCount = Max(ComboBox->DropDownCount, 16);
|
||||
ComboBox->DropDownCount = Max(ComboBox->DropDownCount, DefaultHistoryDropDownCount);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall SetShortCutCombo(TComboBox * ComboBox, TShortCut Value)
|
||||
|
||||
@@ -914,7 +914,6 @@ __fastcall TCustomCommandPromptsDialog::TCustomCommandPromptsDialog(
|
||||
Prompt = LoadStr(CUSTOM_COMMANDS_PARAM_PROMPT2);
|
||||
}
|
||||
THistoryComboBox * ComboBox = new THistoryComboBox(this);
|
||||
ComboBox->AutoComplete = false;
|
||||
AddComboBox(ComboBox, CreateLabel(Prompt));
|
||||
|
||||
UnicodeString HistoryKey = FPrompts[Index];
|
||||
|
||||
Reference in New Issue
Block a user