mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-03 01:55:27 +00:00
define ptr container outside
This commit is contained in:
parent
7b2c07ac45
commit
a5fc2a7475
58 changed files with 230 additions and 272 deletions
|
|
@ -11,7 +11,7 @@ pub struct Widget {
|
|||
|
||||
impl Widget {
|
||||
// Construct
|
||||
pub fn new_rc(window_action: Rc<WindowAction>) -> Rc<Self> {
|
||||
pub fn new(window_action: Rc<WindowAction>) -> Self {
|
||||
// Init gobject
|
||||
let gobject = Button::builder()
|
||||
.icon_name("go-home-symbolic")
|
||||
|
|
@ -22,8 +22,8 @@ impl Widget {
|
|||
// Init events
|
||||
gobject.connect_clicked(move |_| window_action.home().activate());
|
||||
|
||||
// Return activated struct
|
||||
Rc::new(Self { gobject })
|
||||
// Return activated `Self`
|
||||
Self { gobject }
|
||||
}
|
||||
|
||||
// Actions
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue