diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-05-20 15:30:35 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-05-20 20:27:38 +0200 |
commit | bb166403ef1026e3665b2d60810c71955d7402c0 (patch) | |
tree | 8b53027c66feaf328ca2a15e2aaff6fa13fa5ec4 /fpicker | |
parent | 27c89d6db49855ffad5ec38bb4842f5d30b42a05 (diff) |
use toggle instead of click for CheckButton
Change-Id: I7196581a8b7c307d531f6995e1c24db746afdb26
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115883
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'fpicker')
-rw-r--r-- | fpicker/source/office/iodlg.cxx | 21 | ||||
-rw-r--r-- | fpicker/source/office/iodlg.hxx | 4 |
2 files changed, 12 insertions, 13 deletions
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index 98c89e2b2e5e..a861716559ef 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -359,16 +359,16 @@ SvtFileDialog::SvtFileDialog(weld::Window* pParent, PickerFlags nStyle) { m_xCbReadOnly->set_help_id( HID_FILEOPEN_READONLY ); m_xCbReadOnly->set_label( FpsResId( STR_SVT_FILEPICKER_READONLY ) ); - m_xCbReadOnly->connect_clicked( LINK( this, SvtFileDialog, ClickHdl_Impl ) ); + m_xCbReadOnly->connect_toggled( LINK( this, SvtFileDialog, ClickHdl_Impl ) ); m_xCbReadOnly->show(); } if ( nStyle & PickerFlags::Password ) { m_xImpl->m_xCbPassword->set_label( FpsResId( STR_SVT_FILEPICKER_PASSWORD ) ); - m_xImpl->m_xCbPassword->connect_clicked( LINK( this, SvtFileDialog, ClickHdl_Impl ) ); + m_xImpl->m_xCbPassword->connect_toggled( LINK( this, SvtFileDialog, ClickHdl_Impl ) ); m_xImpl->m_xCbPassword->show(); - m_xImpl->m_xCbGPGEncrypt->connect_clicked( LINK( this, SvtFileDialog, ClickHdl_Impl ) ); + m_xImpl->m_xCbGPGEncrypt->connect_toggled( LINK( this, SvtFileDialog, ClickHdl_Impl ) ); m_xImpl->m_xCbGPGEncrypt->show(); } @@ -1213,7 +1213,7 @@ IMPL_LINK( SvtFileDialog, OpenDoneHdl_Impl, SvtFileView*, pView, void ) EnableControl( m_xImpl->m_xBtnUp->getWidget(), bCanTravelUp ); } -IMPL_LINK_NOARG(SvtFileDialog, AutoExtensionHdl_Impl, weld::Button&, void) +IMPL_LINK_NOARG(SvtFileDialog, AutoExtensionHdl_Impl, weld::ToggleButton&, void) { if (m_pFileNotifier) m_pFileNotifier->notify(CTRL_STATE_CHANGED, CHECKBOX_AUTOEXTENSION); @@ -1222,7 +1222,7 @@ IMPL_LINK_NOARG(SvtFileDialog, AutoExtensionHdl_Impl, weld::Button&, void) lcl_autoUpdateFileExtension( this, m_xImpl->GetCurFilter()->GetExtension() ); } -IMPL_LINK( SvtFileDialog, ClickHdl_Impl, weld::Button&, rCheckBox, void ) +IMPL_LINK( SvtFileDialog, ClickHdl_Impl, weld::ToggleButton&, rCheckBox, void ) { if (!m_pFileNotifier) return; @@ -1248,7 +1248,6 @@ IMPL_LINK( SvtFileDialog, ClickHdl_Impl, weld::Button&, rCheckBox, void ) m_pFileNotifier->notify( CTRL_STATE_CHANGED, nId ); } - IMPL_LINK_NOARG(SvtFileDialog, PlayButtonHdl_Impl, weld::Button&, void) { if (m_pFileNotifier) @@ -2043,7 +2042,7 @@ void SvtFileDialog::AddControls_Impl( ) { m_xCbLinkBox->set_label( FpsResId( STR_SVT_FILEPICKER_INSERT_AS_LINK ) ); m_xCbLinkBox->set_help_id( HID_FILEDLG_LINK_CB ); - m_xCbLinkBox->connect_clicked( LINK( this, SvtFileDialog, ClickHdl_Impl ) ); + m_xCbLinkBox->connect_toggled( LINK( this, SvtFileDialog, ClickHdl_Impl ) ); m_xCbLinkBox->show(); } @@ -2055,7 +2054,7 @@ void SvtFileDialog::AddControls_Impl( ) // "preview" m_xCbPreviewBox->set_label( FpsResId( STR_SVT_FILEPICKER_SHOW_PREVIEW ) ); m_xCbPreviewBox->set_help_id( HID_FILEDLG_PREVIEW_CB ); - m_xCbPreviewBox->connect_clicked( LINK( this, SvtFileDialog, ClickHdl_Impl ) ); + m_xCbPreviewBox->connect_toggled( LINK( this, SvtFileDialog, ClickHdl_Impl ) ); m_xCbPreviewBox->show(); // generate preview window just here @@ -2070,21 +2069,21 @@ void SvtFileDialog::AddControls_Impl( ) { m_xImpl->m_xCbAutoExtension->set_label( FpsResId( STR_SVT_FILEPICKER_AUTO_EXTENSION ) ); m_xImpl->m_xCbAutoExtension->set_active(true); - m_xImpl->m_xCbAutoExtension->connect_clicked( LINK( this, SvtFileDialog, AutoExtensionHdl_Impl ) ); + m_xImpl->m_xCbAutoExtension->connect_toggled( LINK( this, SvtFileDialog, AutoExtensionHdl_Impl ) ); m_xImpl->m_xCbAutoExtension->show(); } if ( m_nPickerFlags & PickerFlags::FilterOptions ) { m_xImpl->m_xCbOptions->set_label( FpsResId( STR_SVT_FILEPICKER_FILTER_OPTIONS ) ); - m_xImpl->m_xCbOptions->connect_clicked( LINK( this, SvtFileDialog, ClickHdl_Impl ) ); + m_xImpl->m_xCbOptions->connect_toggled( LINK( this, SvtFileDialog, ClickHdl_Impl ) ); m_xImpl->m_xCbOptions->show(); } if ( m_nPickerFlags & PickerFlags::Selection ) { m_xCbSelection->set_label( FpsResId( STR_SVT_FILEPICKER_SELECTION ) ); - m_xCbSelection->connect_clicked( LINK( this, SvtFileDialog, ClickHdl_Impl ) ); + m_xCbSelection->connect_toggled( LINK( this, SvtFileDialog, ClickHdl_Impl ) ); m_xCbSelection->show(); } diff --git a/fpicker/source/office/iodlg.hxx b/fpicker/source/office/iodlg.hxx index c53302038bb0..4eec689116fa 100644 --- a/fpicker/source/office/iodlg.hxx +++ b/fpicker/source/office/iodlg.hxx @@ -120,8 +120,8 @@ private: DECL_LINK(DblClickHdl_Impl, SvtFileView*, bool); DECL_LINK(EntrySelectHdl_Impl, weld::ComboBox&, void); DECL_LINK(OpenDoneHdl_Impl, SvtFileView*, void); - DECL_LINK(AutoExtensionHdl_Impl, weld::Button&, void); - DECL_LINK(ClickHdl_Impl, weld::Button&, void); + DECL_LINK(AutoExtensionHdl_Impl, weld::ToggleButton&, void); + DECL_LINK(ClickHdl_Impl, weld::ToggleButton&, void); DECL_LINK(PlayButtonHdl_Impl, weld::Button&, void); DECL_LINK(SizeAllocHdl, const Size&, void); |