From 3f75581d60d2c9860a2d097478869c79c21eedc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Thu, 9 Feb 2023 14:05:42 +0100 Subject: [PATCH] app: display node properties on double-clicked --- src/app.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/app.rs b/src/app.rs index 2eac9fc..87ca37c 100644 --- a/src/app.rs +++ b/src/app.rs @@ -786,6 +786,19 @@ impl GPSApp { None }), ); + let app_weak = self.downgrade(); + self.graphview.borrow().connect_local( + "node-double-clicked", + false, + glib::clone!(@weak application => @default-return None, move |values: &[Value]| { + let app = upgrade_weak!(app_weak, None); + let node_id = values[1].get::().expect("node id args[1]"); + GPS_TRACE!("Node double clicked id={}", node_id); + let node = app.graphview.borrow().node(node_id).unwrap(); + GPSUI::properties::display_plugin_properties(&app, &node.name(), node_id); + None + }), + ); // Setup the favorite list GPSUI::elements::setup_favorite_list(self);