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.browser_action.clone(),
|
||||
self.window_action.clone(),
|
||||
// Options
|
||||
position,
|
||||
request,
|
||||
is_pinned,
|
||||
is_selected,
|
||||
is_load,
|
||||
// Options tuple
|
||||
(position, request, is_pinned, is_selected, is_load),
|
||||
));
|
||||
|
||||
// Register dynamically created tab components in the HashMap index
|
||||
|
@ -33,13 +33,12 @@ impl Item {
|
||||
// Actions
|
||||
browser_action: Rc<BrowserAction>,
|
||||
window_action: Rc<WindowAction>,
|
||||
// Options
|
||||
position: Option<i32>,
|
||||
request: Option<String>,
|
||||
is_pinned: bool,
|
||||
is_selected: bool,
|
||||
is_load: bool,
|
||||
// Options tuple @TODO struct?
|
||||
options: (Option<i32>, Option<String>, bool, bool, bool),
|
||||
) -> Self {
|
||||
// Get item options from tuple
|
||||
let (position, request, is_pinned, is_selected, is_load) = options;
|
||||
|
||||
// Generate unique ID for new page components
|
||||
let id = uuid_string_random();
|
||||
|
||||
@ -150,12 +149,8 @@ impl Item {
|
||||
// Actions
|
||||
browser_action.clone(),
|
||||
window_action.clone(),
|
||||
// Options
|
||||
None,
|
||||
None,
|
||||
record.is_pinned,
|
||||
record.is_selected,
|
||||
false,
|
||||
// Options tuple
|
||||
(None, None, record.is_pinned, record.is_selected, false),
|
||||
));
|
||||
|
||||
// Delegate restore action to the item childs
|
||||
|
Loading…
x
Reference in New Issue
Block a user