add new tab item action group, delegate history handle to action implementation

This commit is contained in:
yggverse 2025-01-25 17:28:05 +02:00
parent 5145a53bfa
commit 913030a955
29 changed files with 409 additions and 232 deletions

View file

@ -0,0 +1,25 @@
use gtk::{
gio::SimpleActionGroup,
glib::{uuid_string_random, GString},
};
/// [SimpleActionGroup](https://docs.gtk.org/gio/class.SimpleActionGroup.html) wrapper for `Tab` actions
pub struct Action {
pub id: GString,
pub simple_action_group: SimpleActionGroup,
}
impl Default for Action {
fn default() -> Self {
Self::new()
}
}
impl Action {
pub fn new() -> Self {
Self {
id: uuid_string_random(),
simple_action_group: SimpleActionGroup::new(),
}
}
}