[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 10/10: Select launcher on right click.
noreply at xfce.org
noreply at xfce.org
Tue Dec 31 11:39:59 CET 2019
This is an automated email from the git hooks/post-receive script.
g o t t c o d e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository panel-plugins/xfce4-whiskermenu-plugin.
commit d1860161cfeb8f3d1bcc13c9d123c19cf658beb5
Author: Graeme Gott <graeme at gottcode.org>
Date: Fri Dec 27 09:36:59 2019 -0500
Select launcher on right click.
---
panel-plugin/page.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/panel-plugin/page.cpp b/panel-plugin/page.cpp
index c631df1..55f46ee 100644
--- a/panel-plugin/page.cpp
+++ b/panel-plugin/page.cpp
@@ -343,11 +343,11 @@ void Page::create_context_menu(GtkTreePath* path, GdkEvent* event)
GtkTreeModel* model = m_view->get_model();
GtkTreeIter iter;
gtk_tree_model_get_iter(model, &iter, path);
- gtk_tree_path_free(path);
gtk_tree_model_get(model, &iter, LauncherView::COLUMN_LAUNCHER, &m_selected_launcher, -1);
if (!m_selected_launcher || (m_selected_launcher->get_type() != Launcher::Type))
{
m_selected_launcher = NULL;
+ gtk_tree_path_free(path);
return;
}
@@ -423,6 +423,10 @@ G_GNUC_END_IGNORE_DEPRECATIONS
// Show context menu
gtk_menu_attach_to_widget(GTK_MENU(menu), m_view->get_widget(), NULL);
gtk_menu_popup_at_pointer(GTK_MENU(menu), event);
+
+ // Keep selection
+ m_view->select_path(path);
+ 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