mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-11 16:31:04 +02:00
+ InitToolProcessing new procedure to set default values only once.
* handle 'on' 'off' '0' or '1' in value or default lines for checkboxes
This commit is contained in:
parent
2612c7418b
commit
166d14e98e
@ -129,6 +129,7 @@ function GetHotKeyName(Key: word): string;
|
|||||||
|
|
||||||
function ParseToolParams(var Params: string; CheckOnly: boolean): integer;
|
function ParseToolParams(var Params: string; CheckOnly: boolean): integer;
|
||||||
|
|
||||||
|
procedure InitToolProcessing;
|
||||||
function ProcessMessageFile(const MsgFileName: string): boolean;
|
function ProcessMessageFile(const MsgFileName: string): boolean;
|
||||||
procedure AddToolCommand(Command: string);
|
procedure AddToolCommand(Command: string);
|
||||||
procedure AddToolMessage(ModuleName, Text: string; Row, Col: longint);
|
procedure AddToolMessage(ModuleName, Text: string; Row, Col: longint);
|
||||||
@ -740,6 +741,20 @@ var
|
|||||||
vtCheckBox :
|
vtCheckBox :
|
||||||
begin
|
begin
|
||||||
OK:=OK and (Sec^.SearchEntry(tieName)<>nil);
|
OK:=OK and (Sec^.SearchEntry(tieName)<>nil);
|
||||||
|
if Typ='' then
|
||||||
|
Typ:=tieOffParm;
|
||||||
|
if F^.GetEntry(Sec^.GetName,tieDefault,'')<>'' then
|
||||||
|
begin
|
||||||
|
Typ:=F^.GetEntry(Sec^.GetName,tieDefault,'');
|
||||||
|
end;
|
||||||
|
Typ:=UpcaseStr(Trim(Typ));
|
||||||
|
if Typ=tieOnParm then
|
||||||
|
Typ:='1'
|
||||||
|
else if Typ=tieOffParm then
|
||||||
|
Typ:='0'
|
||||||
|
else if (Typ<>'0') and (Typ<>'1') then
|
||||||
|
Ok:=false;
|
||||||
|
ViewValues[ViewCount]:=Typ;
|
||||||
if OK=false then
|
if OK=false then
|
||||||
begin ErrorBox(FormatStrStr2(msg_propertymissingin,tieName,Sec^.GetName),nil); Exit; end;
|
begin ErrorBox(FormatStrStr2(msg_propertymissingin,tieName,Sec^.GetName),nil); Exit; end;
|
||||||
end;
|
end;
|
||||||
@ -919,7 +934,10 @@ begin
|
|||||||
{ MaxLen:=F^.GetIntEntry(ViewNames[I],tieMaxLen,80);}
|
{ MaxLen:=F^.GetIntEntry(ViewNames[I],tieMaxLen,80);}
|
||||||
New(Memo, Init(ViewBounds[I],nil,nil,nil));
|
New(Memo, Init(ViewBounds[I],nil,nil,nil));
|
||||||
if ViewValues[I]<>'' then
|
if ViewValues[I]<>'' then
|
||||||
|
begin
|
||||||
Memo^.AddLine(ViewValues[I]);
|
Memo^.AddLine(ViewValues[I]);
|
||||||
|
Memo^.TextEnd;
|
||||||
|
end;
|
||||||
ViewPtrs[I]:=Memo;
|
ViewPtrs[I]:=Memo;
|
||||||
end;
|
end;
|
||||||
vtCheckBox :
|
vtCheckBox :
|
||||||
@ -1280,9 +1298,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
var Pass: sw_integer;
|
var Pass: sw_integer;
|
||||||
begin
|
begin
|
||||||
AbortTool:=false;
|
|
||||||
CaptureToolTo:=capNone;
|
|
||||||
ToolFilter:='';
|
|
||||||
W:=FirstEditorWindow;
|
W:=FirstEditorWindow;
|
||||||
Err:=0;
|
Err:=0;
|
||||||
for Pass:=0 to 3 do
|
for Pass:=0 to 3 do
|
||||||
@ -1294,6 +1309,14 @@ begin
|
|||||||
ParseToolParams:=Err;
|
ParseToolParams:=Err;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure InitToolProcessing;
|
||||||
|
begin
|
||||||
|
AbortTool:=false;
|
||||||
|
CaptureToolTo:=capNone;
|
||||||
|
ToolFilter:='';
|
||||||
|
ToolOutput:='';
|
||||||
|
end;
|
||||||
|
|
||||||
function ProcessMessageFile(const MsgFileName: string): boolean;
|
function ProcessMessageFile(const MsgFileName: string): boolean;
|
||||||
var OK,Done: boolean;
|
var OK,Done: boolean;
|
||||||
S: PBufStream;
|
S: PBufStream;
|
||||||
@ -1364,8 +1387,11 @@ begin
|
|||||||
end;
|
end;
|
||||||
begin
|
begin
|
||||||
if not Assigned(ToolTempFiles) then Exit;
|
if not Assigned(ToolTempFiles) then Exit;
|
||||||
|
{$ifndef DEBUG}
|
||||||
ToolTempFiles^.ForEach(@DeleteIt);
|
ToolTempFiles^.ForEach(@DeleteIt);
|
||||||
Dispose(ToolTempFiles, Done); ToolTempFiles:=nil;
|
{$endif ndef DEBUG}
|
||||||
|
Dispose(ToolTempFiles, Done);
|
||||||
|
ToolTempFiles:=nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
constructor TToolMessage.Init(AModule: PString; ALine: string; ARow, ACol: sw_integer);
|
constructor TToolMessage.Init(AModule: PString; ALine: string; ARow, ACol: sw_integer);
|
||||||
@ -1595,7 +1621,11 @@ end;
|
|||||||
END.
|
END.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.2 2001-08-05 02:01:48 peter
|
Revision 1.3 2002-08-29 10:05:01 pierre
|
||||||
|
+ InitToolProcessing new procedure to set default values only once.
|
||||||
|
* handle 'on' 'off' '0' or '1' in value or default lines for checkboxes
|
||||||
|
|
||||||
|
Revision 1.2 2001/08/05 02:01:48 peter
|
||||||
* FVISION define to compile with fvision units
|
* FVISION define to compile with fvision units
|
||||||
|
|
||||||
Revision 1.1 2001/08/04 11:30:24 peter
|
Revision 1.1 2001/08/04 11:30:24 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user