From: Jos v.d.V. <jo...@us...> - 2005-10-09 16:33:39
|
Update of /cvsroot/win32forth/win32forth/apps/Player4 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23074/apps/Player4 Modified Files: Catalog.f Mediatree.f PLAYER4.F Pl_MciWindow.f Pl_Version.f Log Message: Jos: Enabled a fileselector to add files into de catalog. Index: PLAYER4.F =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/PLAYER4.F,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** PLAYER4.F 1 Oct 2005 12:57:38 -0000 1.22 --- PLAYER4.F 9 Oct 2005 16:33:07 -0000 1.23 *************** *** 48,51 **** --- 48,52 ---- needs Player4.frm needs Resources.f + needs multiopen.f \ ----------------------------------------------------------------------------- *************** *** 78,81 **** --- 79,83 ---- MENUITEM "&Exit\tAlt+F4" 'Q' +k_control pushkey ; POPUP "&Catalog" + MENUITEM "&Add file(s)...\tCtrl+M" 'M' +k_control pushkey ; MENUITEM "&Import directory tree...\tCtrl+I" 'I' +k_control pushkey ; MENUITEM "S&earch and make a collection..." SearchCatalog ; *************** *** 216,219 **** --- 218,222 ---- position-windows ;M + :M On_Init: ( -- ) On_Init: super *************** *** 221,225 **** ['] on_clicked to click-func ['] on_unclicked to unclick-func ! GetHandle: Self SetParent: ControlCenter catalog-exist? --- 224,228 ---- ['] on_clicked to click-func ['] on_unclicked to unclick-func ! InitFileNames GetHandle: Self SetParent: ControlCenter catalog-exist? *************** *** 492,496 **** 'R' +k_control of beep catalog-exist? if play-catalog-random: Player4W then endof ! 'I' +k_control of Import-to-catalog: Player4W RefreshCatalog endof \ 'C' +k_control of PlayAudioCD: Player4W endof \ doesn't work on my system (dbu) endcase --- 495,500 ---- 'R' +k_control of beep catalog-exist? if play-catalog-random: Player4W then endof ! 'M' +k_control of AddFilesFromSelector: Player4W endof ! 'I' +k_control of Import-to-catalog: Player4W RefreshCatalog endof \ 'C' +k_control of PlayAudioCD: Player4W endof \ doesn't work on my system (dbu) endcase Index: Pl_MciWindow.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/Pl_MciWindow.f,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Pl_MciWindow.f 26 May 2005 08:29:29 -0000 1.9 --- Pl_MciWindow.f 9 Oct 2005 16:33:07 -0000 1.10 *************** *** 14,17 **** --- 14,18 ---- needs MCIWnd.f + internal external *************** *** 25,29 **** :M ExWindowStyle: ( -- style ) ! ExWindowStyle: Super [ WS_EX_CLIENTEDGE WS_EX_TRANSPARENT or ] literal or ;M --- 26,30 ---- :M ExWindowStyle: ( -- style ) ! ExWindowStyle: Super [ WS_EX_CLIENTEDGE WS_EX_TRANSPARENT or ] literal or ;M *************** *** 33,36 **** --- 34,39 ---- ;Object + MultiFileOpenDialog GetFilesDialog "Select File" "Media Files (*.mp3,*.midi,*.mid,*.wav,*.mpeg,*.mpg,*.mp2,*.mp4,*.mpa,*.wma,*.wmv,*.avi,*.dat)|*.mp3;*.midi;*.mid;*.wav;*.mpeg;*.mpg;*.mp2;*.mp4;*.mpa;*.wma;*.wmv;*.avi;*.dat|" + \ ----------------------------------------------------------------------------- \ define the child window for the right part of the main window *************** *** 215,225 **** \ ----------------------------------------------------------------------------- :M play-catalog-random: ( -- ) ! AbortPlaying: self false to catalog-aborted? ! ! begin PLAYER catalog-aborted? if exitm then ! Playing?: Self not if next-not-played dup -1 = ! if cr cr ." All done. Reset randomlevel and shuffle..." set-all-not-played random-shuffle else cr 2 spaces dup . 2 spaces n>record dup>r --- 218,227 ---- \ ----------------------------------------------------------------------------- :M play-catalog-random: ( -- ) ! database-mhndl #records-in-database vadr-config #free-list @ - 0> ! if AbortPlaying: self false to catalog-aborted? ! begin PLAYER catalog-aborted? if exitm then Playing?: Self not if next-not-played dup -1 = ! if cr cr ." All done. Reset randomlevel and shuffle..." set-all-not-played random-shuffle else cr 2 spaces dup . 2 spaces n>record dup>r *************** *** 230,234 **** then then ! again ;M : add-to-catalog ( -- ) \ Delete the *.dat files to start a new catalog --- 232,238 ---- then then ! again ! then ! ;M : add-to-catalog ( -- ) \ Delete the *.dat files to start a new catalog *************** *** 236,245 **** config-mhndl map-hndl>vadr PathMediaFiles dup +null GetHandle: Self BrowseForFolder ! If \ PathMediaFiles count ! \ DatFile$ count r/w create-file abort" Can't create dat-file" ! \ dup>r write-file abort" Can't save path to media folder" ! \ crlf$ count r@ write-file throw ! \ r> close-file throw ! else true abort" No media folder selected" then ; --- 240,244 ---- config-mhndl map-hndl>vadr PathMediaFiles dup +null GetHandle: Self BrowseForFolder ! If add_dir_tree then ; *************** *** 248,252 **** check-config add-to-catalog ! add_dir_tree ;M --- 247,261 ---- check-config add-to-catalog ! ;M ! ! :M AddFilesFromSelector: ( - ) \ add one or more files ! OpenAppendDatabase ! GetHandle: self Start: GetFilesDialog count nip 0> ! if #SelectedFiles: GetFilesDialog 0 ! do dup i GetFile: GetFilesDialog AddFile ! loop ! then ! CloseReMap ! RefreshCatalog ;M *************** *** 332,334 **** module ! |