mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-08 13:07:41 +01:00
fixed changing menuitem separator and normal
git-svn-id: trunk@4113 -
This commit is contained in:
parent
5690c12858
commit
fac1fd8d76
@ -306,15 +306,20 @@ begin
|
||||
TheOutputFilter.Options:=TheOutputFilter.Options
|
||||
+[ofoSearchForMakeMessages];
|
||||
try
|
||||
Result:=mrCancel;
|
||||
try
|
||||
TheOutputFilter.Execute(TheProcess);
|
||||
TheOutputFilter.ReadLine('"'+Title+'" completed',
|
||||
true);
|
||||
if TheOutputFilter.Execute(TheProcess) then begin
|
||||
TheOutputFilter.ReadLine('"'+Title+'" completed',true);
|
||||
end;
|
||||
if TheOutputFilter.ErrorExists then begin
|
||||
ErrorOccurred:=true;
|
||||
end;
|
||||
finally
|
||||
TheProcess.WaitOnExit;
|
||||
TheProcess.Free;
|
||||
end;
|
||||
Result:=mrOk;
|
||||
if not ErrorOccurred then
|
||||
Result:=mrOk;
|
||||
except
|
||||
on e: EOutputFilterError do begin
|
||||
writeln('TExternalToolList.Run ',E.Message);
|
||||
|
||||
@ -69,7 +69,8 @@ type
|
||||
procedure SetStopExecute(const AValue: boolean);
|
||||
procedure InternalSetCurrentDirectory(const Dir: string);
|
||||
public
|
||||
procedure Execute(TheProcess: TProcess);
|
||||
ErrorExists: boolean;
|
||||
function Execute(TheProcess: TProcess): boolean;
|
||||
function GetSourcePosition(const Line: string; var Filename:string;
|
||||
var CaretXY: TPoint; var MsgType: TErrorType): boolean;
|
||||
procedure Clear;
|
||||
@ -139,14 +140,14 @@ begin
|
||||
FStopExecute:=false;
|
||||
end;
|
||||
|
||||
procedure TOutputFilter.Execute(TheProcess: TProcess);
|
||||
function TOutputFilter.Execute(TheProcess: TProcess): boolean;
|
||||
const
|
||||
BufSize = 1024;
|
||||
var
|
||||
i, Count, LineStart : longint;
|
||||
OutputLine, Buf : String;
|
||||
ErrorExists: boolean;
|
||||
begin
|
||||
Result:=true;
|
||||
Clear;
|
||||
TheProcess.Execute;
|
||||
fCurrentDirectory:=TrimFilename(TheProcess.CurrentDirectory);
|
||||
@ -170,8 +171,10 @@ begin
|
||||
if Buf[i] in [#10,#13] then begin
|
||||
OutputLine:=OutputLine+copy(Buf,LineStart,i-LineStart);
|
||||
ReadLine(OutputLine,false);
|
||||
if fLastErrorType in [etFatal, etPanic, etError] then
|
||||
if fLastErrorType in [etFatal, etPanic, etError] then begin
|
||||
ErrorExists:=true;
|
||||
Result:=false;
|
||||
end;
|
||||
OutputLine:='';
|
||||
if (i<Count) and (Buf[i+1] in [#10,#13]) and (Buf[i]<>Buf[i+1])
|
||||
then
|
||||
|
||||
@ -373,6 +373,8 @@ var
|
||||
function AddPopupMenuItem(const ACaption: string; AnEvent: TNotifyEvent;
|
||||
EnabledFlag: boolean): TMenuItem;
|
||||
begin
|
||||
if FilesPopupMenu.Items.Count<=ItemCnt then begin
|
||||
end;
|
||||
if FilesPopupMenu.Items.Count<=ItemCnt then begin
|
||||
Result:=TMenuItem.Create(Self);
|
||||
FilesPopupMenu.Items.Add(Result);
|
||||
|
||||
@ -1810,7 +1810,7 @@ begin
|
||||
+' '+CreateRelativePath(SrcFilename,APackage.Directory);
|
||||
|
||||
// check if compilation is neccessary
|
||||
if ([pcfOnlyIfNeeded,pcfCleanCompile]*Flags<>[]) then begin
|
||||
if (pcfOnlyIfNeeded in Flags) then begin
|
||||
Result:=CheckIfPackageNeedsCompilation(APackage,
|
||||
CompilerFilename,CompilerParams,
|
||||
SrcFilename);
|
||||
@ -2215,6 +2215,12 @@ begin
|
||||
mtError,[mbCancel,mbAbort],0);
|
||||
exit;
|
||||
end;
|
||||
|
||||
// confirm uninstall package
|
||||
Result:=MessageDlg('Uninstall package?',
|
||||
'Uninstall package '+APackage.IDAsString+'?',
|
||||
mtConfirmation,[mbYes,mbCancel,mbAbort],0);
|
||||
if Result<>mrYes then exit;
|
||||
|
||||
PackageGraph.BeginUpdate(true);
|
||||
try
|
||||
|
||||
Loading…
Reference in New Issue
Block a user