Changeset 1670


Ignore:
Timestamp:
Aug 13, 2012, 3:33:25 AM (13 years ago)
Author:
Gregg Young
Message:

Add ability to change and save PresParam to compare dialog (Ticket 443) Fix loading of a list file in the right compare container (Ticket 489) Allow for selection of include subdirectories or a list file on initial startup of compare dirs (Ticket 145)

Location:
trunk/dll
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/dll/comp.c

    r1655 r1670  
    7878  12 Jun 11 GKY Added SleepIfNeeded in the container fill loop
    7979  02 Jan 12 GKY Added pszFmtFileSize to container info to fix loss of file sizes on move and copy.
     80  12 Aug 12 GKY Add ability to change and save PresParam
     81  12 Aug 12 GKY Fix loading of a list file in the right compare container
     82  12 Aug 12 GKY Allow for selection of include subdirectories or a list file on initial startup of compare dirs
    8083
    8184***********************************************************************/
     
    16891692          } // if have rightdir
    16901693          fclose(fp);
    1691         }
     1694        }
     1695        FillDirList(cmp->rightdir, lenr, cmp->includesubdirs,
     1696                    &filesr, &cmp->cmp->totalright, &numallocr);
    16921697      } // if snapshot file
    16931698
     
    22202225      SetCnrCols(GetHwndLeft(hwnd), TRUE);
    22212226      SetCnrCols(GetHwndRight(hwnd), TRUE);
     2227      if (cmp->listfile) {
     2228        CHAR fullname[CCHMAXPATH];
     2229
     2230        strcpy(fullname, PCSZ_STARDOTPMD);
     2231        if (insert_filename(HWND_DESKTOP, fullname, TRUE, FALSE) &&
     2232            *fullname && !strchr(fullname, '*') && !strchr(fullname, '?'))
     2233          strcpy(cmp->rightlist, fullname);
     2234      }
    22222235      WinSendMsg(hwnd, UM_SETUP, MPVOID, MPVOID);
    22232236      WinSendMsg(hwnd, UM_SETDIR, MPVOID, MPVOID);
    22242237      PostMsg(hwnd, UM_STRETCH, MPVOID, MPVOID);
    22252238      {
    2226         USHORT ids[] = { COMP_LEFTDIR, COMP_RIGHTDIR, COMP_TOTALLEFT,
    2227                          COMP_TOTALRIGHT, COMP_SELLEFT, COMP_SELRIGHT,
    2228                          0
    2229                        };
     2239        USHORT ids[] = {COMP_FRAME, COMP_LEFTDIR, COMP_RIGHTDIR, COMP_COLLECT,
     2240                        COMP_VIEW, COMP_NOTE, COMP_TOTALLEFT, COMP_SELLEFT, COMP_TOTALRIGHT,
     2241                        COMP_SELRIGHT, COMP_CNRMENU, COMP_DIRMENU, COMP_MENU,
     2242                        COMP_INCLUDESUBDIRS, COMP_SETDIRS, COMP_COPYLEFT, COMP_MOVELEFT,
     2243                        COMP_DELETELEFT, COMP_COPYRIGHT, COMP_MOVERIGHT, COMP_DELETERIGHT,
     2244                        COMP_TOTALLEFTHDR, COMP_SELLEFTHDR, COMP_TOTALRIGHTHDR,
     2245                        COMP_SELRIGHTHDR, COMP_FILTER, COMP_HIDENOTSELECTED, 0};
    22302246        UINT x;
     2247        CHAR s[24];
     2248
    22312249        for (x = 0; ids[x]; x++) {
    2232           //fixme to allow user to change presparams 1-10-09 GKY
    2233           SetPresParams(WinWindowFromID(hwnd, ids[x]),
     2250          //fixme to allow user to change presparams 1-10-09 GKY
     2251          sprintf(s, "CompDir%i", ids[x]);
     2252          RestorePresParams(WinWindowFromID(hwnd, ids[x]), s);
     2253          /*SetPresParams(WinWindowFromID(hwnd, ids[x]),
    22342254                        &RGBGREY,
    2235                         &RGBBLACK, &RGBBLACK, FNT_8HELVETICA);
     2255                        &RGBBLACK, &RGBBLACK, FNT_8HELVETICA);*/
    22362256        }
    22372257      }
     
    26802700      COMPARE *forthread;
    26812701      CNRINFO cnri;
     2702      if (cmp->includesubdirs)
     2703        WinCheckButton(hwnd, COMP_INCLUDESUBDIRS, TRUE);
    26822704      cmp->includesubdirs = WinQueryButtonCheckstate(hwnd,
    2683                                                      COMP_INCLUDESUBDIRS);
     2705                                                     COMP_INCLUDESUBDIRS);
    26842706      memset(&cnri, 0, sizeof(CNRINFO));
    26852707      cnri.cb = sizeof(CNRINFO);
     
    27192741          WinSetDlgItemText(hwnd, COMP_NOTE,
    27202742                            (CHAR *) GetPString(IDS_COMPHOLDREADDISKTEXT));
    2721           SetButtonEnables(cmp, FALSE);
     2743          SetButtonEnables(cmp, FALSE);
     2744          cmp->includesubdirs = FALSE;
    27222745          cmp->selleft = 0;
    27232746          cmp->selright = 0;
     
    30533076        wa.size = sizeof(wa);
    30543077        strcpy(wa.szCurrentPath1, cmp->leftdir);
    3055         strcpy(wa.szCurrentPath2, cmp->rightdir);
     3078        strcpy(wa.szCurrentPath2, cmp->rightdir);
     3079        wa.includesubdirs = WinQueryButtonCheckstate(hwnd,
     3080                                                     COMP_INCLUDESUBDIRS);
    30563081        if (WinDlgBox(HWND_DESKTOP,
    30573082                      hwnd,
     
    30633088            !IsFile(wa.szCurrentPath2)) {
    30643089          strcpy(cmp->leftdir, wa.szCurrentPath1);
    3065           strcpy(cmp->rightdir, wa.szCurrentPath2);
    3066           *cmp->rightlist = 0;
     3090          strcpy(cmp->rightdir, wa.szCurrentPath2);
     3091          cmp->includesubdirs = wa.includesubdirs;
     3092          if (!cmp->includesubdirs)
     3093            WinCheckButton(hwnd, COMP_INCLUDESUBDIRS, FALSE);
     3094          cmp->listfile = wa.listfile;
     3095          if (cmp->listfile) {
     3096            CHAR fullname[CCHMAXPATH];
     3097   
     3098            strcpy(fullname, PCSZ_STARDOTPMD);
     3099            if (insert_filename(HWND_DESKTOP, fullname, TRUE, FALSE) &&
     3100                *fullname && !strchr(fullname, '*') && !strchr(fullname, '?'))
     3101              strcpy(cmp->rightlist, fullname);
     3102          }
     3103          else
     3104            *cmp->rightlist = 0;
    30673105          PostMsg(hwnd, UM_SETUP, MPVOID, MPVOID);
    30683106          PostMsg(hwnd, UM_SETDIR, MPVOID, MPVOID);
     
    31273165        SWP swp;
    31283166        ULONG size = sizeof(SWP);
    3129 
     3167        USHORT ids[] = {COMP_FRAME, COMP_LEFTDIR, COMP_RIGHTDIR, COMP_COLLECT,
     3168                        COMP_VIEW, COMP_NOTE, COMP_TOTALLEFT, COMP_SELLEFT, COMP_TOTALRIGHT,
     3169                        COMP_SELRIGHT, COMP_CNRMENU, COMP_DIRMENU, COMP_MENU,
     3170                        COMP_INCLUDESUBDIRS, COMP_SETDIRS, COMP_COPYLEFT, COMP_MOVELEFT,
     3171                        COMP_DELETELEFT, COMP_COPYRIGHT, COMP_MOVERIGHT, COMP_DELETERIGHT,
     3172                        COMP_TOTALLEFTHDR, COMP_SELLEFTHDR, COMP_TOTALRIGHTHDR,
     3173                        COMP_SELRIGHTHDR, COMP_FILTER, COMP_HIDENOTSELECTED, 0};
     3174        UINT x;
     3175        CHAR s[24];
    31303176        WinQueryWindowPos(hwnd, &swp);
    31313177        PrfWriteProfileData(fmprof, FM3Str, "CompDir.Position", (PVOID) &swp,
    3132                             size);
     3178                            size);
     3179        for (x = 0; ids[x]; x++) {
     3180          //fixme to allow user to change presparams 1-10-09 GKY
     3181          sprintf(s, "CompDir%i", ids[x]);
     3182          SavePresParams(WinWindowFromID(hwnd, ids[x]), s);
     3183        }
    31333184      }
    31343185      WinDismissDlg(hwnd, 0);
  • TabularUnified trunk/dll/comp.h

    r1469 r1670  
    1212  18 Jan 08 SHL Sync with count update mods
    1313  27 Sep 09 SHL Support AND'ed selections
     14  12 Aug 12 GKY Allow for selection of include subdirectories or a list file on initial startup of compare dirs
    1415
    1516***********************************************************************/
     
    5556  BOOL stop;                            // Requests thread stop
    5657  BOOL includesubdirs;
     58  BOOL listfile;
    5759  INT action;                           // IDM_...
    5860  UINT selleft;                         // # selected
  • TabularUnified trunk/dll/fm3dlg.h

    r1664 r1670  
    4242  04 Aug 12 GKY Changes to allow copy and move over readonly files with a warning dialog; also added a warning dialog
    4343                for delete of readonly files
     44  12 Aug 12 GKY Allow for selection of include subdirectories or a list file on initial startup of compare dirs
    4445
    4546***********************************************************************/
     
    195196#define WALK2_FRAME                                                                             20850
    196197#define WALK2_PATH                                                                              20851
    197 #define WALK2_DRIVELIST                                                                 20852
    198 #define WALK2_DIRLIST                                                                   20853
     198#define WALK2_DRIVELIST                                                                         20852
     199#define WALK2_DIRLIST                                                                           20853
     200#define WALK2_INCLUDESUBDIRS                                                                    20854
     201#define WALK2_LOADLISTFILE                                                                      20855
    199202
    200203#define AD_FRAME                                                                                        20900
  • TabularUnified trunk/dll/fm3res.dlg

    r1664 r1670  
    5454  04 Aug 12 GKY Changes to allow copy and move over readonly files with a warning dialog; also added a warning dialog
    5555                for delete of readonly files
     56  12 Aug 12 GKY Allow for selection of include subdirectories or a list file on initial startup of compare dirs
    5657 
    5758***********************************************************************/
     
    22502251        PUSHBUTTON      "~Help", IDM_HELP, 147, 4, 40, 14, BS_NOPOINTERFOCUS
    22512252        PUSHBUTTON      "Cancel", DID_CANCEL, 288, 4, 40, 14
     2253        AUTOCHECKBOX    "~Include subdirs", WALK2_INCLUDESUBDIRS, 60, 4, 60,
     2254                        8, BS_NOPOINTERFOCUS | WS_GROUP
     2255        AUTOCHECKBOX    "~Load list file", WALK2_LOADLISTFILE, 199, 4, 60,
     2256                        8, BS_NOPOINTERFOCUS | WS_GROUP               
    22522257    END
    22532258END
  • TabularUnified trunk/dll/mainwnd.c

    r1667 r1670  
    112112  03 Oct 11 SHL Minor code cleanup
    113113  05 Aug 12 GKY Make the Target Directory (DriveBar) a drop target.
     114  12 Aug 12 GKY Allow for selection of include subdirectories or a list file on initial startup of compare dirs
    114115
    115116***********************************************************************/
     
    47854786            cmp->size = sizeof(COMPARE);
    47864787            strcpy(cmp->leftdir, wa.szCurrentPath1);
    4787             strcpy(cmp->rightdir, wa.szCurrentPath2);
     4788            strcpy(cmp->rightdir, wa.szCurrentPath2);
     4789            cmp->listfile = wa.listfile;
     4790            cmp->includesubdirs = wa.includesubdirs;
    47884791            cmp->hwndParent = hwnd;
    47894792            cmp->dcd.hwndParent = hwnd;
  • TabularUnified trunk/dll/mainwnd2.c

    r1549 r1670  
    4141  11 Apr 10 GKY Fix drive tree rescan failure and program hang caused by event sem
    4242                never being posted
     43  12 Aug 12 GKY Allow for selection of include subdirectories or a list file on initial startup of compare dirs
    4344
    4445***********************************************************************/
     
    554555            strcpy(cmp->leftdir, wa.szCurrentPath1);
    555556            strcpy(cmp->rightdir, wa.szCurrentPath2);
     557            cmp->listfile = wa.listfile;
     558            cmp->includesubdirs = wa.includesubdirs;
    556559            cmp->hwndParent = hwnd;
    557560            cmp->dcd.hwndParent = hwnd;
  • TabularUnified trunk/dll/walkem.c

    r1544 r1670  
    3737  06 Oct 09 SHL Ctrl-select selects Walk Dialog listbox entry, but suppresses action
    3838  17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *.
     39  12 Aug 12 GKY Allow for selection of include subdirectories or a list file on initial startup of compare dirs
    3940
    4041***********************************************************************/
     
    14361437                    WinWindowFromID(hwnd, WALK2_DRIVELIST),
    14371438                    WinWindowFromID(hwnd, WALK2_DIRLIST),
    1438                     wa->szCurrentPath2, FALSE);
     1439                    wa->szCurrentPath2, FALSE);
     1440    WinEnableWindow(WinWindowFromID(hwnd, WALK2_INCLUDESUBDIRS), TRUE);
     1441    WinEnableWindow(WinWindowFromID(hwnd, WALK2_LOADLISTFILE), TRUE);
     1442    if (wa->includesubdirs)
     1443      WinCheckButton(hwnd, WALK2_INCLUDESUBDIRS, TRUE);
    14391444    if (!PostMsg(hwnd, UM_SETUP4, MPVOID, MPVOID))
    14401445      okay = TRUE;
     
    15081513        WinSendDlgItemMsg(hwnd, SHORT1FROMMP(mp1), LM_QUERYITEMTEXT,
    15091514                          MPFROM2SHORT(sSelect, CCHMAXPATH),
    1510                           MPFROMP(szBuffer));
     1515                          MPFROMP(szBuffer));
    15111516    }
    15121517    switch (SHORT1FROMMP(mp1)) {
     
    16811686    }
    16821687    WinSetDlgItemText(hwnd, WALK2_PATH, wa->szCurrentPath2);
     1688    wa->includesubdirs = WinQueryButtonCheckstate(hwnd, WALK2_INCLUDESUBDIRS);
     1689    wa->listfile = WinQueryButtonCheckstate(hwnd, WALK2_LOADLISTFILE);
    16831690    switch (SHORT1FROMMP(mp1)) {
    16841691    case DID_OK:
  • TabularUnified trunk/dll/walkem.h

    r1394 r1670  
    1010
    1111  17 Jul 08 SHL Baseline
     12  12 Aug 12 GKY Allow for selection of include subdirectories or a list file on initial startup of compare dirs
    1213
    1314***********************************************************************/
     
    2627  CHAR szCurrentPath1[CCHMAXPATH];
    2728  CHAR szCurrentPath2[CCHMAXPATH];
     29  BOOL includesubdirs;
     30  BOOL listfile;
     31
    2832}
    2933WALK2;
Note: See TracChangeset for help on using the changeset viewer.