Fix compilation of Cactus Jukebox. Cleanup.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9250 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
juhamanninen 2024-02-22 11:42:35 +00:00
parent 51c3d02574
commit 05eac2d82b
19 changed files with 45 additions and 126 deletions

View File

@ -27,11 +27,8 @@ Type
Procedure PlaylistURLEditClick(Sender: TObject);
Procedure StreamUrlEditChange(Sender: TObject);
Procedure FormCreate(Sender: TObject);
Private
{ private declarations }
Private
FAdvanced: boolean;
Public
{ public declarations }
End;
Var

View File

@ -18,10 +18,6 @@ Type
Procedure BackImgClick(Sender: TObject);
Procedure FormClose(Sender: TObject; Var CloseAction: TCloseAction);
Procedure Image1Click(Sender: TObject);
Private
{ private declarations }
Public
{ public declarations }
End;
Var

View File

@ -1,13 +1,13 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
<Version Value="12"/>
<General>
<Flags>
<LRSInOutputDirectory Value="False"/>
<CompatibilityMode Value="True"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="cactus"/>
<UseXPManifest Value="True"/>
<XPManifest>
@ -59,11 +59,7 @@
<ShowHintsForUnusedUnitsInMainSrc Value="True"/>
</Verbosity>
<WriteFPCLogo Value="False"/>
<CompilerMessages>
<UseMsgFile Value="True"/>
</CompilerMessages>
<CustomOptions Value="-dCactusDebug -dCactusDebugVerbose"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
</Item2>
@ -111,10 +107,6 @@
<ShowHintsForUnusedUnitsInMainSrc Value="True"/>
</Verbosity>
<WriteFPCLogo Value="False"/>
<CompilerMessages>
<UseMsgFile Value="True"/>
</CompilerMessages>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
</Item3>
@ -122,14 +114,19 @@
<PublishOptions>
<Version Value="2"/>
<DestinationDirectory Value="/home/daseeb/devel/mp3/release/source"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T &apos;Lazarus Run Output&apos; -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local>
<FormatVersion Value="2"/>
<Modes Count="1">
<Mode0 Name="default">
<local>
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T &apos;Lazarus Run Output&apos; -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local>
</Mode0>
</Modes>
</RunParams>
<RequiredPackages Count="5">
<Item1>
@ -155,74 +152,62 @@
<Unit0>
<Filename Value="cactusjukebox.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="cactusjukebox"/>
</Unit0>
<Unit1>
<Filename Value="editid3.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="EditID3"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="editid3"/>
</Unit1>
<Unit2>
<Filename Value="status.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Status"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="status"/>
</Unit2>
<Unit3>
<Filename Value="settings.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Settings"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="settings"/>
</Unit3>
<Unit4>
<Filename Value="player.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="playwin"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="player"/>
</Unit4>
<Unit5>
<Filename Value="fmodplayer.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="fmodplayer"/>
</Unit5>
<Unit6>
<Filename Value="directories.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="dirwin"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="directories"/>
</Unit6>
<Unit7>
<Filename Value="skin.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="skin"/>
</Unit7>
<Unit8>
<Filename Value="cdrip.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="cdrip"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="cdrip"/>
</Unit8>
<Unit9>
<Filename Value="functions.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="functions"/>
</Unit9>
<Unit10>
<Filename Value="last_fm.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="last_fm"/>
</Unit10>
<Unit11>
<Filename Value="mediacol.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="mediacol"/>
</Unit11>
<Unit12>
<Filename Value="bigcoverimg.pas"/>
@ -236,17 +221,14 @@
<IsPartOfProject Value="True"/>
<ComponentName Value="Main"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="mainform"/>
</Unit13>
<Unit14>
<Filename Value="debug.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="debug"/>
</Unit14>
<Unit15>
<Filename Value="config.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="config"/>
</Unit15>
<Unit16>
<Filename Value="addradio.pas"/>
@ -254,77 +236,62 @@
<ComponentName Value="addRadioForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="addradio"/>
</Unit16>
<Unit17>
<Filename Value="mplayer.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="mplayer"/>
</Unit17>
<Unit18>
<Filename Value="playlist.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="playlist"/>
</Unit18>
<Unit19>
<Filename Value="playerclass.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="playerclass"/>
</Unit19>
<Unit20>
<Filename Value="streamcol.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="streamcol"/>
</Unit20>
<Unit21>
<Filename Value="tagreader/mp3file.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="mp3file"/>
</Unit21>
<Unit22>
<Filename Value="tagreader/guesstag.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="guesstag"/>
</Unit22>
<Unit23>
<Filename Value="plugin/sdk/cj_interfaces.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="cj_interfaces"/>
</Unit23>
<Unit24>
<Filename Value="plugin/sdk/cj_plugin.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="cj_plugin"/>
</Unit24>
<Unit25>
<Filename Value="plugin/impl/cj_interfaces_impl.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="cj_interfaces_impl"/>
</Unit25>
<Unit26>
<Filename Value="plugin/impl/cj_pluginslist.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="cj_pluginslist"/>
</Unit26>
<Unit27>
<Filename Value="MGList.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="MGList"/>
</Unit27>
<Unit28>
<Filename Value="MGSignals.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="MGSignals"/>
</Unit28>
<Unit29>
<Filename Value="MGTree16.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="MGTree16"/>
</Unit29>
<Unit30>
<Filename Value="global_vars.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="global_vars"/>
</Unit30>
<Unit31>
<Filename Value="plugin/TO-DO.txt"/>
@ -333,12 +300,10 @@
<Unit32>
<Filename Value="fmodintf/fmoddyn.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="fmoddyn"/>
</Unit32>
<Unit33>
<Filename Value="cddb.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="cddb"/>
</Unit33>
</Units>
</ProjectOptions>
@ -370,6 +335,9 @@
</Optimizations>
</CodeGeneration>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf3"/>
</Debugging>
<LinkSmart Value="True"/>
<Options>
<Win32>
@ -382,11 +350,7 @@
<ShowHintsForUnusedUnitsInMainSrc Value="True"/>
</Verbosity>
<WriteFPCLogo Value="False"/>
<CompilerMessages>
<UseMsgFile Value="True"/>
</CompilerMessages>
<CustomOptions Value="-dCactusDebug"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
</CONFIG>

View File

@ -52,7 +52,6 @@ type
constructor create;
destructor destroy;
private
{ private declarations }
orphantext: string;
Connection: TLTcp;
FServer, FUser, FSoftware, FVersion, FHostname: string;
@ -61,8 +60,6 @@ type
procedure OnErrorProc(const msg: string; asocket: TLSocket);
procedure OnDisconnectProc(asocket: TLSocket);
procedure OnConnectProc(asocket: TLSocket);
public
{ public declarations }
end;
implementation

View File

@ -68,13 +68,11 @@ Type
Var CanSelect: Boolean);
Procedure encodecheckChange(Sender: TObject);
Procedure startButClick(Sender: TObject);
Private
{ private declarations }
Private
Outputstring: TStringlist;
Outputstream: TMemoryStream;
RipProcess, EncodeProcess: TProcess;
Public
{ public declarations }
Public
ToRemove, ToRip, ToEncode: array[1..100] Of boolean;
OutFileNames: array[1..100] Of string;
RipTrack, EncodeTrack: byte;

View File

@ -46,13 +46,11 @@ type
procedure FormDestroy(Sender: TObject);
procedure lstRemoveClick(Sender: TObject);
private
{ private declarations }
procedure Recursive_AddDir
(dir: String; strExtension: ptrStrArray; var bContainesFiles: Boolean);
public
{ public declarations }
end;
end;
var
FrmCleanLibrary: TFrmCleanLibrary;
@ -376,13 +374,11 @@ type
procedure FormDestroy(Sender: TObject);
procedure lstRemoveClick(Sender: TObject);
private
{ private declarations }
procedure Recursive_AddDir
(dir: String; strExtension: ptrStrArray; var bContainesFiles: Boolean);
public
{ public declarations }
end;
end;
var
FrmCleanLibrary: TFrmCleanLibrary;

View File

@ -1,5 +1,3 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('Tdirwin','FORMDATA',[
'TPF0'#7'Tdirwin'#6'dirwin'#4'Left'#3'^'#1#6'Height'#3#19#1#3'Top'#3'#'#1#5'W'
+'idth'#3#215#1#13'ActiveControl'#7#3'add'#11'BorderIcons'#11#12'biSystemMenu'

View File

@ -44,10 +44,6 @@ Type
Procedure removeClick(Sender: TObject);
Procedure rescanClick(Sender: TObject);
Procedure rescanallClick(Sender: TObject);
Private
{ private declarations }
Public
{ public declarations }
End;
Var

View File

@ -125,7 +125,6 @@ Type
Procedure cmbYearChange(Sender: TObject);
Procedure activateEMode(Sender: TObject);
Private
{ private declarations }
artist_only, album_only: Boolean;
timer_loop_count: integer;
request_send: boolean;
@ -146,7 +145,6 @@ Type
function GetCoverPath: boolean;
function GetTrack: string;
Public
{ public declarations }
fileid: integer;
Procedure display_window(MedFile:TMediaFileClass; intMode: Integer = 0);
Procedure display_window(StreamInfo: TStreamInfoItemClass);
@ -252,8 +250,8 @@ Begin
MedFileObj.write_tag;
RenameFile(MedFileObj.path, UTF8ToSys(editid3win.pathedit1.text));
MedFileObj.path := UTF8ToSys(editid3win.pathedit1.text);
RenameFile(MedFileObj.path, editid3win.pathedit1.text);
MedFileObj.path := editid3win.pathedit1.text;
End;
@ -608,7 +606,7 @@ Begin
// title(-mode) specific actions
Else
Begin
pathedit1.text := SysToUTF8(MedFileObj.path);
pathedit1.text := MedFileObj.path;
//TODO: scroll TEdit to end of path
titleedit1.text := MedFileObj.title;
albumedit1.text := MedFileObj.album;
@ -882,7 +880,7 @@ Begin
else // title-mode
begin
MedFileObj.PathNameFromTag(CactusConfig.strTagToNameFormatString);
EditID3win.pathedit1.text := SysToUTF8(MedFileObj.Path);
EditID3win.pathedit1.text := MedFileObj.Path;
end;
@ -914,18 +912,18 @@ Procedure TEditID3.guessnameClick(Sender: TObject);
Var z: integer;
tmps: string;
Begin
tmps := extractfilename(UTF8ToSys(pathedit1.Text));
tmps := extractfilename(pathedit1.Text);
If ((tmps[1]<#60) And (tmps[2]<#60) And (tmps[4]=#45)) Then
Begin
trackedit1.text := SysToUTF8(copy(tmps,1,2));
trackedit1.text := copy(tmps,1,2);
delete(tmps, 1, 5);
End;
z := pos(' - ', tmps)+3;
If z<>3 Then
Begin
titleedit1.text := SysToUTF8(TrimRight(copy(tmps,z,length(tmps)-z-3)));
artistedit1.text := SysToUTF8(TrimRight(copy(tmps,1,z-3)));
titleedit1.text := TrimRight(copy(tmps,z,length(tmps)-z-3));
artistedit1.text := TrimRight(copy(tmps,1,z-3));
End
Else
Begin

View File

@ -59,7 +59,6 @@ THTTPCallbackProc = function : boolean of object;
constructor Create;
destructor destroy;
Private
{ private declarations }
// FAlbumCover: TFPImage;
FArtist, FAlbum: string;
FAPIKey: string;
@ -79,7 +78,6 @@ THTTPCallbackProc = function : boolean of object;
function album_downloadCoverRCV: boolean;
procedure SendRequest(callback: THTTPCallbackProc);
Public
{ public declarations }
CoverSize: TCoverSize;
property data_ready: boolean read FData_Ready;
property AlbumInfo: TAlbumInfoRecord read FAlbumInfo;

View File

@ -430,7 +430,6 @@ type
procedure VolumebarMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: integer);
private
{ private declarations }
ctrl_pressed, SplitterResize: boolean;
oldSplitterWidth, LoopCount: integer;
@ -471,8 +470,6 @@ type
procedure update_artist_view;
procedure update_library_view;
{ public declarations }
//Test Plugins....cut in future
procedure SayHello(Sender: TCJ_MenuItem);
function SayMsgHello(var Message: TMessage): boolean;
@ -489,8 +486,7 @@ type
private
procedure ShowStatus;
protected
procedure Execute;
override;
procedure Execute; override;
public
fStatus: byte;
tmpcollection: TMediaCollectionClass;
@ -512,16 +508,14 @@ type
protected
CopyList, TargetList, DeleteList: TStringList;
DeletedCnt, DeleteTotal, CopyTotal, CopiedCnt: integer;
OpSuccess, finished: boolean;
OpSuccess: boolean;
SAction: TSyncAction;
TargetCollection: TMediaCollectionClass;
procedure Execute;
override;
procedure Execute; override;
public
Target: string;
constructor Create(Suspd: boolean);
destructor Destroy;
override;
destructor Destroy; override;
procedure CopyFile(fromFile, toFile: string);
procedure DeleteFile(path: string);
end;
@ -586,7 +580,6 @@ end;
procedure TSyncThread.Execute;
begin
finished := False;
DeleteTotal := DeleteList.Count;
CopyTotal := CopyList.Count;
DeletedCnt := 0;
@ -626,7 +619,6 @@ begin
Synchronize(@SyncStatus);
end;
Finished := True;
Synchronize(@SyncStatus);
end;
@ -1243,7 +1235,7 @@ begin
if MediaCollection.items[i].title <> '' then
ListItem.SubItems.Add(MediaCollection.items[i].Artist)
else
ListItem.SubItems.Add(SysToUTF8(extractfilename(MediaCollection.items[i].path)));
ListItem.SubItems.Add(extractfilename(MediaCollection.items[i].path));
ListItem.SubItems.Add(MediaCollection.items[i].title);
ListItem.SubItems.Add(MediaCollection.items[i].album);
ListItem.SubItems.Add(MediaCollection.items[i].Track);
@ -2284,7 +2276,7 @@ var
begin
DebugOutLn('** Loadfile **', 2);
Application.ProcessMessages;
if FileExistsUTF8(Path) then
if FileExists(Path) then
begin
z := MediaCollection.GetIndexByPath(path);
DebugOutLn(z, 3);
@ -4715,13 +4707,13 @@ begin
if MedColObj.items[i].title <> '' then
ListItem.SubItems.Add(MedColObj.items[i].Artist)
else
ListItem.SubItems.Add(SysToUTF8(ExtractFileName(MedColObj.items[i].path)));
ListItem.SubItems.Add(ExtractFileName(MedColObj.items[i].path));
ListItem.SubItems.Add((MedColObj.items[i].title));
ListItem.SubItems.Add((MedColObj.items[i].album));
ListItem.SubItems.Add(MedColObj.items[i].track);
ListItem.SubItems.Add(ID3Genre[MedColObj.items[i].GenreID]);
ListItem.SubItems.Add(SysToUTF8(ExtractFileName(MedColObj.items[i].Path)));
ListItem.SubItems.Add(ExtractFileName(MedColObj.items[i].Path));
ListItem.SubItems.Add(MedColObj.items[i].playtime);
end;
i := MedColObj.GetNext;

View File

@ -19,9 +19,9 @@ Interface
Uses
Classes, SysUtils,
LCLProc, LConvEncoding, LazUTF8,
//Tagreader:
WMAfile, OggVorbis, FLACfile, mp3file, debug, LCLProc, lconvencoding,
guesstag;
WMAfile, OggVorbis, FLACfile, mp3file, debug, guesstag;
Type
// PMediaCollectionClass = ^TMediaCollectionClass;
@ -832,7 +832,7 @@ begin
exit;
end
end;
if FindInvalidUTF8Character(pchar(s), Length(s), false)>=0 then
if FindInvalidUTF8Codepoint(pchar(s), Length(s), false)>=0 then
result := ISO_8859_1ToUTF8(s)
else
result := S;

View File

@ -117,22 +117,19 @@ Type
Procedure playClick(Sender: TObject);
Procedure playwinClose(Sender: TObject; Var CloseAction: TCloseAction);
Procedure playwinCreate(Sender: TObject);
Procedure playwinKeyDown(Sender: TObject; Var Key: Word; Shift: TShiftState
);
Procedure playwinKeyDown(Sender: TObject; Var Key: Word; Shift: TShiftState);
Procedure playwinKeyUp(Sender: TObject; Var Key: Word; Shift: TShiftState);
Procedure prevClick(Sender: TObject);
Procedure stopClick(Sender: TObject);
Procedure toggle_viewClick(Sender: TObject);
Procedure trackbarMouseDown(Sender: TOBject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
Private
{ private declarations }
Private
strg: boolean;
Public
Public
Procedure draw_artist(a:String);
Procedure draw_title(t:String);
{ public declarations }
End;
Var

View File

@ -512,7 +512,7 @@ end;
procedure TCJ_TrayIcon_Impl.ShowNotification(AImageList :Integer; Icon :Integer; Msg :PChar; Sound :PChar);
begin
if (AImageList=-1)
then AImageList :=global_vars.ImageListNormal.Handle;
then AImageList :=global_vars.ImageListNormal.ResolutionByIndex[0].Reference.Handle;
(* TTrayNotifications.ShowNotification(-1, 'Cactus Jukebox',
Icon, Msg, Sound,

View File

@ -144,11 +144,8 @@ Type
Procedure kdeserviceboxChange(Sender: TObject);
Procedure savebutClick(Sender: TObject);
function ShowModal(intActivePage: integer = TSETTINGS_SELECT_NONE): Integer;
Private
{ private declarations }
Private
servicemenu_changed: boolean;
Public
{ public declarations }
End;
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

View File

@ -19,9 +19,8 @@ type
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
cancel: boolean;
end;

View File

@ -84,7 +84,6 @@ type
{ Class TOggVorbis }
TOggVorbis = class(TObject)
private
{ Private declarations }
FFileSize: Integer;
FChannelModeID: Byte;
FSampleRate: integer;
@ -108,7 +107,6 @@ type
function FGetRatio: Double;
function FGetEncoder: String;
public
{ Public declarations }
constructor Create; { Create object }
destructor Destroy; override; { Destroy object }
function ReadFromFile(const FileName: string): Boolean; { Load data }

View File

@ -52,7 +52,6 @@ type
{ Class TWMAfile }
TWMAfile = class(TObject)
private
{ Private declarations }
FValid: Boolean;
FFileSize: Integer;
FChannelModeID: Byte;
@ -69,7 +68,6 @@ type
procedure FResetData;
function FGetChannelMode: string;
public
{ Public declarations }
constructor Create; { Create object }
function ReadFromFile(const FileName: string): Boolean; { Load data }
property Valid: Boolean read FValid; { True if valid data }