mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-01 16:32:25 +01: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,8 +3921,13 @@ resourcestring
|
|||||||
lisPathEditMovePathDown = 'Move path down (Ctrl+Down)';
|
lisPathEditMovePathDown = 'Move path down (Ctrl+Down)';
|
||||||
lisPathEditMovePathUp = 'Move path up (Ctrl+Up)';
|
lisPathEditMovePathUp = 'Move path up (Ctrl+Up)';
|
||||||
lisPathEditBrowse = 'Browse';
|
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';
|
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
|
// new dialog
|
||||||
lisNewDlgNoItemSelected = 'No item selected';
|
lisNewDlgNoItemSelected = 'No item selected';
|
||||||
@ -5318,11 +5323,6 @@ resourcestring
|
|||||||
+'will be set to the values of the chosen scheme.';
|
+'will be set to the values of the chosen scheme.';
|
||||||
lisKMKeymappingScheme = 'Keymapping Scheme';
|
lisKMKeymappingScheme = 'Keymapping Scheme';
|
||||||
lisPVUEditVirtualUnit = 'Edit virtual unit';
|
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';
|
lisExportAllItemsToFile = 'Export All Items to File';
|
||||||
lisImportFromFile = 'Import from File';
|
lisImportFromFile = 'Import from File';
|
||||||
|
|
||||||
|
|||||||
@ -81,15 +81,12 @@ type
|
|||||||
procedure PathListBoxSelectionChange(Sender: TObject; {%H-}User: boolean);
|
procedure PathListBoxSelectionChange(Sender: TObject; {%H-}User: boolean);
|
||||||
procedure ReplaceButtonClick(Sender: TObject);
|
procedure ReplaceButtonClick(Sender: TObject);
|
||||||
procedure ImportMenuItemClick(Sender: TObject);
|
procedure ImportMenuItemClick(Sender: TObject);
|
||||||
procedure TemplatesListBoxDblClick(Sender: TObject);
|
|
||||||
procedure TemplatesListBoxSelectionChange(Sender: TObject; {%H-}User: boolean);
|
|
||||||
private
|
private
|
||||||
FBaseDirectory: string;
|
FBaseDirectory: string;
|
||||||
FEffectiveBaseDirectory: string;
|
FEffectiveBaseDirectory: string;
|
||||||
FTemplateList: TStringList;
|
FTemplateList: TStringList;
|
||||||
procedure AddPath(aPath: String; aObject: TObject);
|
procedure AddPath(aPath: String; aObject: TObject);
|
||||||
function GetPath: string;
|
function GetPath: string;
|
||||||
//function GetTemplates: string;
|
|
||||||
function BaseRelative(const APath: string): String;
|
function BaseRelative(const APath: string): String;
|
||||||
function PathAsAbsolute(const APath: string): String;
|
function PathAsAbsolute(const APath: string): String;
|
||||||
function PathMayExist(APath: string): TObject;
|
function PathMayExist(APath: string): TObject;
|
||||||
@ -292,6 +289,7 @@ var
|
|||||||
begin
|
begin
|
||||||
TemplateForm := TGenericListSelectForm.Create(Nil);
|
TemplateForm := TGenericListSelectForm.Create(Nil);
|
||||||
try
|
try
|
||||||
|
TemplateForm.Caption := lisPathEditPathTemplates;
|
||||||
// Let a user select only templates which are not in the list already.
|
// Let a user select only templates which are not in the list already.
|
||||||
for i := 0 to FTemplateList.Count-1 do
|
for i := 0 to FTemplateList.Count-1 do
|
||||||
if PathListBox.Items.IndexOf(FTemplateList[i]) = -1 then
|
if PathListBox.Items.IndexOf(FTemplateList[i]) = -1 then
|
||||||
@ -407,16 +405,6 @@ begin
|
|||||||
UpdateButtons;
|
UpdateButtons;
|
||||||
end;
|
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);
|
procedure TPathEditorDialog.FormCreate(Sender: TObject);
|
||||||
const
|
const
|
||||||
Filt = 'Text file (*.txt)|*.txt|All files (*)|*';
|
Filt = 'Text file (*.txt)|*.txt|All files (*)|*';
|
||||||
@ -550,13 +538,7 @@ begin
|
|||||||
sl.Free;
|
sl.Free;
|
||||||
end;
|
end;
|
||||||
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);
|
procedure TPathEditorDialog.SetTemplates(const AValue: string);
|
||||||
begin
|
begin
|
||||||
SplitString(GetForcedPathDelims(AValue), ';', FTemplateList, True);
|
SplitString(GetForcedPathDelims(AValue), ';', FTemplateList, True);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user