app: display node properties on double-clicked

This commit is contained in:
Stéphane Cerveau 2023-02-09 14:05:42 +01:00
parent a5767b21fe
commit 3f75581d60

View file

@ -786,6 +786,19 @@ impl GPSApp {
None 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::<u32>().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 // Setup the favorite list
GPSUI::elements::setup_favorite_list(self); GPSUI::elements::setup_favorite_list(self);