mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-15 17:20:08 +00:00
update comments
This commit is contained in:
parent
a55f4724bc
commit
2aed6691b9
@ -85,17 +85,17 @@ impl Tab {
|
|||||||
|
|
||||||
// Init events
|
// Init events
|
||||||
|
|
||||||
// Setup actions for context menu
|
|
||||||
widget.gobject().connect_setup_menu({
|
widget.gobject().connect_setup_menu({
|
||||||
|
// Clone actions to update
|
||||||
let action_page_close = action_page_close.clone();
|
let action_page_close = action_page_close.clone();
|
||||||
let action_page_home = action_page_home.clone();
|
let action_page_home = action_page_home.clone();
|
||||||
let action_page_reload = action_page_reload.clone();
|
let action_page_reload = action_page_reload.clone();
|
||||||
move |tab_view, tab_page| {
|
move |tab_view, tab_page| {
|
||||||
// Get state
|
// Setup state for selected page
|
||||||
let state = match tab_page {
|
let state = match tab_page {
|
||||||
// Menu opened: setup selected page
|
// Context menu opened
|
||||||
Some(this) => tab_view.page_position(this).to_variant(),
|
Some(this) => tab_view.page_position(this).to_variant(),
|
||||||
// Menu closed: reset to defaults
|
// Context menu closed (reset state to defaults)
|
||||||
None => (-1).to_variant(),
|
None => (-1).to_variant(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user