mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 19:02:31 +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);
|
||||
if Result<>mrOk then exit;
|
||||
|
||||
{$IFDEF NewDelphiProjConverter}
|
||||
DebugLn('ConvertDelphiToLazarusProject DEBUG STOP');
|
||||
exit(mrOk);
|
||||
{$ENDIF}
|
||||
|
||||
// find all project files
|
||||
FoundInUnits:=nil;
|
||||
MissingInUnits:=nil;
|
||||
|
@ -191,10 +191,22 @@ begin
|
||||
if Result<>mrOK then exit;
|
||||
if RenameDFMFile then begin
|
||||
DFMFilename:=FindDFMFileForDelphiUnit(DelphiFilename);
|
||||
if DFMFilename<>'' then begin
|
||||
if (DFMFilename<>'') and (CompareFilenames(DFMFilename,LFMFilename)<>0) then
|
||||
begin
|
||||
LFMFilename:=ConvertDFMToLFMFilename(DFMFilename,not RenameLowercase);
|
||||
Result:=RenameFileWithErrorDialogs(DFMFilename,LFMFilename,[mbAbort]);
|
||||
if Result<>mrOK then exit;
|
||||
if FileExists(LFMFilename) then begin
|
||||
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;
|
||||
Result:=mrOk;
|
||||
|
@ -8129,8 +8129,7 @@ begin
|
||||
GDK_FUNC_MINIMIZE or GDK_FUNC_CLOSE;
|
||||
|
||||
bsSizeable : Result := GDK_FUNC_RESIZE or GDK_FUNC_MOVE or
|
||||
GDK_FUNC_MINIMIZE or GDK_FUNC_CLOSE or GDK_FUNC_MAXIMIZE or
|
||||
GDK_FUNC_RESIZE;
|
||||
GDK_FUNC_MINIMIZE or GDK_FUNC_CLOSE or GDK_FUNC_MAXIMIZE;
|
||||
|
||||
bsDialog : Result := GDK_FUNC_RESIZE or GDK_FUNC_CLOSE or GDK_FUNC_MINIMIZE
|
||||
or GDK_FUNC_MOVE;
|
||||
@ -8139,8 +8138,7 @@ begin
|
||||
GDK_FUNC_MINIMIZE or GDK_FUNC_CLOSE;
|
||||
|
||||
bsSizeToolWin : Result := GDK_FUNC_RESIZE or GDK_FUNC_MOVE or
|
||||
GDK_FUNC_MINIMIZE or GDK_FUNC_CLOSE or GDK_FUNC_MAXIMIZE or
|
||||
GDK_FUNC_RESIZE;
|
||||
GDK_FUNC_MINIMIZE or GDK_FUNC_CLOSE or GDK_FUNC_MAXIMIZE;
|
||||
end;
|
||||
|
||||
// X warns if marking a fixed size window resizeable:
|
||||
|
Loading…
Reference in New Issue
Block a user