mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-01 23:00:27 +02:00
improved delphi unti conversion to keep lfm files
git-svn-id: trunk@8889 -
This commit is contained in:
parent
8b5eb2d7ef
commit
3d68fcda88
@ -138,11 +138,6 @@ begin
|
|||||||
Result:=ExtractOptionsFromDPR(LPRCode,Project1);
|
Result:=ExtractOptionsFromDPR(LPRCode,Project1);
|
||||||
if Result<>mrOk then exit;
|
if Result<>mrOk then exit;
|
||||||
|
|
||||||
{$IFDEF NewDelphiProjConverter}
|
|
||||||
DebugLn('ConvertDelphiToLazarusProject DEBUG STOP');
|
|
||||||
exit(mrOk);
|
|
||||||
{$ENDIF}
|
|
||||||
|
|
||||||
// find all project files
|
// find all project files
|
||||||
FoundInUnits:=nil;
|
FoundInUnits:=nil;
|
||||||
MissingInUnits:=nil;
|
MissingInUnits:=nil;
|
||||||
|
@ -191,10 +191,22 @@ begin
|
|||||||
if Result<>mrOK then exit;
|
if Result<>mrOK then exit;
|
||||||
if RenameDFMFile then begin
|
if RenameDFMFile then begin
|
||||||
DFMFilename:=FindDFMFileForDelphiUnit(DelphiFilename);
|
DFMFilename:=FindDFMFileForDelphiUnit(DelphiFilename);
|
||||||
if DFMFilename<>'' then begin
|
if (DFMFilename<>'') and (CompareFilenames(DFMFilename,LFMFilename)<>0) then
|
||||||
|
begin
|
||||||
LFMFilename:=ConvertDFMToLFMFilename(DFMFilename,not RenameLowercase);
|
LFMFilename:=ConvertDFMToLFMFilename(DFMFilename,not RenameLowercase);
|
||||||
Result:=RenameFileWithErrorDialogs(DFMFilename,LFMFilename,[mbAbort]);
|
if FileExists(LFMFilename) then begin
|
||||||
if Result<>mrOK then exit;
|
if (FileAge(LFMFilename)>=FileAge(DFMFilename)) then begin
|
||||||
|
// .lfm is not older than .dfm -> keep .lfm
|
||||||
|
// beware: it could be the same file
|
||||||
|
end else begin
|
||||||
|
// .lfm is older than .dfm -> remove .lfm
|
||||||
|
DeleteFile(LFMFilename);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if not FileExists(LFMFilename) then begin
|
||||||
|
Result:=RenameFileWithErrorDialogs(DFMFilename,LFMFilename,[mbAbort]);
|
||||||
|
if Result<>mrOK then exit;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
Result:=mrOk;
|
Result:=mrOk;
|
||||||
|
@ -8129,8 +8129,7 @@ begin
|
|||||||
GDK_FUNC_MINIMIZE or GDK_FUNC_CLOSE;
|
GDK_FUNC_MINIMIZE or GDK_FUNC_CLOSE;
|
||||||
|
|
||||||
bsSizeable : Result := GDK_FUNC_RESIZE or GDK_FUNC_MOVE or
|
bsSizeable : Result := GDK_FUNC_RESIZE or GDK_FUNC_MOVE or
|
||||||
GDK_FUNC_MINIMIZE or GDK_FUNC_CLOSE or GDK_FUNC_MAXIMIZE or
|
GDK_FUNC_MINIMIZE or GDK_FUNC_CLOSE or GDK_FUNC_MAXIMIZE;
|
||||||
GDK_FUNC_RESIZE;
|
|
||||||
|
|
||||||
bsDialog : Result := GDK_FUNC_RESIZE or GDK_FUNC_CLOSE or GDK_FUNC_MINIMIZE
|
bsDialog : Result := GDK_FUNC_RESIZE or GDK_FUNC_CLOSE or GDK_FUNC_MINIMIZE
|
||||||
or GDK_FUNC_MOVE;
|
or GDK_FUNC_MOVE;
|
||||||
@ -8139,8 +8138,7 @@ begin
|
|||||||
GDK_FUNC_MINIMIZE or GDK_FUNC_CLOSE;
|
GDK_FUNC_MINIMIZE or GDK_FUNC_CLOSE;
|
||||||
|
|
||||||
bsSizeToolWin : Result := GDK_FUNC_RESIZE or GDK_FUNC_MOVE or
|
bsSizeToolWin : Result := GDK_FUNC_RESIZE or GDK_FUNC_MOVE or
|
||||||
GDK_FUNC_MINIMIZE or GDK_FUNC_CLOSE or GDK_FUNC_MAXIMIZE or
|
GDK_FUNC_MINIMIZE or GDK_FUNC_CLOSE or GDK_FUNC_MAXIMIZE;
|
||||||
GDK_FUNC_RESIZE;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// X warns if marking a fixed size window resizeable:
|
// X warns if marking a fixed size window resizeable:
|
||||||
|
Loading…
Reference in New Issue
Block a user