summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-11-23 17:14:25 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-11-24 15:42:17 +0100
commit51e6a95757906dff8b2819a4141bf3dc7938e95f (patch)
tree187342c153d301242b3bfd6cba14fec46b1ee110 /vcl/unx
parent7798c84c969b09f519be7f382fa55e15b4ddcb0b (diff)
allow collapsing rows
Change-Id: I6b137e4fbb860a1d40acc961dae413bcdb27575a Reviewed-on: https://gerrit.libreoffice.org/63894 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/gtk3/gtk3gtkinst.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 1fefb9db0169..b2800cf970ee 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -4641,6 +4641,16 @@ public:
gtk_tree_path_free(path);
}
+ virtual void collapse_row(weld::TreeIter& rIter) override
+ {
+ GtkInstanceTreeIter& rGtkIter = static_cast<GtkInstanceTreeIter&>(rIter);
+ GtkTreeModel *pModel = GTK_TREE_MODEL(m_pTreeStore);
+ GtkTreePath* path = gtk_tree_model_get_path(pModel, &rGtkIter.iter);
+ if (gtk_tree_view_row_expanded(m_pTreeView, path))
+ gtk_tree_view_collapse_row(m_pTreeView, path);
+ gtk_tree_path_free(path);
+ }
+
virtual OUString get_text(const weld::TreeIter& rIter) const override
{
const GtkInstanceTreeIter& rGtkIter = static_cast<const GtkInstanceTreeIter&>(rIter);