Changeset 4 for trunk/mediafolder/c


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
Files:
4 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/mediafolder/c/cddb/helper.c

    r2 r4  
    11/*
    2  * This file is (C) Chris Wohlgemuth 2001/2002
     2 * This file is (C) Chris Wohlgemuth 2001-2005
    33 */
    44/*
  • trunk/mediafolder/c/cddb/makefile

    r2 r4  
    11# Makefile for Audio-CD copy
    22
    3 CC           = icc
    4 LIB_DIR      = $d:/emx/lib
    5 #CPPFLAGS     = -Ge- /Gm+ -G4 -Gl  /O+ -Oc+ -Ol
     3include ../../../make.inc
     4
     5CC           = gcc
    66CPPFLAGS     = -O -Zomf -Zcrtdll -s
    77#CPPFLAGSSTATIC     = -O -Zomf -Zsys -Zmt -s
     
    99CPPFLAGSVAC  = /Ge- /Gm+ /G4 /Gl  /O+ /Oc+ /Ol- /Q+
    1010INC             = ../../include
     11MOREINC         = $(COMMONSRC)/include
    1112DEFS         =
    1213PROGS        = 
    1314ODIR            = .
    1415CPPDIR  = .
     16LIBDIR          =       ./lib
    1517BINDIR          =       ../../dist/bin
    1618HELPERDIR       =       ..\helper
     19OBJECTS         =       cddb.obj \
     20                        cd.obj \
     21                        helper.obj \
     22                        cddbhelper.obj \
     23                        message.obj
     24LIBOBJECTS      = $(LIBDIR)/sys_funcs.obj
    1725
    18 CPPFILES        =
    19 OBJECTS =        cddb.obj cd.obj helper.obj cddbhelper.obj message.obj
    2026#printHelper.obj
    2127#all:    querycddb.exe cddbcls.obj
    2228
    23 all:     pmcddb.exe pmdb001.dll pmdb049.dll pmdb031.dll pmdb039.dll
     29all:     pmcddb.exe pmdb001.dll pmdb049.dll pmdb031.dll pmdb039.dll pmdb088.dll
    2430
    25 nlv:    pmdb001.dll pmdb049.dll pmdb031.dll pmdb039.dll
     31nlv:    pmdb001.dll pmdb049.dll pmdb031.dll pmdb039.dll pmdb088.dll
    2632
    2733pmdb001.dll:    ./res/pmcddb001.c ./res/pmcddb001.res
     
    5359                cd ./Res && make
    5460
     61
     62
     63pmdb088.dll:    ./res/pmcddb088.c ./res/pmcddb088.res
     64                -rm pmdb088.dll
     65                cp ./res/pmcddb088.dll pmdb088.dll
     66
     67./res/pmcddb088.res:    ./res/pmcddb088.rc ./res/pmcddb088.dlg $(INC)/pmcddbres.h
     68                cd ./Res && make
     69
     70
     71$(LIBDIR)/%.obj:        $(COMMONSRC)/%.c
     72        $(CC) -c -Wall -o$@ -Zomf -I$(INC) -I$(MOREINC) $<
     73
    5574cd.obj: cd.c
    5675                gcc -c $< -I$(INC) -Zcrtdll -Zomf
    57 #               cd ../. && cd helper && make
    5876
    5977helper.obj:     helper.c
     
    6381                gcc -c $< -I$(INC) -Zcrtdll -Zomf
    6482
    65 pmcddb.exe:     pmcddb.cc $(OBJECTS) $(CDDBOBJ) $(INC)\cddb.h $(INC)\cddb.hh
    66         gcc $< $(CPPFLAGS) -I$(INC)  $(OBJECTS) $(CDDBOBJ)  -lsocket pmcddb.def
     83pmcddb.exe:     pmcddb.cc $(OBJECTS) $(LIBOBJECTS) $(CDDBOBJ) $(INC)\cddb.h $(INC)\cddb.hh
     84        $(CC) $< $(CPPFLAGS) -I$(INC) -I$(MOREINC) $(LIBOBJECTS) $(OBJECTS) $(CDDBOBJ)  -lsocket pmcddb.def
    6785
    6886cddb.obj:       cddb.cpp $(INC)\cddb.hh
  • trunk/mediafolder/c/cddb/pmcddb.cc

    r2 r4  
    105105HMODULE RESSOURCEHANDLE=0;
    106106
    107 char logName[CCHMAXPATH]="Cddb.log";
     107char logName[CCHMAXPATH]=PMCDDB_LOGFILENAME;
     108char logNameFullPath[CCHMAXPATH];
    108109
    109110#define QUERYCDDB_VERSION "0.1"
     
    616617  /* argv[0]: progname
    617618   * argv[1]: cd drive or /C for configuring
    618    * argv[2]: REXX file
     619   * argv[2]: REXX file. This file is used to parse the queried data file and
     620   *          set all the info of the CD track objects.
     621   *          When configuring argv[2] is the email address.
    619622   * argv[3]: folder path
    620623   */
    621624
    622625  numArgs=argc;
    623 
    624626
    625627  for(a=0;a<argc;a++)
     
    632634    *chrPtr=0;
    633635  strncpy(chrInstallDir, chrBinDir, sizeof(chrInstallDir)-1);
    634   /*  if((chrPtr=strrchr(chrInstallDir, '\\'))!=NULLHANDLE)
    635    *chrPtr=0;*/
    636636
    637637  if(numArgs<3) {
  • trunk/mediafolder/c/cddb/res/makefile

    r2 r4  
    1313
    1414CPPFILES        =
    15 all:     pmcddb001.dll pmcddb049.dll pmcddb031.dll pmcddb039.dll
     15all:     pmcddb001.dll pmcddb049.dll pmcddb031.dll pmcddb039.dll pmcddb088.dll
    1616
    1717
     
    5050                rc  -i $(INC) -r pmcddb039.rc
    5151
     52pmcddb088.dll:  pmcddb088.c pmcddb088.res
     53                gcc -Zdll -Zomf -Zno-rte -I$(INC) pmcddb088.c pmcddb088.def
     54                rc pmcddb088.res pmcddb088.dll
     55
     56pmcddb088.res:  pmcddb088.rc pmcddb039.dlg $(INC)\pmcddbres.h
     57                rc  -i $(INC) -r pmcddb088.rc
     58
    5259clean:
    5360        -rm *.obj
  • trunk/mediafolder/c/cddb/res/pmcddb049.rc

    r2 r4  
    3535IDSTR_PMCDDBTITLE         "FreeDB Abfrage" 
    3636
    37 IDSTR_USAGE               "Email-Adresse mit folgender Option festlegen:  /C <email address> "
     37IDSTR_USAGE               "Email-Adresse mit folgender Option festlegen:  /C <Email-Adresse> "
    3838IDSTR_SETUPERROR         "Der Username oder der Host wurden nicht festgelegt. Pmcddb.exe mit Parameter /C starten, um die Adresse festzulegen."
    3939END
    4040
    4141RCINCLUDE "pmcddb049.dlg"
    42 
  • trunk/mediafolder/c/cdfldr/cdfolder.cpp

    r2 r4  
    11/*
    2  * This file is (C) Chris Wohlgemuth 2002
     2 * This file is (C) Chris Wohlgemuth 2002-2005
    33 *
    44 * It's part of the Media-Folder distribution
     
    7373          //        if(a==1)
    7474          //        WinMessageBox(HWND_DESKTOP,HWND_DESKTOP, chrSetup, "", 12324, MB_MOVEABLE);
    75           sprintf(chrTitle,"Track %d",a);
     75          sprintf(chrTitle,"Track %02d",a);
    7676          WinCreateObject("MMCDTrack", chrTitle, chrSetup, chrTarget, CO_REPLACEIFEXISTS);
    7777        }
  • trunk/mediafolder/c/cdfldr/cdfolderoverriddenwpmethods.cpp

    r2 r4  
    11/*
    2  * This file is (C) Chris Wohlgemuth 2002-2003
     2 * This file is (C) Chris Wohlgemuth 2002-2005
    33 *
    44 * It's part of the Media-Folder distribution
     
    5757extern void showPlayTimeDisplay(CWMediaFolder *thisPtr, BOOL bShow);
    5858void setPlayTimeText2(CWMediaFolder *thisPtr, char * theText);
    59 void HlpWriteToTrapLog(const char* chrFormat, ...);
     59
    6060/* Get the HWND of the play control dialog. This Dialog is on top of
    6161   the top frame control. */
     
    344344    }
    345345  case PLAY_NEXT:
     346  case PLAY_NEXT_CDFLDR:
    346347    if(iWave==0)
    347348      return cwPlayAudioFile(hwndFrame, PLAY_FIRST);/* Not yet playing */
     
    450451  }/* switch */
    451452
    452   if(!getMessage(chrCommand, IDSTR_STARTINGTRACK, sizeof(chrCommand), queryResModuleHandle(),  hwndFrame))
    453     sprintf(chrCommand, "Starting track...");
    454   setPlayTimeText2(this, chrCommand);
     453  //  if(ulWhich!=PLAY_NEXT_CDFLDR) {
     454    if(!getMessage(chrCommand, IDSTR_STARTINGTRACK, sizeof(chrCommand), queryResModuleHandle(),  hwndFrame))
     455      sprintf(chrCommand, "Starting track...");
     456    setPlayTimeText2(this, chrCommand);
     457    // }
    455458
    456459  strncpy(chrDevice,"CDAUDIO", sizeof(chrDevice));
     
    519522  }/*   if( ...|| !mrcPlaying) */
    520523
    521   if(iPrevTrack+1==iTime2) {
     524  if(iPrevTrack+1==iTime2 && ulWhich!=PLAY_NEXT_CDFLDR) {
    522525    /* Previous track ended, now playing the next. Or user pressed 'Next' while playing */
    523526    if(ulPos*1000 < ulTotalLength) {
     
    539542        return 0;
    540543      }
    541       //  HlpWriteToTrapLog("\n2\n");
    542     }
    543   }
    544 
    545   //  HlpWriteToTrapLog("About to get length...\n");
     544    }
     545  }
    546546
    547547  /* Get length in ms */
     
    552552  }
    553553
    554   // HlpWriteToTrapLog("iTime2: %d\n", iTime2);
    555 
    556554  sprintf(chrCommand,"%d:%02d  %d:%02d  -%d:%02d", iTime2/60, iTime2%60,
    557555          0, 0,
    558556          iTime2/60, iTime2%60);
    559557
    560   //  HlpWriteToTrapLog("chrCommand: %s\n", chrCommand);
    561558 
    562559  //  WinSetWindowText(WinWindowFromID(hwndTop, IDST_PLAYTIME), chrCommand);
     
    658655  int iCurrentTrack;
    659656
     657  //SysWriteToTrapLog("\n%s:\n", __FUNCTION__);
     658
    660659  sprintf(chrCommand,"STATUS wave%d MODE WAIT", iWave);
    661660  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
     
    688687  else {
    689688    iCurrentTrack=atoi(retMsg);
     689    //SysWriteToTrapLog(" iWave: %d. iPrevTrack: %d, iCurrentrack: %d\n", iWave, iPrevTrack, iCurrentTrack);
    690690    /* Timeout. Check if track is still playing */
    691691    if(iCurrentTrack==iPrevTrack+1) {
    692692      /* Audio file played. Start next */
    693       cwPlayAudioFile(hwndFrame, PLAY_NEXT);
    694     }
    695   }
    696 }
    697 
    698 
    699 
    700 
    701 
    702 
    703 
    704 
    705 
     693      //SysWriteToTrapLog(" iWave: %d. iPrevTrack: %d, iCurrentrack: %d, startinb next (%d)\n", iWave, iPrevTrack, iCurrentTrack, __LINE__);
     694      cwPlayAudioFile(hwndFrame, PLAY_NEXT_CDFLDR);
     695    }
     696  }
     697}
     698
     699
     700
  • trunk/mediafolder/c/createcd/createcd.c

    r2 r4  
    11/*
    2  * This file is (C) Chris Wohlgemuth 1999-2002
     2 * This file is (C) Chris Wohlgemuth 1999-2005
    33 */
    44/*
     
    2929#include <string.h>
    3030#include "mediafolderinc.h"
     31#include "mediafolderres.h"
     32/* #include "sys_funcs.h" */
    3133
    3234#define  LVM_IS_HARDDISK  0 
     
    9294PFNVIR pfnvirGet_Volume_Information=NULLHANDLE;
    9395
    94 BOOL loadLVMFuncs(void)
     96size_t strlcpy(char *dst, const char *src, size_t siz);
     97
     98/*
     99  FIXME:
     100
     101  Use the function from the \common_funcs directory instead.
     102 */
     103static BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource)
     104{
     105  char* pOffset;
     106  char* ptr;
     107  int id=0;
     108
     109  text[0]='\0';
     110
     111  // printf("resource: %x, %d %d\n", hResource, ulID, (ulID/16)+1,
     112  // DosGetResource(hResource, RT_STRING, (ulID/16)+1, (PVOID)&pOffset));
     113
     114  if(DosGetResource(hResource, RT_STRING, (ulID/16)+1, (PVOID)&pOffset)!=NO_ERROR)
     115    return FALSE;
     116
     117  ptr=pOffset;
     118
     119  //printf("\ngot resource...\n");
     120
     121  /* Parsing... */
     122  id=ulID%16;
     123
     124  //printf("id: %d\n", id);
     125  pOffset+=sizeof(USHORT); /* Skip codepage */
     126
     127  for(;id > 0;id--)
     128    {
     129      //printf("id: %d, length: %d %s\n", id, *pOffset, pOffset+1);
     130      pOffset+=*pOffset+1;
     131    }
     132  //printf("length: %d %s\n",  *pOffset, pOffset+1);
     133  strlcpy(text, pOffset+1, lSizeText);
     134
     135  if(*pOffset!=1){
     136    DosFreeResource(ptr);
     137  return TRUE;
     138  } 
     139  DosFreeResource(ptr);
     140/* Length=1 means dummy entry filled by system */
     141  return FALSE;
     142}
     143
     144#if 0
     145#pragma import(DosQueryModFromEIP,,"DOSCALL1",360)
     146 APIRET APIENTRY DosQueryModFromEIP ( HMODULE *phMod, ULONG *pObjNum, ULONG BuffLen, PCHAR pBuff, ULONG *pOffset, PVOID Address ) ;
     147#endif
     148
     149/* This function returns the module handle of our ressource dll */
     150static HMODULE queryResModuleHandle(void)
     151{
     152  char path[CCHMAXPATH]; 
     153  char buf[CCHMAXPATH];
     154  char* found;
     155  APIRET rc;
     156  HMODULE RESSOURCEHANDLE;
     157  HMODULE hmod;
     158  PTIB   ptib = NULL;
     159  PPIB   ppib = NULL;
     160 
     161 
     162  // printf("rc=%d\n",DosQueryModFromEIP( &hmod, &ul, sizeof(path), path,
     163  //                  &off, (PVOID)queryResModuleHandle ) );
     164  if(NO_ERROR==DosGetInfoBlocks(&ptib, &ppib))
     165    DosQueryModuleName (ppib->pib_hmte,         /* Module handle to query     */
     166                        sizeof(path),           /* Maximum length of result   */
     167                        path);
     168 
     169  //printf("%s %x\n",path, hmod);
     170
     171  /* Get the language code of our system and load the 
     172     resource DLL with the right language */
     173  do
     174    {
     175      static char chrLang[]="en_EN";
     176      PSZ pszLang="";
     177      char *chrPtr;
     178       
     179      /* Get Language var */
     180      if(NO_ERROR!=DosScanEnv("LANG", &pszLang)) {
     181        pszLang=chrLang;
     182      }       
     183      /* Skip leading spaces */
     184      chrPtr=pszLang;
     185      while(*chrPtr==' ')
     186        chrPtr++;
     187       
     188      /* Check if value seems to be valid. The var must be something like xx_XX thus length is 5 */
     189      if(strlen(chrPtr)<5)
     190        break;
     191       
     192      if((found=strrchr(path, '\\'))!=NULLHANDLE)
     193        *found=0;
     194
     195      /* Extract the first two chars and build DLL name */               
     196      sprintf(buf, RESDLLNAME, chrPtr[0], chrPtr[1]);
     197      strcat(path,buf);
     198       
     199      rc=DosLoadModule(buf,sizeof(buf),path, &RESSOURCEHANDLE);
     200      if(rc==NO_ERROR)
     201        break;
     202               
     203      /* NLS DLL not found. Try to load default */
     204      found=strrchr(path,'\\');
     205      if(!found)
     206        break;
     207       
     208      *found=0;
     209      sprintf(buf, DEFRESDLLNAME);
     210      strcat(path,buf);
     211       
     212      rc=DosLoadModule(buf,sizeof(buf),path, &RESSOURCEHANDLE);
     213      if(rc!=NO_ERROR) {
     214        RESSOURCEHANDLE=NULLHANDLE;
     215      }
     216      else {
     217        //  printf("Ressource DLL loaded.\n");
     218      }
     219      break;
     220    }while(TRUE);
     221 
     222  return RESSOURCEHANDLE;
     223}
     224
     225 
     226static BOOL loadLVMFuncs(void)
    95227{
    96228  char chrErrorObject[CCHMAXPATH]={0};
     
    173305}
    174306
    175 int main(void)
     307int main(int argc, char** argv)
    176308{
    177309  CARDINAL32 error;
    178310  int iNumCD;
    179311  char cFirst;
    180   char setup[100];
    181   char name[100];
    182   char id[40];
     312  char setup[512];
     313  char name[256];
     314  char id[100];
     315  char nameTemplate[256];
    183316  int a;
     317  HMODULE hmodRes=NULLHANDLE;
    184318
    185319  if(!CDQueryCDDrives(&iNumCD, &cFirst))
    186320    exit(1);
     321
     322  hmodRes=queryResModuleHandle();
     323
     324  if(!getMessage(nameTemplate, /* IDSTR_LAUNCHPADFLYOVER */ IDSTR_CDFOLDERNAME, sizeof(nameTemplate), hmodRes))
     325    strncpy(nameTemplate, "CD-Audio player^Drive %c:", sizeof(nameTemplate));
    187326
    188327  if(!loadLVMFuncs()) {
     
    190329      int b;
    191330      /* Build folder name */
    192       sprintf(name, "CD-Audio^Drive %c:", cFirst+a);
     331      sprintf(name, nameTemplate, cFirst+a);
    193332      /* Build object ID */
    194333      sprintf(id, CDFLDR_ID, cFirst+a);
     
    231370
    232371              /* Build folder name */
    233               sprintf(name, "CD-Audio^Drive %c:", vir.Current_Drive_Letter);
     372              sprintf(name, nameTemplate, vir.Current_Drive_Letter);
    234373              /* Build object ID */
    235374              sprintf(id, CDFLDR_ID, vir.Current_Drive_Letter);
     
    242381                if(WinCreateObject(CDFLDR_CLASSNAME, name, setup, CDFLDR_LOCATION, CO_UPDATEIFEXISTS))
    243382                  break;
    244 
    245383                //      printf("Found:  %s, %s\n", name, setup);
    246384                DosSleep(5000);
     
    255393    DosFreeModule(hMod);
    256394  } /* else */
     395  if(hmodRes)
     396    DosFreeModule(hmodRes);
    257397  return (0);
    258398}
    259399
    260400
     401/********************************************************************/
     402/*      $OpenBSD: strlcpy.c,v 1.8 2003/06/17 21:56:24 millert Exp $     */
     403
     404/*
     405 * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
     406 *
     407 * Permission to use, copy, modify, and distribute this software for any
     408 * purpose with or without fee is hereby granted, provided that the above
     409 * copyright notice and this permission notice appear in all copies.
     410 *
     411 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
     412 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
     413 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
     414 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
     415 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
     416 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
     417 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
     418 */
     419
     420
     421/*
     422 * Copy src to string dst of size siz.  At most siz-1 characters
     423 * will be copied.  Always NUL terminates (unless siz == 0).
     424 * Returns strlen(src); if retval >= siz, truncation occurred.
     425 */
     426static size_t
     427strlcpy(char *dst, const char *src, size_t siz)
     428{
     429        register char *d = dst;
     430        register const char *s = src;
     431        register size_t n = siz;
     432
     433        /* Copy as many bytes as will fit */
     434        if (n != 0 && --n != 0) {
     435                do {
     436                        if ((*d++ = *s++) == 0)
     437                                break;
     438                } while (--n != 0);
     439        }
     440
     441        /* Not enough room in dst, add NUL and traverse rest of src */
     442        if (n == 0) {
     443                if (siz != 0)
     444                        *d = '\0';              /* NUL-terminate dst */
     445                while (*s++)
     446                        ;
     447        }
     448
     449        return(s - src - 1);    /* count does not include NUL */
     450}
     451
  • 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.