mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 09:35:28 +00:00
delegate history_snap action to protocol driver implementation
This commit is contained in:
parent
68b3119bb1
commit
33d5d414ac
16 changed files with 124 additions and 147 deletions
|
|
@ -24,9 +24,7 @@ pub fn build(mime: &str, download: Option<(&Rc<ItemAction>, &Uri)>) -> StatusPag
|
|||
let action = action.clone();
|
||||
let request = request.clone();
|
||||
move |_| {
|
||||
action
|
||||
.load
|
||||
.activate(Some(&format!("download:{}", request)), true);
|
||||
action.load.activate(Some(&format!("download:{}", request)));
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -388,8 +388,7 @@ impl Gemini {
|
|||
// Select link handler by scheme
|
||||
return match uri.scheme().as_str() {
|
||||
"gemini" | "titan" => {
|
||||
// Open new page in browser
|
||||
item_action.load.activate(Some(&uri.to_str()), true);
|
||||
item_action.load.activate(Some(&uri.to_str()))
|
||||
}
|
||||
// Scheme not supported, delegate
|
||||
_ => UriLauncher::new(&uri.to_str()).launch(
|
||||
|
|
|
|||
|
|
@ -81,14 +81,11 @@ impl Response for Box {
|
|||
action_send.connect_activate({
|
||||
let form = form.clone();
|
||||
move |_, _| {
|
||||
item_action.load.activate(
|
||||
Some(&format!(
|
||||
"{}?{}",
|
||||
base.to_string_partial(UriHideFlags::QUERY),
|
||||
Uri::escape_string(&form.text(), None, false),
|
||||
)),
|
||||
false, // prevent re-send on history navigation
|
||||
);
|
||||
item_action.load.activate(Some(&format!(
|
||||
"{}?{}",
|
||||
base.to_string_partial(UriHideFlags::QUERY),
|
||||
Uri::escape_string(&form.text(), None, false),
|
||||
)))
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -59,14 +59,11 @@ impl Sensitive for Box {
|
|||
action_send.connect_activate({
|
||||
let form = form.clone();
|
||||
move |_, _| {
|
||||
item_action.load.activate(
|
||||
Some(&format!(
|
||||
"{}?{}",
|
||||
base.to_string_partial(UriHideFlags::QUERY),
|
||||
Uri::escape_string(&form.password_entry_row.text(), None, false),
|
||||
)),
|
||||
false, // prevent re-send on history navigation
|
||||
);
|
||||
item_action.load.activate(Some(&format!(
|
||||
"{}?{}",
|
||||
base.to_string_partial(UriHideFlags::QUERY),
|
||||
Uri::escape_string(&form.password_entry_row.text(), None, false),
|
||||
)))
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue