Ignore:
Timestamp:
Jul 13, 2017, 5:17:57 AM (8 years ago)
Author:
stevenhl
Message:

Import modifications from cwmm-0_2_9-work-01_10_2006.zip dated 2006-08-27

Location:
trunk/mediafolder/c/mediafldr
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/mediafolder/c/mediafldr/mediadialogprocs.cpp

    r3 r4  
    405405        thisPtr->usLastSelMenuItem=SHORT1FROMMP(mp1);
    406406      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;
    407416    default:
    408417      break;
  • trunk/mediafolder/c/mediafldr/mediafolderoverridenwpmethods.cpp

    r3 r4  
    311311  hwnd=CWProgFolder::wpOpen(hwndCnr, ulView, ulParam);
    312312
    313   /* Save this ptr */
    314   //  WinSetWindowULong( hwnd, ulQWP_THISPTR, (ULONG)this);
    315    
    316313  /* Only subclass folder frames, not settings notebooks */
    317314  if(ulView!=OPEN_SETTINGS){
     
    409406      }/* menu hwnd */
    410407
    411       //#if 0     
    412408      /* Subclass container for tabbing */
    413409      myFrameCtrlHWND=WinWindowFromID(hwnd,FID_CLIENT);//Get container hwnd
     
    419415      }
    420416
    421       //#endif
    422417      /* Now add the framecontrols */
    423418
     
    13521347
    13531348  /* Check if we currently play a song */
    1354   if(iWave) {
     1349  if(iWave && !(ulPrivFlags & MFLDR_SHOWING_MBOX)) {
     1350    LONG lDelay;
     1351
     1352#if 0
    13551353    PVIEWITEM pViewItem;
    13561354    int a=0;
    1357 
    1358 #if 0
    13591355    /* Check if we close a settings view or a folder view. */
    13601356    for(pViewItem=wpFindViewItem(VIEW_ANY, NULLHANDLE); pViewItem; pViewItem=wpFindViewItem(VIEW_ANY, pViewItem))
     
    13701366      hwndOwner=hwndFrame;
    13711367
     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 */
    13721377    if(messageBox( text, IDSTR_CLOSETEXT, sizeof(text),
    13731378                   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;
    13751382      return FALSE;
     1383    }
    13761384  }
    13771385  cwStopAudioFile(hwndFrame); 
     
    13841392  }
    13851393
    1386   ulPrivFlags&= ~MFLDR_VIEW_COMPACT;
     1394  ulPrivFlags&= ~(MFLDR_VIEW_COMPACT|MFLDR_SHOWING_MBOX);
    13871395  hwndMFldrFrame=NULL;
    13881396  wpSaveDeferred();
     
    13931401{
    13941402  ULONG ulErr;
     1403  /*
     1404    FIXME:
     1405    This init call of the parent should be changed to allow replacement of
     1406    CWProgFolder.
     1407    */
    13951408  CWProgFolder::wpInitData();
    13961409  /* Get storage for private data. */
     
    13991412
    14001413  ulPrivFlags=0;
    1401 
    14021414}
    14031415
    14041416void  CWMediaFolder::wpUnInitData()
    14051417{
    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    */
    14071426  CWProgFolder::wpUnInitData();
    14081427}
    14091428
     1429
     1430
     1431
     1432
Note: See TracChangeset for help on using the changeset viewer.