[baobab] window: select the row before opening the context menu
- From: Stefano Facchini <sfacchini src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [baobab] window: select the row before opening the context menu
- Date: Fri, 26 Jun 2015 09:25:09 +0000 (UTC)
commit 24a8a036bdb9a6415cd30d260bd9bb4a2e85e431
Author: Stefano Facchini <stefano facchini gmail com>
Date: Fri Jun 26 11:23:52 2015 +0200
window: select the row before opening the context menu
https://bugzilla.gnome.org/show_bug.cgi?id=751521
src/baobab-window.vala | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/baobab-window.vala b/src/baobab-window.vala
index 3baf13d..cc27e69 100644
--- a/src/baobab-window.vala
+++ b/src/baobab-window.vala
@@ -410,7 +410,11 @@ namespace Baobab {
void setup_treeview () {
treeview.button_press_event.connect ((event) => {
if (event.triggers_context_menu ()) {
- return show_treeview_popup (treeview_popup_menu, event);
+ Gtk.TreePath path;
+ if (treeview.get_path_at_pos ((int)event.x, (int)event.y, out path, null, null, null)) {
+ treeview.get_selection ().select_path (path);
+ return show_treeview_popup (treeview_popup_menu, event);
+ }
}
return false;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]