From: Jos v.d.V. <jo...@us...> - 2006-07-08 19:58:55
|
Update of /cvsroot/win32forth/win32forth/apps/Player4 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv31458/apps/Player4 Modified Files: Catalog.f CommandID.f Commands.f PLAYER4.F Pl_MciWindow.f Pl_Version.f PopupWindow.f Log Message: Jos: Made the use of a relative search path in the catalog possible Index: CommandID.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/CommandID.f,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CommandID.f 24 May 2006 15:27:43 -0000 1.3 --- CommandID.f 8 Jul 2006 19:58:52 -0000 1.4 *************** *** 8,12 **** : NewID ( <name> -- ) ! defined IF drop ELSE count "header NextId DOCON , , --- 8,12 ---- : NewID ( <name> -- ) ! defined IF drop ELSE count "header NextId DOCON , , *************** *** 48,68 **** IdCounter constant IDM_LAST ! : allot-erase ( n -- ) ! here over allot swap erase ; Create CommandTable IDM_LAST IDM_FIRST - cells allot-erase ! : IsCommand? ( ID -- f ) ! IDM_FIRST IDM_LAST within ; ! : >CommandTable ( ID -- addr ) ! dup IsCommand? ! if IDM_FIRST - cells CommandTable + ! else drop abort" error - command ID out of range" ! then ; ! : DoCommand ( ID -- ) ! >CommandTable @ ?dup IF execute THEN ; ! : SetCommand ( ID -- ) ! last @ name> swap >CommandTable ! ; --- 48,69 ---- IdCounter constant IDM_LAST ! : allot-erase ( n -- ) ! here over allot swap erase ; Create CommandTable IDM_LAST IDM_FIRST - cells allot-erase ! : IsCommand? ( ID -- f ) ! IDM_FIRST IDM_LAST within ; ! : >CommandTable ( ID -- addr ) ! dup IsCommand? ! if IDM_FIRST - cells CommandTable + ! else drop abort" error - command ID out of range" ! then ; ! : DoCommand ( ID -- ) ! >CommandTable @ ?dup IF execute THEN ; ! : SetCommand ( ID -- ) ! last @ name> swap >CommandTable ! ; ! \s Index: Pl_Version.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/Pl_Version.f,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Pl_Version.f 28 Jun 2006 11:43:12 -0000 1.18 --- Pl_Version.f 8 Jul 2006 19:58:52 -0000 1.19 *************** *** 3,7 **** anew -Pl_Version.f ! 10125 value player_version# \ Version numbers: v.ww.rr --- 3,7 ---- anew -Pl_Version.f ! 10126 value player_version# \ Version numbers: v.ww.rr *************** *** 38,43 **** - Create *.m3u files and import them the catalog - - BTW the filenames should be stored with relative - - Addtional search path's - Columns in the treeview. - Only add a new file to the catalog when it wasn't added before --- 38,41 ---- *************** *** 176,177 **** --- 174,179 ---- Push the joystick to the right when you would like to go in an already open child in a tree. + + \ changes for Version 1.01.26 + Jos: July 8th, 2006. + File names will now be relative stored when a search path is filled. Index: Catalog.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/Catalog.f,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** Catalog.f 28 Jun 2006 11:43:12 -0000 1.36 --- Catalog.f 8 Jul 2006 19:58:52 -0000 1.37 *************** *** 56,59 **** --- 56,61 ---- DWORD VolLevel BYTE JoyStickDisabled- + 2 CELLS Field: SourcePathCatalog + MAX-PATH 1+ Field: SearchPathCatalog ;struct *************** *** 123,127 **** sizeof RecordDef dup to record-size mkstruct: InlineRecord ! : file-exist? ( adr len -- true-if-file-exist ) file-status nip 0= ; : file-size>s ( fileid -- len ) file-size drop d>s ; --- 125,129 ---- sizeof RecordDef dup to record-size mkstruct: InlineRecord ! : file-exist? ( adr len -- true-if-file-exist ) file-status nip 0= ; : file-size>s ( fileid -- len ) file-size drop d>s ; *************** *** 137,141 **** : create-index-file ( #records - f ) ! cells index$ create-file-ptrs index$ open-file-ptrs --- 139,143 ---- : create-index-file ( #records - f ) ! cells index$ create-file-ptrs index$ open-file-ptrs *************** *** 155,159 **** ; ! : unmap-configuration ( - ) database-mhndl dup flush-view-file drop close-map-file drop ; --- 157,161 ---- ; ! : unmap-configuration ( - ) database-mhndl dup flush-view-file drop close-map-file drop ; *************** *** 162,166 **** count 2dup file-exist? if r/w open-file abort" Can't open the file for writing" ! else r/w create-file abort" Can't create the file" then ; --- 164,168 ---- count 2dup file-exist? if r/w open-file abort" Can't open the file for writing" ! else r/w create-file abort" Can't create the file" then ; *************** *** 222,226 **** rebuild-index-hdrs ; ! : generate-index-file ( - ) unmap-database _generate-index-file ; --- 224,228 ---- rebuild-index-hdrs ; ! : generate-index-file ( - ) unmap-database _generate-index-file ; *************** *** 228,233 **** ! : vadr-config ( - vadr-config ) s" config-mhndl map-hndl>vadr " EVALUATE ; IMMEDIATE ! : SeparatorX ( - adr ) vadr-config _SeparatorX ; : check-config ( flag -- ) \ creates one with the right size --- 230,242 ---- ! : vadr-config ( - vadr-config ) s" config-mhndl map-hndl>vadr " EVALUATE ; IMMEDIATE ! : CatalogPath ( - CatalogPath ) vadr-config SearchPathCatalog ; ! ! : SeparatorX ( - adr ) vadr-config _SeparatorX ; ! ! \ : UseCatalogPath ( - ) vadr-config SearchPath to path-ptr ; ! \ : UseForthPath ( - ) &fpath to path-ptr ; ! : UseCatalogPath ( - ) ; ! : UseForthPath ( - ) ; : check-config ( flag -- ) \ creates one with the right size *************** *** 239,243 **** r> close-file throw map-config-file ! true vadr-config s_Artist_Title- c! 1000 vadr-config VolLevel ! then --- 248,252 ---- r> close-file throw map-config-file ! true vadr-config s_Artist_Title- c! 1000 vadr-config VolLevel ! then *************** *** 552,559 **** else 0 struct, InlineRecord RecordDef Cnt_Artist c! drop then ! ! drop ! struct, InlineRecord RecordDef File_name r@ cmove ! r> struct, InlineRecord RecordDef Cnt_File_name c! ; --- 561,567 ---- else 0 struct, InlineRecord RecordDef Cnt_Artist c! drop then ! drop struct, InlineRecord RecordDef File_name swap r> ! CatalogPath FindRelativeName drop >r swap r@ cmove ! r> struct, InlineRecord RecordDef Cnt_File_name c! ; *************** *** 634,640 **** DatFile$ count file-exist? database$ count file-exist? and - \ database-mhndl map-file-open? or DataBaseFilled? and dup ! if index$ count file-exist? not if _generate-index-file then --- 642,647 ---- DatFile$ count file-exist? database$ count file-exist? and DataBaseFilled? and dup ! if UseCatalogPath index$ count file-exist? not if _generate-index-file then *************** *** 714,718 **** : EnableAllRecords ( - ) s" *" "search-records ; ! string: tmp$ : n>tmp$ ( n - ) 0 (d.) tmp$ place ; --- 721,725 ---- : EnableAllRecords ( - ) s" *" "search-records ; ! string: tmp$ : n>tmp$ ( n - ) 0 (d.) tmp$ place ; Index: PLAYER4.F =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/PLAYER4.F,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** PLAYER4.F 28 Jun 2006 11:43:12 -0000 1.60 --- PLAYER4.F 8 Jul 2006 19:58:52 -0000 1.61 *************** *** 51,54 **** --- 51,55 ---- needs catalog.f needs view.f + needs SearchPath.f needs Player4.frm \ "Control center" dialog *************** *** 231,235 **** then else map-config-file ! then SortByFlags -1 to #playing GetHandle: Self SetParent: ControlCenter --- 232,237 ---- then else map-config-file ! then ! SortByFlags -1 to #playing GetHandle: Self SetParent: ControlCenter *************** *** 361,365 **** : HandleCmdLine { \ bPlayFolder bPlayList -- } \ simple command-line handling ! CMDLINE ?dup if false to bPlayFolder false to bPlayList --- 363,367 ---- : HandleCmdLine { \ bPlayFolder bPlayList -- } \ simple command-line handling ! UseForthPath CMDLINE ?dup if false to bPlayFolder false to bPlayList *************** *** 496,500 **** vadr-config JoyStickDisabled- c@ 0= if IDJoystick GetJoystickInfo dup JOY_BUTTON1 >= ! if JoystickBrowser WaitTillDepressed 3drop else HandleMovesJoystickBrowser then --- 498,502 ---- vadr-config JoyStickDisabled- c@ 0= if IDJoystick GetJoystickInfo dup JOY_BUTTON1 >= ! if JoystickBrowser WaitTillDepressed 3drop else HandleMovesJoystickBrowser then *************** *** 507,513 **** MENUBAR player4-Menu-bar POPUP "&File" ! MENUITEM "&Play file...\tCtrl+O" IDM_OPEN_FILE DoCommand ; ! MENUITEM "Play &folder...\tCtrl+F" IDM_OPEN_FOLDER DoCommand ; ! MENUITEM "&Play &list...\tShift+L" IDM_OPEN_PLAYLIST DoCommand ; MENUSEPARATOR MENUITEM "&Exit\tAlt+F4" IDM_QUIT DoCommand ; --- 509,515 ---- MENUBAR player4-Menu-bar POPUP "&File" ! MENUITEM "&Play file...\tCtrl+O" IDM_OPEN_FILE DoCommand ; ! MENUITEM "Play &folder...\tCtrl+F" IDM_OPEN_FOLDER DoCommand ; ! MENUITEM "&Play &list...\tShift+L" IDM_OPEN_PLAYLIST DoCommand ; MENUSEPARATOR MENUITEM "&Exit\tAlt+F4" IDM_QUIT DoCommand ; *************** *** 523,528 **** MENUSEPARATOR SUBMENU "S&ort and view" ! MENUITEM "Define a view and sort" StartViewForm ; ! MENUITEM "&Sort / Refresh" SortCatalog ; MENUSEPARATOR MENUITEM "Se&t maximum random level" SetRandomLevel ; --- 525,530 ---- MENUSEPARATOR SUBMENU "S&ort and view" ! MENUITEM "Define a view and sort" UseCatalogPath StartViewForm ; ! MENUITEM "&Sort / Refresh" UseCatalogPath SortCatalog ; MENUSEPARATOR MENUITEM "Se&t maximum random level" SetRandomLevel ; *************** *** 556,559 **** --- 558,562 ---- MENUITEM "&Audio off\tShift+A" IDM_AUDIO_OFF DoCommand ; MENUSEPARATOR + MENUITEM "&Setup search path catalog" Self start: Form_search_path ; :MENUITEM mAutostart "Auto play the catalog at the start" AutoPlay ; *************** *** 653,656 **** --- 656,660 ---- \ build an application on disk or run Player \ ----------------------------------------------------------------------------- + turnkey? [if] ' QuitPlayer is StopPlayer *************** *** 665,669 **** s" Player4.ico" s" Player4.exe" AddAppIcon ! PLAYER4 [then] --- 669,674 ---- s" Player4.ico" s" Player4.exe" AddAppIcon ! PLAYER4 ! [then] Index: Pl_MciWindow.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/Pl_MciWindow.f,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** Pl_MciWindow.f 28 Jun 2006 11:43:12 -0000 1.25 --- Pl_MciWindow.f 8 Jul 2006 19:58:52 -0000 1.26 *************** *** 288,293 **** else n>record dup>r RecordDef File_name r@ Cnt_File_name c@ 2dup type-cr ! r@ incr-#played r@ to #playing r> mark-played ! (PlayOneFile) then then --- 288,295 ---- else n>record dup>r RecordDef File_name r@ Cnt_File_name c@ 2dup type-cr ! r@ incr-#played r@ to #playing r> mark-played ! CatalogPath full-path not ! if (PlayOneFile) ! then then then *************** *** 301,305 **** vadr-config PathMediaFiles dup +null GetHandle: Self BrowseForFolder ! If vadr-config PathMediaFiles count GetLabel add_dir_tree then ; --- 303,307 ---- vadr-config PathMediaFiles dup +null GetHandle: Self BrowseForFolder ! If vadr-config PathMediaFiles count GetLabel add_dir_tree then ; Index: PopupWindow.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/PopupWindow.f,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** PopupWindow.f 28 Jun 2006 11:43:12 -0000 1.8 --- PopupWindow.f 8 Jul 2006 19:58:52 -0000 1.9 *************** *** 13,19 **** if 2dup cr type-space then ! PlayFile: PLAYER4W ! ; ! defer ClosePopupWindow ' noop is ClosePopupWindow --- 13,19 ---- if 2dup cr type-space then ! CatalogPath full-path not ! if PlayFile: Player4W ! then ; defer ClosePopupWindow ' noop is ClosePopupWindow Index: Commands.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/Commands.f,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Commands.f 28 Jun 2006 11:43:12 -0000 1.4 --- Commands.f 8 Jul 2006 19:58:52 -0000 1.5 *************** *** 26,36 **** : PlayFile ( -- ) ! OpenFile: Player4W ; IDM_OPEN_FILE SetCommand : OpenFolder ( -- ) ! OpenFolder: Player4W ; IDM_OPEN_FOLDER SetCommand : OpenPlayList ( -- ) ! OpenPlayList: Player4W ; IDM_OPEN_PLAYLIST SetCommand : QuitPlayer ( -- ) --- 26,36 ---- : PlayFile ( -- ) ! UseForthPath OpenFile: Player4W ; IDM_OPEN_FILE SetCommand : OpenFolder ( -- ) ! UseForthPath OpenFolder: Player4W ; IDM_OPEN_FOLDER SetCommand : OpenPlayList ( -- ) ! UseForthPath OpenPlayList: Player4W ; IDM_OPEN_PLAYLIST SetCommand : QuitPlayer ( -- ) *************** *** 45,52 **** : AddFiles ( -- ) ! AddFilesFromSelector: Player4W ; IDM_ADD_FILES SetCommand : ImportFolder ( -- ) ! Import-to-catalog: Player4W RefreshCatalog ; IDM_IMPORT_FOLDER SetCommand : start/resume ( -- ) --- 45,52 ---- : AddFiles ( -- ) ! UseCatalogPath AddFilesFromSelector: Player4W ; IDM_ADD_FILES SetCommand : ImportFolder ( -- ) ! Import-to-catalog: Player4W RefreshCatalog ; IDM_IMPORT_FOLDER SetCommand : start/resume ( -- ) |