implemented default lcl widget type

git-svn-id: trunk@4636 -
This commit is contained in:
mattias 2003-09-17 22:06:56 +00:00
parent b0a03ccf54
commit 5c553b2031
6 changed files with 31 additions and 6 deletions

View File

@ -1140,7 +1140,7 @@ begin
Libraries := f(XMLConfigFile.GetValue(p+'Libraries/Value', '')); Libraries := f(XMLConfigFile.GetValue(p+'Libraries/Value', ''));
OtherUnitFiles := f(XMLConfigFile.GetValue(p+'OtherUnitFiles/Value', '')); OtherUnitFiles := f(XMLConfigFile.GetValue(p+'OtherUnitFiles/Value', ''));
UnitOutputDirectory := f(XMLConfigFile.GetValue(p+'UnitOutputDirectory/Value', '')); UnitOutputDirectory := f(XMLConfigFile.GetValue(p+'UnitOutputDirectory/Value', ''));
LCLWidgetType := XMLConfigFile.GetValue(p+'LCLWidgetType/Value', 'gtk'); LCLWidgetType := XMLConfigFile.GetValue(p+'LCLWidgetType/Value', '');
ObjectPath := f(XMLConfigFile.GetValue(p+'ObjectPath/Value', '')); ObjectPath := f(XMLConfigFile.GetValue(p+'ObjectPath/Value', ''));
SrcPath := f(XMLConfigFile.GetValue(p+'SrcPath/Value', '')); SrcPath := f(XMLConfigFile.GetValue(p+'SrcPath/Value', ''));
@ -2106,7 +2106,7 @@ begin
ObjectPath:=''; ObjectPath:='';
SrcPath:=''; SrcPath:='';
DebugPath:=''; DebugPath:='';
fLCLWidgetType := 'gtk'; fLCLWidgetType := '';
// parsing // parsing
fStyle := 1; fStyle := 1;
@ -2842,7 +2842,9 @@ begin
Options.DebugPath := edtDebugPath.Text; Options.DebugPath := edtDebugPath.Text;
i:=LCLWidgetTypeRadioGroup.Itemindex; i:=LCLWidgetTypeRadioGroup.Itemindex;
if i<0 then i:=0; if i<=0 then
Options.LCLWidgetType:=''
else
Options.LCLWidgetType:= LCLWidgetTypeRadioGroup.Items[i]; Options.LCLWidgetType:= LCLWidgetTypeRadioGroup.Items[i];
// parsing // parsing
@ -4479,10 +4481,11 @@ begin
Parent := PathPage; Parent := PathPage;
Left := grpOtherUnits.Left; Left := grpOtherUnits.Left;
Top:= y; Top:= y;
Width:=300; Width:=Self.ClientWidth-28;
Height:=45; Height:=45;
Caption:=dlgLCLWidgetType; Caption:=dlgLCLWidgetType;
with Items do begin with Items do begin
Add(Format(lisCOdefault, [GetDefaultLCLWidgetType]));
Add('gnome'); Add('gnome');
Add('gtk'); Add('gtk');
Add('gtk2'); Add('gtk2');

View File

@ -169,6 +169,11 @@ begin
List.Add('/var/tmp/'); List.Add('/var/tmp/');
end; end;
function GetDefaultLCLWidgetType: string;
begin
Result:='gtk';
end;
{--------------------------------------------------------------------------- {---------------------------------------------------------------------------
procedure InternalInit; procedure InternalInit;
---------------------------------------------------------------------------} ---------------------------------------------------------------------------}

View File

@ -156,6 +156,11 @@ begin
List.Add('c:\windows\temp\'); List.Add('c:\windows\temp\');
end; end;
function GetDefaultLCLWidgetType: string;
begin
Result:='win32';
end;
{--------------------------------------------------------------------------- {---------------------------------------------------------------------------
procedure InternalInit; procedure InternalInit;
---------------------------------------------------------------------------} ---------------------------------------------------------------------------}
@ -169,6 +174,9 @@ end;
{ {
$Log$ $Log$
Revision 1.16 2003/09/17 22:06:56 mattias
implemented default lcl widget type
Revision 1.15 2003/09/09 11:22:17 mattias Revision 1.15 2003/09/09 11:22:17 mattias
added fileexists for secondary config files added fileexists for secondary config files

View File

@ -874,6 +874,7 @@ resourcestring
lisCOScanForMakeMessages = 'Scan for Make messages'; lisCOScanForMakeMessages = 'Scan for Make messages';
dlgUnitOutp = 'Unit output directory:'; dlgUnitOutp = 'Unit output directory:';
dlgLCLWidgetType = 'LCL Widget Type'; dlgLCLWidgetType = 'LCL Widget Type';
lisCOdefault = 'default (%s)';
dlgButApply = 'Apply'; dlgButApply = 'Apply';
dlgCOShowOptions = 'Show Options'; dlgCOShowOptions = 'Show Options';
dlgCOLoadSave = 'Load/Save'; dlgCOLoadSave = 'Load/Save';

View File

@ -82,6 +82,8 @@ uses
procedure GetDefaultCompilerFilenames(List: TStrings); procedure GetDefaultCompilerFilenames(List: TStrings);
procedure GetDefaultTestBuildDirs(List: TStrings); procedure GetDefaultTestBuildDirs(List: TStrings);
function GetDefaultLCLWidgetType: string;
const const
// ToDo: find the constant in the fpc units. // ToDo: find the constant in the fpc units.
LineBreak = {$IFDEF win32}#13+{$ENDIF}#10; LineBreak = {$IFDEF win32}#13+{$ENDIF}#10;
@ -138,6 +140,9 @@ end.
{ {
$Log$ $Log$
Revision 1.19 2003/09/17 22:06:56 mattias
implemented default lcl widget type
Revision 1.18 2003/09/10 12:13:48 mattias Revision 1.18 2003/09/10 12:13:48 mattias
implemented Import and Export of compiler options implemented Import and Export of compiler options

View File

@ -7023,7 +7023,7 @@ begin
s:=Project1.CompilerOptions.LCLWidgetType s:=Project1.CompilerOptions.LCLWidgetType
else else
s:=''; s:='';
if s='' then s:='gtk'; if (s='') or (s='default') then s:=GetDefaultLCLWidgetType;
end else if MacroName='fpcsrcdir' then begin end else if MacroName='fpcsrcdir' then begin
Handled:=true; Handled:=true;
s:=EnvironmentOptions.FPCSourceDirectory; s:=EnvironmentOptions.FPCSourceDirectory;
@ -9792,6 +9792,9 @@ end.
{ ============================================================================= { =============================================================================
$Log$ $Log$
Revision 1.648 2003/09/17 22:06:56 mattias
implemented default lcl widget type
Revision 1.647 2003/09/15 15:03:05 mattias Revision 1.647 2003/09/15 15:03:05 mattias
Import and Export of package compiler options Import and Export of package compiler options