fix window title update

This commit is contained in:
unK
2008-10-18 16:26:20 +02:00
parent 58fcccc68b
commit 884a88effa

View File

@@ -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;
}
}