lock open button to prevent double click

This commit is contained in:
yggverse 2024-11-21 15:02:20 +02:00
parent 75fc7f68b8
commit 03eb0fd87d

View File

@ -37,6 +37,9 @@ impl File {
let pem = pem.clone(); let pem = pem.clone();
let update = action.update.clone(); let update = action.update.clone();
move |_| { move |_| {
// Lock open button (prevent double click)
gobject.set_sensitive(false);
// Init file filters related with PEM extension // Init file filters related with PEM extension
let filters = ListStore::new::<FileFilter>(); let filters = ListStore::new::<FileFilter>();
@ -83,6 +86,7 @@ impl File {
gobject.set_label(reason.message()) gobject.set_label(reason.message())
} }
} }
gobject.set_sensitive(true); // unlock
update.activate() update.activate()
} }
}); });