mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
begin local actions implementation
This commit is contained in:
parent
9398a835cd
commit
9ff32a3419
19 changed files with 402 additions and 226 deletions
|
|
@ -61,21 +61,32 @@ impl Menu {
|
|||
// Main > Tool
|
||||
let main_tool = gio::Menu::new();
|
||||
|
||||
{ // Debug
|
||||
let (group, action, _, _) = crate::action::APP_BROWSER_WIDGET_DEBUG;
|
||||
main_tool.append(Some("Debug"), Some(&gformat!("{group}.{action}")));
|
||||
}
|
||||
// Debug
|
||||
main_tool.append(Some("Debug"), Some(&gformat!(
|
||||
"{}.{}",
|
||||
browser_action.id(),
|
||||
browser_action.debug().id()
|
||||
)));
|
||||
|
||||
main_tool.append(Some("Profile"), Some(&detailed_action_name(browser_action.profile())));
|
||||
main_tool.append(Some("About"), Some(&detailed_action_name(browser_action.about())));
|
||||
main_tool.append(Some("Profile"), Some(&gformat!(
|
||||
"{}.{}",
|
||||
browser_action.id(),
|
||||
browser_action.profile().id()
|
||||
)));
|
||||
|
||||
main.append_submenu(Some("Tool"), &main_tool);
|
||||
main_tool.append(Some("About"), Some(&gformat!(
|
||||
"{}.{}",
|
||||
browser_action.id(),
|
||||
browser_action.about().id()
|
||||
)));
|
||||
|
||||
{
|
||||
// Quit
|
||||
let (group, action, _, _) = crate::action::APP_BROWSER_WIDGET_CLOSE;
|
||||
main.append(Some("Quit"), Some(&gformat!("{group}.{action}")));
|
||||
}
|
||||
main.append_submenu(Some("Tool"), &main_tool);
|
||||
|
||||
main.append(Some("Quit"), Some(&gformat!(
|
||||
"{}.{}",
|
||||
browser_action.id(),
|
||||
browser_action.close().id()
|
||||
)));
|
||||
|
||||
// Result
|
||||
Rc::new(Self { widget:Widget::new_rc(&main) })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue