Changeset 1522 for trunk/dll/filldir.c


Ignore:
Timestamp:
May 10, 2010, 12:51:06 AM (15 years ago)
Author:
John Small
Message:

Ticket 434: Startup parameter suggestion improvements and bug fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/filldir.c

    r1498 r1522  
    8585  15 Nov 09 GKY Optimize some check code
    8686  17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *.
     87  09 MAY 10 JBS Ticket 434 bug fixes, message box text improvements and parameter update improvements.
    8788
    8889***********************************************************************/
     
    16771678  DosReleaseMutexSem(hmtFillingTreeCnr);
    16781679
    1679   {
     1680  if (!fDontSuggestAgain) {
    16801681    BYTE info;
    16811682    BOOL includesyours = FALSE;
    16821683
    16831684    // 10 Jan 08 SHL fixme to understand fFirstTime - looks obsolete to me - probably mean didonce?
    1684     if (!fDontSuggestAgain && (*szSuggest || ~driveflags[1] & DRIVE_IGNORE && fFirstTime)) {
     1685    if (*szSuggest || ~driveflags[1] & DRIVE_IGNORE && fFirstTime) {
    16851686      if (!DosDevConfig(&info, DEVINFO_FLOPPY) && info == 1) {
    16861687        if (!*szSuggest) {
     
    16941695    }
    16951696    if (*szSuggest) {
     1697      APIRET rc;
    16961698      for (iDrvNum = 2; iDrvNum < 26; iDrvNum++) {
    16971699        if (driveflags[iDrvNum] & DRIVE_IGNORE) {
     
    17011703      }
    17021704      strcat(szSuggest, " %*");
    1703       saymsg(MB_YESNOCANCEL | MB_ICONEXCLAMATION,
     1705      rc = saymsg(MB_YESNOCANCEL | MB_ICONEXCLAMATION,
    17041706             hwndParent ? hwndParent : hwndCnr,
    17051707             GetPString(IDS_SUGGESTTITLETEXT),
     
    17071709             (includesyours) ? GetPString(IDS_SUGGEST2TEXT) : NullStr,
    17081710             szSuggest);
    1709       if (MBID_YES) {
     1711      if (rc == MBID_YES) {
     1712        HOBJECT hFM2Object;
    17101713        char s[64];
    17111714        sprintf(s, "PARAMETERS=%s", szSuggest);
    1712         WinCreateObject((CHAR *) WPProgram, "FM/2", s, (CHAR *) FM3Folder, CO_UPDATEIFEXISTS);
    1713         WinCreateObject((CHAR *) WPProgram,
    1714                         "FM/2 Lite", s, (CHAR *) FM3Folder, CO_UPDATEIFEXISTS);
    1715         WinCreateObject((CHAR *) WPProgram,
    1716                         "Archive Viewer/2", s, (CHAR *) FM3Tools, CO_UPDATEIFEXISTS);
    1717         WinCreateObject((CHAR *) WPProgram,
    1718                         "Dir Sizes", s, (CHAR *) FM3Tools, CO_UPDATEIFEXISTS);
    1719         WinCreateObject((CHAR *) WPProgram,
    1720                         "Visual Tree", s, (CHAR *) FM3Tools, CO_UPDATEIFEXISTS);
    1721         WinCreateObject((CHAR *) WPProgram,
    1722                         "Visual Directory", s, (CHAR *) FM3Tools, CO_UPDATEIFEXISTS);
    1723         WinCreateObject((CHAR *) WPProgram,
    1724                         "Global File Viewer", s, (CHAR *) FM3Tools, CO_UPDATEIFEXISTS);
    1725         WinCreateObject((CHAR *) WPProgram, "Databar", s, (CHAR *) FM3Tools, CO_UPDATEIFEXISTS);
    1726       }
    1727       else if (MBID_CANCEL) {
     1715        hFM2Object = WinQueryObject("<FM/2>");
     1716        if (hFM2Object) {
     1717          rc = WinSetObjectData(hFM2Object, (PSZ)s);
     1718        }
     1719        hFM2Object = WinQueryObject("<FM/2 LITE>");
     1720        if (hFM2Object) {
     1721          rc = WinSetObjectData(hFM2Object, (PSZ)s);
     1722        }
     1723        hFM2Object = WinQueryObject("<FM/2_AV/2>");
     1724        if (hFM2Object) {
     1725          rc = WinSetObjectData(hFM2Object, (PSZ)s);
     1726        }
     1727        hFM2Object = WinQueryObject("<FM/2_DIRSIZE>");
     1728        if (hFM2Object) {
     1729          rc = WinSetObjectData(hFM2Object, (PSZ)s);
     1730        }
     1731        hFM2Object = WinQueryObject("<FM/2_VTREE>");
     1732        if (hFM2Object) {
     1733          rc = WinSetObjectData(hFM2Object, (PSZ)s);
     1734        }
     1735        hFM2Object = WinQueryObject("<FM/2_VDIR>");
     1736        if (hFM2Object) {
     1737          rc = WinSetObjectData(hFM2Object, (PSZ)s);
     1738        }
     1739        hFM2Object = WinQueryObject("<FM/2_SEEALL>");
     1740        if (hFM2Object) {
     1741          rc = WinSetObjectData(hFM2Object, (PSZ)s);
     1742        }
     1743        hFM2Object = WinQueryObject("<FM/2_DATABAR>");
     1744        if (hFM2Object) {
     1745          rc = WinSetObjectData(hFM2Object, (PSZ)s);
     1746        }
     1747      }
     1748      else if (rc == MBID_CANCEL) {
    17281749        fDontSuggestAgain = TRUE;
    1729         PrfWriteProfileData(fmprof, appname, "DontSuggestAgain", &fDontSuggestAgain, sizeof(BOOL));
     1750        PrfWriteProfileData(fmprof, FM3Str, "DontSuggestAgain", &fDontSuggestAgain, sizeof(BOOL));
    17301751      }
    17311752    } // if suggest
    1732   }
     1753  } // if !fDontSuggestAgain
    17331754  didonce = TRUE;
    17341755} // FillTreeCnr
Note: See TracChangeset for help on using the changeset viewer.