summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-11-30 13:29:23 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-12-02 11:10:31 +0100
commitcd5bef5e19c2812386ab6afee4b3bc43fe5541b9 (patch)
treeacaca75e4a2972beb0fc8c0867f048ccc238ec67 /vcl
parente84d236a81af429e92f3da39a83cca02da8fe3aa (diff)
weld ScShareDocumentDlg
Change-Id: I790f957c9ebc6d87a94a355c30215245aaabeb30 Reviewed-on: https://gerrit.libreoffice.org/64345 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.cxx4
-rw-r--r--vcl/unx/gtk3/gtk3gtkinst.cxx25
2 files changed, 25 insertions, 4 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index e61980febe35..b6c6d68d920a 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -2267,9 +2267,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();
}