mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
use shared reference for tab item id
This commit is contained in:
parent
e66b065fc3
commit
ea3aab4d68
3 changed files with 7 additions and 6 deletions
|
|
@ -24,7 +24,7 @@ use std::rc::Rc;
|
|||
pub struct Item {
|
||||
// Auto-generated unique item ID
|
||||
// useful as widget name in GTK actions callback
|
||||
pub id: GString,
|
||||
pub id: Rc<GString>,
|
||||
// Components
|
||||
pub page: Rc<Page>,
|
||||
pub widget: Rc<Widget>,
|
||||
|
|
@ -42,7 +42,7 @@ impl Item {
|
|||
let (position, request, is_pinned, is_selected, is_attention, is_load) = options;
|
||||
|
||||
// Generate unique ID for new page components
|
||||
let id = uuid_string_random();
|
||||
let id = Rc::new(uuid_string_random());
|
||||
|
||||
// Init components
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue