mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
add new tab item action group, delegate history handle to action implementation
This commit is contained in:
parent
5145a53bfa
commit
913030a955
29 changed files with 409 additions and 232 deletions
25
src/app/browser/window/tab/action.rs
Normal file
25
src/app/browser/window/tab/action.rs
Normal 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(),
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue