mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-15 17:20:08 +00:00
use tuple for item options (todo struct)
This commit is contained in:
parent
89d0d13c42
commit
f6d015c8c1
@ -112,12 +112,8 @@ impl Tab {
|
|||||||
self.widget.gobject(),
|
self.widget.gobject(),
|
||||||
self.browser_action.clone(),
|
self.browser_action.clone(),
|
||||||
self.window_action.clone(),
|
self.window_action.clone(),
|
||||||
// Options
|
// Options tuple
|
||||||
position,
|
(position, request, is_pinned, is_selected, is_load),
|
||||||
request,
|
|
||||||
is_pinned,
|
|
||||||
is_selected,
|
|
||||||
is_load,
|
|
||||||
));
|
));
|
||||||
|
|
||||||
// Register dynamically created tab components in the HashMap index
|
// Register dynamically created tab components in the HashMap index
|
||||||
|
@ -33,13 +33,12 @@ impl Item {
|
|||||||
// Actions
|
// Actions
|
||||||
browser_action: Rc<BrowserAction>,
|
browser_action: Rc<BrowserAction>,
|
||||||
window_action: Rc<WindowAction>,
|
window_action: Rc<WindowAction>,
|
||||||
// Options
|
// Options tuple @TODO struct?
|
||||||
position: Option<i32>,
|
options: (Option<i32>, Option<String>, bool, bool, bool),
|
||||||
request: Option<String>,
|
|
||||||
is_pinned: bool,
|
|
||||||
is_selected: bool,
|
|
||||||
is_load: bool,
|
|
||||||
) -> Self {
|
) -> Self {
|
||||||
|
// Get item options from tuple
|
||||||
|
let (position, request, is_pinned, is_selected, is_load) = options;
|
||||||
|
|
||||||
// Generate unique ID for new page components
|
// Generate unique ID for new page components
|
||||||
let id = uuid_string_random();
|
let id = uuid_string_random();
|
||||||
|
|
||||||
@ -150,12 +149,8 @@ impl Item {
|
|||||||
// Actions
|
// Actions
|
||||||
browser_action.clone(),
|
browser_action.clone(),
|
||||||
window_action.clone(),
|
window_action.clone(),
|
||||||
// Options
|
// Options tuple
|
||||||
None,
|
(None, None, record.is_pinned, record.is_selected, false),
|
||||||
None,
|
|
||||||
record.is_pinned,
|
|
||||||
record.is_selected,
|
|
||||||
false,
|
|
||||||
));
|
));
|
||||||
|
|
||||||
// Delegate restore action to the item childs
|
// Delegate restore action to the item childs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user