make update action by item id

This commit is contained in:
yggverse 2024-10-15 08:45:44 +03:00
parent c92a5406f5
commit 6c4137f2b6
7 changed files with 48 additions and 41 deletions

View file

@ -17,7 +17,7 @@ use std::sync::Arc;
pub struct Item {
// Auto-generated unique item ID
// useful as widget name in GTK actions callback
id: Arc<GString>,
id: GString,
// Components
page: Arc<Page>,
widget: Arc<Widget>,
@ -39,7 +39,7 @@ impl Item {
is_selected: bool,
) -> Arc<Self> {
// Generate unique ID for new page components
let id = Arc::new(uuid_string_random());
let id = uuid_string_random();
// Init components
let page = Page::new_arc(
@ -201,7 +201,7 @@ impl Item {
}
// Getters
pub fn id(&self) -> Arc<GString> {
pub fn id(&self) -> GString {
self.id.clone()
}