Changeset 1522


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.

Location:
trunk/dll
Files:
3 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
  • trunk/dll/fm3res.rc

    r1491 r1522  
    4242                and rescans drive in tree container depending on container focus, greyed out
    4343                inappropriate menu context choices
    44   12 Sep 09 GKY Add FM3.INI User ini and system ini to submenu for view ini             
     44  12 Sep 09 GKY Add FM3.INI User ini and system ini to submenu for view ini
    4545  15 Sep 09 SHL Update for Thread notes text changes
    4646  15 Sep 09 SHL Add rescan progress messages
     
    5454                submenu.
    5555  27 Dec 09 GKY Strings for command.c changes
     56  09 MAY 10 JBS Ticket 434: Message box text improvements.
    5657
    5758***********************************************************************/
     
    33453346    IDS_DOSQAPPTYPEFAILEDTEXT2            "The program %s was not found on the PATH or is not an executible file type."
    33463347    IDS_DOSQAPPTYPEFAILEDTEXT3            "The drive specified in %s is loked or invalid."
    3347    
     3348
    33483349    // Add strings that need to be combined by GetPString here
    33493350    IDS_SUGGEST1TEXT1                     "Based on this scan of your drives, I would like to suggest the following parameters for your FM/2 program object (each letter following the '/' character is a drive that probably should be excluded from viewing by FM/2 (see README), and the '%%*' on the"
    3350     IDS_SUGGEST1TEXT2                     " end enables drag-and-drop to the program object%s):\r\r""%s""\r\rWould you like me to automatically place this in the parameters field of the FM/2 program objects (note: existing Parameters will be replaced)? Cancel = don't show this message again."
     3351    IDS_SUGGEST1TEXT2                     " end enables drag-and-drop to the program object%s):\r\r""%s""\r\rYes: Replace all relevant FM/2 object parameters with this string.\rNo: Parameters are left unchanged.\rCancel: Same as ""No"" plus don't show this message again.\r\r"
    33513352    IDS_ARCHIVERBB2TEXT1                  ";format for this archiver.bb2 file (each entry has 21 lines):\n;\n; 1st line:  ID of archiver (like ARC, LHARC, PKZIP, etc.; human consumption)\n; 2nd line:  normal extension for archives (like ZIP, ARC, LZH; note no period)\n; 3rd line:  offset into"
    33523353    IDS_ARCHIVERBB2TEXT2                  " file to signature\n; 4th line:  list command\n; 5th line:  extract command\n; 6th line:  extract w/ directories command\n; 7th line:  test archive command\n; 8th line:  add/create command\n; 9th line: add/create w/ paths command\n;10th line: add/create"
  • trunk/dll/init.c

    r1505 r1522  
    9696                one or more miniapp but not to FM/2
    9797  17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *.
     98  09 MAY 10 JBS Ticket 434: Make fDontSuggestAgain a "global" flag, not a per app flag
    9899
    99100***********************************************************************/
     
    12711272    return 0; //already complained
    12721273  size = sizeof(BOOL);
    1273   PrfQueryProfileData(fmprof, appname, "DontSuggestAgain", &fDontSuggestAgain, &size);
     1274  PrfQueryProfileData(fmprof, FM3Str, "DontSuggestAgain", &fDontSuggestAgain, &size);
    12741275  size = sizeof(BOOL);
    12751276  PrfQueryProfileData(fmprof, appname, "ShowTarget", &fShowTarget, &size);
Note: See TracChangeset for help on using the changeset viewer.