Changeset 549 for trunk/dll/grep2.c


Ignore:
Timestamp:
Feb 4, 2007, 4:14:36 AM (19 years ago)
Author:
root
Message:

Support additional file systems types (Gregg)
Reorganize menus (Gregg)
Enhance unzip option controls (Gregg)
Remember search options in Seek and Scan (Gregg)
Allow drive flag editing for not ready drives (Gregg)
Correct bitmap loading defects (Steven)
Update documentation (Gregg)
Add newer, better bitmaps (David)
Update Readme to discuss move to Netlabs (Steve)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/grep2.c

    r524 r549  
    1717  29 Jul 06 SHL Use xfgets
    1818  22 Oct 06 GKY Switch say files on as default so you can tell that seek and scan files is doing something
     19  07 Jan 07 GKY Add remember search flags to seek and scan
    1920
    2021  fixme for more excess locals to be gone
     
    208209  static BOOL changed = FALSE;
    209210  static BOOL findifany = TRUE;
     211  static BOOL gRemember = FALSE;
     212  ULONG size = sizeof(BOOL);
    210213  static UINT newer = 0;
    211214  static UINT older = 0;
     
    257260                      MPFROM2SHORT(0, 8192),
    258261                      MPVOID);
     262          PrfQueryProfileData(fmprof,FM3Str,"RememberFlagsGrep",
     263                    (PVOID)&gRemember,&size);
     264     WinCheckButton(hwnd,GREP_REMEMBERFLAGS,gRemember);
     265          if(gRemember){
     266      PrfQueryProfileData(fmprof,FM3Str,"Grep_Recurse",
     267               (PVOID)&recurse,&size);
     268      PrfQueryProfileData(fmprof,FM3Str,"Grep_Absolute",
     269                (PVOID)&absolute,&size);
     270      PrfQueryProfileData(fmprof,FM3Str,"Grep_Case",
     271                (PVOID)&sensitive,&size);
     272      PrfQueryProfileData(fmprof,FM3Str,"Grep_Sayfiles",
     273                (PVOID)&sayfiles,&size);
     274      PrfQueryProfileData(fmprof,FM3Str,"Grep_Searchfiles",
     275                (PVOID)&searchFiles,&size);
     276      PrfQueryProfileData(fmprof,FM3Str,"Grep_SearchfEAs",
     277                (PVOID)&searchEAs,&size);
     278        }
     279    if(!gRemember){
     280       recurse = TRUE;
     281       sensitive = FALSE;
     282       absolute = FALSE;
     283       sayfiles = TRUE;
     284       searchEAs = TRUE;
     285       searchFiles = TRUE;
     286       }
    259287    WinSetWindowText(hwndMLE, lasttext);
    260288    if (*lasttext)
     
    337365    switch (SHORT1FROMMP(mp1))
    338366    {
     367       case GREP_REMEMBERFLAGS:
     368  {
     369    BOOL gRemember = WinQueryButtonCheckstate(hwnd,GREP_REMEMBERFLAGS);
     370
     371    PrfWriteProfileData(fmprof,FM3Str,"RememberFlagsGrep",
     372                        (PVOID)&gRemember,sizeof(BOOL));
     373  }
     374  break;
     375
    339376    case GREP_DRIVELIST:
    340377      switch (SHORT2FROMMP(mp1))
     
    887924            case GREP_LOCALHDS:
    888925              if (!(driveflags[x] &
    889                     (DRIVE_REMOVABLE | DRIVE_IGNORE | DRIVE_REMOTE)))
     926                    (DRIVE_REMOVABLE | DRIVE_IGNORE | DRIVE_REMOTE | DRIVE_VIRTUAL)))
    890927                incl = TRUE;
    891928              break;
     
    936973        searchFiles = WinQueryButtonCheckstate(hwnd, GREP_SEARCHFILES) != 0;
    937974        findifany = WinQueryButtonCheckstate(hwnd, GREP_FINDIFANY) != 0;
    938         g.finddupes = WinQueryButtonCheckstate(hwnd, GREP_FINDDUPES) != 0;
     975        gRemember = WinQueryButtonCheckstate(hwnd,GREP_REMEMBERFLAGS);
     976   if(gRemember){
     977    PrfWriteProfileData(fmprof,FM3Str,"Grep_Recurse",
     978              (PVOID)&recurse,sizeof(BOOL));
     979    PrfWriteProfileData(fmprof,FM3Str,"Grep_Absolute",
     980               (PVOID)&absolute,sizeof(BOOL));
     981    PrfWriteProfileData(fmprof,FM3Str,"Grep_Case",
     982               (PVOID)&sensitive,sizeof(BOOL));
     983    PrfWriteProfileData(fmprof,FM3Str,"Grep_Sayfiles",
     984               (PVOID)&sayfiles,sizeof(BOOL));
     985    PrfWriteProfileData(fmprof,FM3Str,"Grep_Searchfiles",
     986               (PVOID)&searchFiles,sizeof(BOOL));
     987    PrfWriteProfileData(fmprof,FM3Str,"Grep_SearchfEAs",
     988               (PVOID)&searchEAs,sizeof(BOOL));
     989      }
     990   g.finddupes = WinQueryButtonCheckstate(hwnd, GREP_FINDDUPES) != 0;
    939991        if (g.finddupes) {
    940992          g.CRCdupes = WinQueryButtonCheckstate(hwnd, GREP_CRCDUPES) != 0;
Note: See TracChangeset for help on using the changeset viewer.