diff --git a/hammond-gtk/src/app.rs b/hammond-gtk/src/app.rs index a4b922a..3b3a354 100644 --- a/hammond-gtk/src/app.rs +++ b/hammond-gtk/src/app.rs @@ -88,7 +88,7 @@ impl App { let content = Content::new(&sender).expect("Content Initialization failed."); // Create the headerbar - let header = Rc::new(Header::new(&content, &window, &sender)); + let header = Header::new(&content, &window, &sender); // Add the content main stack to the overlay. let overlay = gtk::Overlay::new(); diff --git a/hammond-gtk/src/headerbar.rs b/hammond-gtk/src/headerbar.rs index 0b0c4ce..9e0d7fd 100644 --- a/hammond-gtk/src/headerbar.rs +++ b/hammond-gtk/src/headerbar.rs @@ -14,6 +14,8 @@ use app::Action; use stacks::Content; use utils::{itunes_to_rss, refresh}; +use std::rc::Rc; + #[derive(Debug, Clone)] // TODO: split this into smaller pub struct Header { @@ -60,14 +62,14 @@ impl Default for Header { } } -// TODO: Refactor components into smaller state machines +// TODO: Refactor components into smaller widgets. impl Header { pub fn new( content: &Content, window: >k::ApplicationWindow, sender: &Sender, - ) -> Header { - let h = Header::default(); + ) -> Rc { + let h = Rc::new(Header::default()); h.init(content, window, &sender); h }