summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-05-18 17:57:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-05-18 21:47:48 +0200
commit1f3d18445cad89a8ab572028f2bc1b54914893e5 (patch)
treefd3db9f93683a228fe576c9dcbe26015140f411d /dbaccess
parent33cc1debf963c503636cf9219aa81d1a6cf2e943 (diff)
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.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/dlg/admincontrols.cxx19
-rw-r--r--dbaccess/source/ui/dlg/generalpage.cxx25
2 files changed, 24 insertions, 20 deletions
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());
}
}