diff --git a/ide/aboutfrm.lfm b/ide/aboutfrm.lfm index a8e655956e..37f8796571 100644 --- a/ide/aboutfrm.lfm +++ b/ide/aboutfrm.lfm @@ -30,10 +30,17 @@ object AboutForm: TAboutForm object Label1: TLabel Alignment = tacenter Caption = 'Version #:' - Layout = tltop Left = 14 Height = 17 Top = 6 Width = 200 end + object Label2: TLabel + Alignment = tacenter + Caption = 'Date:' + Left = 14 + Height = 17 + Top = 23 + Width = 200 + end end diff --git a/ide/aboutfrm.lrs b/ide/aboutfrm.lrs index f7720221fd..7b06d78514 100644 --- a/ide/aboutfrm.lrs +++ b/ide/aboutfrm.lrs @@ -9,6 +9,7 @@ LazarusResources.Add('TAboutForm','FORMDATA',[ +#3#219#0#3'Top'#2#14#5'Width'#3'S'#1#0#0#7'TButton'#7'Button1'#11'ModalResul' +'t'#2#1#7'Caption'#6#5'Close'#8'TabOrder'#2#1#4'Left'#2'N'#6'Height'#2#25#3 +'Top'#3#184#0#5'Width'#2'K'#0#0#6'TLabel'#6'Label1'#9'Alignment'#7#8'tacente' - +'r'#7'Caption'#6#10'Version #:'#6'Layout'#7#5'tltop'#4'Left'#2#14#6'Height'#2 - +#17#3'Top'#2#6#5'Width'#3#200#0#0#0#0 + +'r'#7'Caption'#6#10'Version #:'#4'Left'#2#14#6'Height'#2#17#3'Top'#2#6#5'Wid' + +'th'#3#200#0#0#0#6'TLabel'#6'Label2'#9'Alignment'#7#8'tacenter'#7'Caption'#6 + +#5'Date:'#4'Left'#2#14#6'Height'#2#17#3'Top'#2#23#5'Width'#3#200#0#0#0#0 ]); diff --git a/ide/aboutfrm.pas b/ide/aboutfrm.pas index 65d8f86894..ec082bddb1 100644 --- a/ide/aboutfrm.pas +++ b/ide/aboutfrm.pas @@ -30,6 +30,7 @@ uses type TAboutForm = class(TForm) + Label2: TLABEL; Memo1: TMEMO; Button1: TBUTTON; Label1: TLABEL; @@ -63,12 +64,31 @@ end; { TAboutForm } constructor TAboutForm.Create(AOwner: TComponent); + {The compiler generated date string is always of the form y/m/d. + This function gives it a string respresentation according to the + shortdateformat} + function GetLocalizedBuildDate(): string; + var + BuildDate: string; + SlashPos1, SlashPos2: integer; + Date: TDate; + begin + BuildDate := {$I %date%}; + SlashPos1 := Pos('/',BuildDate); + SlashPos2 := SlashPos1 + + Pos('/', Copy(BuildDate, SlashPos1+1, Length(BuildDate)-SlashPos1)); + Date := EncodeDate(StrToInt(Copy(BuildDate,1,SlashPos1-1)), + StrToInt(Copy(BuildDate,SlashPos1+1,SlashPos2-SlashPos1-1)), + StrToInt(Copy(BuildDate,SlashPos2+1,Length(BuildDate)-SlashPos2))); + Result := DateTimeToStr(Date); + end; begin inherited Create(AOwner); FPixmap := TPixmap.Create; FPixmap.LoadFromLazarusResource('lazarus_about_logo'); Label1.Caption := lisVersion+' #: '+lisLazarusVersionString; + Label2.Caption := lisDate+': '+GetLocalizedBuildDate; Memo1.Lines.Text:=Format(lisAboutLazarusMsg,[LineEnding,LineEnding,LineEnding]); Button1.Caption:=lisClose; @@ -99,7 +119,7 @@ procedure TAboutForm.Paint; begin inherited Paint; if FPixmap <>nil - then Canvas.Copyrect(Bounds(12, 36, Width, Height) + then Canvas.Copyrect(Bounds(12, 44, Width, Height) ,FPixmap.Canvas, Rect(0,0, Width, Height)); end; diff --git a/ide/lazarusidestrconsts.pas b/ide/lazarusidestrconsts.pas index 6b93633b0d..73048d9f19 100644 --- a/ide/lazarusidestrconsts.pas +++ b/ide/lazarusidestrconsts.pas @@ -476,6 +476,7 @@ resourcestring lisPlzCheckTheCompilerName = 'Please check the compiler name'; lisAboutLazarus = 'About Lazarus'; lisVersion = 'Version'; + lisDate = 'Date'; lisClose = 'Close'; lisAboutLazarusMsg = 'License: GPL/LGPL' diff --git a/lcl/graphics.pp b/lcl/graphics.pp index 6e0ee077a4..ccb6041b62 100644 --- a/lcl/graphics.pp +++ b/lcl/graphics.pp @@ -371,6 +371,8 @@ type TIcon = class; // ico TPortableNetworkGraphic = class; // png {$IFDEF UseSimpleJpeg} + // MG: will be added to the LCL, when fpc 2.0 is released + // but then with the advanced features of the existing package TJpegImage = class; // jpg {$ENDIF} @@ -1699,6 +1701,9 @@ end. { ============================================================================= $Log$ + Revision 1.138 2004/05/23 21:30:10 mattias + added build date to About box from vincent + Revision 1.137 2004/05/07 08:07:57 mattias ifdefd UseSimpleJpeg