summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-05-19 14:06:14 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-05-19 17:06:52 +0200
commit749be84cefbce1c24b46ab8cc296064216087312 (patch)
treeced723d7c59f45ce991cc6415ff314781658b203 /sfx2
parentbe622ccf9b60290d0577314ac9d76fbcf1cce636 (diff)
use toggle instead of click for ToggleButton
Change-Id: Ia2382e030bb668528e0ad56fd91b19e8621531f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115810 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/inc/emojicontrol.hxx4
-rw-r--r--sfx2/source/control/emojicontrol.cxx22
2 files changed, 13 insertions, 13 deletions
diff --git a/sfx2/inc/emojicontrol.hxx b/sfx2/inc/emojicontrol.hxx
index 2e2ab150762f..787405d101fb 100644
--- a/sfx2/inc/emojicontrol.hxx
+++ b/sfx2/inc/emojicontrol.hxx
@@ -36,9 +36,9 @@ public:
private:
static void ConvertLabelToUnicode(weld::ToggleButton& rBtn);
- FILTER_CATEGORY getFilter(const weld::Button& rBtn) const;
+ FILTER_CATEGORY getFilter(const weld::ToggleButton& rBtn) const;
- DECL_LINK(ActivatePageHdl, weld::Button&, void);
+ DECL_LINK(ActivatePageHdl, weld::ToggleButton&, void);
DECL_STATIC_LINK(SfxEmojiControl, InsertHdl, ThumbnailViewItem*, void);
std::unique_ptr<weld::ToggleButton> mxPeopleBtn;
diff --git a/sfx2/source/control/emojicontrol.cxx b/sfx2/source/control/emojicontrol.cxx
index c3e9910ddacd..0d51ce805e68 100644
--- a/sfx2/source/control/emojicontrol.cxx
+++ b/sfx2/source/control/emojicontrol.cxx
@@ -62,15 +62,15 @@ SfxEmojiControl::SfxEmojiControl(const EmojiPopup* pControl, weld::Widget* pPare
ConvertLabelToUnicode(*mxFlagsBtn);
ConvertLabelToUnicode(*mxUnicode9Btn);
- mxPeopleBtn->connect_clicked(LINK(this, SfxEmojiControl, ActivatePageHdl));
- mxNatureBtn->connect_clicked(LINK(this, SfxEmojiControl, ActivatePageHdl));
- mxFoodBtn->connect_clicked(LINK(this, SfxEmojiControl, ActivatePageHdl));
- mxActivityBtn->connect_clicked(LINK(this, SfxEmojiControl, ActivatePageHdl));
- mxTravelBtn->connect_clicked(LINK(this, SfxEmojiControl, ActivatePageHdl));
- mxObjectsBtn->connect_clicked(LINK(this, SfxEmojiControl, ActivatePageHdl));
- mxSymbolsBtn->connect_clicked(LINK(this, SfxEmojiControl, ActivatePageHdl));
- mxFlagsBtn->connect_clicked(LINK(this, SfxEmojiControl, ActivatePageHdl));
- mxUnicode9Btn->connect_clicked(LINK(this, SfxEmojiControl, ActivatePageHdl));
+ mxPeopleBtn->connect_toggled(LINK(this, SfxEmojiControl, ActivatePageHdl));
+ mxNatureBtn->connect_toggled(LINK(this, SfxEmojiControl, ActivatePageHdl));
+ mxFoodBtn->connect_toggled(LINK(this, SfxEmojiControl, ActivatePageHdl));
+ mxActivityBtn->connect_toggled(LINK(this, SfxEmojiControl, ActivatePageHdl));
+ mxTravelBtn->connect_toggled(LINK(this, SfxEmojiControl, ActivatePageHdl));
+ mxObjectsBtn->connect_toggled(LINK(this, SfxEmojiControl, ActivatePageHdl));
+ mxSymbolsBtn->connect_toggled(LINK(this, SfxEmojiControl, ActivatePageHdl));
+ mxFlagsBtn->connect_toggled(LINK(this, SfxEmojiControl, ActivatePageHdl));
+ mxUnicode9Btn->connect_toggled(LINK(this, SfxEmojiControl, ActivatePageHdl));
mxEmojiView->setItemMaxTextLength(ITEM_MAX_TEXT_LENGTH);
mxEmojiView->setItemDimensions(ITEM_MAX_WIDTH, 0, ITEM_MAX_HEIGHT, ITEM_PADDING);
@@ -99,7 +99,7 @@ void SfxEmojiControl::ConvertLabelToUnicode(weld::ToggleButton& rBtn)
rBtn.set_label(sHexText.toString());
}
-FILTER_CATEGORY SfxEmojiControl::getFilter(const weld::Button& rCurPageId) const
+FILTER_CATEGORY SfxEmojiControl::getFilter(const weld::ToggleButton& rCurPageId) const
{
if (&rCurPageId == mxPeopleBtn.get())
return FILTER_CATEGORY::PEOPLE;
@@ -123,7 +123,7 @@ FILTER_CATEGORY SfxEmojiControl::getFilter(const weld::Button& rCurPageId) const
return FILTER_CATEGORY::PEOPLE;
}
-IMPL_LINK(SfxEmojiControl, ActivatePageHdl, weld::Button&, rButton, void)
+IMPL_LINK(SfxEmojiControl, ActivatePageHdl, weld::ToggleButton&, rButton, void)
{
mxPeopleBtn->set_active(&rButton == mxPeopleBtn.get());
mxNatureBtn->set_active(&rButton == mxNatureBtn.get());