Changeset 1753 for trunk/dll


Ignore:
Timestamp:
Mar 2, 2014, 7:58:53 PM (12 years ago)
Author:
Gregg Young
Message:

Fixed typo that reversed the function of the saymsg dialog g/bzip check. Added option to suppress message regarding missing bzip2.exe or gzip.exe on TAR.B/GZ archives. Ticket 526

Location:
trunk/dll
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/arccnrs.c

    r1752 r1753  
    626626    if (!nobzip) {
    627627      ftarbz = TRUE;
    628       if (DosQueryAppType("bzip.exe" , &apptype)) {
     628      if (DosQueryAppType("bzip2.exe" , &apptype)) {
    629629        nobzip = TRUE;
    630         temp = saymsg(MB_YESNO, HWND_DESKTOP, NullStr, GetPString(IDS_ARCNOBZIP));
    631         if (temp != MBID_NO)
    632           return 0;                                               
     630        if (!fDontAskBzip) {
     631          temp = saymsg2(NULL, 3,
     632                         HWND_DESKTOP,
     633                         NullStr,
     634                         GetPString(IDS_ARCNOBZIP));
     635          if (temp == SM2_NO ||temp == SM2_CANCEL)
     636            return 0;
     637          else if (temp == SM2_DONTASK) {
     638            fDontAskBzip = TRUE;
     639            PrfWriteProfileData(fmprof, FM3Str, "DontAskBzip", &fDontAskBzip, sizeof(BOOL));
     640          }
     641        }
    633642      }                                                           
    634643    }                                                             
    635     else if (!nogzip) {                                           
    636       ftargz = TRUE;                                             
     644    else if (!nogzip) {
     645      ftargz = TRUE;
    637646      if (DosQueryAppType("gzip.exe" , &apptype)) {
    638647        nogzip = TRUE;
    639         temp = saymsg(MB_YESNO, HWND_DESKTOP, NullStr, GetPString(IDS_ARCNOGZIP));
    640         if (temp != MBID_NO)
    641           return 0;
     648        if (!fDontAskGzip) {
     649          temp = saymsg2(NULL, 3,
     650                         HWND_DESKTOP,
     651                         NullStr,
     652                         GetPString(IDS_ARCNOGZIP));
     653          if (temp == SM2_NO || temp == SM2_CANCEL)
     654            return 0;
     655          else if (temp == SM2_DONTASK) {
     656            fDontAskGzip = TRUE;
     657            PrfWriteProfileData(fmprof, FM3Str, "DontAskGzip", &fDontAskGzip, sizeof(BOOL));
     658          }
     659        }
    642660      }
    643661    }
     
    734752                if (info->test)
    735753                  strcpy(TestStr, info->test);
    736                 else
     754                else {
     755                  strcpy(TestStr, "");
    737756                  notest = TRUE;
     757                }
    738758              }
    739759              else if (notest && info->test) {
     
    9901010          }
    9911011          else if ((ftarbz && !nobzip) || (ftargz && !nogzip))
    992             info->test = xstrdup(ftarbz ? "bzip.exe -t" : "gzip.exe - t",
     1012            info->test = xstrdup(ftarbz ? "bzip2.exe -t" : "gzip.exe - t",
    9931013                                 pszSrcFile, __LINE__);
     1014          else if (rc) {
     1015            strcpy(Temp, info->test);
     1016            info->test = NULL;
     1017          }
    9941018          ad.errmsg = errstr;
    9951019          WinDlgBox(HWND_DESKTOP,
     
    10001024          else if ((ftarbz && !nobzip) || (ftargz && !nogzip))
    10011025            info->test = xstrdup("", pszSrcFile, __LINE__);
     1026          else if (rc)
     1027            info->test = xstrdup(Temp, pszSrcFile, __LINE__);
    10021028        }
    10031029        else
  • trunk/dll/init.c

    r1750 r1753  
    126126  01 Mar 14 JBS Ticket #524: Made "searchapath" thread-safe. Function names and signatures were changed.
    127127                So calls to these functions had to be changed.
     128  02 Mar 14 GKY Fixed typo that reversed the function of the saymsg dialog g/bzip check.
     129                Added option to suppress message regarding missing bzip2.exe
     130                or gzip.exe on TAR.B/GZ archives.
    128131
    129132***********************************************************************/
     
    245248BOOL fWantFirstTimeInit;
    246249BOOL fUseShellEnv;
     250BOOL fDontAskBzip;
     251BOOL fDontAskGzip;
    247252//BOOL fDrivetoSkip[26];
    248253HPOINTER hptrApp;
     
    16201625  if (fThreadNotes)
    16211626    ShowNote();
     1627  size = sizeof(BOOL);
     1628  PrfQueryProfileData(fmprof, FM3Str, "DontAskBzip", &fDontAskBzip, &size);
     1629  size = sizeof(BOOL);
     1630  PrfQueryProfileData(fmprof, FM3Str, "DontAskGzip", &fDontAskGzip, &size);
    16221631
    16231632  LoadDetailsSwitches(PCSZ_DIRCNR, &dsDirCnrDefault, FALSE);
  • trunk/dll/init.h

    r1720 r1753  
    3636                started from fm2 after fm2 has been started with stdout and stderr
    3737                redirected to a file.
     38  02 Mar 14 GKY Fixed typo that reversed the function of the saymsg dialog g/bzip check.
     39                Added option to suppress message regarding missing bzip2.exe
     40                or gzip.exe on TAR.B/GZ archives.
    3841
    3942***********************************************************************/
     
    207210extern BOOL fWantFirstTimeInit;
    208211extern BOOL fUseShellEnv;
     212extern BOOL fDontAskBzip;
     213extern BOOL fDontAskGzip;
    209214extern HPOINTER hptrApp;
    210215extern HPOINTER hptrArc;
Note: See TracChangeset for help on using the changeset viewer.