Changeset 4 for trunk/mediafolder/c/mediafldr
- Timestamp:
- Jul 13, 2017, 5:17:57 AM (8 years ago)
- Location:
- trunk/mediafolder/c/mediafldr
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mediafolder/c/mediafldr/mediadialogprocs.cpp
r3 r4 405 405 thisPtr->usLastSelMenuItem=SHORT1FROMMP(mp1); 406 406 break; 407 case WM_TIMER: 408 /* The user didn't click any button on the message box asking for closing the 409 folder. Now the system forces the closing so automatic shutdown may finally 410 succeed. */ 411 if(SHORT1FROMMP(mp1)==MFLDR_MBOX_TIMER_ID) { 412 WinStopTimer(WinQueryAnchorBlock(HWND_DESKTOP), hwnd, MFLDR_MBOX_TIMER_ID); 413 WinPostMsg(hwnd, WM_CLOSE, 0, 0); 414 } 415 return MRFALSE; 407 416 default: 408 417 break; -
trunk/mediafolder/c/mediafldr/mediafolderoverridenwpmethods.cpp
r3 r4 311 311 hwnd=CWProgFolder::wpOpen(hwndCnr, ulView, ulParam); 312 312 313 /* Save this ptr */314 // WinSetWindowULong( hwnd, ulQWP_THISPTR, (ULONG)this);315 316 313 /* Only subclass folder frames, not settings notebooks */ 317 314 if(ulView!=OPEN_SETTINGS){ … … 409 406 }/* menu hwnd */ 410 407 411 //#if 0412 408 /* Subclass container for tabbing */ 413 409 myFrameCtrlHWND=WinWindowFromID(hwnd,FID_CLIENT);//Get container hwnd … … 419 415 } 420 416 421 //#endif422 417 /* Now add the framecontrols */ 423 418 … … 1352 1347 1353 1348 /* Check if we currently play a song */ 1354 if(iWave) { 1349 if(iWave && !(ulPrivFlags & MFLDR_SHOWING_MBOX)) { 1350 LONG lDelay; 1351 1352 #if 0 1355 1353 PVIEWITEM pViewItem; 1356 1354 int a=0; 1357 1358 #if 01359 1355 /* Check if we close a settings view or a folder view. */ 1360 1356 for(pViewItem=wpFindViewItem(VIEW_ANY, NULLHANDLE); pViewItem; pViewItem=wpFindViewItem(VIEW_ANY, pViewItem)) … … 1370 1366 hwndOwner=hwndFrame; 1371 1367 1368 /* Start a timer which will cause the folder to close automatically after some time even 1369 if the user doesn't click any button. Get the timeout from the INI file if available. */ 1370 if((lDelay=PrfQueryProfileInt(HINI_USERPROFILE, "CWMM", MFLDR_TIMER_DELAY_KEY, MFLDR_MBOX_TIMER_DELAY)) 1371 < MFLDR_MBOX_MIN_TIMER_DELAY) 1372 lDelay=MFLDR_MBOX_MIN_TIMER_DELAY; 1373 1374 WinStartTimer(WinQueryAnchorBlock(HWND_DESKTOP), hwndFrame, MFLDR_MBOX_TIMER_ID, lDelay); 1375 ulPrivFlags|= MFLDR_SHOWING_MBOX; 1376 /* Ask user if he really wants to stop playing and close the folder */ 1372 1377 if(messageBox( text, IDSTR_CLOSETEXT, sizeof(text), 1373 1378 title, IDSTR_CLOSETITLE, sizeof(title), 1374 queryResModuleHandle(), hwndOwner, MB_YESNO|MB_MOVEABLE|MB_ICONQUESTION)==MBID_NO) 1379 queryResModuleHandle(), hwndOwner, MB_YESNO|MB_MOVEABLE|MB_ICONQUESTION)==MBID_NO) { 1380 WinStopTimer(WinQueryAnchorBlock(HWND_DESKTOP), hwndFrame, MFLDR_MBOX_TIMER_ID); 1381 ulPrivFlags&= ~MFLDR_SHOWING_MBOX; 1375 1382 return FALSE; 1383 } 1376 1384 } 1377 1385 cwStopAudioFile(hwndFrame); … … 1384 1392 } 1385 1393 1386 ulPrivFlags&= ~ MFLDR_VIEW_COMPACT;1394 ulPrivFlags&= ~(MFLDR_VIEW_COMPACT|MFLDR_SHOWING_MBOX); 1387 1395 hwndMFldrFrame=NULL; 1388 1396 wpSaveDeferred(); … … 1393 1401 { 1394 1402 ULONG ulErr; 1403 /* 1404 FIXME: 1405 This init call of the parent should be changed to allow replacement of 1406 CWProgFolder. 1407 */ 1395 1408 CWProgFolder::wpInitData(); 1396 1409 /* Get storage for private data. */ … … 1399 1412 1400 1413 ulPrivFlags=0; 1401 1402 1414 } 1403 1415 1404 1416 void CWMediaFolder::wpUnInitData() 1405 1417 { 1406 wpFreeMem((PBYTE)mfData); 1418 if(mfData) 1419 wpFreeMem((PBYTE)mfData); 1420 1421 /* 1422 FIXME: 1423 This uninit call of the parent should be changed to allow replacement of 1424 CWProgFolder. 1425 */ 1407 1426 CWProgFolder::wpUnInitData(); 1408 1427 } 1409 1428 1429 1430 1431 1432
Note:
See TracChangeset
for help on using the changeset viewer.