mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
implement about dialog
This commit is contained in:
parent
39ee50c4ba
commit
eca93df1eb
7 changed files with 74 additions and 11 deletions
|
|
@ -16,6 +16,7 @@ impl Header {
|
|||
// Construct
|
||||
pub fn new_arc(
|
||||
// Actions
|
||||
action_about: SimpleAction,
|
||||
action_debug: SimpleAction,
|
||||
action_profile: SimpleAction,
|
||||
action_quit: SimpleAction,
|
||||
|
|
@ -32,6 +33,7 @@ impl Header {
|
|||
) -> Arc<Self> {
|
||||
// Init components
|
||||
let bar = Bar::new_arc(
|
||||
action_about,
|
||||
action_debug,
|
||||
action_profile,
|
||||
action_quit,
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ pub struct Bar {
|
|||
impl Bar {
|
||||
// Construct
|
||||
pub fn new_arc(
|
||||
action_about: SimpleAction,
|
||||
action_debug: SimpleAction,
|
||||
action_profile: SimpleAction,
|
||||
action_quit: SimpleAction,
|
||||
|
|
@ -36,6 +37,7 @@ impl Bar {
|
|||
let control = Control::new_arc();
|
||||
let tab = Tab::new_arc(action_page_new.clone(), view);
|
||||
let menu = Menu::new_arc(
|
||||
action_about,
|
||||
action_debug,
|
||||
action_profile,
|
||||
action_quit,
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ pub struct Menu {
|
|||
#[rustfmt::skip] // @TODO template builder?
|
||||
impl Menu {
|
||||
pub fn new_arc(
|
||||
action_about: SimpleAction,
|
||||
action_debug: SimpleAction,
|
||||
action_profile: SimpleAction,
|
||||
action_quit: SimpleAction,
|
||||
|
|
@ -64,6 +65,7 @@ impl Menu {
|
|||
let main_tool = gio::Menu::new();
|
||||
main_tool.append(Some("Debug"), Some(&detailed_action_name(action_debug)));
|
||||
main_tool.append(Some("Profile"), Some(&detailed_action_name(action_profile)));
|
||||
main_tool.append(Some("About"), Some(&detailed_action_name(action_about)));
|
||||
|
||||
main.append_submenu(Some("Tool"), &main_tool);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue