reorganize reload action, add middle click handler

This commit is contained in:
yggverse 2025-01-26 13:28:20 +02:00
parent 3ee6a03c30
commit 8b4d184ad7
5 changed files with 80 additions and 20 deletions

View file

@ -0,0 +1,13 @@
use gtk::{gio::SimpleAction, glib::uuid_string_random};
pub trait Reload {
fn reload() -> Self;
}
impl Reload for SimpleAction {
fn reload() -> Self {
let reload = SimpleAction::new(&uuid_string_random(), None);
reload.set_enabled(false);
reload
}
}