summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs
index 4b02152..f9904b2 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -45,6 +45,7 @@ impl SongInfo {
let album_art = gtk::Image::new();
let song_text = gtk::Label::new(None);
song_text.set_justify(gtk::Justification::Center);
+ song_text.set_line_wrap(true);
container.add(&album_art);
container.add(&song_text);
SongInfo {
@@ -147,9 +148,6 @@ fn main() {
let stack = gtk::Stack::new();
// let (song_info_view, song_info_container) = ().unwrap();
let song_info = SongInfo::new();
- song_info
- .update(&mut conn)
- .expect("Couldn't update song info");
stack.add_named(song_info.as_ref(), "Currently Playing");
let header_bar = HeaderBar::builder()
@@ -179,6 +177,12 @@ fn main() {
window.set_application(Some(app));
window.show_all();
+ // Now that everything's been allocated a window, let's go ahead and
+ // update the widgets.
+ song_info
+ .update(&mut conn)
+ .expect("Couldn't update song info");
+
let (mut sender, mut receiver) = mpsc::channel(1000);
std::thread::spawn(move || loop {
let mut conn = Client::connect("127.0.0.1:6600").unwrap();