summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-05-19 15:16:47 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-05-19 21:36:02 +0200
commit6815067b75ab79c050d07693a9a1b7e306a4af1b (patch)
treee2896b92c1260274b5829b5429748a52beb382d6 /dbaccess
parent3de15e365d120c92147f79dab082cca395abf75e (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')
-rw-r--r--dbaccess/source/ui/dlg/adtabdlg.cxx5
-rw-r--r--dbaccess/source/ui/dlg/detailpages.cxx25
-rw-r--r--dbaccess/source/ui/dlg/detailpages.hxx1
-rw-r--r--dbaccess/source/ui/dlg/indexdialog.cxx4
-rw-r--r--dbaccess/source/ui/inc/WCPage.hxx2
-rw-r--r--dbaccess/source/ui/inc/adtabdlg.hxx2
-rw-r--r--dbaccess/source/ui/inc/indexdialog.hxx2
-rw-r--r--dbaccess/source/ui/misc/WCPage.cxx4
8 files changed, 22 insertions, 23 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);
}
diff --git a/dbaccess/source/ui/inc/WCPage.hxx b/dbaccess/source/ui/inc/WCPage.hxx
index 2ebb3a5ec441..d56f983199bb 100644
--- a/dbaccess/source/ui/inc/WCPage.hxx
+++ b/dbaccess/source/ui/inc/WCPage.hxx
@@ -42,7 +42,7 @@ namespace dbaui
DECL_LINK( AppendDataClickHdl, weld::Button&, void );
DECL_LINK( RadioChangeHdl, weld::Button&, void );
- DECL_LINK( KeyClickHdl, weld::Button&, void );
+ DECL_LINK( KeyClickHdl, weld::ToggleButton&, void );
bool checkAppendData();
void SetAppendDataRadio();
diff --git a/dbaccess/source/ui/inc/adtabdlg.hxx b/dbaccess/source/ui/inc/adtabdlg.hxx
index a6842081d2dc..c79eec0467e0 100644
--- a/dbaccess/source/ui/inc/adtabdlg.hxx
+++ b/dbaccess/source/ui/inc/adtabdlg.hxx
@@ -70,7 +70,7 @@ namespace dbaui
DECL_LINK( CloseClickHdl, weld::Button&, void);
DECL_LINK( TableListDoubleClickHdl, weld::TreeView&, bool );
DECL_LINK( TableListSelectHdl, weld::TreeView&, void );
- DECL_LINK( OnTypeSelected, weld::Button&, void );
+ DECL_LINK( OnTypeSelected, weld::ToggleButton&, void );
public:
OAddTableDlg(weld::Window* _pParent,
diff --git a/dbaccess/source/ui/inc/indexdialog.hxx b/dbaccess/source/ui/inc/indexdialog.hxx
index ca2e0114d1d6..aa817171a184 100644
--- a/dbaccess/source/ui/inc/indexdialog.hxx
+++ b/dbaccess/source/ui/inc/indexdialog.hxx
@@ -77,7 +77,7 @@ namespace dbaui
DECL_LINK( OnIndexAction, const OString&, void );
DECL_LINK( OnEntryEditing, const weld::TreeIter&, bool );
DECL_LINK( OnEntryEdited, const IterString&, bool );
- DECL_LINK( OnModifiedClick, weld::Button&, void );
+ DECL_LINK( OnModifiedClick, weld::ToggleButton&, void );
DECL_LINK( OnModified, IndexFieldsControl&, void );
DECL_LINK( OnCloseDialog, weld::Button&, void );
diff --git a/dbaccess/source/ui/misc/WCPage.cxx b/dbaccess/source/ui/misc/WCPage.cxx
index 35c8a7fe0f18..3362f17250fe 100644
--- a/dbaccess/source/ui/misc/WCPage.cxx
+++ b/dbaccess/source/ui/misc/WCPage.cxx
@@ -72,7 +72,7 @@ OCopyTable::OCopyTable(weld::Container* pPage, OCopyTableWizard* pWizard)
m_xRB_Def->connect_clicked( LINK( this, OCopyTable, RadioChangeHdl ) );
m_xRB_View->connect_clicked( LINK( this, OCopyTable, RadioChangeHdl ) );
- m_xCB_PrimaryColumn->connect_clicked(LINK( this, OCopyTable, KeyClickHdl ) );
+ m_xCB_PrimaryColumn->connect_toggled(LINK( this, OCopyTable, KeyClickHdl ) );
m_xFT_KeyName->set_sensitive(false);
m_xEdKeyName->set_sensitive(false);
@@ -121,7 +121,7 @@ IMPL_LINK(OCopyTable, RadioChangeHdl, weld::Button&, rButton, void)
m_pParent->setOperation( CopyTableOperation::CreateAsView );
}
-IMPL_LINK_NOARG( OCopyTable, KeyClickHdl, weld::Button&, void )
+IMPL_LINK_NOARG( OCopyTable, KeyClickHdl, weld::ToggleButton&, void )
{
m_xEdKeyName->set_sensitive(m_xCB_PrimaryColumn->get_active());
m_xFT_KeyName->set_sensitive(m_xCB_PrimaryColumn->get_active());