mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 00:02:03 +02:00
IDE, Project: remove property "Marked", in SourceEditor pass option as param.
This commit is contained in:
parent
ca8d8b9b84
commit
3e73ce083c
@ -324,7 +324,6 @@ type
|
||||
function GetLoaded: Boolean;
|
||||
function GetLoadedDesigner: Boolean;
|
||||
function GetLoadingComponent: boolean;
|
||||
function GetMarked: boolean;
|
||||
function GetModified: boolean;
|
||||
function GetOpenEditorInfo(Index: Integer): TUnitEditorInfo;
|
||||
function GetRunFileIfActive: boolean;
|
||||
@ -344,7 +343,6 @@ type
|
||||
procedure SetLoaded(const AValue: Boolean);
|
||||
procedure SetLoadedDesigner(const AValue: Boolean);
|
||||
procedure SetLoadingComponent(AValue: boolean);
|
||||
procedure SetMarked(AValue: boolean);
|
||||
procedure SetModified(const AValue: boolean);
|
||||
procedure SetProject(const AValue: TProject);
|
||||
procedure SetRunFileIfActive(const AValue: boolean);
|
||||
@ -473,7 +471,6 @@ type
|
||||
property Loaded: Boolean read GetLoaded write SetLoaded;
|
||||
property LoadedDesigner: Boolean read GetLoadedDesigner write SetLoadedDesigner;
|
||||
property LoadingComponent: boolean read GetLoadingComponent write SetLoadingComponent;
|
||||
property Marked: boolean read GetMarked write SetMarked;
|
||||
property Modified: boolean read GetModified write SetModified;// not Session data
|
||||
property SessionModified: boolean read GetSessionModified write SetSessionModified;
|
||||
property OnFileBackup: TOnFileBackup read fOnFileBackup write fOnFileBackup;
|
||||
@ -2579,11 +2576,6 @@ begin
|
||||
Result:=uifHasErrorInLFM in FFlags;
|
||||
end;
|
||||
|
||||
function TUnitInfo.GetMarked: boolean;
|
||||
begin
|
||||
Result:=uifMarked in FFlags;
|
||||
end;
|
||||
|
||||
function TUnitInfo.GetModified: boolean;
|
||||
begin
|
||||
Result:=(uifModified in FFlags)
|
||||
@ -2791,14 +2783,6 @@ begin
|
||||
Exclude(FFlags, uifLoadingComponent);
|
||||
end;
|
||||
|
||||
procedure TUnitInfo.SetMarked(AValue: boolean);
|
||||
begin
|
||||
if AValue then
|
||||
Include(FFlags, uifMarked)
|
||||
else
|
||||
Exclude(FFlags, uifMarked);
|
||||
end;
|
||||
|
||||
procedure TUnitInfo.SetModified(const AValue: boolean);
|
||||
begin
|
||||
if Modified=AValue then exit;
|
||||
|
@ -333,8 +333,8 @@ function GetDsgnComponentBaseClassname(aCompClass: TClass): string;
|
||||
LRSCode, LFMCode: TCodeBuffer; Flags: TSaveFlags): TModalResult;
|
||||
function RemoveLooseEvents(AnUnitInfo: TUnitInfo): TModalResult;
|
||||
function RenameUnit(AnUnitInfo: TUnitInfo; NewFilename, NewUnitName: string;
|
||||
var LFMCode, LRSCode: TCodeBuffer): TModalResult;
|
||||
function RenameUnitLowerCase(AnUnitInfo: TUnitInfo; AskUser: boolean): TModalresult;
|
||||
var LFMCode, LRSCode: TCodeBuffer; AutoRemoveOldFile: boolean = False): TModalResult;
|
||||
function RenameUnitLowerCase(AnUnitInfo: TUnitInfo; AskUser, AutoRemoveOldFile: boolean): TModalresult;
|
||||
function ReplaceUnitUse(OldFilename, OldUnitName, NewFilename, NewUnitName: string;
|
||||
IgnoreErrors, Quiet, Confirm: boolean): TModalResult;
|
||||
//designer
|
||||
@ -1936,9 +1936,7 @@ begin
|
||||
if AnUnitInfo.Source=nil then
|
||||
AnUnitInfo.ReadUnitSource(false,false);
|
||||
// Marked here means to remove old files silently.
|
||||
AnUnitInfo.Marked:=True;
|
||||
Result:=RenameUnitLowerCase(AnUnitInfo, false);
|
||||
AnUnitInfo.Marked:=False;
|
||||
Result:=RenameUnitLowerCase(AnUnitInfo, false,True);
|
||||
if Result<>mrOK then exit;
|
||||
end;
|
||||
ShowMessage(Format(lisDFilesWereRenamedToL, [fUnitInfos.Count]));
|
||||
@ -2121,7 +2119,7 @@ begin
|
||||
if IsPascal and (EnvironmentOptions.CharcaseFileAction<>ccfaIgnore) then
|
||||
begin
|
||||
// ask user to apply naming conventions
|
||||
Result:=RenameUnitLowerCase(ActiveUnitInfo,true);
|
||||
Result:=RenameUnitLowerCase(ActiveUnitInfo,true,false);
|
||||
if Result=mrIgnore then Result:=mrOk;
|
||||
if Result<>mrOk then begin
|
||||
DebugLn('AddUnitToProject A RenameUnitLowerCase failed ',ActiveUnitInfo.Filename);
|
||||
@ -5753,8 +5751,8 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function RenameUnit(AnUnitInfo: TUnitInfo; NewFilename, NewUnitName: string;
|
||||
var LFMCode, LRSCode: TCodeBuffer): TModalResult;
|
||||
function RenameUnit(AnUnitInfo: TUnitInfo; NewFilename, NewUnitName: string; var LFMCode,
|
||||
LRSCode: TCodeBuffer; AutoRemoveOldFile: boolean): TModalResult;
|
||||
var
|
||||
NewSource: TCodeBuffer;
|
||||
NewFilePath, OldFilePath: String;
|
||||
@ -5943,7 +5941,7 @@ begin
|
||||
S:=Format(lisDeleteOldFile, [ExtractFilename(OldFilename)]);
|
||||
OldFileRemoved:=true;
|
||||
// Marked here means to remove an old file silently.
|
||||
if AnUnitInfo.Marked then
|
||||
if AutoRemoveOldFile then
|
||||
Silence:=true;
|
||||
end
|
||||
else
|
||||
@ -6004,7 +6002,8 @@ begin
|
||||
Result:=mrOk;
|
||||
end;
|
||||
|
||||
function RenameUnitLowerCase(AnUnitInfo: TUnitInfo; AskUser: boolean): TModalresult;
|
||||
function RenameUnitLowerCase(AnUnitInfo: TUnitInfo; AskUser, AutoRemoveOldFile: boolean
|
||||
): TModalresult;
|
||||
var
|
||||
OldFilename: String;
|
||||
OldShortFilename: String;
|
||||
@ -6039,7 +6038,7 @@ begin
|
||||
end;
|
||||
LFMCode:=nil;
|
||||
LRSCode:=nil;
|
||||
Result:=RenameUnit(AnUnitInfo,NewFilename,NewUnitName,LFMCode,LRSCode);
|
||||
Result:=RenameUnit(AnUnitInfo,NewFilename,NewUnitName,LFMCode,LRSCode,AutoRemoveOldFile);
|
||||
end;
|
||||
|
||||
function CheckLFMInEditor(LFMUnitInfo: TUnitInfo; Quiet: boolean): TModalResult;
|
||||
|
Loading…
Reference in New Issue
Block a user