Use content struct instead of plain stack.
This commit is contained in:
parent
5414dbdb37
commit
b4b2f24c77
@ -12,7 +12,7 @@
|
||||
<property name="can_focus">True</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<child>
|
||||
<object class="GtkViewport">
|
||||
<object class="GtkViewport" id="viewport">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
|
||||
@ -55,6 +55,9 @@ impl Content {
|
||||
self.stack.add_named(&self.widget.container, "pdw"); // Rename into "widget"
|
||||
self.stack.add_named(&self.podcasts.container, "fb_parent"); // Rename into "podcasts"
|
||||
self.stack.add_named(&self.empty.container, "empty"); // Rename into "empty"
|
||||
|
||||
// FIXME: needs actuall logic
|
||||
self.stack.set_visible_child_name("fb_parent")
|
||||
}
|
||||
|
||||
fn init(&self) {
|
||||
|
||||
@ -50,7 +50,7 @@ mod content;
|
||||
mod utils;
|
||||
mod static_resource;
|
||||
|
||||
use views::podcasts;
|
||||
// use views::podcasts;
|
||||
|
||||
/*
|
||||
THIS IS STILL A PROTOTYPE.
|
||||
@ -66,7 +66,9 @@ fn build_ui(app: >k::Application) {
|
||||
let window = gtk::ApplicationWindow::new(app);
|
||||
window.set_default_size(1150, 650);
|
||||
// Setup the Stack that will manage the switch between podcasts_view and podcast_widget.
|
||||
let stack = podcasts::setup_stack();
|
||||
// let stack = podcasts::setup_stack();
|
||||
let content = content::Content::new();
|
||||
let stack = content.stack.clone();
|
||||
window.add(&stack);
|
||||
|
||||
window.connect_delete_event(|w, _| {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user