mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 08:29:06 +02:00
made compiling gtk2 interface easier
git-svn-id: trunk@4195 -
This commit is contained in:
parent
a915590b4f
commit
4d36209f39
@ -315,7 +315,10 @@ type
|
||||
procedure SaveToXMLConfig(XMLConfig: TXMLConfig;
|
||||
const Path: string); virtual;
|
||||
function GetGroupByName(const GroupName: string): TDBGBreakPointGroup;
|
||||
function IndexOfGroupWithName(const GroupName: string): integer;
|
||||
function FindGroupByName(const GroupName: string;
|
||||
Ignore: TDBGBreakPointGroup): TDBGBreakPointGroup;
|
||||
function IndexOfGroupWithName(const GroupName: string;
|
||||
Ignore : TDBGBreakPointGroup): integer;
|
||||
procedure InitTargetStart; virtual;
|
||||
procedure Regroup(SrcGroups: TDBGBreakPointGroups;
|
||||
SrcBreakPoints, DestBreakPoints: TDBGBreakPoints);
|
||||
@ -1599,6 +1602,7 @@ var
|
||||
NewCount: integer;
|
||||
NewGroup: TDBGBreakPointGroup;
|
||||
i: Integer;
|
||||
OldGroup: TDBGBreakPointGroup;
|
||||
begin
|
||||
Clear;
|
||||
NewCount:=XMLConfig.GetValue(Path+'Count',0);
|
||||
@ -1607,7 +1611,10 @@ begin
|
||||
NewGroup:=TDBGBreakPointGroup(inherited Add);
|
||||
NewGroup.LoadFromXMLConfig(XMLConfig,
|
||||
Path+'Item'+IntToStr(i+1)+'/');
|
||||
writeln('TDBGBreakPointGroups.LoadFromXMLConfig i=',i,' ',NewGroup.Name);
|
||||
OldGroup:=FindGroupByName(NewGroup.Name,NewGroup);
|
||||
writeln('TDBGBreakPointGroups.LoadFromXMLConfig i=',i,' ',NewGroup.Name,' OldGroup=',OldGroup<>nil);
|
||||
if OldGroup<>nil then
|
||||
NewGroup.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -1629,21 +1636,34 @@ end;
|
||||
|
||||
function TDBGBreakPointGroups.GetGroupByName(const GroupName: string
|
||||
): TDBGBreakPointGroup;
|
||||
begin
|
||||
Result:=FindGroupByName(GroupName,nil);
|
||||
end;
|
||||
|
||||
function TDBGBreakPointGroups.FindGroupByName(const GroupName: string;
|
||||
Ignore: TDBGBreakPointGroup): TDBGBreakPointGroup;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
i:=IndexOfGroupWithName(GroupName);
|
||||
if i>=0 then
|
||||
Result:=Items[i]
|
||||
else
|
||||
Result:=nil;
|
||||
i:=Count-1;
|
||||
while i>=0 do begin
|
||||
Result:=Items[i];
|
||||
if (AnsiCompareText(Result.Name,GroupName)=0)
|
||||
and (Ignore<>Result) then
|
||||
exit;
|
||||
dec(i);
|
||||
end;
|
||||
Result:=nil;
|
||||
end;
|
||||
|
||||
function TDBGBreakPointGroups.IndexOfGroupWithName(const GroupName: string
|
||||
): integer;
|
||||
function TDBGBreakPointGroups.IndexOfGroupWithName(const GroupName: string;
|
||||
Ignore : TDBGBreakPointGroup): integer;
|
||||
begin
|
||||
Result:=Count-1;
|
||||
while (Result>=0) and (AnsiCompareText(Items[Result].Name,GroupName)<>0) do
|
||||
while (Result>=0)
|
||||
and ((AnsiCompareText(Items[Result].Name,GroupName)<>0)
|
||||
or (Items[Result]=Ignore))
|
||||
do
|
||||
dec(Result);
|
||||
end;
|
||||
|
||||
@ -2146,6 +2166,9 @@ end;
|
||||
end.
|
||||
{ =============================================================================
|
||||
$Log$
|
||||
Revision 1.27 2003/05/26 20:05:21 mattias
|
||||
made compiling gtk2 interface easier
|
||||
|
||||
Revision 1.26 2003/05/26 11:08:20 mattias
|
||||
fixed double breakpoints
|
||||
|
||||
|
@ -481,7 +481,7 @@ constructor TAddToProjectDialog.Create(TheOwner: TComponent);
|
||||
begin
|
||||
inherited Create(TheOwner);
|
||||
Name:='AddToProjectDialog';
|
||||
fPackages:=TAVLTree.Create(@CompareLazPackageID);
|
||||
fPackages:=TAVLTree.Create(@CompareLazPackageIDNames);
|
||||
Position:=poScreenCenter;
|
||||
IDEDialogLayoutList.ApplyLayout(Self,500,300);
|
||||
SetupComponents;
|
||||
|
@ -345,7 +345,6 @@ type
|
||||
procedure mnuWindowsItemClick(Sender: TObject);
|
||||
private
|
||||
FToolStatus: TIDEToolStatus;
|
||||
procedure SetToolStatus(const AValue: TIDEToolStatus);
|
||||
protected
|
||||
CurrentParsedCompilerOption: TParsedCompilerOptions;
|
||||
TheCompiler: TCompiler;
|
||||
@ -365,6 +364,7 @@ type
|
||||
procedure SetupHelpMenu; virtual;
|
||||
|
||||
procedure LoadMenuShortCuts; virtual;
|
||||
procedure SetToolStatus(const AValue: TIDEToolStatus); virtual;
|
||||
public
|
||||
MacroList: TTransferMacroList;
|
||||
HiddenWindowsOnRun: TList; // list of forms, that were automatically hidden
|
||||
|
@ -231,6 +231,8 @@ var i, j, FilenameEndPos: integer;
|
||||
CurCompHistLen: Integer;
|
||||
|
||||
function CheckForCompilingState: boolean;
|
||||
var
|
||||
AFilename: string;
|
||||
begin
|
||||
Result:=false;
|
||||
if ('Compiling '=copy(s,1,length('Compiling '))) then begin
|
||||
@ -243,8 +245,8 @@ var i, j, FilenameEndPos: integer;
|
||||
i:=length('Compiling ');
|
||||
if (length(s)>=i+2) and (s[i+1]='.') and (s[i+2]=PathDelim) then
|
||||
inc(i,2);
|
||||
Filename:=TrimFilename(copy(s,i+1,length(s)-i));
|
||||
fCompilingHistory.Add(Filename);
|
||||
AFilename:=TrimFilename(copy(s,i+1,length(s)-i));
|
||||
fCompilingHistory.Add(AFilename);
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -330,23 +332,23 @@ begin
|
||||
// check for '<line> <kb>/<kb> Kb Free'
|
||||
Result:=CheckForLineProgress;
|
||||
if Result then exit;
|
||||
|
||||
// search for round bracket open
|
||||
i:=1;
|
||||
while (i<=length(s)) and (s[i]<>'(') do inc(i);
|
||||
FilenameEndPos:=i-1;
|
||||
inc(i);
|
||||
// search for number
|
||||
if (i>=length(s)) or (not (s[i] in ['0'..'9'])) then exit;
|
||||
while (i<=length(s)) and (s[i] in ['0'..'9']) do inc(i);
|
||||
if not CheckForNumber(s,i) then exit;
|
||||
if (i<length(s)) and (s[i]=',') and (s[i+1] in ['0'..'9']) then begin
|
||||
// skip second number
|
||||
inc(i);
|
||||
while (i<=length(s)) and (s[i] in ['0'..'9']) do inc(i);
|
||||
end;
|
||||
// search for ') <ErrorType>: '
|
||||
inc(i,2);
|
||||
if (i>=length(s)) or (s[i-2]<>')') or (S[i-1]<>' ')
|
||||
or (not (s[i] in ['A'..'Z'])) then exit;
|
||||
if not CheckForChar(s,i,')') then exit;
|
||||
if not CheckForChar(s,i,' ') then exit;
|
||||
if (i>=length(s)) or (not (s[i] in ['A'..'Z'])) then exit;
|
||||
j:=i+1;
|
||||
while (j<=length(s)) and (s[j] in ['a'..'z']) do inc(j);
|
||||
if (j+1>length(s)) or (s[j]<>':') or (s[j+1]<>' ') then exit;
|
||||
@ -609,10 +611,14 @@ begin
|
||||
// try every compiled pascal source
|
||||
for p:=fCompilingHistory.Count-1 downto 0 do begin
|
||||
RelativeDir:=AppendPathDelim(ExtractFilePath(fCompilingHistory[p]));
|
||||
FullDir:=TrimFilename(fCurrentDirectory+RelativeDir+PathDelim);
|
||||
FullDir:=RelativeDir;
|
||||
if not FilenameIsAbsolute(FullDir) then
|
||||
FullDir:=fCurrentDirectory+FullDir;
|
||||
FullDir:=TrimFilename(FullDir);
|
||||
if SearchedDirectories.IndexOf(FullDir)>=0 then continue;
|
||||
// new directory start a search
|
||||
if FileExists(FullDir+ShortIncFilename) then begin
|
||||
Result:=FullDir+ShortIncFilename;
|
||||
if FileExists(Result) then begin
|
||||
// file found in search dir
|
||||
Result:=CleanAndExpandFilename(FullDir+ShortIncFilename);
|
||||
exit;
|
||||
|
Loading…
Reference in New Issue
Block a user