update window title only when playlist or songid changed
This commit is contained in:
@@ -185,6 +185,7 @@ void NcmpcppStatusChanged(Connection *Mpd, StatusChanges changed, void *)
|
||||
if (!Playlist::BlockUpdate)
|
||||
{
|
||||
np = Mpd->GetCurrentSong();
|
||||
WindowTitle(utf_to_locale_cpy(np.toString(Config.song_window_title_format)));
|
||||
|
||||
bool was_filtered = myPlaylist->Main()->isFiltered();
|
||||
myPlaylist->Main()->ShowAll();
|
||||
@@ -331,6 +332,7 @@ void NcmpcppStatusChanged(Connection *Mpd, StatusChanges changed, void *)
|
||||
}
|
||||
catch (std::out_of_range &) { }
|
||||
np = Mpd->GetCurrentSong();
|
||||
WindowTitle(utf_to_locale_cpy(np.toString(Config.song_window_title_format)));
|
||||
myPlaylist->Main()->BoldOption(myPlaylist->NowPlaying, 1);
|
||||
if (Config.autocenter_mode && !myPlaylist->Main()->isFiltered())
|
||||
myPlaylist->Main()->Highlight(myPlaylist->NowPlaying);
|
||||
@@ -367,8 +369,6 @@ void NcmpcppStatusChanged(Connection *Mpd, StatusChanges changed, void *)
|
||||
if (np.GetTotalLength() && elapsed == np.GetTotalLength()-1)
|
||||
repeat_one_allowed = 1;
|
||||
|
||||
WindowTitle(utf_to_locale_cpy(np.toString(Config.song_window_title_format)));
|
||||
|
||||
if (!block_statusbar_update && Config.statusbar_visibility)
|
||||
{
|
||||
string tracklength;
|
||||
|
||||
Reference in New Issue
Block a user