Changeset 1482


Ignore:
Timestamp:
Dec 13, 2009, 8:59:47 PM (16 years ago)
Author:
Gregg Young
Message:

Fixed separate parameters; added the ability to set it either globally or for just one app; some files only contain white space changes.

Location:
trunk/dll
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/arccnrs.c

    r1480 r1482  
    7676  08 Mar 09 GKY Removed variable aurguments from docopyf and unlinkf (not used)
    7777  12 Mar 09 SHL Use common SearchContainer
     78  13 Dec 09 GKY Fixed separate paramenters. Please note that appname should be used in
     79                profile calls for user settings that work and are setable in more than one
     80                miniapp; FM3Str should be used for setting only relavent to FM/2 or that
     81                aren't user settable; realappname should be used for setting applicable to
     82                one or more miniapp but not to FM/2
    7883
    7984***********************************************************************/
     
    175180#pragma data_seg(GLOBAL2)
    176181CHAR lastextractpath[CCHMAXPATH];
    177 ULONGLONG ullDATFileSpaceNeeded;
     182ULONGLONG ullDATFileSpaceNeeded = 10000;
    178183
    179184typedef struct {
     
    38133818
    38143819            WinQueryTaskSizePos(WinQueryAnchorBlock(hwndFrame), 0, &swp);
    3815             if (PrfQueryProfileData(fmprof,
    3816                                     appname, "AV2SizePos", &swpD, &size)) {
     3820            if (PrfQueryProfileData(fmprof, appname, "AV2SizePos", &swpD, &size)) {
    38173821              cxScreen = WinQuerySysValue(HWND_DESKTOP, SV_CXSCREEN);
    38183822              cyScreen = WinQuerySysValue(HWND_DESKTOP, SV_CYSCREEN);
  • trunk/dll/autoview.c

    r1480 r1482  
    3030  08 Mar 09 GKY Renamed commafmt.h i18nutil.h
    3131  12 Jul 09 GKY Add xDosQueryAppType and xDosAlloc... to allow FM/2 to load in high memory
     32  13 Dec 09 GKY Fixed separate paramenters. Please note that appname should be used in
     33                profile calls for user settings that work and are setable in more than one
     34                miniapp; FM3Str should be used for setting only relavent to FM/2 or that
     35                aren't user settable; realappname should be used for setting applicable to
     36                one or more miniapp but not to FM/2
    3237
    3338***********************************************************************/
     
    770775          if (WinTrackRect(hwnd, hps, &track)) {
    771776            AutoviewHeight = track.rclTrack.yTop - track.rclTrack.yBottom;
    772             PrfWriteProfileData(fmprof,
    773                                 FM3Str,
    774                                 "AutoviewHeight",
     777            PrfWriteProfileData(fmprof, appname, "AutoviewHeight",
    775778                                &AutoviewHeight, sizeof(ULONG));
    776779            WinSendMsg(WinQueryWindow(hwnd, QW_PARENT),
  • trunk/dll/cmdline.c

    r1480 r1482  
    2121  24 Aug 08 GKY Warn full drive on save of .DAT file; prevent loss of existing file
    2222  28 Jun 09 GKY Added AddBackslashToPath() to remove repeatative code.
     23  13 Dec 09 GKY Fixed separate paramenters. Please note that appname should be used in
     24                profile calls for user settings that work and are setable in more than one
     25                miniapp; FM3Str should be used for setting only relavent to FM/2 or that
     26                aren't user settable; realappname should be used for setting applicable to
     27                one or more miniapp but not to FM/2
    2328
    2429***********************************************************************/
     
    559564        fSaveBigCmds = (fSaveBigCmds) ? FALSE : TRUE;
    560565        WinCheckButton(hwnd, EXEC_SAVECMD, fSaveBigCmds);
    561         PrfWriteProfileData(fmprof,
    562                             appname,
    563                             "SaveBigCmds", &fSaveBigCmds, sizeof(BOOL));
     566        PrfWriteProfileData(fmprof, appname, "SaveBigCmds", &fSaveBigCmds, sizeof(BOOL));
    564567      }
    565568      break;
  • trunk/dll/datamin.c

    r1480 r1482  
    2929  08 Mar 09 GKY Renamed commafmt.h i18nutil.h
    3030  12 Jul 09 GKY Add xDosQueryAppType and xDosAlloc... to allow FM/2 to load in high memory
     31  13 Dec 09 GKY Fixed separate paramenters. Please note that appname should be used in
     32                profile calls for user settings that work and are setable in more than one
     33                miniapp; FM3Str should be used for setting only relavent to FM/2 or that
     34                aren't user settable; realappname should be used for setting applicable to
     35                one or more miniapp but not to FM/2
    3136
    3237***********************************************************************/
     
    491496    case MINI_BORING:
    492497      fDullMin = (fDullMin) ? FALSE : TRUE;
    493       PrfWriteProfileData(fmprof,
    494                           FM3Str, "DullDatabar", &fDullMin, sizeof(BOOL));
     498      PrfWriteProfileData(fmprof, appname, "DullDatabar", &fDullMin, sizeof(BOOL));
    495499      if (G_hevDataMin != NULLHANDLE) {
    496500        rc = DosPostEventSem(G_hevDataMin);
     
    507511      if (SHORT1FROMMP(mp1) == MINI_SHOW) {
    508512        fDataShowDrives = (fDataShowDrives) ? FALSE : TRUE;
    509         PrfWriteProfileData(fmprof,
    510                             appname,
    511                             "DataShowDrives", &fDataShowDrives, sizeof(BOOL));
     513        PrfWriteProfileData(fmprof, appname, "DataShowDrives",
     514                            &fDataShowDrives, sizeof(BOOL));
    512515      }
    513516      else {
    514517        fDataInclRemote = (fDataInclRemote) ? FALSE : TRUE;
    515         PrfWriteProfileData(fmprof,
    516                             appname,
    517                             "DataInclRemote", &fDataInclRemote, sizeof(BOOL));
     518        PrfWriteProfileData(fmprof, appname, "DataInclRemote",
     519                            &fDataInclRemote, sizeof(BOOL));
    518520      }
    519521      {
     
    535537    case MINI_FLOAT:
    536538      fDataToFore = (fDataToFore) ? FALSE : TRUE;
    537       PrfWriteProfileData(fmprof,
    538                           appname, "DataToFore", &fDataToFore, sizeof(BOOL));
     539      PrfWriteProfileData(fmprof, appname, "DataToFore", &fDataToFore, sizeof(BOOL));
    539540      if (!hwndMain) {
    540541
  • trunk/dll/dircnrs.c

    r1459 r1482  
    6969  14 Sep 09 SHL Drop experimental code
    7070  15 Sep 09 SHL Show rescan progress while filling container
     71  13 Dec 09 GKY Fixed separate paramenters. Please note that appname should be used in
     72                profile calls for user settings that work and are setable in more than one
     73                miniapp; FM3Str should be used for setting only relavent to FM/2 or that
     74                aren't user settable; realappname should be used for setting applicable to
     75                one or more miniapp but not to FM/2
    7176
    7277***********************************************************************/
     
    15571562          ULONG size = sizeof(ULONG);
    15581563
    1559           PrfQueryProfileData(fmprof,
    1560                               appname,
    1561                               "DirflWindowAttr",
     1564          PrfQueryProfileData(fmprof, appname, "DirflWindowAttr",
    15621565                              (PVOID) & cnri.flWindowAttr, &size);
    15631566          size = sizeof(MASK);
    15641567          if (!*dcd->mask.szMask &&
    15651568              !dcd->mask.attrFile && !dcd->mask.antiattr) {
    1566             if (PrfQueryProfileSize(fmprof,
    1567                                     appname, "DirFilter", &size) && size) {
    1568               PrfQueryProfileData(fmprof,
    1569                                   appname, "DirFilter", &dcd->mask, &size);
     1569            if (PrfQueryProfileSize(fmprof, appname, "DirFilter", &size) && size) {
     1570              PrfQueryProfileData(fmprof, appname, "DirFilter", &dcd->mask, &size);
    15701571              SetMask(dcd->mask.szMask, &dcd->mask);
    15711572            }
     
    34893490      WinQueryWindowPos(dcd->hwndFrame, &swp);
    34903491      if (!(swp.fl & (SWP_HIDE | SWP_MINIMIZE | SWP_MAXIMIZE)))
    3491         PrfWriteProfileData(fmprof,
    3492                             appname, "VDirSizePos", &swp, sizeof(swp));
     3492        PrfWriteProfileData(fmprof, appname, "VDirSizePos", &swp, sizeof(swp));
    34933493    }
    34943494    break;
     
    38113811
    38123812            WinQueryTaskSizePos(WinQueryAnchorBlock(hwndFrame), 0, &swp);
    3813             if (PrfQueryProfileData(fmprof,
    3814                                     appname, "VDirSizePos", &swpD, &size)) {
     3813            if (PrfQueryProfileData(fmprof, appname, "VDirSizePos", &swpD, &size)) {
    38153814              cxScreen = WinQuerySysValue(HWND_DESKTOP, SV_CXSCREEN);
    38163815              cyScreen = WinQuerySysValue(HWND_DESKTOP, SV_CYSCREEN);
  • trunk/dll/dirsize.c

    r1438 r1482  
    4646  08 Mar 09 GKY Additional strings move to PCSZs in init.c
    4747  28 Jun 09 GKY Added AddBackslashToPath() to remove repeatative code.
     48  13 Dec 09 GKY Fixed separate paramenters. Please note that appname should be used in
     49                profile calls for user settings that work and are setable in more than one
     50                miniapp; FM3Str should be used for setting only relavent to FM/2 or that
     51                aren't user settable; realappname should be used for setting applicable to
     52                one or more miniapp but not to FM/2
    4853
    4954***********************************************************************/
     
    900905            strcpy(s, PCSZ_ICON);
    901906            PrfQueryProfileData(fmprof, appname, "DirflWindowAttr",
    902                                 (PVOID) & flWindowAttr, &size);
     907                                (PVOID) &flWindowAttr, &size);
    903908            if (flWindowAttr & CV_DETAIL) {
    904909              if (IsRoot(szFileName))
  • trunk/dll/flesh.c

    r1471 r1482  
    2525                to prevent duplicate directory names in tree following a copy before initial scan.
    2626  08 Mar 09 GKY Additional strings move to PCSZs in init.c
     27  13 Dec 09 GKY Fixed separate paramenters. Please note that appname should be used in
     28                profile calls for user settings that work and are setable in more than one
     29                miniapp; FM3Str should be used for setting only relavent to FM/2 or that
     30                aren't user settable; realappname should be used for setting applicable to
     31                one or more miniapp but not to FM/2
    2732
    2833***********************************************************************/
     
    266271}
    267272
    268 #define DDEPTH 16
     273#define DDEPTH 64
    269274
    270275/**
     
    290295  APIRET rc, prc;
    291296  BOOL isadir = FALSE, isremote = FALSE, includefiles = fFilesInTree;
    292   ULONG ddepth = 3;
     297  ULONG ddepth = DDEPTH;
    293298  ULONG drvNum;
    294299  ULONG flags;
     
    315320    return FALSE;                       // Not a directory
    316321
    317   //if (isalpha(*str) &&  // redundant check GKY 11/24/08
    318322  if (flags & DRIVE_INCLUDEFILES)
    319323    includefiles = TRUE;
     
    323327
    324328  if (isremote) {
    325     ddepth = 14;
    326329    if (fRemoteBug) {
    327330      if (brokenlan) {
     
    335338    ddepth = 14;
    336339
    337   if (!isremote || !fRemoteBug)
    338     ulM = (ddepth < 16) ? ddepth : 1;
     340  if (!fRemoteBug)
     341    ulM = (ddepth <= DDEPTH) ? ddepth : 1;
    339342
    340343  nm = ulM;
     
    367370                   GetPString(IDS_LANERROR2TEXT));
    368371            NoBrokenNotify = 255;
    369             PrfWriteProfileData(fmprof,
    370                                 FM3Str,
    371                                 "NoBrokenNotify",
     372            PrfWriteProfileData(fmprof, FM3Str, "NoBrokenNotify",
    372373                                &NoBrokenNotify, sizeof(ULONG));
    373374          }
     
    375376        else {
    376377          NoBrokenNotify--;
    377           PrfWriteProfileData(fmprof,
    378                               FM3Str,
    379                               "NoBrokenNotify",
     378          PrfWriteProfileData(fmprof, FM3Str, "NoBrokenNotify",
    380379                              &NoBrokenNotify, sizeof(ULONG));
    381380        }
     
    393392      nm = 1;
    394393      DosError(FERR_DISABLEHARDERR);
    395     } while (++total < ddepth && !(rc = (DosFindNext(hDir,
    396                                                      &ffb,
    397                                                      sizeof(FILEFINDBUF3),
    398                                                      &nm))));
    399     DosFindClose(hDir);
     394    }
     395    while (++total < ddepth && !(rc = (DosFindNext(hDir,
     396                                                   &ffb,
     397                                                   sizeof(FILEFINDBUF3),
     398                                                   &nm))));
     399      DosFindClose(hDir);
    400400    // If drive B:
    401401    if (toupper(*pciParent->pszFileName) > 'B' &&
     
    439439                       GetPString(IDS_FSDERROR2TEXT));
    440440                NoBrokenNotify = 255;
    441                 PrfWriteProfileData(fmprof,
    442                                     FM3Str,
    443                                     "NoBrokenNotify",
     441                PrfWriteProfileData(fmprof, FM3Str, "NoBrokenNotify",
    444442                                    &NoBrokenNotify, sizeof(ULONG));
    445443              }
     
    447445            else {
    448446              NoBrokenNotify--;
    449               PrfWriteProfileData(fmprof,
    450                                   FM3Str,
    451                                   "NoBrokenNotify",
     447              PrfWriteProfileData(fmprof, FM3Str, "NoBrokenNotify",
    452448                                  &NoBrokenNotify, sizeof(ULONG));
    453449            }
  • trunk/dll/fm2cmd.c

    r1438 r1482  
    1111  20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat
    1212  28 Jun 09 GKY Added AddBackslashToPath() to remove repeatative code.
     13  13 Dec 09 GKY Fixed separate paramenters. Please note that appname should be used in
     14                profile calls for user settings that work and are setable in more than one
     15                miniapp; FM3Str should be used for setting only relavent to FM/2 or that
     16                aren't user settable; realappname should be used for setting applicable to
     17                one or more miniapp but not to FM/2
    1318
    1419***********************************************************************/
     
    127132      else
    128133        fKeepCmdLine = TRUE;
    129       PrfWriteProfileData(fmprof, FM3Str, "KeepCmdLine", &fKeepCmdLine,
     134      PrfWriteProfileData(fmprof, appname, "KeepCmdLine", &fKeepCmdLine,
    130135                          sizeof(BOOL));
    131136      ret = TRUE;
     
    137142      else
    138143        fSaveMiniCmds = TRUE;
    139       PrfWriteProfileData(fmprof, FM3Str, "SaveMiniCmds", &fSaveMiniCmds,
     144      PrfWriteProfileData(fmprof, appname, "SaveMiniCmds", &fSaveMiniCmds,
    140145                          sizeof(BOOL));
    141146      ret = TRUE;
  • trunk/dll/init.c

    r1480 r1482  
    9090  22 Nov 09 GKY Fix FindSwapperDat so the check for large file support actually occurs if the
    9191                fall back to config.sys is used to find it; use bstripcr to streamline code.
     92  13 Dec 09 GKY Fixed separate paramenters. Please note that appname should be used in
     93                profile calls for user settings that work and are setable in more than one
     94                miniapp; FM3Str should be used for setting only relavent to FM/2 or that
     95                aren't user settable; realappname should be used for setting applicable to
     96                one or more miniapp but not to FM/2
    9297
    9398***********************************************************************/
     
    362367PCSZ WC_DATABAR         =  "WC_DATABAR";
    363368CHAR profile[CCHMAXPATH];
    364 ULONGLONG ullTmpSpaceNeeded;
     369ULONGLONG ullTmpSpaceNeeded = 5120000;
    365370
    366371BOOL CheckFileHeader(CHAR *filespec, CHAR *signature, LONG offset);
     
    624629  CHAR dllfile[CCHMAXPATH];
    625630  ULONG size;
     631  BOOL fSeparateParmsApp;
    626632
    627633  strcpy(dllfile, "FM3RES");
     
    766772  // Check free space on TMP and FM2 Save drives
    767773  {
    768     ullTmpSpaceNeeded = 5120000;
     774    //ullTmpSpaceNeeded = 5120000;
    769775    if (pTmpDir && CheckDriveSpaceAvail(pTmpDir, ullTmpSpaceNeeded, 0) == 1) {
    770776      if (CheckDriveSpaceAvail(pFM2SaveDirectory, ullTmpSpaceNeeded, 0) == 0){
     
    903909
    904910  size = sizeof(BOOL);
    905   PrfQueryProfileData(fmprof,
    906                       FM3Str,
    907                       "SeparateParms",
    908                       &fSeparateParms,
    909                       &size);
    910   if (!fSeparateParms)
     911  PrfQueryProfileData(fmprof, FM3Str, "SeparateParms",
     912                      &fSeparateParms, &size);
     913  size = sizeof(BOOL);
     914  PrfQueryProfileData(fmprof, appname, "SeparateParms",
     915                      &fSeparateParmsApp, &size);
     916  if (!fSeparateParms && !fSeparateParmsApp)
    911917    strcpy(appname, FM3Str);
    912918
     
    11161122    fAutoTile = fConfirmDelete = fLoadSubject = fUnHilite =
    11171123    fLoadLongnames = fToolbar = fSaveState = fGuessType = fToolbarHelp =
    1118     fAutoAddDirs = fUseNewViewer = fDataToFore = fDataShowDrives =
     1124    fAutoAddDirs = fUseNewViewer = fDataToFore = fDataShowDrives = fDataMin =
    11191125    fSplitStatus = fDragndropDlg = fQuickArcFind = fKeepCmdLine =
    11201126    fMoreButtons = fDrivebar = fCollapseFirst = fSwitchTree =
     
    11241130    fEjectRemovableScan = fRScanLocal = TRUE;
    11251131  ulCnrType = CCS_EXTENDSEL;
    1126   FilesToGet = FILESTOGET_MIN;
     1132  FilesToGet = FILESTOGET_MAX;
    11271133  MaxComLineStrg = MAXCOMLINESTRGDEFAULT;
    11281134  AutoviewHeight = 48;
     
    11361142  prnspacing = 1;
    11371143  prntabspaces = 8;
    1138   CollectorsortFlags = sortFlags = SORT_DIRSFIRST;
    1139   ullDATFileSpaceNeeded = 10000;
     1144  CollectorsortFlags = sortFlags = SORT_FILENAME | SORT_DIRSFIRST;
     1145  //ullDATFileSpaceNeeded = 10000;
    11401146
    11411147  //Get default Country info
     
    12001206
    12011207  // load preferences from profile (INI) file
     1208  /**
     1209    * Separate paramenters -- Please note that appname should be used in
     1210    * profile calls for user settings that work and are setable in more than one
     1211    * miniapp; FM3Str should be used for setting only relavent to FM/2 or that
     1212    * aren't user settable; realappname should be used for setting applicable to
     1213    * one or more miniapp but not to FM/2
     1214    */
    12021215  size = sizeof(ULONG);
    12031216  PrfQueryProfileData(fmprof, appname, "MaxComLineStrg", &MaxComLineStrg, &size);
     
    12671280  PrfQueryProfileData(fmprof, appname, "ConfirmTarget", &fConfirmTarget, &size);
    12681281  size = sizeof(BOOL);
    1269   PrfQueryProfileData(fmprof, FM3Str, "CustomFileDlg", &fCustomFileDlg, &size);
    1270   size = sizeof(BOOL);
    1271   PrfQueryProfileData(fmprof, FM3Str, "SaveMiniCmds", &fSaveMiniCmds, &size);
     1282  PrfQueryProfileData(fmprof, appname, "CustomFileDlg", &fCustomFileDlg, &size);
     1283  size = sizeof(BOOL);
     1284  PrfQueryProfileData(fmprof, appname, "SaveMiniCmds", &fSaveMiniCmds, &size);
    12721285  size = sizeof(BOOL);
    12731286  PrfQueryProfileData(fmprof, appname, "SaveBigCmds", &fSaveBigCmds, &size);
     
    12751288  PrfQueryProfileData(fmprof, appname, "NoFoldMenu", &fNoFoldMenu, &size);
    12761289  size = sizeof(BOOL);
    1277   PrfQueryProfileData(fmprof, FM3Str, "ThreadNotes", &fThreadNotes, &size);
     1290  PrfQueryProfileData(fmprof, appname, "ThreadNotes", &fThreadNotes, &size);
    12781291  size = sizeof(BOOL);
    12791292  PrfQueryProfileData(fmprof, FM3Str, "Prnpagenums", &prnpagenums, &size);
     
    13031316  PrfQueryProfileData(fmprof, FM3Str, "Prnspacing", &prnspacing, &size);
    13041317  size = sizeof(BOOL);
    1305   PrfQueryProfileData(fmprof, FM3Str, "NoDead", &fNoDead, &size);
    1306   size = sizeof(BOOL);
    1307   PrfQueryProfileData(fmprof, FM3Str, "NoFinger", &fNoFinger, &size);
    1308   size = sizeof(BOOL);
    1309   PrfQueryProfileData(fmprof, FM3Str, "AlertBeepOff", &fAlertBeepOff, &size);
    1310   size = sizeof(BOOL);
    1311   PrfQueryProfileData(fmprof, FM3Str, "ErrorBeepOff", &fErrorBeepOff, &size);
     1318  PrfQueryProfileData(fmprof, appname, "NoDead", &fNoDead, &size);
     1319  size = sizeof(BOOL);
     1320  PrfQueryProfileData(fmprof, appname, "NoFinger", &fNoFinger, &size);
     1321  size = sizeof(BOOL);
     1322  PrfQueryProfileData(fmprof, appname, "AlertBeepOff", &fAlertBeepOff, &size);
     1323  size = sizeof(BOOL);
     1324  PrfQueryProfileData(fmprof, appname, "ErrorBeepOff", &fErrorBeepOff, &size);
    13121325  size = sizeof(BOOL);
    13131326  PrfQueryProfileData(fmprof, appname, "SwitchTree", &fSwitchTree, &size);
     
    13211334  PrfQueryProfileData(fmprof, appname, "FilesInTree", &fFilesInTree, &size);
    13221335  size = sizeof(BOOL);
    1323   PrfQueryProfileData(fmprof, FM3Str, "TopDir", &fTopDir, &size);
    1324   size = sizeof(BOOL);
    1325   PrfQueryProfileData(fmprof, FM3Str, "LookInDir", &fLookInDir, &size);
     1336  PrfQueryProfileData(fmprof, appname, "TopDir", &fTopDir, &size);
     1337  size = sizeof(BOOL);
     1338  PrfQueryProfileData(fmprof, appname, "LookInDir", &fLookInDir, &size);
    13261339  PrfQueryProfileString(fmprof, appname, "DefArc", NULL, szDefArc, sizeof(szDefArc));
    13271340  size = sizeof(ULONG);
    1328   PrfQueryProfileData(fmprof, FM3Str, "AutoviewHeight",
     1341  PrfQueryProfileData(fmprof, appname, "AutoviewHeight",
    13291342                      &AutoviewHeight, &size);
    13301343  size = sizeof(BOOL);
    1331   PrfQueryProfileData(fmprof, FM3Str, "KeepCmdLine", &fKeepCmdLine, &size);
     1344  PrfQueryProfileData(fmprof, appname, "KeepCmdLine", &fKeepCmdLine, &size);
    13321345  if (strcmp(realappname, "FM/4")) {
    13331346    size = sizeof(BOOL);
     
    13361349    PrfQueryProfileData(fmprof, FM3Str, "Drivebar", &fDrivebar, &size);
    13371350  }
    1338   else
    1339     fDrivebar = fMoreButtons = TRUE;
    13401351  size = sizeof(BOOL);
    13411352  PrfQueryProfileData(fmprof, appname, "NoSearch", &fNoSearch, &size);
     
    13491360                        pszTreeEnvVarList, MaxComLineStrg);
    13501361  size = sizeof(BOOL);
    1351   PrfQueryProfileData(fmprof, FM3Str, "ShowDriveOnly", &fShowDriveOnly, &size);
    1352   size = sizeof(BOOL);
    1353   PrfQueryProfileData(fmprof, FM3Str, "ShowFSTypeInTree", &fShowFSTypeInTree, &size);
    1354   size = sizeof(BOOL);
    1355   PrfQueryProfileData(fmprof, FM3Str, "ShowDriveLabelInTree", &fShowDriveLabelInTree, &size);
     1362  PrfQueryProfileData(fmprof, appname, "ShowDriveOnly", &fShowDriveOnly, &size);
     1363  size = sizeof(BOOL);
     1364  PrfQueryProfileData(fmprof, appname, "ShowFSTypeInTree", &fShowFSTypeInTree, &size);
     1365  size = sizeof(BOOL);
     1366  PrfQueryProfileData(fmprof, appname, "ShowDriveLabelInTree", &fShowDriveLabelInTree, &size);
    13561367  if (!fShowDriveOnly && !fShowFSTypeInTree && !fShowDriveLabelInTree)
    13571368    fShowDriveOnly = TRUE;
     
    13591370  PrfQueryProfileData(fmprof, appname, "LeaveTree", &fLeaveTree, &size);
    13601371  size = sizeof(BOOL);
    1361   PrfQueryProfileData(fmprof, FM3Str, "Comments", &fComments, &size);
     1372  PrfQueryProfileData(fmprof, appname, "Comments", &fComments, &size);
    13621373  size = sizeof(ULONG);
    13631374  PrfQueryProfileData(fmprof, appname, "WS_ANIMATE", &fwsAnimate, &size);
     
    13671378  PrfQueryProfileData(fmprof, appname, "SelectedAlways", &fSelectedAlways, &size);
    13681379  size = sizeof(BOOL);
    1369   PrfQueryProfileData(fmprof, FM3Str, "ToolbarHelp", &fToolbarHelp, &size);
    1370   size = sizeof(BOOL);
    1371   PrfQueryProfileData(fmprof, FM3Str, "OtherHelp", &fOtherHelp, &size);
    1372   size = sizeof(BOOL);
    1373   PrfQueryProfileData(fmprof, FM3Str, "DrivebarHelp", &fDrivebarHelp, &size);
     1380  PrfQueryProfileData(fmprof, appname, "ToolbarHelp", &fToolbarHelp, &size);
     1381  size = sizeof(BOOL);
     1382  PrfQueryProfileData(fmprof, appname, "OtherHelp", &fOtherHelp, &size);
     1383  size = sizeof(BOOL);
     1384  PrfQueryProfileData(fmprof, appname, "DrivebarHelp", &fDrivebarHelp, &size);
    13741385  size = sizeof(BOOL);
    13751386  PrfQueryProfileData(fmprof, appname, "AutoAddDirs", &fAutoAddDirs, &size);
     
    13951406  PrfQueryProfileData(fmprof, FM3Str, "UseQSysState", &fUseQSysState, &size);
    13961407  size = sizeof(BOOL);
    1397   PrfQueryProfileData(fmprof, FM3Str, "DataMin", &fDataMin, &size);
     1408  PrfQueryProfileData(fmprof, appname, "DataMin", &fDataMin, &size);
    13981409  size = sizeof(BOOL);
    13991410  PrfQueryProfileData(fmprof, appname, "DataToFore", &fDataToFore, &size);
     
    14071418  PrfQueryProfileData(fmprof, appname, "FolderAfterExtract", &fFolderAfterExtract, &size);
    14081419  size = sizeof(BOOL);
    1409   PrfQueryProfileData(fmprof, FM3Str, "DullDatabar", &fDullMin, &size);
     1420  PrfQueryProfileData(fmprof, appname, "DullDatabar", &fDullMin, &size);
    14101421  size = sizeof(BOOL);
    14111422  PrfQueryProfileData(fmprof, appname, "BlueLED", &fBlueLED, &size);
     
    14381449  PrfQueryProfileData(fmprof, appname, "ForceLower", &fForceLower, &size);
    14391450  size = sizeof(BOOL);
    1440   PrfQueryProfileData(fmprof, FM3Str, "TextTools", &fTextTools, &size);
    1441   size = sizeof(BOOL);
    1442   PrfQueryProfileData(fmprof, FM3Str, "ToolTitles", &fToolTitles, &size);
     1451  PrfQueryProfileData(fmprof, appname, "TextTools", &fTextTools, &size);
     1452  size = sizeof(BOOL);
     1453  PrfQueryProfileData(fmprof, appname, "ToolTitles", &fToolTitles, &size);
    14431454  size = sizeof(BOOL);
    14441455  PrfQueryProfileData(fmprof, appname, "DoubleClickOpens", &fDCOpens, &size);
     
    14561467  PrfQueryProfileString(fmprof, appname, "ExtractPath", NULL, extractpath, sizeof(extractpath));
    14571468  size = sizeof(BOOL);
    1458   PrfQueryProfileData(fmprof, FM3Str, "FileNamePathCnr", &fFileNameCnrPath, &size);
     1469  PrfQueryProfileData(fmprof, appname, "FileNamePathCnr", &fFileNameCnrPath, &size);
    14591470  PrfQueryProfileString(fmprof, appname, "Printer", "PRN", printer, sizeof(printer));
    14601471  PrfQueryProfileString(fmprof, appname, "DirCompare", NULL, dircompare, MaxComLineStrg);
     
    15031514  PrfQueryProfileData(fmprof, appname, "ArcStuffVisible", &fArcStuffVisible, &size);
    15041515  size = sizeof(BOOL);
    1505   PrfQueryProfileData(fmprof, FM3Str, "NoTreeGap", &fNoTreeGap, &size);
     1516  PrfQueryProfileData(fmprof, appname, "NoTreeGap", &fNoTreeGap, &size);
    15061517  size = sizeof(BOOL);
    15071518  PrfQueryProfileData(fmprof, FM3Str, "VTreeOpensWPS", &fVTreeOpensWPS, &size);
     
    15331544  PrfQueryProfileData(fmprof, appname, "QuickArcFind", &fQuickArcFind, &size);
    15341545  size = sizeof(BOOL);
    1535   PrfQueryProfileData(fmprof, FM3Str, "NoRemovableScan", &fNoRemovableScan, &size);
     1546  PrfQueryProfileData(fmprof, appname, "NoRemovableScan", &fNoRemovableScan, &size);
    15361547  size = sizeof(ULONG);
    15371548  PrfQueryProfileData(fmprof, FM3Str, "NoBrokenNotify", &NoBrokenNotify, &size);
     
    15451556    FilesToGet = FILESTOGET_MAX;
    15461557  size = sizeof(BOOL);
    1547   PrfQueryProfileData(fmprof, FM3Str, "AutoView", &fAutoView, &size);
    1548   size = sizeof(BOOL);
    1549   PrfQueryProfileData(fmprof, FM3Str, "FM2Deletes", &fFM2Deletes, &size);
    1550   size = sizeof(BOOL);
    1551   PrfQueryProfileData(fmprof, FM3Str, "TrashCan", &fTrashCan, &size);
     1558  PrfQueryProfileData(fmprof, appname, "AutoView", &fAutoView, &size);
     1559  size = sizeof(BOOL);
     1560  PrfQueryProfileData(fmprof, appname, "FM2Deletes", &fFM2Deletes, &size);
     1561  size = sizeof(BOOL);
     1562  PrfQueryProfileData(fmprof, appname, "TrashCan", &fTrashCan, &size);
    15521563
    15531564  LoadDetailsSwitches(PCSZ_DIRCNR, &dsDirCnrDefault, FALSE);
  • trunk/dll/ipf/notebook.ipf

    r1441 r1482  
    1717.* 12 Mar 09 SHL Update container search description
    1818.* 13 Jul 09 SHL Rework scanning page help text
     19.* 13 Dec 09 GKY Fixed separate paramenters.
    1920.*
    2021.***********************************************************************
     
    110111object starting with the depressed letter and the object is selected.
    111112Note that you override the configured value of this feature by
    112 pressing the &ShiftKey.
    113 key along with the letter.
     113pressing the &ShiftKey.key along with the letter.
    114114Extended container searching allows you to enter multiple characters which
    115 are searched for at the start of filenames.
    116 The record is made the current (cursored) object.
     115are searched for at the start of filenames. The record is made the current (cursored) object.
    117116The leading backslash can be omitted from directory names where there is no ambiguity.
    118 If the record matches all the letters typed exactly, it is also selected.
     117If the record matches all the letters typed exactly, it is also selected.
    119118A pause of more than about two seconds in typing resets the search string.
    120119The Escape key clears the search string.
     
    575574:p.
    576575The :hp6.Separate parameters:ehp6. toggle tells FM/2 whether to use
    577 separate parameters for many of the mini-apps (like VDIR and VTREE). If
    578 checked, you'll have to set up each application separately, but
     576separate parameters for many of the mini-apps (like FM/2 lite, VDIR and VTREE).
     577If you select it with FM/2 running it applies to all the mini-apps. However,
     578if you select it with a mini-app running it will only effect that app. If
     579checked, you'll have to set up the effected applications separately, but
    579580configurations can be different than that in the monolithic FM/2
    580581application itself. If you don't understand that, let's try this&colon.
     
    631632display the thread LED as blue (off) and yellow (on) LEDs rather than
    632633the default red (off) and green (on) LEDs. The change will not show up
    633 on the application window until you close and then reopen FM/2.
     634on the application window until you close and then reopen FM/2. The LED
     635blinks during background processing indicating that the background process
     636is still active.
    634637:p.
    635638The :hp6.Show Target in Drivebar:ehp6. toggle, if on, tells FM/2 to
     
    875878give you some quick choices about the general way you'd like FM/2 to
    876879look and behave, and allow you to tweak specifics later as you get some
    877 experience with the program.
     880experience with the program. Please note that none of these do anything to
     881strings (i.e. the viewer program paths, antivirus path, etc) you may have
     882already entered.
    878883:p.
    879884:hp6.Default:ehp6. restores FM/2 to its default state, for the most
     
    914919mileage may vary.
    915920:p.
     921:hp6.Gregg's way:ehp6. sets FM/2 up the way the one of the current maintainers
     922likes it. Your mileage may vary but it give you a starting point based on
     923a long time user's settings. I only use FM/2 (except when testing) so you
     924may want to avoid this if you generally use the other miniapps (vtree, FM/2 lite, etc).
     925:p.
    916926You might also want to take a look at the :link reftype=hd
    917927res=100000."FM/2 Lite":elink. object in the FM/2 folder.
  • trunk/dll/killproc.c

    r1480 r1482  
    2222  08 Mar 09 GKY Removed variable aurguments from docopyf and unlinkf (not used)
    2323  12 Jul 09 GKY Add xDosQueryAppType and xDosAlloc... to allow FM/2 to load in high memory
     24  13 Dec 09 GKY Fixed separate paramenters. Please note that appname should be used in
     25                profile calls for user settings that work and are setable in more than one
     26                miniapp; FM3Str should be used for setting only relavent to FM/2 or that
     27                aren't user settable; realappname should be used for setting applicable to
     28                one or more miniapp but not to FM/2
    2429
    2530***********************************************************************/
     
    383388    case KILL_CHECKBOX:
    384389      fUseQProcStat = WinQueryButtonCheckstate(hwnd, KILL_CHECKBOX);
    385       PrfWriteProfileData(fmprof,
    386                           FM3Str,
    387                           "UseQProcStat", &fUseQProcStat, sizeof(BOOL));
     390      PrfWriteProfileData(fmprof, FM3Str, "UseQProcStat",
     391                          &fUseQProcStat, sizeof(BOOL));
    388392      PostMsg(hwnd, WM_COMMAND, MPFROM2SHORT(KILL_RESCAN, 0), MPVOID);
    389393      if (WinQueryButtonCheckstate(hwnd, KILL_CHECKBOX)) {
     
    396400    case KILL2_CHECKBOX:
    397401      fUseQSysState = WinQueryButtonCheckstate(hwnd, KILL2_CHECKBOX);
    398       PrfWriteProfileData(fmprof,
    399                           FM3Str,
    400                           "UseQSysState", &fUseQSysState, sizeof(BOOL));
     402      PrfWriteProfileData(fmprof, FM3Str, "UseQSysState",
     403                          &fUseQSysState, sizeof(BOOL));
    401404      PostMsg(hwnd, WM_COMMAND, MPFROM2SHORT(KILL_RESCAN, 0), MPVOID);
    402405      if (WinQueryButtonCheckstate(hwnd, KILL2_CHECKBOX)) {
  • trunk/dll/mainwnd.c

    r1471 r1482  
    9999  12 Sep 09 GKY Add FM3.INI User ini and system ini to submenu for view ini
    100100  14 Sep 09 SHL Blink thread LEDs when workers busy
     101  13 Dec 09 GKY Fixed separate paramenters. Please note that appname should be used in
     102                profile calls for user settings that work and are setable in more than one
     103                miniapp; FM3Str should be used for setting only relavent to FM/2 or that
     104                aren't user settable; realappname should be used for setting applicable to
     105                one or more miniapp but not to FM/2
    101106
    102107***********************************************************************/
     
    32313236  // Delete saved state if internally saved state
    32323237  fDeleteState = strcmp(pszStateName, PCSZ_FM2TEMPTEXT) == 0;
    3233 
    3234   //size = (ULONG)0;
    32353238  sprintf(szKey, "%sToolbar", szPrefix);
    3236   //if (PrfQueryProfileSize(fmprof, FM3Str, szKey, &size) && size)
    32373239  {
    32383240    if (fToolsChanged)
     
    32433245    PostMsg(hwndToolback, UM_SETUP2, MPVOID, MPVOID);
    32443246  }
    3245   //size = (ULONG)0;
    32463247  sprintf(szKey, "%sTargetDir", szPrefix);
    3247   //if (PrfQueryProfileSize(fmprof, FM3Str, szKey, &size) && size)
    32483248  {
    32493249    PrfQueryProfileString(fmprof, FM3Str, szKey, NULL, targetdir, sizeof(targetdir));
     
    32533253  size = sizeof(SWP);
    32543254  sprintf(szKey, "%sMySizeLastTime", szPrefix);
    3255   if (!PrfQueryProfileData(fmprof,
    3256                            FM3Str,
    3257                            szKey,
    3258                            (PVOID) &swpO,
    3259                            &size) ||
     3255  if (!PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) &swpO, &size) ||
    32603256      size != sizeof(SWP) || !swp.cx || !swp.cy)
    32613257  {
     
    33033299  sprintf(szKey, "%sNumDirsLastTime", szPrefix);
    33043300  size = sizeof(ULONG);
    3305   if (PrfQueryProfileData(fmprof,
    3306                           FM3Str, szKey, (PVOID) &numsaves, &size)) {
     3301  if (PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) &numsaves, &size)) {
    33073302    if (fDeleteState)
    33083303      PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L);
     
    33683363                strcpy(eos, "Sort");
    33693364                size = sizeof(INT);
    3370                 if (PrfQueryProfileData(fmprof,
    3371                                         FM3Str,
    3372                                         szKey,
    3373                                         (PVOID) &dcd->sortFlags,
     3365                if (PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) &dcd->sortFlags,
    33743366                                        &size)) {
    33753367                  if (!dcd->sortFlags)
     
    33783370                size = sizeof(MASK);
    33793371                strcpy(eos, "Filter");
    3380                 if (PrfQueryProfileData(fmprof,
    3381                                         FM3Str,
    3382                                         szKey,
    3383                                         (PVOID) &dcd->mask, &size)) {
     3372                if (PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) &dcd->mask, &size)) {
    33843373                  if (*dcd->mask.szMask)
    33853374                    WinSendMsg(WinWindowFromID(hwndC, DIR_CNR),
     
    33903379                if (!noview) {
    33913380                  size = sizeof(ULONG);
    3392                   if (PrfQueryProfileData(fmprof,
    3393                                           FM3Str,
    3394                                           szKey,
    3395                                           (PVOID) &dcd->flWindowAttr,
     3381                  if (PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) &dcd->flWindowAttr,
    33963382                                          &size)) {
    33973383
     
    47324718            sprintf(szKey, "%s.NumDirsLastTime", szStateName);
    47334719            size = sizeof(ULONG);
    4734             if (!PrfQueryProfileData(fmprof,
    4735                                      FM3Str,
    4736                                      szKey,
    4737                                      (PVOID)&numsaves,
    4738                                      &size)) {
     4720            if (!PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) &numsaves, &size)) {
    47394721              saymsg(MB_ENTER | MB_ICONASTERISK, hwnd,
    47404722                     GetPString(IDS_WARNINGTEXT),
     
    57255707
    57265708    size = sizeof(BOOL);
    5727     if (PrfQueryProfileData(fmprof,
    5728                             FM3Str,
    5729                             "MenuInvisible", &temp, &size) && size && temp)
     5709    if (PrfQueryProfileData(fmprof, FM3Str, "MenuInvisible", &temp, &size) &&
     5710        size && temp)
    57305711      WinSendMsg(hwnd, WM_COMMAND, MPFROM2SHORT(IDM_HIDEMENU, 0), MPVOID);
    57315712    size = sizeof(BOOL);
    5732     if (PrfQueryProfileData(fmprof,
    5733                             FM3Str, "FreeTree", &temp, &size) && size && temp)
     5713    if (PrfQueryProfileData(fmprof, FM3Str, "FreeTree", &temp, &size) &&
     5714        size && temp)
    57345715      WinSendMsg(hwnd, WM_COMMAND, MPFROM2SHORT(IDM_FREETREE, 0), MPVOID);
    57355716    size = sizeof(BOOL);
    5736     if (PrfQueryProfileData(fmprof,
    5737                             FM3Str,
    5738                             "AutoTile", &temp, &size) && size && !temp)
     5717    if (PrfQueryProfileData(fmprof, FM3Str, "AutoTile", &temp, &size) &&
     5718        size && !temp)
    57395719      WinSendMsg(hwnd, WM_COMMAND, MPFROM2SHORT(IDM_AUTOTILE, 0), MPVOID);
    57405720    size = sizeof(BOOL);
    5741     if (PrfQueryProfileData(fmprof,
    5742                             FM3Str, "Toolbar", &temp, &size) && size && !temp)
     5721    if (PrfQueryProfileData(fmprof, appname, "Toolbar", &temp, &size) && size && !temp)
    57435722      WinSendMsg(hwnd, WM_COMMAND, MPFROM2SHORT(IDM_TOOLBAR, 0), MPVOID);
    57445723
  • trunk/dll/mainwnd2.c

    r1457 r1482  
    3333  22 Jul 09 GKY Code changes to use semaphores to serialize drive scanning
    3434  12 Sep 09 GKY Add FM3.INI User ini and system ini to submenu for view ini
     35  13 Dec 09 GKY Fixed separate paramenters. Please note that appname should be used in
     36                profile calls for user settings that work and are setable in more than one
     37                miniapp; FM3Str should be used for setting only relavent to FM/2 or that
     38                aren't user settable; realappname should be used for setting applicable to
     39                one or more miniapp but not to FM/2
    3540
    3641***********************************************************************/
     
    851856
    852857      size = sizeof(BOOL);
    853       PrfQueryProfileData(fmprof,
    854                           realappname, "FM/4 TreeUp", (PVOID) & dummy, &size);
     858      PrfQueryProfileData(fmprof, realappname, "FM/4 TreeUp",
     859                          (PVOID) &dummy, &size);
    855860      if (dummy) {
    856861        size = sizeof(ULONG);
    857862        hwndTree = StartTreeCnr(hwnd, 3);
    858         PrfQueryProfileData(fmprof,
    859                             realappname,
    860                             "FM/4 TreeWidth", (PVOID) & TreeWidth, &size);
     863        PrfQueryProfileData(fmprof, realappname, "FM/4 TreeWidth",
     864                            (PVOID) &TreeWidth, &size);
    861865        TreeWidth = max(TreeWidth, 80);
    862866      }
    863867      size = sizeof(BOOL);
    864       if (PrfQueryProfileData(fmprof,
    865                               FM3Str,
    866                               "Toolbar", &dummy, &size) && size && !dummy)
     868      if (PrfQueryProfileData(fmprof, appname, "Toolbar", &dummy, &size) &&
     869          size && !dummy)
    867870        WinSendMsg(hwnd, WM_COMMAND, MPFROM2SHORT(IDM_TOOLBAR, 0), MPVOID);
    868871
    869872      size = sizeof(s);
    870873      *s = 0;
    871       if (PrfQueryProfileData(fmprof,
    872                               realappname, "FM/4 Dir1", s, &size) && *s)
     874      if (PrfQueryProfileData(fmprof, realappname, "FM/4 Dir1", s, &size) && *s)
    873875        MakeValidDir(s);
    874876      else
     
    878880      size = sizeof(s);
    879881      *s = 0;
    880       if (PrfQueryProfileData(fmprof,
    881                               realappname, "FM/4 Dir2", s, &size) && *s)
     882      if (PrfQueryProfileData(fmprof, realappname, "FM/4 Dir2", s, &size) && *s)
    882883        MakeValidDir(s);
    883884      else
     
    896897        if (dcd) {
    897898          size = sizeof(INT);
    898           if (PrfQueryProfileData(fmprof,
    899                                   realappname,
    900                                   "FM/4 Dir1.Sort",
     899          if (PrfQueryProfileData(fmprof, realappname, "FM/4 Dir1.Sort",
    901900                                  (PVOID) & dcd->sortFlags,
    902901                                  &size) && size == sizeof(INT)) {
     
    905904          }
    906905          size = sizeof(MASK);
    907           if (PrfQueryProfileData(fmprof,
    908                                   realappname,
    909                                   "FM/4 Dir1.Filter",
     906          if (PrfQueryProfileData(fmprof, realappname, "FM/4 Dir1.Filter",
    910907                                  (PVOID) & dcd->mask, &size) && size) {
    911908            if (*dcd->mask.szMask)
     
    915912          *(dcd->mask.prompt) = 0;
    916913          size = sizeof(ULONG);
    917           if (PrfQueryProfileData(fmprof,
    918                                   realappname,
    919                                   "FM/4 Dir1.View",
     914          if (PrfQueryProfileData(fmprof, realappname, "FM/4 Dir1.View",
    920915                                  (PVOID) & dcd->flWindowAttr,
    921916                                  &size) && size == sizeof(ULONG)) {
     
    942937        if (dcd) {
    943938          size = sizeof(INT);
    944           if (PrfQueryProfileData(fmprof,
    945                                   realappname,
    946                                   "FM/4 Dir2.Sort",
     939          if (PrfQueryProfileData(fmprof, realappname, "FM/4 Dir2.Sort",
    947940                                  (PVOID) & dcd->sortFlags,
    948941                                  &size) && size == sizeof(INT)) {
     
    951944          }
    952945          size = sizeof(MASK);
    953           if (PrfQueryProfileData(fmprof,
    954                                   realappname,
    955                                   "FM/4 Dir2.Filter",
     946          if (PrfQueryProfileData(fmprof, realappname, "FM/4 Dir2.Filter",
    956947                                  (PVOID) & dcd->mask, &size) && size) {
    957948            if (*dcd->mask.szMask)
     
    961952          *(dcd->mask.prompt) = 0;
    962953          size = sizeof(ULONG);
    963           if (PrfQueryProfileData(fmprof,
    964                                   realappname,
    965                                   "FM/4 Dir2.View",
     954          if (PrfQueryProfileData(fmprof, realappname, "FM/4 Dir2.View",
    966955                                  (PVOID) & dcd->flWindowAttr,
    967956                                  &size) && size == sizeof(ULONG)) {
     
    986975      ULONG which = 0, size = sizeof(ULONG);
    987976
    988       if (PrfQueryProfileData(fmprof,
    989                               realappname,
    990                               "FM/4 Max",
     977      if (PrfQueryProfileData(fmprof, realappname, "FM/4 Max",
    991978                              (PVOID) & which,
    992979                              &size) && size == sizeof(ULONG) && which) {
     
    10531040              flWindowAttr |= CV_NAME;
    10541041          }
    1055           PrfWriteProfileData(fmprof,
    1056                               realappname,
    1057                               "FM/4 Dir1.Sort",
     1042          PrfWriteProfileData(fmprof, realappname, "FM/4 Dir1.Sort",
    10581043                              (PVOID) & dcd->sortFlags, sizeof(INT));
    1059           PrfWriteProfileData(fmprof,
    1060                               realappname,
    1061                               "FM/4 Dir1.Filter",
     1044          PrfWriteProfileData(fmprof, realappname, "FM/4 Dir1.Filter",
    10621045                              (PVOID) & dcd->mask, sizeof(MASK));
    1063           PrfWriteProfileData(fmprof,
    1064                               realappname,
    1065                               "FM/4 Dir1.View",
     1046          PrfWriteProfileData(fmprof, realappname, "FM/4 Dir1.View",
    10661047                              (PVOID) & flWindowAttr, sizeof(ULONG));
    10671048        }
     
    10881069              flWindowAttr |= CV_NAME;
    10891070          }
    1090           PrfWriteProfileData(fmprof,
    1091                               realappname,
    1092                               "FM/4 Dir2.Sort",
     1071          PrfWriteProfileData(fmprof, realappname, "FM/4 Dir2.Sort",
    10931072                              (PVOID) & dcd->sortFlags, sizeof(INT));
    1094           PrfWriteProfileData(fmprof,
    1095                               realappname,
    1096                               "FM/4 Dir2.Filter",
     1073          PrfWriteProfileData(fmprof, realappname, "FM/4 Dir2.Filter",
    10971074                              (PVOID) & dcd->mask, sizeof(MASK));
    1098           PrfWriteProfileData(fmprof,
    1099                               realappname,
    1100                               "FM/4 Dir2.View",
     1075          PrfWriteProfileData(fmprof, realappname, "FM/4 Dir2.View",
    11011076                              (PVOID) & flWindowAttr, sizeof(ULONG));
    11021077        }
  • trunk/dll/notebook.c

    r1478 r1482  
    5151  06 Jun 09 GKY Add option to show file system type or drive label in tree
    5252  15 Nov 09 GKY Change rescan following label/type change to WinSendMsg to avoid trap on SMP
     53  13 Dec 09 GKY Fixed separate paramenters. Please note that appname should be used in
     54                profile calls for user settings that work and are setable in more than one
     55                miniapp; FM3Str should be used for setting only relavent to FM/2 or that
     56                aren't user settable; realappname should be used for setting applicable to
     57                one or more miniapp but not to FM/2
    5358
    5459***********************************************************************/
     
    9398#include "info.h"                       // driveflags
    9499#include "init.h"                       // font strings
     100#include "fm2cmd.h"                     // fKeepCmdLine
    95101
    96102static VOID SaveLastPageIndex(HWND hwnd);
     
    353359  case WM_CLOSE:
    354360    fQuickArcFind = WinQueryButtonCheckstate(hwnd, CFGA_QUICKARCFIND);
    355     PrfWriteProfileData(fmprof,
    356                         appname,
    357                         "QuickArcFind", &fQuickArcFind, sizeof(BOOL));
     361    PrfWriteProfileData(fmprof, appname, "QuickArcFind",
     362                        &fQuickArcFind, sizeof(BOOL));
    358363    fArcStuffVisible = WinQueryButtonCheckstate(hwnd, CFGA_ARCSTUFFVISIBLE);
    359     PrfWriteProfileData(fmprof,
    360                         appname,
    361                         "ArcStuffVisible", &fArcStuffVisible, sizeof(BOOL));
     364    PrfWriteProfileData(fmprof, appname, "ArcStuffVisible",
     365                        &fArcStuffVisible, sizeof(BOOL));
    362366    fFileNameCnrPath = WinQueryButtonCheckstate(hwnd, CFGA_FILENAMEPATH);
    363     PrfWriteProfileData(fmprof,
    364                         appname,
    365                         "FileNamePathCnr", &fFileNameCnrPath, sizeof(BOOL));
     367    PrfWriteProfileData(fmprof, appname, "FileNamePathCnr", &fFileNameCnrPath, sizeof(BOOL));
    366368    fFolderAfterExtract = WinQueryButtonCheckstate(hwnd,
    367369                                                   CFGA_FOLDERAFTEREXTRACT);
    368     PrfWriteProfileData(fmprof,
    369                         appname,
    370                         "FolderAfterExtract",
     370    PrfWriteProfileData(fmprof, appname, "FolderAfterExtract",
    371371                        &fFolderAfterExtract, sizeof(BOOL));
    372372    if (WinQueryButtonCheckstate(hwnd, CFGA_DEFARC)) {
     
    11131113    fToolbarHelp = WinQueryButtonCheckstate(hwnd, CFGB_TOOLBARHELP);
    11141114    PrfWriteProfileData(fmprof,
    1115                         FM3Str, "ToolbarHelp", &fToolbarHelp, sizeof(BOOL));
     1115                        appname, "ToolbarHelp", &fToolbarHelp, sizeof(BOOL));
    11161116    fDrivebarHelp = WinQueryButtonCheckstate(hwnd, CFGB_DRIVEBARHELP);
    11171117    PrfWriteProfileData(fmprof,
    1118                         FM3Str, "DrivebarHelp", &fDrivebarHelp, sizeof(BOOL));
     1118                        appname, "DrivebarHelp", &fDrivebarHelp, sizeof(BOOL));
    11191119    fOtherHelp = WinQueryButtonCheckstate(hwnd, CFGB_OTHERHELP);
    11201120    PrfWriteProfileData(fmprof,
    1121                         FM3Str, "OtherHelp", &fOtherHelp, sizeof(BOOL));
     1121                        appname, "OtherHelp", &fOtherHelp, sizeof(BOOL));
    11221122    break;
    11231123  }
     
    14281428      fShowDriveLabelInTree = WinQueryButtonCheckstate(hwnd, CFGT_LABEL);
    14291429      fShowDriveOnly = WinQueryButtonCheckstate(hwnd, CFGT_DRIVEONLY);
    1430       PrfWriteProfileData(fmprof, FM3Str, "ShowDriveOnly", &fShowDriveOnly, sizeof(BOOL));
    1431       PrfWriteProfileData(fmprof, FM3Str, "ShowFSTypeInTree",
     1430      PrfWriteProfileData(fmprof, appname, "ShowDriveOnly", &fShowDriveOnly, sizeof(BOOL));
     1431      PrfWriteProfileData(fmprof, appname, "ShowFSTypeInTree",
    14321432                          &fShowFSTypeInTree, sizeof(BOOL));
    1433       PrfWriteProfileData(fmprof,       FM3Str, "ShowDriveLabelInTree",
     1433      PrfWriteProfileData(fmprof,       appname, "ShowDriveLabelInTree",
    14341434                          &fShowDriveLabelInTree, sizeof(BOOL));
    14351435      fVTreeOpensWPS = WinQueryButtonCheckstate(hwnd, CFGT_VTREEOPENSWPS);
     
    14561456                          sizeof(BOOL));
    14571457      fDCOpens = WinQueryButtonCheckstate(hwnd, CFGT_DCOPENS);
    1458       PrfWriteProfileData(fmprof, FM3Str, "DoubleClickOpens", &fDCOpens,
     1458      PrfWriteProfileData(fmprof, appname, "DoubleClickOpens", &fDCOpens,
    14591459                          sizeof(BOOL));
    14601460      fShowEnvChanged = (fShowEnv != WinQueryButtonCheckstate(hwnd, CFGT_SHOWENV));
     
    16101610      fNoDead = (test == 1);
    16111611      fNoFinger = (test == 2);
    1612       PrfWriteProfileData(fmprof, FM3Str, "NoDead", &fNoDead, sizeof(BOOL));
     1612      PrfWriteProfileData(fmprof, appname, "NoDead", &fNoDead, sizeof(BOOL));
    16131613      PrfWriteProfileData(fmprof,
    1614                           FM3Str, "NoFinger", &fNoFinger, sizeof(BOOL));
     1614                          appname, "NoFinger", &fNoFinger, sizeof(BOOL));
    16151615      WinDestroyPointer(hptrFinger);
    16161616      if (!fNoDead)
     
    16251625    fCustomFileDlg = WinQueryButtonCheckstate(hwnd, CFGG_CUSTOMFILEDLG);
    16261626    PrfWriteProfileData(fmprof,
    1627                         FM3Str,
     1627                        appname,
    16281628                        "CustomFileDlg", &fCustomFileDlg, sizeof(BOOL));
    16291629    fDullMin = WinQueryButtonCheckstate(hwnd, CFGG_BORING);
    16301630    PrfWriteProfileData(fmprof,
    1631                         FM3Str, "DullDatabar", &fDullMin, sizeof(BOOL));
     1631                        appname, "DullDatabar", &fDullMin, sizeof(BOOL));
    16321632    fConfirmDelete = WinQueryButtonCheckstate(hwnd, CFGG_CONFIRMDELETE);
    16331633    PrfWriteProfileData(fmprof,
     
    16561656                        &fDefaultDeletePerm, sizeof(BOOL));
    16571657    fFM2Deletes = WinQueryButtonCheckstate(hwnd, CFGG_FM2DELETES);
    1658     PrfWriteProfileData(fmprof, FM3Str, "FM2Deletes",
     1658    PrfWriteProfileData(fmprof, appname, "FM2Deletes",
    16591659                        &fFM2Deletes, sizeof(BOOL));
    16601660    fTrashCan = WinQueryButtonCheckstate(hwnd, CFGG_TRASHCAN);
    1661     PrfWriteProfileData(fmprof, FM3Str, "TrashCan",
     1661    PrfWriteProfileData(fmprof, appname, "TrashCan",
    16621662                        &fTrashCan, sizeof(BOOL));
    16631663    fConfirmTarget = WinQueryButtonCheckstate(hwnd, CFGG_CONFIRMTARGET);
     
    19171917                        (PVOID) & ulCnrType, sizeof(BOOL));
    19181918    fMinOnOpen = WinQueryButtonCheckstate(hwnd, CFGD_MINONOPEN);
    1919     PrfWriteProfileData(fmprof, FM3Str, "MinDirOnOpen", &fMinOnOpen,
     1919    PrfWriteProfileData(fmprof, appname, "MinDirOnOpen", &fMinOnOpen,
    19201920                        sizeof(BOOL));
    19211921    fLeaveTree = WinQueryButtonCheckstate(hwnd, CFGD_LEAVETREE);
     
    19321932                        sizeof(BOOL));
    19331933    fLookInDir = WinQueryButtonCheckstate(hwnd, CFGD_LOOKINDIR);
    1934     PrfWriteProfileData(fmprof, FM3Str, "LookInDir", (PVOID) & fLookInDir,
     1934    PrfWriteProfileData(fmprof, appname, "LookInDir", (PVOID) & fLookInDir,
    19351935                        sizeof(BOOL));
    19361936    fUnHilite = WinQueryButtonCheckstate(hwnd, CFGD_UNHILITE);
     
    21612161    fDataMin = WinQueryButtonCheckstate(hwnd, CFGM_DATAMIN);
    21622162    PrfWriteProfileData(fmprof,
    2163                         FM3Str, "DataMin", (PVOID) & fDataMin, sizeof(BOOL));
     2163                        appname, "DataMin", (PVOID) & fDataMin, sizeof(BOOL));
    21642164    fTileBackwards = WinQueryButtonCheckstate(hwnd, CFGM_TILEBACKWARDS);
    21652165    PrfWriteProfileData(fmprof,
     
    21692169    fNoTreeGap = WinQueryButtonCheckstate(hwnd, CFGM_NOTREEGAP);
    21702170    PrfWriteProfileData(fmprof,
    2171                         FM3Str,
     2171                        appname,
    21722172                        "NoTreeGap", (PVOID) & fNoTreeGap, sizeof(BOOL));
    21732173    fBlueLED = WinQueryButtonCheckstate(hwnd, CFGM_BLUELED);
     
    21932193        fSeparateParms = dummy;
    21942194        PrfWriteProfileData(fmprof,
    2195                             FM3Str,
     2195                            appname,
    21962196                            "SeparateParms",
    21972197                            (PVOID) & fSeparateParms, sizeof(BOOL));
     
    30573057                            "CollectorflWindowAttr",
    30583058                            &flWindowAttr, sizeof(ULONG));
    3059         //fixme to allow user to change presparams 1-10-09 GKY
    3060         PrfWriteProfileData(fmprof,
     3059        //This is set to maximize the info seen in the container GKY
     3060        PrfWriteProfileData(fmprof,
    30613061                            appname,
    30623062                            "Collector.Fontnamesize",
     
    31533153      fForceUpper = FALSE;
    31543154      fForceLower = FALSE;
     3155      fEjectRemovableScan = FALSE;
     3156      fRScanLocal = FALSE;
    31553157      dsDirCnrDefault.detailslongname = FALSE;
    31563158      dsDirCnrDefault.detailssubject = FALSE;
     
    32743276
    32753277    case CFG9_DEFAULT:
    3276       fSwitchTree = FALSE;
     3278      fSwitchTree = TRUE;
    32773279      fSwitchTreeOnFocus = FALSE;
    3278       fSwitchTreeExpand = FALSE;
    3279       fCollapseFirst = FALSE;
     3280      fSwitchTreeExpand = TRUE;
     3281      fCollapseFirst = TRUE;
    32803282      fSelectedAlways = FALSE;
    32813283      fTileBackwards = FALSE;
     
    32993301      fNoIconsDirs = FALSE;
    33003302      fFolderAfterExtract = FALSE;
    3301       fVerify = TRUE;
    3302       DosSetVerify(TRUE);
     3303      fVerify = FALSE;
     3304      DosSetVerify(fVerify);
    33033305      fNoSearch = TRUE;
    33043306      fForceUpper = FALSE;
    3305       fForceLower = TRUE;
     3307      fForceLower = FALSE;
    33063308      fArcStuffVisible = TRUE;
    33073309      fVTreeOpensWPS = FALSE;
    3308       fRemoteBug = TRUE;
     3310      fRemoteBug = FALSE;
    33093311      fDragndropDlg = TRUE;
    33103312      fMinOnOpen = FALSE;
     
    33173319      fSaveState = TRUE;
    33183320      fStartMinimized = FALSE;
    3319       fStartMaximized = FALSE;
    33203321      fDataMin = TRUE;
    33213322      ulCnrType = CCS_EXTENDSEL;
    33223323      fNoTreeGap = FALSE;
     3324      MaxComLineStrg = MAXCOMLINESTRGDEFAULT;
     3325      fGuessType = TRUE;
     3326      fUseNewViewer = TRUE;
     3327      fDataToFore = TRUE;
     3328      fDataShowDrives = TRUE;
     3329      fKeepCmdLine = TRUE;
     3330      fCustomFileDlg = TRUE;
     3331      fToolbarHelp = TRUE;
     3332      fOtherHelp = TRUE;
     3333      fDrivebarHelp = TRUE;
     3334      fShowTarget = TRUE;
     3335      fRScanLocal = TRUE;
     3336      fRScanRemote = FALSE;
     3337      fRScanVirtual = FALSE;
     3338      fRScanSlow = FALSE;
     3339      fRScanNoWrite = FALSE;
     3340      fEjectRemovableScan = TRUE;
     3341      fEjectCDScan = FALSE;
     3342      fEjectFlpyScan = FALSE;
     3343      fShowDriveOnly = TRUE;
     3344      fShowFSTypeInTree = FALSE;
     3345      fShowDriveLabelInTree = FALSE;
     3346      fAlertBeepOff = FALSE;
     3347      fErrorBeepOff = FALSE;
     3348      fTrashCan = FALSE;
    33233349      {
    33243350        ULONG flWindowAttr;
     
    33423368      dsDirCnrDefault.detailscrtime = FALSE;
    33433369      dsDirCnrDefault.detailsattr = TRUE;
     3370      dsDirCnrDefault.fSubjectInLeftPane = FALSE;
     3371      dsDirCnrDefault.fSubjectLengthMax = TRUE;
     3372      dsDirCnrDefault.SubjectDisplayWidth = 0;
    33443373      sortFlags = SORT_FILENAME | SORT_DIRSFIRST;
    33453374      CollectorsortFlags = SORT_FILENAME | SORT_DIRSFIRST;
     3375      WriteDetailsSwitches(PCSZ_COLLECTOR, &dsDirCnrDefault, FALSE);
    33463376      if (hwndMain) {
    33473377
     
    33543384                          (WinQuerySysValue(HWND_DESKTOP, SV_CYICON) * 2),
    33553385                          SWP_MOVE | SWP_SIZE);
    3356         }
     3386        }
     3387        if (!fToolbar) {
     3388          WinSendMsg(hwndMain, WM_COMMAND,
     3389                     MPFROM2SHORT(IDM_TOOLBAR, 0), MPVOID);
     3390          fToolbar = TRUE;
     3391        }
     3392        if (!fDrivebar) {
     3393          WinSendMsg(hwndMain, WM_COMMAND,
     3394                     MPFROM2SHORT(IDM_DRIVEBAR, 0), MPVOID);
     3395          fDrivebar = TRUE;
     3396        }
     3397        if (!fMoreButtons) {
     3398          WinSendMsg(hwndMain, WM_COMMAND, MPFROM2SHORT(IDM_MOREBUTTONS, 0),
     3399                     MPVOID);
     3400          fMoreButtons = TRUE;
     3401        }
     3402        if (!fUserComboBox) {
     3403          WinSendMsg(hwndMain, WM_COMMAND,
     3404                     MPFROM2SHORT(IDM_USERLIST, 0), MPVOID);
     3405          fUserComboBox = TRUE;
     3406        }
    33573407      }
    33583408      if (hwndTree) {
     
    35403590      }
    35413591      return 0;
     3592
     3593    case CFG9_GREGG:
     3594      fSwitchTree = TRUE;
     3595      fSwitchTreeOnFocus = FALSE;
     3596      fSwitchTreeExpand = TRUE;
     3597      fCollapseFirst = TRUE;
     3598      fSelectedAlways = FALSE;
     3599      fTileBackwards = FALSE;
     3600      fExternalViewer = TRUE;
     3601      fExternalArcboxes = TRUE;
     3602      fExternalCollector = TRUE;
     3603      fExternalINIs = TRUE;
     3604      fCopyDefault = FALSE;
     3605      fFollowTree = FALSE;
     3606      fLoadSubject = TRUE;
     3607      fLoadLongnames = TRUE;
     3608      fDontMoveMouse = FALSE;
     3609      fUnHilite = TRUE;
     3610      fUserListSwitches = FALSE;
     3611      fDCOpens = FALSE;
     3612      fLinkSetsIcon = FALSE;
     3613      fConfirmDelete = TRUE;
     3614      fSyncUpdates = FALSE;
     3615      fRealIdle = TRUE;
     3616      fNoIconsFiles = FALSE;
     3617      fNoIconsDirs = FALSE;
     3618      fFolderAfterExtract = FALSE;
     3619      fVerify = FALSE;
     3620      DosSetVerify(fVerify);
     3621      fNoSearch = FALSE;
     3622      fForceUpper = FALSE;
     3623      fForceLower = FALSE;
     3624      fArcStuffVisible = TRUE;
     3625      fVTreeOpensWPS = FALSE;
     3626      fRemoteBug = FALSE;
     3627      fDragndropDlg = TRUE;
     3628      fMinOnOpen = FALSE;
     3629      fQuickArcFind = TRUE;
     3630      fNoRemovableScan = FALSE;
     3631      FilesToGet = FILESTOGET_MAX;
     3632      fFreeTree = FALSE;
     3633      fSplitStatus = TRUE;
     3634      fAutoTile = TRUE;
     3635      fSaveState = TRUE;
     3636      fStartMinimized = FALSE;
     3637      fDataMin = TRUE;
     3638      ulCnrType = CCS_EXTENDSEL;
     3639      fNoTreeGap = TRUE;
     3640      MaxComLineStrg = MAXCOMLINESTRGDEFAULT;
     3641      fGuessType = TRUE;
     3642      fUseNewViewer = TRUE;
     3643      fDataToFore = TRUE;
     3644      fDataShowDrives = TRUE;
     3645      fKeepCmdLine = TRUE;
     3646      fCustomFileDlg = TRUE;
     3647      fToolbarHelp = TRUE;
     3648      fOtherHelp = TRUE;
     3649      fDrivebarHelp = TRUE;
     3650      fShowTarget = TRUE;
     3651      fRScanLocal = TRUE;
     3652      fRScanRemote = TRUE;
     3653      fRScanVirtual = FALSE;
     3654      fRScanSlow = FALSE;
     3655      fRScanNoWrite = FALSE;
     3656      fEjectRemovableScan = TRUE;
     3657      fEjectCDScan = TRUE;
     3658      fEjectFlpyScan = FALSE;
     3659      fShowDriveOnly = FALSE;
     3660      fShowFSTypeInTree = FALSE;
     3661      fShowDriveLabelInTree = TRUE;
     3662      fAlertBeepOff = TRUE;
     3663      fErrorBeepOff = FALSE;
     3664      fTrashCan = TRUE;
     3665      {
     3666        ULONG flWindowAttr;
     3667
     3668        flWindowAttr = (CV_DETAIL | CV_MINI | CA_DETAILSVIEWTITLES);
     3669        PrfWriteProfileData(fmprof, appname, "DirflWindowAttr",
     3670                            &flWindowAttr, sizeof(ULONG));
     3671        PrfWriteProfileData(fmprof, appname, "CollectorflWindowAttr",
     3672                            &flWindowAttr, sizeof(ULONG));
     3673      }
     3674      dsDirCnrDefault.detailslongname = FALSE;
     3675      dsDirCnrDefault.detailssubject = FALSE;
     3676      dsDirCnrDefault.detailsea = TRUE;
     3677      dsDirCnrDefault.detailssize = TRUE;
     3678      dsDirCnrDefault.detailsicon = TRUE;
     3679      dsDirCnrDefault.detailslwdate = TRUE;
     3680      dsDirCnrDefault.detailslwtime = TRUE;
     3681      dsDirCnrDefault.detailsladate = FALSE;
     3682      dsDirCnrDefault.detailslatime = FALSE;
     3683      dsDirCnrDefault.detailscrdate = FALSE;
     3684      dsDirCnrDefault.detailscrtime = FALSE;
     3685      dsDirCnrDefault.detailsattr = TRUE;
     3686      dsDirCnrDefault.fSubjectInLeftPane = TRUE;
     3687      dsDirCnrDefault.fSubjectLengthMax = TRUE;
     3688      dsDirCnrDefault.SubjectDisplayWidth = 0;
     3689      sortFlags = SORT_FILENAME | SORT_DIRSFIRST;
     3690      CollectorsortFlags = SORT_FILENAME | SORT_DIRSFIRST;
     3691      WriteDetailsSwitches(PCSZ_COLLECTOR, &dsDirCnrDefault, FALSE);
     3692      if (hwndMain) {
     3693
     3694        SWP swp;
     3695
     3696        if (WinQueryWindowPos(hwndMain, &swp)) {
     3697          WinSetWindowPos(hwndTree, HWND_TOP, 0, 0,
     3698                          swp.cx / 5,
     3699                          swp.cy -
     3700                          (WinQuerySysValue(HWND_DESKTOP, SV_CYICON) * 2),
     3701                          SWP_MOVE | SWP_SIZE);
     3702        }
     3703        if (!fToolbar) {
     3704          WinSendMsg(hwndMain, WM_COMMAND,
     3705                     MPFROM2SHORT(IDM_TOOLBAR, 0), MPVOID);
     3706          fToolbar = TRUE;
     3707        }
     3708        if (!fDrivebar) {
     3709          WinSendMsg(hwndMain, WM_COMMAND,
     3710                     MPFROM2SHORT(IDM_DRIVEBAR, 0), MPVOID);
     3711          fDrivebar = TRUE;
     3712        }
     3713        if (!fMoreButtons) {
     3714          WinSendMsg(hwndMain, WM_COMMAND, MPFROM2SHORT(IDM_MOREBUTTONS, 0),
     3715                     MPVOID);
     3716          fMoreButtons = TRUE;
     3717        }
     3718        if (!fUserComboBox) {
     3719          WinSendMsg(hwndMain, WM_COMMAND,
     3720                     MPFROM2SHORT(IDM_USERLIST, 0), MPVOID);
     3721          fUserComboBox = TRUE;
     3722        }
     3723      }
     3724      if (hwndTree) {
     3725
     3726        CNRINFO cnri;
     3727        ULONG flWindowAttr = (CV_TREE | CV_TEXT |
     3728                              CV_FLOW | CA_TREELINE | CV_MINI);
     3729
     3730        memset(&cnri, 0, sizeof(cnri));
     3731        cnri.cb = sizeof(cnri);
     3732        WinSendMsg(WinWindowFromID
     3733                   (WinWindowFromID(hwndTree, FID_CLIENT), TREE_CNR),
     3734                   CM_QUERYCNRINFO, MPFROMP(&cnri), MPFROMLONG(sizeof(cnri)));
     3735        cnri.flWindowAttr = flWindowAttr;
     3736        WinSendMsg(WinWindowFromID
     3737                   (WinWindowFromID(hwndTree, FID_CLIENT), TREE_CNR),
     3738                   CM_SETCNRINFO, MPFROMP(&cnri),
     3739                   MPFROMLONG(CMA_FLWINDOWATTR));
     3740      }
     3741      break;
    35423742
    35433743    case DID_CANCEL:
Note: See TracChangeset for help on using the changeset viewer.