mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
implement separated dialogs for the Bookmarks and History menu items
This commit is contained in:
parent
e548efc93f
commit
ebb38008e1
14 changed files with 378 additions and 171 deletions
|
|
@ -1,12 +1,16 @@
|
|||
mod about;
|
||||
mod bookmarks;
|
||||
mod close;
|
||||
mod debug;
|
||||
mod history;
|
||||
mod profile;
|
||||
mod proxy;
|
||||
|
||||
use about::About;
|
||||
use bookmarks::Bookmarks;
|
||||
use close::Close;
|
||||
use debug::Debug;
|
||||
use history::History;
|
||||
use profile::Profile;
|
||||
use proxy::Proxy;
|
||||
|
||||
|
|
@ -21,8 +25,10 @@ use std::rc::Rc;
|
|||
pub struct Action {
|
||||
// Actions
|
||||
pub about: Rc<About>,
|
||||
pub bookmarks: Rc<Bookmarks>,
|
||||
pub close: Rc<Close>,
|
||||
pub debug: Rc<Debug>,
|
||||
pub history: Rc<History>,
|
||||
pub profile: Rc<Profile>,
|
||||
pub proxy: Rc<Proxy>,
|
||||
// Group
|
||||
|
|
@ -43,8 +49,10 @@ impl Action {
|
|||
pub fn new() -> Self {
|
||||
// Init actions
|
||||
let about = Rc::new(About::new());
|
||||
let bookmarks = Rc::new(Bookmarks::new());
|
||||
let close = Rc::new(Close::new());
|
||||
let debug = Rc::new(Debug::new());
|
||||
let history = Rc::new(History::new());
|
||||
let profile = Rc::new(Profile::new());
|
||||
let proxy = Rc::new(Proxy::new());
|
||||
|
||||
|
|
@ -56,18 +64,22 @@ impl Action {
|
|||
|
||||
// Add action to given group
|
||||
simple_action_group.add_action(&about.simple_action);
|
||||
simple_action_group.add_action(&bookmarks.simple_action);
|
||||
simple_action_group.add_action(&close.simple_action);
|
||||
simple_action_group.add_action(&debug.simple_action);
|
||||
simple_action_group.add_action(&history.simple_action);
|
||||
simple_action_group.add_action(&profile.simple_action);
|
||||
simple_action_group.add_action(&proxy.simple_action);
|
||||
|
||||
// Done
|
||||
Self {
|
||||
about,
|
||||
bookmarks,
|
||||
close,
|
||||
debug,
|
||||
profile,
|
||||
proxy,
|
||||
history,
|
||||
id,
|
||||
simple_action_group,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue