fix for bug #7850 - have to call function depend on the Next button on the ini file
git-svn-id: svn://10.0.0.236/trunk@51668 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -22,7 +22,7 @@ Title=Netscape Client Customization Kit - Page 2 of 10 %CustomizationList%
|
||||
Caption=2nd level node
|
||||
|
||||
[Navigation Controls]
|
||||
onNext=
|
||||
onNext=Depend(%Network%,1,%FTPLocation%,NULL,If you have selected to use the Network - You MUST enter a ftp location)
|
||||
Help=InfoHelp.ini
|
||||
|
||||
[Image 1]
|
||||
|
||||
@@ -549,6 +549,52 @@ BOOL CInterpret::interpret(CString cmds, WIDGET *curWidget)
|
||||
if (strcmp(Getval,p2) ==0)
|
||||
return FALSE;
|
||||
}
|
||||
else if (strcmp(pcmd, "Depend") == 0)
|
||||
{
|
||||
int numParam = 0;
|
||||
char *dParamList[5];
|
||||
char *dParam = strtok(parms, ",");
|
||||
while (dParam)
|
||||
{
|
||||
dParamList[numParam] = strdup(dParam);
|
||||
dParam = strtok(NULL, ",");
|
||||
numParam++;
|
||||
}
|
||||
CString var1 = replaceVars(dParamList[0],NULL);
|
||||
CString value1 = replaceVars(dParamList[1],NULL);
|
||||
CString var2 = replaceVars(dParamList[2],NULL);
|
||||
CString value2;
|
||||
if (strcmp(dParamList[3],"NULL") !=0)
|
||||
value2 = replaceVars(dParamList[3],NULL);
|
||||
else
|
||||
value2.Empty();
|
||||
CString message = replaceVars(dParamList[4],NULL);
|
||||
if (!message)
|
||||
{
|
||||
AfxMessageBox("Error - provide a message to show when depend is false", MB_OK);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
if (var1.Compare(value1) == 0)
|
||||
{
|
||||
if (value2.IsEmpty())
|
||||
{
|
||||
if (var2.IsEmpty())
|
||||
{
|
||||
AfxMessageBox(message, MB_OK);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (var2.Compare(value2) != 0)
|
||||
{
|
||||
AfxMessageBox(message, MB_OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (strcmp(pcmd, "VerifyDir") == 0)
|
||||
{
|
||||
CFileFind tmpDir;
|
||||
|
||||
Reference in New Issue
Block a user