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

@ -4,7 +4,6 @@ use gtk::{
prelude::{ActionMapExt, BoxExt, IsA, WidgetExt},
Box, Orientation,
};
use std::rc::Rc;
pub struct Widget {
gobject: Box,
@ -12,7 +11,7 @@ pub struct Widget {
impl Widget {
// Construct
pub fn new_rc(
pub fn new(
name: &str,
// Actions
action_page_open: SimpleAction,
@ -20,7 +19,7 @@ impl Widget {
navigation: &impl IsA<gtk::Widget>,
content: &impl IsA<gtk::Widget>,
input: &impl IsA<gtk::Widget>,
) -> Rc<Self> {
) -> Self {
// Init additional action group
let action_group = SimpleActionGroup::new();
action_group.add_action(&action_page_open);
@ -37,7 +36,7 @@ impl Widget {
gobject.insert_action_group(&uuid_string_random(), Some(&action_group));
Rc::new(Self { gobject })
Self { gobject }
}
// Getters