Fix private field visibility of stacks.

This commit is contained in:
Jordan Petridis 2018-02-07 07:11:40 +02:00
parent 31bd75ae45
commit 07c1a9a0e9
No known key found for this signature in database
GPG Key ID: CEABAD9F5683B9A6
3 changed files with 8 additions and 6 deletions

View File

@ -24,8 +24,8 @@ impl Content {
let episodes = Arc::new(EpisodeStack::new(sender.clone())?);
let shows = Arc::new(ShowStack::new(sender.clone())?);
stack.add_titled(&episodes.stack, "episodes", "Episodes");
stack.add_titled(&shows.stack, "shows", "Shows");
stack.add_titled(&episodes.get_stack(), "episodes", "Episodes");
stack.add_titled(&shows.get_stack(), "shows", "Shows");
Ok(Content {
stack,

View File

@ -12,8 +12,7 @@ use std::sync::mpsc::Sender;
#[derive(Debug, Clone)]
pub struct EpisodeStack {
// FIXME: remove pub
pub stack: gtk::Stack,
stack: gtk::Stack,
sender: Sender<Action>,
}
@ -71,4 +70,8 @@ impl EpisodeStack {
Ok(())
}
pub fn get_stack(&self) -> gtk::Stack {
self.stack.clone()
}
}

View File

@ -17,8 +17,7 @@ use std::sync::mpsc::Sender;
#[derive(Debug, Clone)]
pub struct ShowStack {
// FIXME: remove pub
pub stack: gtk::Stack,
stack: gtk::Stack,
sender: Sender<Action>,
}