update window title if elapsed time changes
This commit is contained in:
@@ -24,8 +24,6 @@
|
|||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "status_checker.h"
|
#include "status_checker.h"
|
||||||
|
|
||||||
#define UPDATE_WINDOW_TITLE WindowTitle(Mpd->GetCurrentSong().toString(Config.song_window_title_format))
|
|
||||||
|
|
||||||
using namespace MPD;
|
using namespace MPD;
|
||||||
|
|
||||||
extern Connection *Mpd;
|
extern Connection *Mpd;
|
||||||
@@ -254,7 +252,6 @@ void NcmpcppStatusChanged(Connection *Mpd, StatusChanges 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;
|
||||||
}
|
}
|
||||||
@@ -311,7 +308,6 @@ void NcmpcppStatusChanged(Connection *Mpd, StatusChanges changed, void *)
|
|||||||
|
|
||||||
if (Mpd->GetState() == psPlay)
|
if (Mpd->GetState() == psPlay)
|
||||||
{
|
{
|
||||||
UPDATE_WINDOW_TITLE;
|
|
||||||
changed.ElapsedTime = 1;
|
changed.ElapsedTime = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -326,6 +322,8 @@ void NcmpcppStatusChanged(Connection *Mpd, StatusChanges changed, void *)
|
|||||||
if (s.GetTotalLength() && elapsed == s.GetTotalLength()-1)
|
if (s.GetTotalLength() && elapsed == s.GetTotalLength()-1)
|
||||||
repeat_one_allowed = 1;
|
repeat_one_allowed = 1;
|
||||||
|
|
||||||
|
WindowTitle(s.toString(Config.song_window_title_format));
|
||||||
|
|
||||||
if (!block_statusbar_update && Config.statusbar_visibility)
|
if (!block_statusbar_update && Config.statusbar_visibility)
|
||||||
{
|
{
|
||||||
string tracklength;
|
string tracklength;
|
||||||
|
|||||||
Reference in New Issue
Block a user