From 884a88effadac55e098b446cf588606ab4136643 Mon Sep 17 00:00:00 2001 From: unK Date: Sat, 18 Oct 2008 16:26:20 +0200 Subject: [PATCH] fix window title update --- src/status_checker.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/status_checker.cpp b/src/status_checker.cpp index 048af7db..f1d31768 100644 --- a/src/status_checker.cpp +++ b/src/status_checker.cpp @@ -23,6 +23,8 @@ #include "settings.h" #include "status_checker.h" +#define UPDATE_WINDOW_TITLE WindowTitle(DisplaySong(Mpd->GetCurrentSong(), &Config.song_window_title_format)) + extern MPDConnection *Mpd; extern ncmpcpp_config Config; @@ -259,6 +261,7 @@ void NcmpcppStatusChanged(MPDConnection *Mpd, MPDStatusChanges changed, void *) { player_state = "Playing: "; mPlaylist->BoldOption(now_playing, 1); + UPDATE_WINDOW_TITLE; changed.ElapsedTime = 1; break; } @@ -308,7 +311,7 @@ void NcmpcppStatusChanged(MPDConnection *Mpd, MPDStatusChanges changed, void *) if (Mpd->GetState() == psPlay) { - WindowTitle(DisplaySong(Mpd->GetCurrentSong(), &Config.song_window_title_format)); + UPDATE_WINDOW_TITLE; changed.ElapsedTime = 1; } }