use gtk::{gio::SimpleAction, glib::uuid_string_random};
pub struct About {
pub simple_action: SimpleAction,
}
impl Default for About {
fn default() -> Self {
Self::new()
}
}
impl About {
pub fn new() -> Self {
Self {
simple_action: SimpleAction::new(&uuid_string_random(), None),
}
}
pub fn connect_activate(&self, callback: impl Fn() + 'static) {
self.simple_action.connect_activate(move |_, _| callback());
}
}