mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 17:45:28 +00:00
move history to page open action, fix request activate action
This commit is contained in:
parent
da46928dfd
commit
78b7dd960b
3 changed files with 25 additions and 28 deletions
|
|
@ -29,10 +29,7 @@ pub struct Widget {
|
|||
|
||||
impl Widget {
|
||||
// Construct
|
||||
pub fn new_arc(
|
||||
action_update: SimpleAction,
|
||||
action_page_reload: SimpleAction, // @TODO local `action_page_open`?
|
||||
) -> Arc<Self> {
|
||||
pub fn new_arc(action_update: SimpleAction, action_page_open: SimpleAction) -> Arc<Self> {
|
||||
// Init animated progress bar state
|
||||
let progress = Arc::new(Progress {
|
||||
fraction: RefCell::new(0.0),
|
||||
|
|
@ -50,8 +47,8 @@ impl Widget {
|
|||
action_update.activate(Some(&"".to_variant())); // @TODO
|
||||
});
|
||||
|
||||
gobject.connect_activate(move |_| {
|
||||
action_page_reload.activate(None);
|
||||
gobject.connect_activate(move |this| {
|
||||
action_page_open.activate(Some(&this.text().to_variant()));
|
||||
});
|
||||
|
||||
gobject.connect_state_flags_changed({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue