[Libreoffice-commits] core.git: include/vcl vcl/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sat Nov 14 09:49:32 UTC 2020


 include/vcl/toolkit/ivctrl.hxx |    1 +
 vcl/source/control/imivctl.hxx |    5 +++++
 vcl/source/control/ivctrl.cxx  |    6 ++++++
 3 files changed, 12 insertions(+)

New commits:
commit d538de17562b2c7ca2c382aeae7c95827999abe5
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Nov 12 15:13:07 2020 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Nov 14 10:48:45 2020 +0100

    Related: tdf#131970 icon-switcher should be in single-selection mode
    
    Change-Id: Ie5ac5ccf1273905832e934998f206425401b0f30
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105763
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/vcl/toolkit/ivctrl.hxx b/include/vcl/toolkit/ivctrl.hxx
index f4c50b48c84d..e322631036a3 100644
--- a/include/vcl/toolkit/ivctrl.hxx
+++ b/include/vcl/toolkit/ivctrl.hxx
@@ -213,6 +213,7 @@ public:
     virtual void        dispose() override;
 
     WinBits             GetStyle() const;
+    void SetSelectionMode(SelectionMode eMode);
 
     void                SetFont( const vcl::Font& rFont );
     void                SetPointFont( const vcl::Font& rFont );
diff --git a/vcl/source/control/imivctl.hxx b/vcl/source/control/imivctl.hxx
index 8e63a555b6b9..9695e99a665d 100644
--- a/vcl/source/control/imivctl.hxx
+++ b/vcl/source/control/imivctl.hxx
@@ -252,6 +252,11 @@ public:
                         SvxIconChoiceCtrl_Impl( SvtIconChoiceCtrl* pView, WinBits nWinStyle );
                         ~SvxIconChoiceCtrl_Impl();
 
+    void SetSelectionMode(SelectionMode eMode)
+    {
+        eSelectionMode = eMode;
+    }
+
     void                Clear( bool bInCtor );
     void                SetStyle( WinBits nWinStyle );
     WinBits             GetStyle() const { return nWinBits; }
diff --git a/vcl/source/control/ivctrl.cxx b/vcl/source/control/ivctrl.cxx
index dc304e511937..87b746c88da0 100644
--- a/vcl/source/control/ivctrl.cxx
+++ b/vcl/source/control/ivctrl.cxx
@@ -97,6 +97,11 @@ SvtIconChoiceCtrl::SvtIconChoiceCtrl( vcl::Window* pParent, WinBits nWinStyle )
     _pImpl->SetPositionMode( SvxIconChoiceCtrlPositionMode::AutoArrange );
 }
 
+void SvtIconChoiceCtrl::SetSelectionMode(SelectionMode eMode)
+{
+    _pImpl->SetSelectionMode(eMode);
+}
+
 SvtIconChoiceCtrl::~SvtIconChoiceCtrl()
 {
     disposeOnce();
@@ -440,6 +445,7 @@ VerticalTabControl::VerticalTabControl(vcl::Window* pParent)
 {
     SetStyle(GetStyle() | WB_DIALOGCONTROL);
     SetType(WindowType::VERTICALTABCONTROL);
+    m_xChooser->SetSelectionMode(SelectionMode::Single);
     m_xChooser->SetClickHdl(LINK(this, VerticalTabControl, ChosePageHdl_Impl));
     m_xChooser->set_width_request(110);
     m_xChooser->set_height_request(400);


More information about the Libreoffice-commits mailing list