Changeset 1068 for trunk/dll/arccnrs.c


Ignore:
Timestamp:
Jul 14, 2008, 3:50:10 PM (17 years ago)
Author:
John Small
Message:

Ticket 126: Add support for WPS open default & open settings in arccnrs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/arccnrs.c

    r1063 r1068  
    5353  15 Feb 08 SHL Sync with settings menu rework
    5454  29 Feb 08 GKY Use xfree where appropriate
     55  14 Jul 08 JBS Ticket 126: Add support for WPS open default & open settings in arccnrs
    5556
    5657***********************************************************************/
     
    16321633        case IDM_EXTRACTWDIRS:
    16331634        case IDM_EXTRACT:
     1635        case IDM_OPENDEFAULT:
     1636        case IDM_OPENSETTINGS:
    16341637          {
    16351638            CHAR *endofit, *ptr;
    16361639            PSZ pszCmdLine;
    16371640            INT z;
    1638 
    16391641            if ((li->type == IDM_EXTRACT && !li->info->extract) ||
    16401642                ((li->type == IDM_VIEW || li->type == IDM_VIEWTEXT ||
     
    17071709                      li->type == IDM_EDIT ||
    17081710                      li->type == IDM_EDITTEXT ||
    1709                       (li->type == IDM_EDITBINARY &&
     1711                      li->type == IDM_OPENDEFAULT ||
     1712                      li->type == IDM_OPENSETTINGS ||
     1713                      (li->type == IDM_EDITBINARY &&            // JBS No way for this () to be true??
    17101714                       li->type == IDM_MCIPLAY)) &&
    17111715                     !li->info->exwdirs)) ?
     
    18011805                     li->type == IDM_VIEWARCHIVE ||
    18021806                     li->type == IDM_EDITBINARY ||
     1807                     li->type == IDM_OPENDEFAULT ||
     1808                     li->type == IDM_OPENSETTINGS ||
    18031809                     li->type == IDM_MCIPLAY || li->type == IDM_PRINT) {
    18041810
    18051811              CHAR *temp, *p;
    1806 
    18071812              for (x = 0; li->list[x]; x++) {
    18081813                if (!li->info->exwdirs) {
     
    18951900                           WINDOWED | SEPARATE, li->targetpath, li->list,
    18961901                           NULL, pszSrcFile, __LINE__);
     1902              }
     1903              else if (li->type == IDM_OPENDEFAULT ||
     1904                       li->type == IDM_OPENSETTINGS) {
     1905                WORKER *wk;
     1906#               ifdef FORTIFY
     1907                Fortify_EnterScope();
     1908#               endif
     1909                wk = xmallocz(sizeof(WORKER), pszSrcFile, __LINE__);
     1910                if (!wk)
     1911                  FreeListInfo(li);
     1912                else {
     1913                  wk->size = sizeof(WORKER);
     1914                  wk->hwndCnr = dcd->hwndCnr;
     1915                  wk->hwndParent = dcd->hwndParent;
     1916                  wk->hwndFrame = dcd->hwndFrame;
     1917                  wk->hwndClient = dcd->hwndClient;
     1918                  wk->li = li;
     1919                  strcpy(wk->directory, dcd->directory);
     1920                  if (_beginthread(Action, NULL, 122880, (PVOID) wk) == -1) {
     1921                    Runtime_Error(pszSrcFile, __LINE__,
     1922                                  GetPString(IDS_COULDNTSTARTTHREADTEXT));
     1923                    free(wk);
     1924                    FreeListInfo((LISTINFO *) mp1);
     1925#                   ifdef FORTIFY
     1926                    Fortify_LeaveScope();
     1927#                   endif
     1928                  }
     1929        }
     1930               
    18971931              }
    18981932              else {
     
    19822016        }
    19832017      }
    1984       FreeListInfo(li);
     2018      if (li->type != IDM_OPENDEFAULT && li->type != IDM_OPENSETTINGS)
     2019      {
     2020        FreeListInfo(li);
     2021      }
    19852022    }
    19862023    return 0;
     
    29092946      case IDM_EXEC:
    29102947      case IDM_VIRUSSCAN:
     2948      case IDM_OPENDEFAULT:
     2949      case IDM_OPENSETTINGS:
    29112950        {
    29122951          LISTINFO *li;
     
    29723011            case IDM_PRINT:
    29733012            case IDM_VIRUSSCAN:
     3013            case IDM_OPENDEFAULT:
     3014            case IDM_OPENSETTINGS:
    29743015              strcpy(li->targetpath, dcd->workdir);
    29753016              break;
     
    29883029            else
    29893030              free(li);
    2990 #             ifdef FORTIFY
    2991               Fortify_LeaveScope();
    2992 #              endif
     3031#           ifdef FORTIFY
     3032            Fortify_LeaveScope();
     3033#           endif
    29933034          }
    29943035        }
Note: See TracChangeset for help on using the changeset viewer.