use returned response value

This commit is contained in:
yggverse 2024-11-30 19:06:08 +02:00
parent 065c176c4f
commit 7674553ac9

View File

@ -88,9 +88,9 @@ impl Widget {
pub fn on_apply(&self, callback: impl Fn(Value) + 'static) {
self.gobject.connect_response(Some(RESPONSE_APPLY.0), {
let form = self.form.clone();
move |this, _| {
move |this, response| {
// Prevent double-click action
this.set_response_enabled(RESPONSE_APPLY.0, false);
this.set_response_enabled(response, false);
// Result
callback(form.list.selected())