dbaccess/source/ui/dlg/admincontrols.cxx | 19 ++++++++----------- dbaccess/source/ui/dlg/generalpage.cxx | 25 ++++++++++++++++--------- 2 files changed, 24 insertions(+), 20 deletions(-)
New commits: commit 1f3d18445cad89a8ab572028f2bc1b54914893e5 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Sat May 18 17:57:09 2019 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sat May 18 21:47:48 2019 +0200 tdf#124951 Open button on Database Wizard dialog is enabled.. ..when it should be disabled regression from commit 7df04009b98165f89c89f1e506ebafd2fecc8f5a Date: Fri Feb 8 11:55:18 2019 +0200 remove ControlDependencyManager Change-Id: Ic84d8c8a5f0615753e323d3aa1e9da0d0c76bb42 Reviewed-on: https://gerrit.libreoffice.org/72532 Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Tested-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/dbaccess/source/ui/dlg/admincontrols.cxx b/dbaccess/source/ui/dlg/admincontrols.cxx index 58c8c2f95f06..e45e14379351 100644 --- a/dbaccess/source/ui/dlg/admincontrols.cxx +++ b/dbaccess/source/ui/dlg/admincontrols.cxx @@ -73,23 +73,20 @@ namespace dbaui { if (&rRadioButton == &*m_pSocketRadio || &rRadioButton == &*m_pNamedPipeRadio) m_aControlModificationLink.Call(&rRadioButton); - bool bSelected = rRadioButton.IsChecked(); + m_pHostNameLabel->Enable(m_pHostPortRadio->IsChecked()); + m_pHostName->Enable(m_pHostPortRadio->IsChecked()); + m_pPortLabel->Enable(m_pHostPortRadio->IsChecked()); + m_pPort->Enable(m_pHostPortRadio->IsChecked()); + m_pDefaultPort->Enable(m_pHostPortRadio->IsChecked()); + m_pSocket->Enable(m_pSocketRadio->IsChecked()); + m_pNamedPipe->Enable(m_pNamedPipeRadio->IsChecked()); if (&rRadioButton == &*m_pHostPortRadio) { - m_pHostNameLabel->Enable(bSelected); - m_pHostName->Enable(bSelected); - m_pPortLabel->Enable(bSelected); - m_pPort->Enable(bSelected); - m_pDefaultPort->Enable(bSelected); - if (bSelected) + if (rRadioButton.IsChecked()) m_pHostName->SetText(m_sHostNameUserText); else m_pHostName->SetText("localhost"); } - else if (&rRadioButton == &*m_pSocketRadio) - m_pSocket->Enable(bSelected); - else if (&rRadioButton == &*m_pNamedPipeRadio) - m_pNamedPipe->Enable(bSelected); } IMPL_LINK(MySQLNativeSettings, EditModifyHdl, Edit&, rEdit, void) diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx index 8f3fb2e79943..4ac9a54ba2b7 100644 --- a/dbaccess/source/ui/dlg/generalpage.cxx +++ b/dbaccess/source/ui/dlg/generalpage.cxx @@ -574,6 +574,15 @@ namespace dbaui m_pFT_DocListLabel->Enable( false ); m_pLB_DocumentList->Enable( false ); } + else + { + m_pEmbeddedDBType->Enable( false ); + m_pFT_EmbeddedDBLabel->Enable( false ); + m_pDatasourceType->Enable( false ); + m_pPB_OpenDatabase->Enable( false ); + m_pFT_DocListLabel->Enable( false ); + m_pLB_DocumentList->Enable( false ); + } m_pLB_DocumentList->SetDropDownLineCount( 20 ); if ( m_pLB_DocumentList->GetEntryCount() ) @@ -671,7 +680,7 @@ namespace dbaui } } - IMPL_LINK( OGeneralPageWizard, OnSetupModeSelected, Button*, pButton, void ) + IMPL_LINK_NOARG( OGeneralPageWizard, OnSetupModeSelected, Button*, void ) { m_aCreationModeHandler.Call( *this ); OnDatasourceTypeSelected(*m_pDatasourceType); @@ -680,14 +689,12 @@ namespace dbaui getFlags( GetItemSet(), bValid, bReadonly ); if ( bValid && !bReadonly ) { - if (pButton == m_pRB_ConnectDatabase.get()) - m_pDatasourceType->Enable(m_pRB_ConnectDatabase->IsChecked()); - else if (pButton == m_pRB_OpenExistingDatabase.get()) - { - m_pPB_OpenDatabase->Enable(m_pRB_OpenExistingDatabase->IsChecked()); - m_pFT_DocListLabel->Enable(m_pRB_OpenExistingDatabase->IsChecked()); - m_pLB_DocumentList->Enable(m_pRB_OpenExistingDatabase->IsChecked()); - } + m_pEmbeddedDBType->Enable(m_pRB_CreateDatabase->IsChecked()); + m_pFT_EmbeddedDBLabel->Enable(m_pRB_CreateDatabase->IsChecked()); + m_pDatasourceType->Enable(m_pRB_ConnectDatabase->IsChecked()); + m_pPB_OpenDatabase->Enable(m_pRB_OpenExistingDatabase->IsChecked()); + m_pFT_DocListLabel->Enable(m_pRB_OpenExistingDatabase->IsChecked()); + m_pLB_DocumentList->Enable(m_pRB_OpenExistingDatabase->IsChecked()); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits