Changeset 447 for trunk/dll/mainwnd.c


Ignore:
Timestamp:
Aug 24, 2006, 6:52:11 AM (19 years ago)
Author:
root
Message:

Complain nicer if state name does not exist

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/mainwnd.c

    r419 r447  
    2323  29 May 06 SHL IDM_EDITANYARCHIVER: sanitize code
    2424  17 Jul 06 SHL Use Runtime_Error
     25  17 Aug 06 SHL Complain nicer if state name does not exist
    2526
    2627***********************************************************************/
     
    320321      while ((hwndC = WinGetNextWindow(henum)) != NULLHANDLE)
    321322      {
    322 // saymsg(MB_ENTER,HWND_DESKTOP,DEBUG_STRING,"Tree = %lu\rExclude = %lu\rFound = %lu",hwndTree,exclude,hwndC);
     323        // saymsg(MB_ENTER,HWND_DESKTOP,DEBUG_STRING,"Tree = %lu\rExclude = %lu\rFound = %lu",hwndTree,exclude,hwndC);
    323324        if (hwndC != exclude &&
    324325            hwndC != hwndTree)
     
    349350                {
    350351                  MakeValidDir(ret);
    351 // saymsg(MB_ENTER,HWND_DESKTOP,DEBUG_STRING,"Tree = %lu\rExclude = %lu\rFound = %lu\r\"%s\"",hwndTree,exclude,hwndC,ret);
     352                  // saymsg(MB_ENTER,HWND_DESKTOP,DEBUG_STRING,"Tree = %lu\rExclude = %lu\rFound = %lu\r\"%s\"",hwndTree,exclude,hwndC,ret);
    352353                  WinEndEnumWindows(henum);
    353354                  return hwndC;
     
    715716  case WM_BEGINDRAG:
    716717    id = WinQueryWindowUShort(hwnd, QWS_ID);
    717 // saymsg(MB_ENTER,HWND_DESKTOP,DEBUG_STRING,"%u %s %u",id,(id == CBID_EDIT) ? "TRUE" : "FALSE",WinQueryWindowUShort(WinQueryWindow(hwnd,QW_PARENT),QWS_ID) == MAIN_USERLIST);
     718    // saymsg(MB_ENTER,HWND_DESKTOP,DEBUG_STRING,"%u %s %u",id,(id == CBID_EDIT) ? "TRUE" : "FALSE",WinQueryWindowUShort(WinQueryWindow(hwnd,QW_PARENT),QWS_ID) == MAIN_USERLIST);
    718719    if (id == CBID_EDIT &&
    719720        WinQueryWindowUShort(WinQueryWindow(hwnd, QW_PARENT), QWS_ID) ==
     
    726727      WinQueryWindowText(hwnd, CCHMAXPATH, path);
    727728      bstrip(path);
    728 // saymsg(MB_ENTER,HWND_DESKTOP,DEBUG_STRING,"Dragging: %s",path);
     729      // saymsg(MB_ENTER,HWND_DESKTOP,DEBUG_STRING,"Dragging: %s",path);
    729730      if (*path && !IsRoot(path))
    730731        DragOne(hwnd, (HWND)0, path, FALSE);
     
    14541455    if (tool && (tool -> flags & T_DROPABLE) != 0)
    14551456    {
    1456 
    14571457      LISTINFO *li;
    14581458      CNRDRAGINFO cdi;
     
    14641464      }
    14651465      memset(&cdi, 0, sizeof(cdi));
    1466       cdi.pRecord = NULL;
    14671466      cdi.pDragInfo = mp1;
    14681467      li = DoFileDrop(hwnd,
     
    14781477        else
    14791478        {
    1480 
    14811479          HWND hwndActive;
    14821480
     
    50455043      if (*name)
    50465044      {
    5047         if (SHORT1FROMMP(mp1) == IDM_SAVEDIRCNRSTATE)
    5048         {
     5045        if (SHORT1FROMMP(mp1) == IDM_SAVEDIRCNRSTATE) {
     5046          // Save
    50495047          if (SaveDirCnrState(hwnd, name))
    50505048          {
     
    50575055            }
    50585056          }
    5059           WinSetWindowText(hwndStatelist,
    5060                            GetPString(IDS_STATETEXT));
    5061         }
    5062         else
    5063         {
    5064 
     5057          WinSetWindowText(hwndStatelist,GetPString(IDS_STATETEXT));
     5058        }
     5059        else {
     5060          // Delete
    50655061          ULONG numsaves = 0, size, x;
    50665062          CHAR s[120];
     
    50705066          sprintf(s, "%s.NumDirsLastTime", name);
    50715067          size = sizeof(ULONG);
    5072           if (!PrfQueryProfileData(fmprof, FM3Str, s, (PVOID)&numsaves, &size))
    5073             Win_Error2(hwnd,hwnd,__FILE__,__LINE__,IDS_PRFQUERYPROFILEDATA);
     5068          if (!PrfQueryProfileData(fmprof, FM3Str, s, (PVOID)&numsaves, &size)) {
     5069            saymsg(MB_ENTER | MB_ICONASTERISK,
     5070                   hwnd,
     5071                   GetPString(IDS_WARNINGTEXT),
     5072                   GetPString(IDS_DOESNTEXISTTEXT), name);
     5073          }
    50745074          else if (!size)
    50755075            Runtime_Error2(pszSrcFile, __LINE__, IDS_NODATATEXT);
Note: See TracChangeset for help on using the changeset viewer.