diff --git a/components/jvcllaz/examples/JvID3v1/JvID3v1Demo.lpi b/components/jvcllaz/examples/JvID3v1/JvID3v1Demo.lpi index 311e71979..f7d8dbb06 100644 --- a/components/jvcllaz/examples/JvID3v1/JvID3v1Demo.lpi +++ b/components/jvcllaz/examples/JvID3v1/JvID3v1Demo.lpi @@ -1,19 +1,17 @@ - + - <Scaled Value="True"/> <ResourceType Value="res"/> <UseXPManifest Value="True"/> <XPManifest> <DpiAware Value="True"/> </XPManifest> - <Icon Value="0"/> </General> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> @@ -22,8 +20,9 @@ <Version Value="2"/> </PublishOptions> <RunParams> - <FormatVersion Value="2"/> - <Modes Count="0"/> + <local> + <FormatVersion Value="1"/> + </local> </RunParams> <RequiredPackages Count="2"> <Item1> diff --git a/components/jvcllaz/examples/JvID3v1/JvID3v1MainFormU.lfm b/components/jvcllaz/examples/JvID3v1/JvID3v1MainFormU.lfm index ec65eff10..34377d6ac 100644 --- a/components/jvcllaz/examples/JvID3v1/JvID3v1MainFormU.lfm +++ b/components/jvcllaz/examples/JvID3v1/JvID3v1MainFormU.lfm @@ -18,8 +18,7 @@ object JvID3v1MainForm: TJvID3v1MainForm OnDropFiles = FormDropFiles Position = poScreenCenter ShowHint = True - LCLVersion = '1.9.0.0' - Scaled = False + LCLVersion = '1.6.4.0' object lblArtist: TLabel AnchorSideTop.Control = edtArtist AnchorSideTop.Side = asrCenter @@ -283,7 +282,7 @@ object JvID3v1MainForm: TJvID3v1MainForm ShowHint = True end object ToolButton2: TToolButton - Left = 46 + Left = 48 Hint = 'Save changes of the tag to the file' Top = 0 Action = actSave @@ -291,7 +290,7 @@ object JvID3v1MainForm: TJvID3v1MainForm ShowHint = True end object ToolButton3: TToolButton - Left = 90 + Left = 92 Hint = 'Erase the tag of the file' Top = 0 Action = actErase @@ -299,7 +298,7 @@ object JvID3v1MainForm: TJvID3v1MainForm ShowHint = True end object ToolButton4: TToolButton - Left = 134 + Left = 136 Hint = 'Toggle ''Always on Top''' Top = 0 Action = actOnTop @@ -307,7 +306,7 @@ object JvID3v1MainForm: TJvID3v1MainForm ShowHint = True end object ToolButton5: TToolButton - Left = 178 + Left = 184 Hint = 'Show ''About'' dialog' Top = 0 Action = actAbout @@ -315,7 +314,7 @@ object JvID3v1MainForm: TJvID3v1MainForm ShowHint = True end object ToolButton6: TToolButton - Left = 222 + Left = 228 Hint = 'Close program' Top = 0 Action = actExit diff --git a/components/jvcllaz/examples/JvID3v1/JvID3v1MainFormU.pas b/components/jvcllaz/examples/JvID3v1/JvID3v1MainFormU.pas index 1f49e0222..aec7b33dc 100644 --- a/components/jvcllaz/examples/JvID3v1/JvID3v1MainFormU.pas +++ b/components/jvcllaz/examples/JvID3v1/JvID3v1MainFormU.pas @@ -31,7 +31,6 @@ unit JvID3v1MainFormU; interface uses - //Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, //JvComponent, StdCtrls, //Mask, //JvToolEdit, diff --git a/components/jvcllaz/examples/JvID3v2/JvId3v2Demo.lpi b/components/jvcllaz/examples/JvID3v2/JvId3v2Demo.lpi index 3ac4fee2e..9d8236743 100644 --- a/components/jvcllaz/examples/JvID3v2/JvId3v2Demo.lpi +++ b/components/jvcllaz/examples/JvID3v2/JvId3v2Demo.lpi @@ -1,13 +1,12 @@ <?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="11"/> + <Version Value="10"/> <PathDelim Value="\"/> <General> <SessionStorage Value="InProjectDir"/> <MainUnit Value="0"/> <Title Value="JvId3v2Demo"/> - <Scaled Value="True"/> <ResourceType Value="res"/> <UseXPManifest Value="True"/> <XPManifest> @@ -21,8 +20,9 @@ <Version Value="2"/> </PublishOptions> <RunParams> - <FormatVersion Value="2"/> - <Modes Count="0"/> + <local> + <FormatVersion Value="1"/> + </local> </RunParams> <RequiredPackages Count="2"> <Item1> diff --git a/components/jvcllaz/examples/JvID3v2/JvId3v2Demo.lpr b/components/jvcllaz/examples/JvID3v2/JvId3v2Demo.lpr index 641b4ed9e..dcc8451df 100644 --- a/components/jvcllaz/examples/JvID3v2/JvId3v2Demo.lpr +++ b/components/jvcllaz/examples/JvID3v2/JvId3v2Demo.lpr @@ -1,7 +1,7 @@ program JvId3v2Demo; uses - Interfaces, + Interfaces, LCLVersion, Forms, JvId3v2MainFormU in 'JvId3v2MainFormU.pas' {JvId3v2MainForm}, JvId3v2EditFormU in 'JvId3v2EditFormU.pas' {JvId3v2EditForm}; @@ -9,7 +9,9 @@ uses {$R *.res} begin + {$IF LCL_FullVersion >= 1080000} Application.Scaled:=True; + {$ENDIF} Application.Initialize; Application.CreateForm(TJvId3v2MainForm, JvId3v2MainForm); Application.Run; diff --git a/components/jvcllaz/examples/JvID3v2/JvId3v2EditFormU.lfm b/components/jvcllaz/examples/JvID3v2/JvId3v2EditFormU.lfm index 54ffc4c13..bb1a2221d 100644 --- a/components/jvcllaz/examples/JvID3v2/JvId3v2EditFormU.lfm +++ b/components/jvcllaz/examples/JvID3v2/JvId3v2EditFormU.lfm @@ -12,7 +12,7 @@ object JvID3v2EditForm: TJvID3v2EditForm OnCreate = FormCreate OnShow = FormShow Position = poMainFormCenter - LCLVersion = '1.9.0.0' + LCLVersion = '1.6.4.0' object lsbNavigator: TListBox Left = 4 Height = 483 @@ -73,7 +73,7 @@ object JvID3v2EditForm: TJvID3v2EditForm Height = 487 Top = 40 Width = 474 - PageIndex = 0 + PageIndex = 1 Align = alClient TabOrder = 2 object PgWinAmpTags: TPage @@ -451,6 +451,7 @@ object JvID3v2EditForm: TJvID3v2EditForm Anchors = [akTop, akLeft, akRight] BorderSpacing.Top = 4 BorderSpacing.Right = 4 + ScrollBars = ssAutoBoth TabOrder = 1 end object edtDescription: TEdit diff --git a/components/jvcllaz/examples/JvID3v2/JvId3v2EditFormU.pas b/components/jvcllaz/examples/JvID3v2/JvId3v2EditFormU.pas index 742a7c9d0..4b3b33378 100644 --- a/components/jvcllaz/examples/JvID3v2/JvId3v2EditFormU.pas +++ b/components/jvcllaz/examples/JvID3v2/JvId3v2EditFormU.pas @@ -105,22 +105,21 @@ type ToolButton5: TToolButton; actCopyTov1: TAction; actCopyFromv1: TAction; - procedure actOKExecute(Sender: TObject); - procedure actCancelExecute(Sender: TObject); - procedure actRemoveExecute(Sender: TObject); procedure actAddPictureExecute(Sender: TObject); - procedure actDeletePictureExecute(Sender: TObject); - procedure actSavePictureExecute(Sender: TObject); - procedure FormShow(Sender: TObject); - procedure lsvPicturesClick(Sender: TObject); - procedure lsbNavigatorClick(Sender: TObject); + procedure actCancelExecute(Sender: TObject); procedure actChangePictureExecute(Sender: TObject); - procedure ItemSelected(Sender: TObject); - procedure actCopyTov1Execute(Sender: TObject); procedure actCopyFromv1Execute(Sender: TObject); + procedure actCopyTov1Execute(Sender: TObject); + procedure actDeletePictureExecute(Sender: TObject); + procedure actOKExecute(Sender: TObject); + procedure actRemoveExecute(Sender: TObject); + procedure actSavePictureExecute(Sender: TObject); procedure FormCreate(Sender: TObject); - procedure lsvAllFramesInfoTip(Sender: TObject; Item: TListItem; - var InfoTip: String); + procedure FormShow(Sender: TObject); + procedure ItemSelected(Sender: TObject); + procedure lsbNavigatorClick(Sender: TObject); + procedure lsvAllFramesInfoTip(Sender: TObject; Item: TListItem; var InfoTip: String); + procedure lsvPicturesClick(Sender: TObject); private FTagDeleted: Boolean; protected @@ -245,7 +244,7 @@ var 'User defined URL link', {fiWWWUser} 'Encrypted meta frame', {fiMetaCrypto} 'Compressed meta frame' {fiMetaCompression} - ); + ); CPictureTypeStr: array[TJvID3PictureType] of string = ( 'Other', @@ -269,20 +268,17 @@ var 'Illustration', 'Band/artist logotype', 'Publisher/Studio logotype' - ); + ); procedure SetPictureListItemTo(ListItem: TListItem; Frame: TJvID3PictureFrame); begin - with ListItem, Frame do - begin - Caption := Description; - while SubItems.Count < 3 do - SubItems.Add(''); - SubItems[0] := CPictureTypeStr[PictureType]; //Type - SubItems[1] := string(MIMEType); //Format - SubItems[2] := IntToStr(DataSize); //Size - Data := Frame; - end; + ListItem.Caption := Frame.Description; + while ListItem.SubItems.Count < 3 do + ListItem.SubItems.Add(''); + ListItem.SubItems[0] := CPictureTypeStr[Frame.PictureType]; //Type + ListItem.SubItems[1] := Frame.MIMEType; //Format + ListItem.SubItems[2] := IntToStr(Frame.DataSize); //Size + ListItem.Data := Frame; end; procedure TJvID3v2EditForm.FormCreate(Sender: TObject); @@ -307,9 +303,9 @@ begin HasTag := True; if JvID3v21.FrameCount = 0 then GetID3v2Version(JvID3v21.FileName, HasTag, Version); - if HasTag then JvID3v21.Commit; + ModalResult := mrOk; finally Screen.Cursor := lCursor; @@ -362,7 +358,6 @@ begin TagToCtrls; imgPicture.Picture.Assign(nil); lsbNavigator.ItemIndex := 0; - Notebook1.PageIndex := lsbNavigator.ItemIndex; end; function ChangeYear(const ADateTime: TDateTime; const NewYear: Word): TDateTime; @@ -560,6 +555,7 @@ begin P := Point(0, EdtEncodedBy.Top + EdtEncodedby.Height + EdtEncodedBy.BorderSpacing.Bottom); P := ScreenToClient(EdtEncodedBy.Parent.ClientToScreen(P)); Height := P.Y; + Notebook1.PageIndex := lsbNavigator.ItemIndex; end; procedure TJvID3v2EditForm.lsvPicturesClick(Sender: TObject); diff --git a/components/jvcllaz/run/JvJans/JvYearGrid.pas b/components/jvcllaz/run/JvJans/JvYearGrid.pas index 9f8cebaa0..71cc2474c 100644 --- a/components/jvcllaz/run/JvJans/JvYearGrid.pas +++ b/components/jvcllaz/run/JvJans/JvYearGrid.pas @@ -258,6 +258,8 @@ type property DefaultColWidth: Integer read GetDefaultColWidth write SetDefaultColWidth default 16; property DefaultRowHeight default 18; //: Integer read GetDefaultRowHeight write SetDefaultRowHeihgt default 18; + property Align; + property Anchors; property BorderSpacing; property BorderStyle; property Flat read GetFlat write SetFlat default true; diff --git a/components/jvcllaz/run/JvMM/JvId3v2Base.pas b/components/jvcllaz/run/JvMM/JvId3v2Base.pas index 3a04b4ffb..29757425b 100644 --- a/components/jvcllaz/run/JvMM/JvId3v2Base.pas +++ b/components/jvcllaz/run/JvMM/JvId3v2Base.pas @@ -1225,7 +1225,7 @@ procedure ID3ErrorFmt(const Msg: string; const Args: array of const; function CreateUniqueName(AController: TJvID3Controller; const FrameName: AnsiString; FrameClass: TJvID3FrameClass; Component: TComponent): string; procedure GetID3v2Version(const AFileName: string; var HasTag: Boolean; - var Version: TJvID3Version); + out Version: TJvID3Version); function ExtToMIMEType(const Ext: string): string; function MIMETypeToExt(const MIMEType: string): string; function GenreToNiceGenre(const AGenre: string): string; @@ -1235,7 +1235,7 @@ function NiceGenreToGenre(const ANiceGenre: string): string; implementation uses - Graphics, Math, LazUTF8, LConvEncoding, LazFileUtils, DateUtils, + Graphics, Math, LazUTF8, LConvEncoding, LazFileUtils, DateUtils, StrUtils, (* {$IFDEF HAS_UNIT_ANSISTRINGS} AnsiStrings, @@ -2336,7 +2336,7 @@ begin end; procedure GetID3v2Version(const AFileName: string; var HasTag: Boolean; - var Version: TJvID3Version); + out Version: TJvID3Version); var Header: TID3v2HeaderRec; begin @@ -2996,7 +2996,7 @@ begin if Result then Result := AnsiSameStr(TJvID3ContentFrame(Frame).Language, Self.Language) and - SameStr(TJvID3ContentFrame(Frame).Description, Self.Description) + (TJvID3ContentFrame(Frame).Description = Self.Description) else Result := inherited SameUniqueIDAs(Frame); end; @@ -6073,8 +6073,8 @@ begin Exit; while (Frame is TJvID3GeneralObjFrame) and - not SameStr(TJvID3GeneralObjFrame(Frame).ContentDescription, AContentDescription) do - + (TJvID3GeneralObjFrame(Frame).ContentDescription <> AContentDescription) + do AController.FindNextFrame(fiGeneralObject, Frame); if Frame is TJvID3GeneralObjFrame then @@ -6174,7 +6174,7 @@ begin (Frame.FrameID = FrameID) and (FrameID = fiGeneralObject); if Result then - Result := SameStr(TJvID3GeneralObjFrame(Frame).ContentDescription, ContentDescription) + Result := (TJvID3GeneralObjFrame(Frame).ContentDescription = ContentDescription) else Result := inherited SameUniqueIDAs(Frame); end; @@ -6933,7 +6933,7 @@ begin Result := (TJvID3PictureFrame(Frame).PictureType = PictureType) and ((PictureType in [ptFileIcon, ptOtherFileIcon]) or - SameStr(Description, TJvID3PictureFrame(Frame).Description)) + (Description = TJvID3PictureFrame(Frame).Description)) else Result := inherited SameUniqueIDAs(Frame); end;