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