|
|
@ -99,61 +99,38 @@ impl Browser { |
|
|
|
let widget = Arc::new(Widget::new( |
|
|
|
let widget = Arc::new(Widget::new( |
|
|
|
profile_database_connection.clone(), |
|
|
|
profile_database_connection.clone(), |
|
|
|
header.widget(), |
|
|
|
header.widget(), |
|
|
|
window.widget(), |
|
|
|
window.widget_gobject(), |
|
|
|
)); |
|
|
|
)); |
|
|
|
|
|
|
|
|
|
|
|
// Assign actions
|
|
|
|
// Assign actions
|
|
|
|
|
|
|
|
widget.gobject().add_action(action_tool_debug.as_ref()); |
|
|
|
widget |
|
|
|
widget |
|
|
|
.application_window() |
|
|
|
.gobject() |
|
|
|
.add_action(action_tool_debug.as_ref()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
widget |
|
|
|
|
|
|
|
.application_window() |
|
|
|
|
|
|
|
.add_action(action_tool_profile_directory.as_ref()); |
|
|
|
.add_action(action_tool_profile_directory.as_ref()); |
|
|
|
|
|
|
|
widget.gobject().add_action(action_quit.as_ref()); |
|
|
|
widget.application_window().add_action(action_quit.as_ref()); |
|
|
|
widget.gobject().add_action(action_update.as_ref()); |
|
|
|
|
|
|
|
widget.gobject().add_action(action_tab_append.as_ref()); |
|
|
|
|
|
|
|
widget.gobject().add_action(action_tab_close.as_ref()); |
|
|
|
|
|
|
|
widget.gobject().add_action(action_tab_close_all.as_ref()); |
|
|
|
widget |
|
|
|
widget |
|
|
|
.application_window() |
|
|
|
.gobject() |
|
|
|
.add_action(action_update.as_ref()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
widget |
|
|
|
|
|
|
|
.application_window() |
|
|
|
|
|
|
|
.add_action(action_tab_append.as_ref()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
widget |
|
|
|
|
|
|
|
.application_window() |
|
|
|
|
|
|
|
.add_action(action_tab_close.as_ref()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
widget |
|
|
|
|
|
|
|
.application_window() |
|
|
|
|
|
|
|
.add_action(action_tab_close_all.as_ref()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
widget |
|
|
|
|
|
|
|
.application_window() |
|
|
|
|
|
|
|
.add_action(action_tab_page_navigation_base.as_ref()); |
|
|
|
.add_action(action_tab_page_navigation_base.as_ref()); |
|
|
|
|
|
|
|
|
|
|
|
widget |
|
|
|
widget |
|
|
|
.application_window() |
|
|
|
.gobject() |
|
|
|
.add_action(action_tab_page_navigation_history_back.as_ref()); |
|
|
|
.add_action(action_tab_page_navigation_history_back.as_ref()); |
|
|
|
|
|
|
|
|
|
|
|
widget |
|
|
|
widget |
|
|
|
.application_window() |
|
|
|
.gobject() |
|
|
|
.add_action(action_tab_page_navigation_history_forward.as_ref()); |
|
|
|
.add_action(action_tab_page_navigation_history_forward.as_ref()); |
|
|
|
|
|
|
|
|
|
|
|
widget |
|
|
|
widget |
|
|
|
.application_window() |
|
|
|
.gobject() |
|
|
|
.add_action(action_tab_page_navigation_reload.as_ref()); |
|
|
|
.add_action(action_tab_page_navigation_reload.as_ref()); |
|
|
|
|
|
|
|
widget.gobject().add_action(action_tab_pin.as_ref()); |
|
|
|
widget |
|
|
|
|
|
|
|
.application_window() |
|
|
|
|
|
|
|
.add_action(action_tab_pin.as_ref()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Init events
|
|
|
|
// Init events
|
|
|
|
action_tool_debug.connect_activate({ |
|
|
|
action_tool_debug.connect_activate({ |
|
|
|
let widget = widget.clone(); |
|
|
|
let widget = widget.clone(); |
|
|
|
move |_, _| { |
|
|
|
move |_, _| { |
|
|
|
widget.application_window().emit_enable_debugging(true); |
|
|
|
widget.gobject().emit_enable_debugging(true); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
@ -170,7 +147,7 @@ impl Browser { |
|
|
|
action_quit.connect_activate({ |
|
|
|
action_quit.connect_activate({ |
|
|
|
let widget = widget.clone(); |
|
|
|
let widget = widget.clone(); |
|
|
|
move |_, _| { |
|
|
|
move |_, _| { |
|
|
|
widget.application_window().close(); |
|
|
|
widget.gobject().close(); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
@ -303,7 +280,7 @@ impl Browser { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Getters
|
|
|
|
// Getters
|
|
|
|
pub fn widget(&self) -> &ApplicationWindow { |
|
|
|
pub fn widget_gobject(&self) -> &ApplicationWindow { |
|
|
|
&self.widget.application_window() |
|
|
|
&self.widget.gobject() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|