mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
init context menu for page tabs
This commit is contained in:
parent
51f543143d
commit
b443d1c58e
6 changed files with 93 additions and 27 deletions
|
|
@ -11,7 +11,7 @@ use window::Window;
|
|||
use adw::ApplicationWindow;
|
||||
use gtk::{
|
||||
gio::{Cancellable, File, SimpleAction},
|
||||
prelude::GtkWindowExt,
|
||||
prelude::{ActionExt, GtkWindowExt},
|
||||
FileLauncher,
|
||||
};
|
||||
use sqlite::Transaction;
|
||||
|
|
@ -174,8 +174,14 @@ impl Browser {
|
|||
|
||||
action_page_reload.connect_activate({
|
||||
let window = window.clone();
|
||||
move |_, _| {
|
||||
window.tab_page_navigation_reload();
|
||||
move |this, _| {
|
||||
let page_position = this
|
||||
.state()
|
||||
.expect("Page position required for reload action")
|
||||
.get::<i32>()
|
||||
.expect("Parameter does not match `i32`");
|
||||
|
||||
window.tab_page_navigation_reload(page_position);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue