update navigation request on middle click the link

This commit is contained in:
yggverse 2024-10-14 06:42:06 +03:00
parent ee92777039
commit 6ccaf9d4c5
3 changed files with 19 additions and 2 deletions

View file

@ -85,7 +85,7 @@ impl Tab {
action_tab_page_navigation_history_forward.clone();
let action_tab_page_navigation_reload = action_tab_page_navigation_reload.clone();
let action_update = action_update.clone();
move |_, _| {
move |_, request| {
// Init new tab item
let item = Item::new_arc(
&gobject,
@ -99,11 +99,18 @@ impl Tab {
action_update.clone(),
// Options
false,
false, // open on background
false,
);
// Register dynamically created tab components in the HashMap index
index.borrow_mut().insert(item.id(), item.clone());
// Set navigation request
if let Some(variant) = request {
if let Some(value) = variant.get::<String>() {
item.set_page_navigation_request_text(value.as_str())
}
}
}
});