diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-05-19 15:16:47 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-05-19 21:36:02 +0200 |
commit | 6815067b75ab79c050d07693a9a1b7e306a4af1b (patch) | |
tree | e2896b92c1260274b5829b5429748a52beb382d6 /dbaccess/source/ui/dlg | |
parent | 3de15e365d120c92147f79dab082cca395abf75e (diff) |
use toggle instead of click for RadioButton
only listen for one toggle for the button grouping
Change-Id: I0c1866c25793ffce50bcf5f5a07fcdc98f64aacc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115818
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'dbaccess/source/ui/dlg')
-rw-r--r-- | dbaccess/source/ui/dlg/adtabdlg.cxx | 5 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/detailpages.cxx | 25 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/detailpages.hxx | 1 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/indexdialog.cxx | 4 |
4 files changed, 17 insertions, 18 deletions
diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx index bab1b0ca78bf..335a346e2e28 100644 --- a/dbaccess/source/ui/dlg/adtabdlg.cxx +++ b/dbaccess/source/ui/dlg/adtabdlg.cxx @@ -347,8 +347,7 @@ OAddTableDlg::OAddTableDlg(weld::Window* pParent, IAddTableDialogContext& _rCont rTableList.set_size_request(aSize.Width(), aSize.Height()); m_xQueryList->set_size_request(aSize.Width(), aSize.Height()); - m_xCaseTables->connect_clicked( LINK( this, OAddTableDlg, OnTypeSelected ) ); - m_xCaseQueries->connect_clicked( LINK( this, OAddTableDlg, OnTypeSelected ) ); + m_xCaseTables->connect_toggled(LINK(this, OAddTableDlg, OnTypeSelected)); m_xAddButton->connect_clicked( LINK( this, OAddTableDlg, AddClickHdl ) ); m_xCloseButton->connect_clicked( LINK( this, OAddTableDlg, CloseClickHdl ) ); rTableList.connect_row_activated( LINK( this, OAddTableDlg, TableListDoubleClickHdl ) ); @@ -435,7 +434,7 @@ IMPL_LINK_NOARG( OAddTableDlg, CloseClickHdl, weld::Button&, void ) m_xDialog->response(RET_CLOSE); } -IMPL_LINK_NOARG( OAddTableDlg, OnTypeSelected, weld::Button&, void ) +IMPL_LINK_NOARG(OAddTableDlg, OnTypeSelected, weld::ToggleButton&, void) { if ( m_xCaseTables->get_active() ) impl_switchTo( Tables ); diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx index 1ce6475b6573..6f7e51e186d7 100644 --- a/dbaccess/source/ui/dlg/detailpages.cxx +++ b/dbaccess/source/ui/dlg/detailpages.cxx @@ -164,7 +164,7 @@ namespace dbaui , m_xIndexes(m_xBuilder->weld_button("indiciesButton")) { m_xIndexes->connect_clicked(LINK(this, ODbaseDetailsPage, OnButtonClicked)); - m_xShowDeleted->connect_clicked(LINK(this, ODbaseDetailsPage, OnButtonClicked)); + m_xShowDeleted->connect_toggled(LINK(this, ODbaseDetailsPage, OnButtonToggled)); } ODbaseDetailsPage::~ODbaseDetailsPage() @@ -209,21 +209,20 @@ namespace dbaui return bChangedSomething; } - IMPL_LINK(ODbaseDetailsPage, OnButtonClicked, weld::Button&, rButton, void) + IMPL_LINK_NOARG(ODbaseDetailsPage, OnButtonClicked, weld::Button&, void) { - if (m_xIndexes.get() == &rButton) - { - ODbaseIndexDialog aIndexDialog(GetFrameWeld(), m_sDsn); - aIndexDialog.run(); - } - else - { - m_xFT_Message->set_visible(m_xShowDeleted->get_active()); - // it was one of the checkboxes -> we count as modified from now on - callModifiedHdl(); - } + ODbaseIndexDialog aIndexDialog(GetFrameWeld(), m_sDsn); + aIndexDialog.run(); } + IMPL_LINK_NOARG(ODbaseDetailsPage, OnButtonToggled, weld::ToggleButton&, void) + { + m_xFT_Message->set_visible(m_xShowDeleted->get_active()); + // it was the checkbox -> we count as modified from now on + callModifiedHdl(); + } + + // OAdoDetailsPage OAdoDetailsPage::OAdoDetailsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs) : OCommonBehaviourTabPage(pPage, pController, "dbaccess/ui/autocharsetpage.ui", "AutoCharset", diff --git a/dbaccess/source/ui/dlg/detailpages.hxx b/dbaccess/source/ui/dlg/detailpages.hxx index 07ea1bb1ab88..d93d8dffa88e 100644 --- a/dbaccess/source/ui/dlg/detailpages.hxx +++ b/dbaccess/source/ui/dlg/detailpages.hxx @@ -101,6 +101,7 @@ namespace dbaui private: DECL_LINK(OnButtonClicked, weld::Button&, void); + DECL_LINK(OnButtonToggled, weld::ToggleButton&, void); }; // OAdoDetailsPage diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx index fa24be183a09..89aabbc0d27f 100644 --- a/dbaccess/source/ui/dlg/indexdialog.cxx +++ b/dbaccess/source/ui/dlg/indexdialog.cxx @@ -116,7 +116,7 @@ namespace dbaui fillIndexList(); - m_xUnique->connect_clicked(LINK(this, DbaIndexDialog, OnModifiedClick)); + m_xUnique->connect_toggled(LINK(this, DbaIndexDialog, OnModifiedClick)); m_xFields->SetModifyHdl(LINK(this, DbaIndexDialog, OnModified)); m_xClose->connect_clicked(LINK(this, DbaIndexDialog, OnCloseDialog)); @@ -615,7 +615,7 @@ namespace dbaui return true; } - IMPL_LINK_NOARG(DbaIndexDialog, OnModifiedClick, weld::Button&, void) + IMPL_LINK_NOARG(DbaIndexDialog, OnModifiedClick, weld::ToggleButton&, void) { OnModified(*m_xFields); } |