зеркало из https://github.com/mozilla/pjs.git
fix for bug #17459 as well as some clean up
This commit is contained in:
Родитель
5f7f711aa3
Коммит
18871bef80
|
@ -301,15 +301,17 @@ BOOL CWizardMachineApp::InitInstance()
|
|||
if (PageReturnValue == ID_WIZFINISH)
|
||||
{
|
||||
CreateRshell();
|
||||
if (!isBuildInstaller) {
|
||||
//removing the isbuildinstaller from the routine.
|
||||
// if (!isBuildInstaller) {
|
||||
|
||||
NODE* tmpNode = WizardTree->childNodes[0];
|
||||
while (!tmpNode->numWidgets) {
|
||||
tmpNode = tmpNode->childNodes[0];
|
||||
}
|
||||
|
||||
CurrentNode = tmpNode;
|
||||
NODE* tmpNode = WizardTree->childNodes[0];
|
||||
while (!tmpNode->numWidgets)
|
||||
{
|
||||
tmpNode = tmpNode->childNodes[0];
|
||||
}
|
||||
|
||||
CurrentNode = tmpNode;
|
||||
// }
|
||||
theApp.CreateNewCache();
|
||||
|
||||
}
|
||||
|
@ -1389,101 +1391,7 @@ void CWizardMachineApp::BuildWidget(WIDGET* aWidget, CString iniSection, CString
|
|||
aWidget->numOfOptDesc = counter;
|
||||
}
|
||||
|
||||
/*
|
||||
void CWizardMachineApp::BuildHelpWidget(WIDGET* aWidget, CString iniSection, CString iniFile, int pageBaseIndex)
|
||||
{
|
||||
static int idCounter = 0;
|
||||
char buffer[MAX_SIZE] = {'\0'};
|
||||
char largeBuffer[EXTD_MAX_SIZE] = {'\0'};
|
||||
|
||||
idCounter++;
|
||||
|
||||
GetPrivateProfileString(iniSection, "Name", "", buffer, MAX_SIZE, iniFile);
|
||||
aWidget->name = buffer;
|
||||
|
||||
GetPrivateProfileString(iniSection, "Type", "", buffer, MAX_SIZE, iniFile);
|
||||
aWidget->type = buffer;
|
||||
|
||||
GetPrivateProfileString(iniSection, "Options", "", buffer, MAX_SIZE, iniFile);
|
||||
aWidget->items = buffer;
|
||||
|
||||
GetPrivateProfileString(iniSection, "Value", "", largeBuffer, EXTD_MAX_SIZE, iniFile);
|
||||
aWidget->value = largeBuffer;
|
||||
aWidget->value.TrimRight();
|
||||
|
||||
GetPrivateProfileString(iniSection, "Title", "", buffer, MAX_SIZE, iniFile);
|
||||
aWidget->title = buffer;
|
||||
|
||||
GetPrivateProfileString(iniSection, "Group", "", buffer, MAX_SIZE, iniFile);
|
||||
aWidget->group = buffer;
|
||||
|
||||
GetPrivateProfileString(iniSection, "Target", "", buffer, MAX_SIZE, iniFile);
|
||||
aWidget->target = buffer;
|
||||
|
||||
GetPrivateProfileString(iniSection, "Start_x", "", buffer, MAX_SIZE, iniFile);
|
||||
aWidget->location.x = atoi(buffer);
|
||||
|
||||
GetPrivateProfileString(iniSection, "Start_y", "", buffer, MAX_SIZE, iniFile);
|
||||
aWidget->location.y = atoi(buffer);
|
||||
|
||||
//aWidget->size = new DIMENSION;
|
||||
GetPrivateProfileString(iniSection, "Width", "", buffer, MAX_SIZE, iniFile);
|
||||
aWidget->size.width = atoi(buffer);
|
||||
GetPrivateProfileString(iniSection, "Height", "", buffer, MAX_SIZE, iniFile);
|
||||
aWidget->size.height = atoi(buffer);
|
||||
|
||||
GetPrivateProfileString(iniSection, "dll", "", buffer, MAX_SIZE, iniFile);
|
||||
aWidget->action.dll = buffer;
|
||||
GetPrivateProfileString(iniSection, "function", "", buffer, MAX_SIZE, iniFile);
|
||||
aWidget->action.function = buffer;
|
||||
GetPrivateProfileString(iniSection, "parameters", "", buffer, MAX_SIZE, iniFile);
|
||||
strcpy(aWidget->action.parameters, buffer);
|
||||
|
||||
/// Dynamic ID allocation
|
||||
aWidget->widgetID = pageBaseIndex + idCounter;
|
||||
|
||||
|
||||
// As the number of entries in the subsection are not known, a generic loop
|
||||
// has been created to read all existing name/value pairs in the subsection
|
||||
// and store them in the options component of the control.
|
||||
GetPrivateProfileString(iniSection, "subsection", "", buffer, MAX_SIZE, iniFile);
|
||||
if (strcmp(buffer, "") != 0) {
|
||||
char* subSection;
|
||||
subSection = new char[sizeof(buffer)];
|
||||
strcpy(subSection, buffer);
|
||||
|
||||
if (aWidget->action.function == "")
|
||||
{
|
||||
int counter = 0;
|
||||
int i = 0;
|
||||
char* ComponentKey;
|
||||
char ComponentKeyBuffer[MAX_SIZE];
|
||||
if (GetPrivateProfileString(subSection, NULL, "", buffer, MAX_SIZE, iniFile) > 0)
|
||||
{
|
||||
while (buffer[i] != 0)
|
||||
{
|
||||
ComponentKey = &buffer[i];
|
||||
if (GetPrivateProfileString(subSection, ComponentKey, "", ComponentKeyBuffer, MAX_SIZE, iniFile) > 0)
|
||||
{
|
||||
aWidget->options.name[counter] = new char[sizeof(ComponentKey)];
|
||||
strcpy(aWidget->options.name[counter],ComponentKey);
|
||||
aWidget->options.value[counter] = new char[sizeof(ComponentKeyBuffer)];
|
||||
strcpy(aWidget->options.value[counter],ComponentKeyBuffer);
|
||||
counter++;
|
||||
}
|
||||
while (buffer[i] != 0)
|
||||
i++;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
aWidget->numOfOptions = counter;
|
||||
}
|
||||
else {
|
||||
aWidget->numOfOptions = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
void CWizardMachineApp::GenerateList(CString action, WIDGET* targetWidget, CString parentDirPath)
|
||||
{
|
||||
WIDGET* curWidget = targetWidget;
|
||||
|
|
|
@ -128,20 +128,9 @@ BOOL CWizardUI::OnSetActive()
|
|||
pSheet->GetDlgItem(IDCANCEL)->SetWindowText(CurrentNode->localVars->wizbut->cancel);
|
||||
|
||||
// Using the ini files to set the value as mentioned above
|
||||
// instead of using the commented out code below
|
||||
|
||||
// !!! Use an OnEnter for this instead !!!
|
||||
/* if (CurrentNode->localVars->functionality == "BuildInstallers")
|
||||
{
|
||||
pSheet->GetDlgItem(ID_WIZNEXT)->SetWindowText("Build &Installers");
|
||||
isBuildInstaller = TRUE;
|
||||
}
|
||||
else {
|
||||
isBuildInstaller = FALSE;
|
||||
pSheet->GetDlgItem(ID_WIZNEXT)->SetWindowText("&Next >");
|
||||
}
|
||||
*/
|
||||
|
||||
//we used to check for a particular value previously and then set the values
|
||||
// not doing it any more cuz - the wizard neednt know the values of the buttons in inifiles
|
||||
|
||||
if (theApp.IsLastNode(CurrentNode))
|
||||
{
|
||||
pSheet->SetWizardButtons(PSWIZB_BACK | PSWIZB_FINISH);
|
||||
|
@ -206,7 +195,7 @@ LRESULT CWizardUI::OnWizardNext()
|
|||
if (!nextLock.IsLocked())
|
||||
{
|
||||
nextLock.Lock();
|
||||
|
||||
#if 0
|
||||
if (isBuildInstaller) {
|
||||
isCDLayoutCreated = FALSE;
|
||||
|
||||
|
@ -231,7 +220,7 @@ LRESULT CWizardUI::OnWizardNext()
|
|||
MessageBox("CD Image would be created", "OK", MB_OK);
|
||||
isBuildInstaller = FALSE;
|
||||
}
|
||||
|
||||
#endif
|
||||
UpdateGlobals();
|
||||
DestroyCurrentScreenWidgets();
|
||||
while (!theApp.GoToNextNode())
|
||||
|
|
|
@ -656,6 +656,7 @@ BOOL CInterpret::interpret(CString cmds, WIDGET *curWidget)
|
|||
if (var2.Compare(value2) != 0)
|
||||
{
|
||||
AfxMessageBox(message, MB_OK);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче