fix window title update
This commit is contained in:
@@ -23,6 +23,8 @@
|
|||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "status_checker.h"
|
#include "status_checker.h"
|
||||||
|
|
||||||
|
#define UPDATE_WINDOW_TITLE WindowTitle(DisplaySong(Mpd->GetCurrentSong(), &Config.song_window_title_format))
|
||||||
|
|
||||||
extern MPDConnection *Mpd;
|
extern MPDConnection *Mpd;
|
||||||
extern ncmpcpp_config Config;
|
extern ncmpcpp_config Config;
|
||||||
|
|
||||||
@@ -259,6 +261,7 @@ void NcmpcppStatusChanged(MPDConnection *Mpd, MPDStatusChanges changed, void *)
|
|||||||
{
|
{
|
||||||
player_state = "Playing: ";
|
player_state = "Playing: ";
|
||||||
mPlaylist->BoldOption(now_playing, 1);
|
mPlaylist->BoldOption(now_playing, 1);
|
||||||
|
UPDATE_WINDOW_TITLE;
|
||||||
changed.ElapsedTime = 1;
|
changed.ElapsedTime = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -308,7 +311,7 @@ void NcmpcppStatusChanged(MPDConnection *Mpd, MPDStatusChanges changed, void *)
|
|||||||
|
|
||||||
if (Mpd->GetState() == psPlay)
|
if (Mpd->GetState() == psPlay)
|
||||||
{
|
{
|
||||||
WindowTitle(DisplaySong(Mpd->GetCurrentSong(), &Config.song_window_title_format));
|
UPDATE_WINDOW_TITLE;
|
||||||
changed.ElapsedTime = 1;
|
changed.ElapsedTime = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user