mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 15:10:29 +02:00
IDE: using nogui widgetset if LCL package not used by project
git-svn-id: trunk@21857 -
This commit is contained in:
parent
5b02eb7f37
commit
e716a6b710
@ -648,7 +648,7 @@ type
|
|||||||
MakeAlwaysRelative: boolean): string;
|
MakeAlwaysRelative: boolean): string;
|
||||||
function GetCustomOptions(Parsed: TCompilerOptionsParseType = coptParsed): string;
|
function GetCustomOptions(Parsed: TCompilerOptionsParseType = coptParsed): string;
|
||||||
function GetOptionsForCTDefines: string;
|
function GetOptionsForCTDefines: string;
|
||||||
function GetEffectiveLCLWidgetType: string;
|
function GetEffectiveLCLWidgetType: string; virtual;
|
||||||
public
|
public
|
||||||
// Properties
|
// Properties
|
||||||
property ParsedOpts: TParsedCompilerOptions read FParsedOpts;
|
property ParsedOpts: TParsedCompilerOptions read FParsedOpts;
|
||||||
|
@ -1615,6 +1615,7 @@ end;
|
|||||||
procedure TfrmCompilerOptions.SetupSearchPathsTab(Page: integer);
|
procedure TfrmCompilerOptions.SetupSearchPathsTab(Page: integer);
|
||||||
var
|
var
|
||||||
LCLInterface: TLCLPlatform;
|
LCLInterface: TLCLPlatform;
|
||||||
|
s: String;
|
||||||
begin
|
begin
|
||||||
// Setup the Search Paths Tab
|
// Setup the Search Paths Tab
|
||||||
MainNoteBook.Page[Page].Caption:= dlgSearchPaths;
|
MainNoteBook.Page[Page].Caption:= dlgSearchPaths;
|
||||||
@ -1731,8 +1732,8 @@ begin
|
|||||||
with LCLWidgetTypeComboBox do begin
|
with LCLWidgetTypeComboBox do begin
|
||||||
with Items do begin
|
with Items do begin
|
||||||
BeginUpdate;
|
BeginUpdate;
|
||||||
Add(Format(lisCOdefault,
|
s:=LCLPlatformDisplayNames[GetDefaultLCLWidgetType];
|
||||||
[LCLPlatformDisplayNames[GetDefaultLCLWidgetType]]));
|
Add(Format(lisCOdefault,[s]));
|
||||||
for LCLInterface:=Low(TLCLPlatform) to High(TLCLPlatform) do begin
|
for LCLInterface:=Low(TLCLPlatform) to High(TLCLPlatform) do begin
|
||||||
Items.Add(LCLPlatformDisplayNames[LCLInterface]);
|
Items.Add(LCLPlatformDisplayNames[LCLInterface]);
|
||||||
end;
|
end;
|
||||||
@ -1740,7 +1741,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
ItemIndex:=1;
|
ItemIndex:=1;
|
||||||
Constraints.MinWidth:=150;
|
Constraints.MinWidth:=150;
|
||||||
// MG: does not work in win32 intf: AutoSize:=True;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ uses
|
|||||||
MemCheck,
|
MemCheck,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
Classes, SysUtils, TypInfo, FPCAdds, LCLProc, LCLIntf, LCLType, Forms,
|
Classes, SysUtils, TypInfo, FPCAdds, LCLProc, LCLIntf, LCLType, Forms,
|
||||||
Controls, Dialogs,
|
Controls, Dialogs, InterfaceBase,
|
||||||
Laz_XMLCfg, ExprEval, FileUtil, DefineTemplates, CodeToolManager, CodeCache,
|
Laz_XMLCfg, ExprEval, FileUtil, DefineTemplates, CodeToolManager, CodeCache,
|
||||||
// IDEIntf
|
// IDEIntf
|
||||||
PropEdits, ProjectIntf, MacroIntf, LazIDEIntf,
|
PropEdits, ProjectIntf, MacroIntf, LazIDEIntf,
|
||||||
@ -57,7 +57,7 @@ uses
|
|||||||
CompOptsModes, ProjectResources, LazConf, frmCustomApplicationOptions,
|
CompOptsModes, ProjectResources, LazConf, frmCustomApplicationOptions,
|
||||||
LazarusIDEStrConsts, CompilerOptions,
|
LazarusIDEStrConsts, CompilerOptions,
|
||||||
TransferMacros, EditorOptions, IDEProcs, RunParamsOpts, ProjectDefs,
|
TransferMacros, EditorOptions, IDEProcs, RunParamsOpts, ProjectDefs,
|
||||||
FileReferenceList, EditDefineTree, PackageDefs;
|
FileReferenceList, EditDefineTree, PackageDefs, PackageSystem;
|
||||||
|
|
||||||
type
|
type
|
||||||
TUnitInfo = class;
|
TUnitInfo = class;
|
||||||
@ -422,6 +422,7 @@ type
|
|||||||
procedure CreateDiff(CompOpts: TBaseCompilerOptions;
|
procedure CreateDiff(CompOpts: TBaseCompilerOptions;
|
||||||
Tool: TCompilerDiffTool); override;
|
Tool: TCompilerDiffTool); override;
|
||||||
procedure InvalidateOptions;
|
procedure InvalidateOptions;
|
||||||
|
function GetEffectiveLCLWidgetType: string; override;
|
||||||
public
|
public
|
||||||
property OwnerProject: TProject read FOwnerProject;
|
property OwnerProject: TProject read FOwnerProject;
|
||||||
property Project: TProject read FOwnerProject;
|
property Project: TProject read FOwnerProject;
|
||||||
@ -792,7 +793,7 @@ type
|
|||||||
procedure ReaddRemovedDependency(Dependency: TPkgDependency);
|
procedure ReaddRemovedDependency(Dependency: TPkgDependency);
|
||||||
procedure MoveRequiredDependencyUp(Dependency: TPkgDependency);
|
procedure MoveRequiredDependencyUp(Dependency: TPkgDependency);
|
||||||
procedure MoveRequiredDependencyDown(Dependency: TPkgDependency);
|
procedure MoveRequiredDependencyDown(Dependency: TPkgDependency);
|
||||||
function Requires(APackage: TLazPackage): boolean;
|
function Requires(APackage: TLazPackage; SearchRecursively: boolean): boolean;
|
||||||
procedure GetAllRequiredPackages(var List: TFPList);
|
procedure GetAllRequiredPackages(var List: TFPList);
|
||||||
procedure AddPackageDependency(const PackageName: string); override;
|
procedure AddPackageDependency(const PackageName: string); override;
|
||||||
|
|
||||||
@ -3729,10 +3730,15 @@ begin
|
|||||||
EndUpdate;
|
EndUpdate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TProject.Requires(APackage: TLazPackage): boolean;
|
function TProject.Requires(APackage: TLazPackage; SearchRecursively: boolean
|
||||||
|
): boolean;
|
||||||
begin
|
begin
|
||||||
Result:=FindCompatibleDependencyInList(FFirstRequiredDependency,pdlRequires,
|
if SearchRecursively then
|
||||||
APackage)<>nil;
|
Result:=PackageGraph.FindDependencyRecursively(FFirstRequiredDependency,
|
||||||
|
APackage)<>nil
|
||||||
|
else
|
||||||
|
Result:=FindCompatibleDependencyInList(FFirstRequiredDependency,pdlRequires,
|
||||||
|
APackage)<>nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TProject.GetAllRequiredPackages(var List: TFPList);
|
procedure TProject.GetAllRequiredPackages(var List: TFPList);
|
||||||
@ -4905,6 +4911,14 @@ begin
|
|||||||
// TODO: propagate change to all dependant projects
|
// TODO: propagate change to all dependant projects
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TProjectCompilerOptions.GetEffectiveLCLWidgetType: string;
|
||||||
|
begin
|
||||||
|
if OwnerProject.Requires(PackageGraph.LCLPackage,true) then
|
||||||
|
Result:=inherited GetEffectiveLCLWidgetType
|
||||||
|
else
|
||||||
|
Result:=LCLPlatformDirNames[lpNoGUI];
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TProjectCompilerOptions.UpdateGlobals;
|
procedure TProjectCompilerOptions.UpdateGlobals;
|
||||||
begin
|
begin
|
||||||
FGlobals.TargetCPU:=TargetCPU;
|
FGlobals.TargetCPU:=TargetCPU;
|
||||||
|
Loading…
Reference in New Issue
Block a user