Changeset 1083

Show
Ignore:
Timestamp:
07/20/08 17:31:07 (6 weeks ago)
Author:
jbs
Message:

Ticket 114: Support user-selectable env. strings in Tree container.

Location:
trunk/dll
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • trunk/dll/filldir.c

    r1078 r1083  
    4343  07 Jul 08 SHL Use NULL rather than NullStr in FreeCnrItemData 
    4444  16 JUL 08 GKY Use TMP directory for temp files 
     45  20 Jul 08 JBS Ticket 114: Support user-selectable env. strings in Tree container. 
    4546 
    4647***********************************************************************/ 
     
    6566#include "misc.h"                       // GetTidForWindow 
    6667#include "fortify.h"                    // 06 May 08 SHL 
     68#include "notebook.h"                   // INI file fields 
    6769#include "fm3dll.h" 
    6870 
     
    13841386        char *p, *pp; 
    13851387 
    1386         p = GetPString(IDS_ENVVARNAMES); 
     1388        p = pszTreeEnvVarList; 
    13871389        while (*p == ' ') 
    13881390          p++; 
  • trunk/dll/fm3res.dlg

    r1080 r1083  
    3434  29 Feb 08 GKY Add presparams & update appearence of "Sizes" dialog 
    3535  19 Jul 08 JBS Ticket 197: Support accelerator keys in setting dialogs. 
     36  20 Jul 08 JBS Ticket 114: Support user-selectable env. strings in Tree container. 
    3637 
    3738***********************************************************************/ 
     
    19461947        AUTOCHECKBOX    "Show ~env. vars in Tree", CFGT_SHOWENV, 4, 32, 132, 
    19471948                        10 
     1949        ENTRYFIELD      "", CFGT_ENVVARLIST, 120, 32, 196, 8, ES_MARGIN | ES_AUTOSCROLL 
    19481950        PUSHBUTTON      "~Help", IDM_HELP, 8, 4, 40, 14, BS_NOPOINTERFOCUS | 
    19491951                        WS_GROUP 
  • trunk/dll/init.c

    r1082 r1083  
    5252  17 Jul 08 SHL Reduce code bulk in fUseTmp setup 
    5353  19 Jul 08 GKY Use pFM2SaveDirectory, MakeTempName and move temp files to TMP subdirectory if (TMP). 
     54  20 Jul 08 JBS Ticket 114: Support user-selectable env. strings in Tree container. 
    5455 
    5556***********************************************************************/ 
     
    10851086  if (!mailrun) 
    10861087    return 0; //already complained 
     1088  pszTreeEnvVarList = xmallocz(MaxComLineStrg, pszSrcFile, __LINE__); 
     1089  if (!pszTreeEnvVarList) 
     1090    return 0; //already complained 
    10871091  size = sizeof(BOOL); 
    10881092  PrfQueryProfileData(fmprof, appname, "ShowTarget", &fShowTarget, &size); 
     
    11761180  size = sizeof(BOOL); 
    11771181  PrfQueryProfileData(fmprof, appname, "ShowEnv", &fShowEnv, &size); 
     1182  size = MaxComLineStrg; 
     1183  PrfQueryProfileData(fmprof, appname, "TreeEnvVarList", pszTreeEnvVarList, &size); 
    11781184  size = sizeof(BOOL); 
    11791185  PrfQueryProfileData(fmprof, appname, "LeaveTree", &fLeaveTree, &size); 
  • trunk/dll/ipf/notebook.ipf

    r1041 r1083  
    1313.* 13 Aug 07 SHL Tweak scanning page 
    1414.* 06 Jul 08 GKY Update delete/undelete to include the option of using the XWP trashcan 
     15.* 20 Jul 08 JBS Ticket 114: Support user-selectable env. strings in Tree container. 
    1516.* 
    1617.*********************************************************************** 
     
    344345The :hp6.Show env. vars in Tree:ehp6. toggle determines whether FM/2 
    345346shows a few environment variable lists (like PATH, DPATH and LIBPATH) 
    346 in the Drive Tree. 
     347in the Drive Tree. Use the entry field to specify a blank-separated 
     348list of the desired environment variables. 
    347349 
    348350 
  • trunk/dll/notebook.c

    r1080 r1083  
    3737                DIRCNRDATA struct) into a new struct: DETAILS_SETTINGS. 
    3838  19 Jul 08 JBS Ticket 197: Support accelerator keys in setting dialogs. 
     39  20 Jul 08 JBS Ticket 114: Support user-selectable env. strings in Tree container. 
    3940 
    4041***********************************************************************/ 
     
    11691170  switch (msg) { 
    11701171  case WM_INITDLG: 
     1172    WinSendDlgItemMsg(hwnd, CFGT_ENVVARLIST, EM_SETTEXTLIMIT, 
     1173                      MPFROM2SHORT(CCHMAXPATH, 0), MPVOID); 
    11711174    PostMsg(hwnd, UM_UNDO, MPVOID, MPVOID); 
    11721175    break; 
     
    11821185    WinCheckButton(hwnd, CFGT_SWITCHTREEEXPAND, fSwitchTreeExpand); 
    11831186    WinCheckButton(hwnd, CFGT_SHOWENV, fShowEnv); 
     1187    WinSetDlgItemText(hwnd, CFGT_ENVVARLIST, pszTreeEnvVarList); 
    11841188    return 0; 
    11851189 
     
    12621266    fShowEnv = WinQueryButtonCheckstate(hwnd, CFGT_SHOWENV); 
    12631267    PrfWriteProfileData(fmprof, appname, "ShowEnv", &fShowEnv, sizeof(BOOL)); 
     1268    { 
     1269      char * pszTemp = xmalloc(MaxComLineStrg, pszSrcFile, __LINE__); 
     1270      if (pszTemp) 
     1271      { 
     1272        WinQueryDlgItemText(hwnd, CFGT_ENVVARLIST, MaxComLineStrg, pszTemp); 
     1273        strupr(pszTemp); 
     1274        if (strcmp(pszTemp, pszTreeEnvVarList)) 
     1275        { 
     1276          strcpy(pszTreeEnvVarList, pszTemp); 
     1277          PrfWriteProfileString(fmprof, appname, "TreeEnvVarList", pszTreeEnvVarList); 
     1278          if (hwndTree && fShowEnv) { 
     1279            PostMsg(WinWindowFromID 
     1280                    (WinWindowFromID(hwndTree, FID_CLIENT), TREE_CNR), WM_COMMAND, 
     1281                    MPFROM2SHORT(IDM_RESCAN, 0), MPVOID); 
     1282          } 
     1283        } 
     1284        free(pszTemp); 
     1285      } else { 
     1286        // Report error? 
     1287      } 
     1288    } 
    12641289    break; 
    12651290  } 
  • trunk/dll/notebook.h

    r985 r1083  
    1111  14 Feb 08 SHL Refactor from fm3dll.h 
    1212  29 Feb 08 GKY Refactor global command line variables to notebook.h 
     13  20 Jul 08 JBS Ticket 114: Support user-selectable env. strings in Tree container. 
    1314 
    1415***********************************************************************/ 
     
    3738 
    3839DATADEF CHAR *editor, *viewer, *virus, *compare, *binview, *bined, 
    39   *dircompare, *ftprun, *httprun, *mailrun; 
     40  *dircompare, *ftprun, *httprun, *mailrun, *pszTreeEnvVarList; 
    4041DATADEF CHAR ftprundir[CCHMAXPATH], httprundir[CCHMAXPATH], 
    4142  mailrundir[CCHMAXPATH], targetdir[CCHMAXPATH];