diff --git a/ide/lazarusidestrconsts.pas b/ide/lazarusidestrconsts.pas index d56fce1582..3226f067fc 100644 --- a/ide/lazarusidestrconsts.pas +++ b/ide/lazarusidestrconsts.pas @@ -3921,9 +3921,14 @@ resourcestring lisPathEditMovePathDown = 'Move path down (Ctrl+Down)'; lisPathEditMovePathUp = 'Move path up (Ctrl+Up)'; lisPathEditBrowse = 'Browse'; - lisPathEditPathTemplates = 'Path templates'; + lisPathEditorReplaceHint = 'Replace the selected path with a new path'; + lisPathEditorAddHint = 'Add new path to the list'; lisPathEditDeleteInvalidPaths = 'Delete Invalid Paths'; - + lisPathEditorDeleteHint = 'Delete the selected path'; + lisPathEditorDeleteInvalidHint = 'Remove non-existent (gray) paths from the list'; + lisPathEditPathTemplates = 'Path templates'; + lisPathEditorTemplAddHint = 'Add template to the list'; + // new dialog lisNewDlgNoItemSelected = 'No item selected'; lisErrorOpeningComponent = 'Error opening component'; @@ -5318,11 +5323,6 @@ resourcestring +'will be set to the values of the chosen scheme.'; lisKMKeymappingScheme = 'Keymapping Scheme'; lisPVUEditVirtualUnit = 'Edit virtual unit'; - lisPathEditorReplaceHint = 'Replace the selected path with a new path'; - lisPathEditorAddHint = 'Add new path to the list'; - lisPathEditorDeleteHint = 'Delete the selected path'; - lisPathEditorDeleteInvalidHint = 'Remove non-existent (gray) paths from the list'; - lisPathEditorTemplAddHint = 'Add template to the list'; lisExportAllItemsToFile = 'Export All Items to File'; lisImportFromFile = 'Import from File'; diff --git a/ide/patheditordlg.pas b/ide/patheditordlg.pas index d1df5f4133..8e0c796f55 100644 --- a/ide/patheditordlg.pas +++ b/ide/patheditordlg.pas @@ -81,15 +81,12 @@ type procedure PathListBoxSelectionChange(Sender: TObject; {%H-}User: boolean); procedure ReplaceButtonClick(Sender: TObject); procedure ImportMenuItemClick(Sender: TObject); - procedure TemplatesListBoxDblClick(Sender: TObject); - procedure TemplatesListBoxSelectionChange(Sender: TObject; {%H-}User: boolean); private FBaseDirectory: string; FEffectiveBaseDirectory: string; FTemplateList: TStringList; procedure AddPath(aPath: String; aObject: TObject); function GetPath: string; - //function GetTemplates: string; function BaseRelative(const APath: string): String; function PathAsAbsolute(const APath: string): String; function PathMayExist(APath: string): TObject; @@ -292,6 +289,7 @@ var begin TemplateForm := TGenericListSelectForm.Create(Nil); try + TemplateForm.Caption := lisPathEditPathTemplates; // Let a user select only templates which are not in the list already. for i := 0 to FTemplateList.Count-1 do if PathListBox.Items.IndexOf(FTemplateList[i]) = -1 then @@ -407,16 +405,6 @@ begin UpdateButtons; end; -procedure TPathEditorDialog.TemplatesListBoxSelectionChange(Sender: TObject; User: boolean); -begin - UpdateButtons; -end; - -procedure TPathEditorDialog.TemplatesListBoxDblClick(Sender: TObject); -begin - AddTemplateButtonClick(Nil); -end; - procedure TPathEditorDialog.FormCreate(Sender: TObject); const Filt = 'Text file (*.txt)|*.txt|All files (*)|*'; @@ -550,13 +538,7 @@ begin sl.Free; end; end; -{ -function TPathEditorDialog.GetTemplates: string; -begin - raise Exception.Create('TPathEditorDialog.GetTemplates is called.'); - //Result := TextToPath(FTemplateList.Text); -end; -} + procedure TPathEditorDialog.SetTemplates(const AValue: string); begin SplitString(GetForcedPathDelims(AValue), ';', FTemplateList, True);