mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 09:35:28 +00:00
connect bookmark action
This commit is contained in:
parent
7b9bd95c09
commit
d0a7c3079d
12 changed files with 76 additions and 64 deletions
|
|
@ -7,18 +7,18 @@ use gtk::glib::{gformat, GString, Uri};
|
|||
use std::{cell::RefCell, rc::Rc};
|
||||
|
||||
pub struct Home {
|
||||
window_action: Rc<WindowAction>,
|
||||
action: Rc<WindowAction>,
|
||||
uri: RefCell<Option<Uri>>,
|
||||
widget: Rc<Widget>,
|
||||
}
|
||||
|
||||
impl Home {
|
||||
// Construct
|
||||
pub fn new(window_action: Rc<WindowAction>) -> Self {
|
||||
pub fn new(action: Rc<WindowAction>) -> Self {
|
||||
Self {
|
||||
window_action: window_action.clone(),
|
||||
action: action.clone(),
|
||||
uri: RefCell::new(None),
|
||||
widget: Rc::new(Widget::new(window_action)),
|
||||
widget: Rc::new(Widget::new(action)),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -34,7 +34,7 @@ impl Home {
|
|||
self.uri.replace(uri);
|
||||
|
||||
// Update action status
|
||||
self.window_action.home().gobject().set_enabled(status);
|
||||
self.action.home().gobject().set_enabled(status);
|
||||
|
||||
// Update child components
|
||||
self.widget.update(status);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue