зеркало из https://github.com/mozilla/gecko-dev.git
fixing bug #5987 - introduced three new fields in VARS in the ini files - cancel back and next - use those to change the text on the buttons
This commit is contained in:
Родитель
ff3811524a
Коммит
723035e37f
|
@ -418,14 +418,39 @@ NODE* CWizardMachineApp::CreateNode(NODE *parentNode, CString iniFile)
|
|||
NewNode->childNodes[i] = NULL;
|
||||
}
|
||||
|
||||
NewNode->localVars = new VARS;
|
||||
GetPrivateProfileString(varSection, "Title", "", buffer, MAX_SIZE, iniFile);
|
||||
NewNode->localVars->title = buffer;
|
||||
NewNode->localVars = new VARS;
|
||||
GetPrivateProfileString(varSection, "Title", "", buffer, MAX_SIZE, iniFile);
|
||||
NewNode->localVars->title = buffer;
|
||||
if (NewNode->localVars->title == "")
|
||||
{
|
||||
NewNode->localVars->title = parentNode->localVars->title;
|
||||
}
|
||||
GetPrivateProfileString(varSection, "Caption", "", buffer, MAX_SIZE, iniFile);
|
||||
NewNode->localVars->caption = buffer;
|
||||
GetPrivateProfileString(varSection, "Function", "", buffer, MAX_SIZE, iniFile);
|
||||
NewNode->localVars->functionality = buffer;
|
||||
|
||||
NewNode->localVars->wizbut = new WIZBUT;
|
||||
GetPrivateProfileString(varSection, "Back", "", buffer, MAX_SIZE, iniFile);
|
||||
NewNode->localVars->wizbut->back = buffer;
|
||||
if (NewNode->localVars->wizbut->back == "")
|
||||
{
|
||||
NewNode->localVars->wizbut->back = parentNode->localVars->wizbut->back;
|
||||
}
|
||||
|
||||
GetPrivateProfileString(varSection, "Next", "", buffer, MAX_SIZE, iniFile);
|
||||
NewNode->localVars->wizbut->next = buffer;
|
||||
if (NewNode->localVars->wizbut->next == "")
|
||||
{
|
||||
NewNode->localVars->wizbut->next = parentNode->localVars->wizbut->next;
|
||||
}
|
||||
GetPrivateProfileString(varSection, "Cancel", "", buffer, MAX_SIZE, iniFile);
|
||||
NewNode->localVars->wizbut->cancel = buffer;
|
||||
if (NewNode->localVars->wizbut->cancel == "")
|
||||
{
|
||||
NewNode->localVars->wizbut->cancel = parentNode->localVars->wizbut->cancel;
|
||||
}
|
||||
|
||||
CString tempPageVar = "";
|
||||
|
||||
int index = iniFile.ReverseFind('\\');
|
||||
|
@ -584,7 +609,11 @@ void CWizardMachineApp::CreateNode()
|
|||
GlobalDefaults->localVars->caption = "Globals";
|
||||
GlobalDefaults->localVars->pageName = "Globals";
|
||||
GlobalDefaults->localVars->image = "Globals";
|
||||
|
||||
GlobalDefaults->localVars->wizbut = new WIZBUT;
|
||||
GlobalDefaults->localVars->wizbut->back = "<Back";
|
||||
GlobalDefaults->localVars->wizbut->next = "Next>";
|
||||
GlobalDefaults->localVars->wizbut->cancel = "Exit";
|
||||
GlobalDefaults->localVars->wizbut->back = "Help";
|
||||
GlobalDefaults->subPages = NULL;
|
||||
GlobalDefaults->navControls = NULL;
|
||||
GlobalDefaults->pageWidgets = NULL;
|
||||
|
|
|
@ -128,8 +128,15 @@ BOOL CWizardUI::OnSetActive()
|
|||
CPropSheet* pSheet = (CPropSheet*) GetParent();
|
||||
ASSERT_VALID(pSheet);
|
||||
|
||||
pSheet->GetDlgItem(ID_WIZBACK)->SetWindowText(CurrentNode->localVars->wizbut->back);
|
||||
pSheet->GetDlgItem(ID_WIZNEXT)->SetWindowText(CurrentNode->localVars->wizbut->next);
|
||||
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")
|
||||
/* if (CurrentNode->localVars->functionality == "BuildInstallers")
|
||||
{
|
||||
pSheet->GetDlgItem(ID_WIZNEXT)->SetWindowText("Build &Installers");
|
||||
isBuildInstaller = TRUE;
|
||||
|
@ -138,7 +145,7 @@ BOOL CWizardUI::OnSetActive()
|
|||
isBuildInstaller = FALSE;
|
||||
pSheet->GetDlgItem(ID_WIZNEXT)->SetWindowText("&Next >");
|
||||
}
|
||||
|
||||
*/
|
||||
if (theApp.IsLastNode(CurrentNode)) {
|
||||
pSheet->SetWizardButtons(PSWIZB_BACK | PSWIZB_FINISH);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче