mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
move debug menu item to the tool submenu, draft open profile dir action
This commit is contained in:
parent
c8d0b7151e
commit
82219c01b9
5 changed files with 41 additions and 21 deletions
|
|
@ -29,7 +29,8 @@ impl Browser {
|
|||
// Extras
|
||||
// connection: Arc<sqlite::Connection>,
|
||||
// Actions
|
||||
action_debug: Arc<SimpleAction>,
|
||||
action_tool_debug: Arc<SimpleAction>,
|
||||
action_tool_profile_directory: Arc<SimpleAction>,
|
||||
action_quit: Arc<SimpleAction>,
|
||||
action_update: Arc<SimpleAction>,
|
||||
action_tab_append: Arc<SimpleAction>,
|
||||
|
|
@ -46,7 +47,8 @@ impl Browser {
|
|||
|
||||
// Init components
|
||||
let header = Arc::new(Header::new(
|
||||
action_debug.clone(),
|
||||
action_tool_debug.clone(),
|
||||
action_tool_profile_directory.clone(),
|
||||
action_quit.clone(),
|
||||
action_tab_append.clone(),
|
||||
action_tab_close.clone(),
|
||||
|
|
@ -75,7 +77,8 @@ impl Browser {
|
|||
.build();
|
||||
|
||||
// Assign actions
|
||||
widget.add_action(action_debug.as_ref());
|
||||
widget.add_action(action_tool_debug.as_ref());
|
||||
widget.add_action(action_tool_profile_directory.as_ref());
|
||||
widget.add_action(action_quit.as_ref());
|
||||
widget.add_action(action_update.as_ref());
|
||||
widget.add_action(action_tab_append.as_ref());
|
||||
|
|
@ -88,13 +91,19 @@ impl Browser {
|
|||
widget.add_action(action_tab_pin.as_ref());
|
||||
|
||||
// Init events
|
||||
action_debug.connect_activate({
|
||||
action_tool_debug.connect_activate({
|
||||
let widget = widget.clone();
|
||||
move |_, _| {
|
||||
widget.emit_enable_debugging(true);
|
||||
}
|
||||
});
|
||||
|
||||
action_tool_profile_directory.connect_activate({
|
||||
move |_, _| {
|
||||
// @TODO
|
||||
}
|
||||
});
|
||||
|
||||
action_quit.connect_activate({
|
||||
let widget = widget.clone();
|
||||
move |_, _| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue