Changeset 1482 for trunk/dll/init.c


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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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);
Note: See TracChangeset for help on using the changeset viewer.