mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 07:30:19 +02:00
IDE: Add a form caption when editing templates in PathEditor. Cleanup.
git-svn-id: trunk@58920 -
This commit is contained in:
parent
cbb9c40974
commit
41ea7084a7
@ -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';
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user