mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
replace static action names with objects
This commit is contained in:
parent
76d0c6014c
commit
12f5146468
4 changed files with 120 additions and 65 deletions
|
|
@ -12,9 +12,25 @@ pub struct Tray {
|
|||
}
|
||||
|
||||
impl Tray {
|
||||
pub fn new(action_debug: &SimpleAction, action_quit: &SimpleAction) -> Self {
|
||||
pub fn new(
|
||||
action_debug: &SimpleAction,
|
||||
action_quit: &SimpleAction,
|
||||
action_tab_append: &SimpleAction,
|
||||
action_tab_close: &SimpleAction,
|
||||
action_tab_close_all: &SimpleAction,
|
||||
action_tab_page_reload: &SimpleAction,
|
||||
action_tab_pin: &SimpleAction,
|
||||
) -> Self {
|
||||
// Init components
|
||||
let menu = Menu::new(action_debug, action_quit);
|
||||
let menu = Menu::new(
|
||||
action_debug,
|
||||
action_quit,
|
||||
action_tab_append,
|
||||
action_tab_close,
|
||||
action_tab_close_all,
|
||||
action_tab_page_reload,
|
||||
action_tab_pin,
|
||||
);
|
||||
let tab = Tab::new();
|
||||
|
||||
// Init widget
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue