Changeset 1366 for trunk/dll/collect.c


Ignore:
Timestamp:
Jan 1, 2009, 10:36:46 PM (17 years ago)
Author:
Gregg Young
Message:

Seek and scan called from the dir or drive context menu opens seek and scan and provides the path to start the search from. (Ticket 167)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/collect.c

    r1357 r1366  
    13831383               MPVOID, MPFROM2SHORT(0, CMA_ERASE | CMA_REPOSITION));
    13841384    disable_menuitem(WinWindowFromID(WinQueryWindow(hwndMain, QW_PARENT),
    1385                                      FID_MENU), IDM_GREP, FALSE);
     1385                                     FID_MENU), IDM_GREP, FALSE);
     1386    disable_menuitem(TreeMenu, IDM_GREP, FALSE);
     1387    disable_menuitem(DirMenu, IDM_GREP, FALSE);
    13861388    PostMsg(hwnd, UM_RESCAN, MPVOID, MPVOID);
    13871389    if (dcd) {
     
    19351937                 "Collector busy - please try again later");
    19361938        }
    1937         else {
    1938           if (WinDlgBox(HWND_DESKTOP, hwnd, GrepDlgProc,
    1939                         FM3ModHandle, GREP_FRAME, (PVOID) & hwnd)) {
    1940             dcd->amextracted = TRUE;    // Say busy scanning
    1941             disable_menuitem(WinWindowFromID
    1942                              (WinQueryWindow(hwndMain, QW_PARENT), FID_MENU),
    1943                              IDM_GREP, TRUE);
    1944             PostMsg(hwnd, UM_RESCAN, MPVOID, MPVOID);
     1939        else {
     1940          GREPINFO *GrepInfo;
     1941
     1942          GrepInfo = xmallocz(sizeof(GREPINFO), pszSrcFile, __LINE__);
     1943          if (GrepInfo) {
     1944            GrepInfo->hwnd = &hwnd;
     1945            if (mp2)
     1946              GrepInfo->szGrepPath = mp2;
     1947            if (WinDlgBox(HWND_DESKTOP, hwnd, GrepDlgProc,
     1948                          FM3ModHandle, GREP_FRAME, (PVOID) GrepInfo)) {
     1949              free(GrepInfo);
     1950              dcd->amextracted = TRUE;  // Say busy scanning
     1951              disable_menuitem(WinWindowFromID
     1952                               (WinQueryWindow(hwndMain, QW_PARENT), FID_MENU),
     1953                               IDM_GREP, TRUE);
     1954              disable_menuitem(TreeMenu, IDM_GREP, TRUE);
     1955              disable_menuitem(DirMenu, IDM_GREP, TRUE);
     1956              PostMsg(hwnd, UM_RESCAN, MPVOID, MPVOID);
     1957            }
     1958            else
     1959              free(GrepInfo);
    19451960          }
    19461961        }
Note: See TracChangeset for help on using the changeset viewer.