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

View File

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

View File

@ -156,6 +156,11 @@ begin
List.Add('c:\windows\temp\');
end;
function GetDefaultLCLWidgetType: string;
begin
Result:='win32';
end;
{---------------------------------------------------------------------------
procedure InternalInit;
---------------------------------------------------------------------------}
@ -169,6 +174,9 @@ end;
{
$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
added fileexists for secondary config files

View File

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

View File

@ -81,6 +81,8 @@ uses
procedure GetDefaultCompilerFilenames(List: TStrings);
procedure GetDefaultTestBuildDirs(List: TStrings);
function GetDefaultLCLWidgetType: string;
const
// ToDo: find the constant in the fpc units.
@ -138,6 +140,9 @@ end.
{
$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
implemented Import and Export of compiler options

View File

@ -7023,7 +7023,7 @@ begin
s:=Project1.CompilerOptions.LCLWidgetType
else
s:='';
if s='' then s:='gtk';
if (s='') or (s='default') then s:=GetDefaultLCLWidgetType;
end else if MacroName='fpcsrcdir' then begin
Handled:=true;
s:=EnvironmentOptions.FPCSourceDirectory;
@ -9792,6 +9792,9 @@ end.
{ =============================================================================
$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
Import and Export of package compiler options