Kaydet (Commit) 1f3d1844 authored tarafından Noel Grandin's avatar Noel Grandin

tdf#124951 Open button on Database Wizard dialog is enabled..

..when it should be disabled

regression from
    commit 7df04009
    Date:   Fri Feb 8 11:55:18 2019 +0200
    remove ControlDependencyManager

Change-Id: Ic84d8c8a5f0615753e323d3aa1e9da0d0c76bb42
Reviewed-on: https://gerrit.libreoffice.org/72532Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
Tested-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 33cc1deb
...@@ -73,23 +73,20 @@ namespace dbaui ...@@ -73,23 +73,20 @@ namespace dbaui
{ {
if (&rRadioButton == &*m_pSocketRadio || &rRadioButton == &*m_pNamedPipeRadio) if (&rRadioButton == &*m_pSocketRadio || &rRadioButton == &*m_pNamedPipeRadio)
m_aControlModificationLink.Call(&rRadioButton); 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) if (&rRadioButton == &*m_pHostPortRadio)
{ {
m_pHostNameLabel->Enable(bSelected); if (rRadioButton.IsChecked())
m_pHostName->Enable(bSelected);
m_pPortLabel->Enable(bSelected);
m_pPort->Enable(bSelected);
m_pDefaultPort->Enable(bSelected);
if (bSelected)
m_pHostName->SetText(m_sHostNameUserText); m_pHostName->SetText(m_sHostNameUserText);
else else
m_pHostName->SetText("localhost"); 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) IMPL_LINK(MySQLNativeSettings, EditModifyHdl, Edit&, rEdit, void)
......
...@@ -574,6 +574,15 @@ namespace dbaui ...@@ -574,6 +574,15 @@ namespace dbaui
m_pFT_DocListLabel->Enable( false ); m_pFT_DocListLabel->Enable( false );
m_pLB_DocumentList->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 ); m_pLB_DocumentList->SetDropDownLineCount( 20 );
if ( m_pLB_DocumentList->GetEntryCount() ) if ( m_pLB_DocumentList->GetEntryCount() )
...@@ -671,7 +680,7 @@ namespace dbaui ...@@ -671,7 +680,7 @@ namespace dbaui
} }
} }
IMPL_LINK( OGeneralPageWizard, OnSetupModeSelected, Button*, pButton, void ) IMPL_LINK_NOARG( OGeneralPageWizard, OnSetupModeSelected, Button*, void )
{ {
m_aCreationModeHandler.Call( *this ); m_aCreationModeHandler.Call( *this );
OnDatasourceTypeSelected(*m_pDatasourceType); OnDatasourceTypeSelected(*m_pDatasourceType);
...@@ -680,14 +689,12 @@ namespace dbaui ...@@ -680,14 +689,12 @@ namespace dbaui
getFlags( GetItemSet(), bValid, bReadonly ); getFlags( GetItemSet(), bValid, bReadonly );
if ( bValid && !bReadonly ) if ( bValid && !bReadonly )
{ {
if (pButton == m_pRB_ConnectDatabase.get()) m_pEmbeddedDBType->Enable(m_pRB_CreateDatabase->IsChecked());
m_pDatasourceType->Enable(m_pRB_ConnectDatabase->IsChecked()); m_pFT_EmbeddedDBLabel->Enable(m_pRB_CreateDatabase->IsChecked());
else if (pButton == m_pRB_OpenExistingDatabase.get()) m_pDatasourceType->Enable(m_pRB_ConnectDatabase->IsChecked());
{ m_pPB_OpenDatabase->Enable(m_pRB_OpenExistingDatabase->IsChecked());
m_pPB_OpenDatabase->Enable(m_pRB_OpenExistingDatabase->IsChecked()); m_pFT_DocListLabel->Enable(m_pRB_OpenExistingDatabase->IsChecked());
m_pFT_DocListLabel->Enable(m_pRB_OpenExistingDatabase->IsChecked()); m_pLB_DocumentList->Enable(m_pRB_OpenExistingDatabase->IsChecked());
m_pLB_DocumentList->Enable(m_pRB_OpenExistingDatabase->IsChecked());
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment