mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
add view source menu item
This commit is contained in:
parent
85735d33e2
commit
e66b065fc3
8 changed files with 124 additions and 0 deletions
|
|
@ -60,6 +60,7 @@ impl Tab {
|
|||
action.pin.change_state(state);
|
||||
action.reload.change_state(state);
|
||||
action.save_as.change_state(state);
|
||||
action.source.change_state(state);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -161,6 +162,14 @@ impl Tab {
|
|||
}
|
||||
}
|
||||
|
||||
// View source for page at given `position`, `None` to use selected page (if available)
|
||||
pub fn source(&self, page_position: Option<i32>) {
|
||||
if let Some(item) = self.item(page_position) {
|
||||
item.page.navigation.request.to_source();
|
||||
item.page.load(true);
|
||||
}
|
||||
}
|
||||
|
||||
/// Toggle `Bookmark` in current `Profile` for `Page` at given `position` (current page on `None`)
|
||||
/// * return `true` on bookmark created, `false` on deleted; `Error` otherwise.
|
||||
pub fn bookmark(&self, page_position: Option<i32>) -> Result<bool, Error> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue