mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
reorganize home action, add middle click handler
This commit is contained in:
parent
418b04c86c
commit
3ee6a03c30
5 changed files with 93 additions and 30 deletions
|
|
@ -1,8 +1,11 @@
|
|||
mod history;
|
||||
mod home;
|
||||
mod ident;
|
||||
mod load;
|
||||
|
||||
use gtk::gio::SimpleAction;
|
||||
use history::History;
|
||||
use home::Home;
|
||||
use ident::Ident;
|
||||
use load::Load;
|
||||
|
||||
|
|
@ -11,6 +14,7 @@ use std::rc::Rc;
|
|||
/// [SimpleActionGroup](https://docs.gtk.org/gio/class.SimpleActionGroup.html) wrapper for `Browser` actions
|
||||
pub struct Action {
|
||||
pub history: Rc<History>,
|
||||
pub home: SimpleAction,
|
||||
pub ident: Rc<Ident>,
|
||||
pub load: Rc<Load>,
|
||||
}
|
||||
|
|
@ -28,6 +32,7 @@ impl Action {
|
|||
pub fn new() -> Self {
|
||||
let ident = Rc::new(Ident::new());
|
||||
let load = Rc::new(Load::new());
|
||||
let home = SimpleAction::home();
|
||||
|
||||
let history = Rc::new(History::build({
|
||||
let load = load.clone();
|
||||
|
|
@ -36,6 +41,7 @@ impl Action {
|
|||
|
||||
Self {
|
||||
history,
|
||||
home,
|
||||
ident,
|
||||
load,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue