diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-11-30 13:29:23 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-12-03 09:50:36 +0100 |
commit | 196f174b5707760d41d8062aed6410ba08878326 (patch) | |
tree | b23478e1dc23b5b737341e32a2f6adc6a4351d71 /vcl | |
parent | 53170cae2057f705e779ec4b8538d422d071986e (diff) |
weld ScShareDocumentDlg
Change-Id: I790f957c9ebc6d87a94a355c30215245aaabeb30
Reviewed-on: https://gerrit.libreoffice.org/64421
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/app/salvtables.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 25 |
2 files changed, 25 insertions, 4 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index f59e3a2bd7d8..431ee544d32f 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -2266,9 +2266,9 @@ public: m_xTreeView->SetCollapsedEntryBmp(rVclIter.iter, aImage); } - virtual void set_selection_mode(bool bMultiple) override + virtual void set_selection_mode(SelectionMode eMode) override { - m_xTreeView->SetSelectionMode(bMultiple ? SelectionMode::Multiple : SelectionMode::Single); + m_xTreeView->SetSelectionMode(eMode); } virtual int count_selected_rows() const override diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index a37d199e1511..265cc49fd982 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -2925,6 +2925,27 @@ static GtkButtonsType VclToGtk(VclButtonsType eType) return eRet; } +static GtkSelectionMode VclToGtk(SelectionMode eType) +{ + GtkSelectionMode eRet(GTK_SELECTION_NONE); + switch (eType) + { + case SelectionMode::NONE: + eRet = GTK_SELECTION_NONE; + break; + case SelectionMode::Single: + eRet = GTK_SELECTION_SINGLE; + break; + case SelectionMode::Range: + eRet = GTK_SELECTION_BROWSE; + break; + case SelectionMode::Multiple: + eRet = GTK_SELECTION_MULTIPLE; + break; + } + return eRet; +} + class GtkInstanceScrolledWindow : public GtkInstanceContainer, public virtual weld::ScrolledWindow { private: @@ -5065,10 +5086,10 @@ public: gtk_widget_hide(m_pWidget); } - virtual void set_selection_mode(bool bMultiple) override + virtual void set_selection_mode(SelectionMode eMode) override { disable_notify_events(); - gtk_tree_selection_set_mode(gtk_tree_view_get_selection(m_pTreeView), bMultiple ? GTK_SELECTION_MULTIPLE : GTK_SELECTION_SINGLE); + gtk_tree_selection_set_mode(gtk_tree_view_get_selection(m_pTreeView), VclToGtk(eMode)); enable_notify_events(); } |