mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
activate tab on construct
This commit is contained in:
parent
ef5eb9b317
commit
1293da7955
2 changed files with 16 additions and 20 deletions
|
|
@ -45,7 +45,22 @@ impl Tab {
|
|||
// Init widget
|
||||
let widget = Arc::new(Widget::new());
|
||||
|
||||
// Return non activated struct
|
||||
// Init events
|
||||
widget.gobject().connect_close_page(move |_, tab_page| {
|
||||
/* @TODO
|
||||
// Cleanup HashMap index
|
||||
let id = tab_page.widget_name();
|
||||
|
||||
// Check for required value as raw access to gobject @TODO
|
||||
if id.is_empty() {
|
||||
panic!("Undefined tab index!")
|
||||
}
|
||||
|
||||
tab.index.borrow_mut().remove(&id); */
|
||||
Propagation::Proceed
|
||||
});
|
||||
|
||||
// Return activated struct
|
||||
Arc::new(Self {
|
||||
// Define action links
|
||||
action_tab_page_navigation_base,
|
||||
|
|
@ -61,24 +76,6 @@ impl Tab {
|
|||
}
|
||||
|
||||
// Actions
|
||||
pub fn activate(&self, tab: Arc<Self>) {
|
||||
self.widget
|
||||
.gobject()
|
||||
.connect_close_page(move |_, tab_page| {
|
||||
/* @TODO
|
||||
// Cleanup HashMap index
|
||||
let id = tab_page.widget_name();
|
||||
|
||||
// Check for required value as raw access to gobject @TODO
|
||||
if id.is_empty() {
|
||||
panic!("Undefined tab index!")
|
||||
}
|
||||
|
||||
tab.index.borrow_mut().remove(&id); */
|
||||
Propagation::Proceed
|
||||
});
|
||||
}
|
||||
|
||||
pub fn append(
|
||||
&self,
|
||||
page_navigation_request_text: Option<GString>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue