[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 152/473: Collapse tree when switching categories.

noreply at xfce.org noreply at xfce.org
Mon Feb 16 23:55:22 CET 2015


This is an automated email from the git hooks/post-receive script.

gottcode pushed a commit to branch master
in repository panel-plugins/xfce4-whiskermenu-plugin.

commit 0ace36cf1c01ec5f7d33df7803fdeced547117fd
Author: Graeme Gott <graeme at gottcode.org>
Date:   Thu Aug 1 15:34:30 2013 -0400

    Collapse tree when switching categories.
---
 src/launcher_view.cpp |    7 +++++++
 src/launcher_view.hpp |    2 +-
 src/page.cpp          |    2 ++
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/launcher_view.cpp b/src/launcher_view.cpp
index 5eb4f85..e47dcd0 100644
--- a/src/launcher_view.cpp
+++ b/src/launcher_view.cpp
@@ -145,6 +145,13 @@ void LauncherView::set_selection_mode(GtkSelectionMode mode)
 
 //-----------------------------------------------------------------------------
 
+void LauncherView::collapse_all()
+{
+	gtk_tree_view_collapse_all(m_view);
+}
+
+//-----------------------------------------------------------------------------
+
 void LauncherView::unselect_all()
 {
 	GtkTreeSelection* selection = gtk_tree_view_get_selection(m_view);
diff --git a/src/launcher_view.hpp b/src/launcher_view.hpp
index b4ac8c1..bac5754 100644
--- a/src/launcher_view.hpp
+++ b/src/launcher_view.hpp
@@ -40,7 +40,6 @@ public:
 
 	GtkTreePath* get_selected_path() const;
 	void activate_path(GtkTreePath* path);
-
 	void scroll_to_path(GtkTreePath* path);
 	void select_path(GtkTreePath* path);
 	void set_cursor(GtkTreePath* path);
@@ -49,6 +48,7 @@ public:
 	void set_reorderable(bool reorderable);
 	void set_selection_mode(GtkSelectionMode mode);
 
+	void collapse_all();
 	void unselect_all();
 
 	GtkTreeModel* get_model() const
diff --git a/src/page.cpp b/src/page.cpp
index fa3025e..48283b9 100644
--- a/src/page.cpp
+++ b/src/page.cpp
@@ -68,6 +68,8 @@ Page::~Page()
 
 void Page::reset_selection()
 {
+	m_view->collapse_all();
+
 	// Clear selection and scroll to top
 	GtkTreeModel* model = m_view->get_model();
 	GtkTreeIter iter;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list