define ptr container outside

This commit is contained in:
yggverse 2024-11-11 01:14:09 +02:00
parent 7b2c07ac45
commit a5fc2a7475
58 changed files with 230 additions and 272 deletions

View file

@ -8,7 +8,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("tab-new-symbolic")
@ -20,7 +20,7 @@ impl Widget {
// Init events
gobject.connect_clicked(move |_| window_action.append().activate());
Rc::new(Self { gobject })
Self { gobject }
}
// Getters