tdf#103311 Conditionally disable Next button on MM Wizard page 4
The user has to set up either an address block on page 3 or a greeting on page 4 to be able to progress to page 5. The 5th page is already disabled if these are not enabled but the Next button on page 4 is always enabled. Now the Next button gets enabled/disabled if the 5th page is enabled/disabled by UpdateRoadmap(). Change-Id: If216d935ebebb3fc6a4e1488ec2dfc716db41c3e Reviewed-on: https://gerrit.libreoffice.org/38610 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
This commit is contained in:
committed by
Miklos Vajna
parent
57ae8834c8
commit
90e83ba599
@@ -99,7 +99,7 @@ IMPL_LINK_NOARG(SwGreetingsHandler, IndividualHdl_Impl, Button*, void)
|
|||||||
{
|
{
|
||||||
m_rConfigItem.SetIndividualGreeting(bIndividual, false);
|
m_rConfigItem.SetIndividualGreeting(bIndividual, false);
|
||||||
m_pWizard->UpdateRoadmap();
|
m_pWizard->UpdateRoadmap();
|
||||||
m_pWizard->enableButtons(WizardButtonFlags::NEXT, true);
|
m_pWizard->enableButtons(WizardButtonFlags::NEXT, m_pWizard->isStateEnabled(MM_LAYOUTPAGE));
|
||||||
}
|
}
|
||||||
UpdatePreview();
|
UpdatePreview();
|
||||||
}
|
}
|
||||||
@@ -118,7 +118,7 @@ IMPL_LINK(SwGreetingsHandler, GreetingHdl_Impl, Button*, pButton, void)
|
|||||||
if(m_bIsTabPage)
|
if(m_bIsTabPage)
|
||||||
{
|
{
|
||||||
m_pWizard->UpdateRoadmap();
|
m_pWizard->UpdateRoadmap();
|
||||||
m_pWizard->enableButtons(WizardButtonFlags::NEXT, true);
|
m_pWizard->enableButtons(WizardButtonFlags::NEXT, m_pWizard->isStateEnabled(MM_LAYOUTPAGE));
|
||||||
}
|
}
|
||||||
UpdatePreview();
|
UpdatePreview();
|
||||||
}
|
}
|
||||||
@@ -138,7 +138,7 @@ IMPL_LINK(SwMailMergeGreetingsPage, AssignHdl_Impl, Button*, pButton, void)
|
|||||||
{
|
{
|
||||||
UpdatePreview();
|
UpdatePreview();
|
||||||
m_pWizard->UpdateRoadmap();
|
m_pWizard->UpdateRoadmap();
|
||||||
m_pWizard->enableButtons(WizardButtonFlags::NEXT, true);
|
m_pWizard->enableButtons(WizardButtonFlags::NEXT, m_pWizard->isStateEnabled(MM_LAYOUTPAGE));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -331,7 +331,7 @@ void SwMailMergeGreetingsPage::ActivatePage()
|
|||||||
m_pFemaleFieldCB->SaveValue();
|
m_pFemaleFieldCB->SaveValue();
|
||||||
|
|
||||||
UpdatePreview();
|
UpdatePreview();
|
||||||
m_pWizard->enableButtons(WizardButtonFlags::NEXT, true);
|
m_pWizard->enableButtons(WizardButtonFlags::NEXT, m_pWizard->isStateEnabled(MM_LAYOUTPAGE));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SwMailMergeGreetingsPage::commitPage( ::svt::WizardTypes::CommitPageReason )
|
bool SwMailMergeGreetingsPage::commitPage( ::svt::WizardTypes::CommitPageReason )
|
||||||
@@ -376,6 +376,7 @@ IMPL_LINK(SwMailMergeGreetingsPage, ContainsHdl_Impl, Button*, pBox, void)
|
|||||||
m_pNextSetIB->Enable(bContainsGreeting);
|
m_pNextSetIB->Enable(bContainsGreeting);
|
||||||
m_rConfigItem.SetGreetingLine(m_pGreetingLineCB->IsChecked(), false);
|
m_rConfigItem.SetGreetingLine(m_pGreetingLineCB->IsChecked(), false);
|
||||||
m_pWizard->UpdateRoadmap();
|
m_pWizard->UpdateRoadmap();
|
||||||
|
m_pWizard->enableButtons(WizardButtonFlags::NEXT, m_pWizard->isStateEnabled(MM_LAYOUTPAGE));
|
||||||
}
|
}
|
||||||
|
|
||||||
IMPL_LINK(SwMailMergeGreetingsPage, InsertDataHdl_Impl, Button*, pButton, void)
|
IMPL_LINK(SwMailMergeGreetingsPage, InsertDataHdl_Impl, Button*, pButton, void)
|
||||||
|
Reference in New Issue
Block a user