[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 291/473: Fix menu artifacts when switching categories. Closes #46.

noreply at xfce.org noreply at xfce.org
Mon Feb 16 23:57:41 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 60f4a9720a648b3ee0c75f2bb4bc422559f6d4a1
Author: Graeme Gott <graeme at gottcode.org>
Date:   Tue Dec 10 11:59:10 2013 -0500

    Fix menu artifacts when switching categories. Closes #46.
---
 panel-plugin/launcher-view.cpp |   12 ++++--------
 panel-plugin/launcher-view.h   |    1 -
 panel-plugin/page.cpp          |    1 -
 3 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/panel-plugin/launcher-view.cpp b/panel-plugin/launcher-view.cpp
index b024cb8..27360be 100644
--- a/panel-plugin/launcher-view.cpp
+++ b/panel-plugin/launcher-view.cpp
@@ -115,7 +115,11 @@ void LauncherView::select_path(GtkTreePath* path)
 
 void LauncherView::set_cursor(GtkTreePath* path)
 {
+	GtkTreeSelection* selection = gtk_tree_view_get_selection(m_view);
+	GtkSelectionMode mode = gtk_tree_selection_get_mode(selection);
+	gtk_tree_selection_set_mode(selection, GTK_SELECTION_NONE);
 	gtk_tree_view_set_cursor(m_view, path, NULL, false);
+	gtk_tree_selection_set_mode(selection, mode);
 }
 
 //-----------------------------------------------------------------------------
@@ -149,14 +153,6 @@ void LauncherView::collapse_all()
 
 //-----------------------------------------------------------------------------
 
-void LauncherView::unselect_all()
-{
-	GtkTreeSelection* selection = gtk_tree_view_get_selection(m_view);
-	gtk_tree_selection_unselect_all(selection);
-}
-
-//-----------------------------------------------------------------------------
-
 void LauncherView::set_model(GtkTreeModel* model)
 {
 	m_model = model;
diff --git a/panel-plugin/launcher-view.h b/panel-plugin/launcher-view.h
index 37ecd28..9bf1190 100644
--- a/panel-plugin/launcher-view.h
+++ b/panel-plugin/launcher-view.h
@@ -47,7 +47,6 @@ public:
 	void set_selection_mode(GtkSelectionMode mode);
 
 	void collapse_all();
-	void unselect_all();
 
 	GtkTreeModel* get_model() const
 	{
diff --git a/panel-plugin/page.cpp b/panel-plugin/page.cpp
index bb4b728..f02d08d 100644
--- a/panel-plugin/page.cpp
+++ b/panel-plugin/page.cpp
@@ -76,7 +76,6 @@ void Page::reset_selection()
 		GtkTreePath* path = gtk_tree_model_get_path(model, &iter);
 		get_view()->scroll_to_path(path);
 		get_view()->set_cursor(path);
-		get_view()->unselect_all();
 		gtk_tree_path_free(path);
 	}
 }

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


More information about the Xfce4-commits mailing list