Use content struct instead of plain stack.

This commit is contained in:
Jordan Petridis
2017-12-01 01:30:19 +02:00
parent 5414dbdb37
commit b4b2f24c77
3 changed files with 8 additions and 3 deletions
+3
View File
@@ -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) {
+4 -2
View File
@@ -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: &gtk::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, _| {