From 1a7fd6d332595f6816ae197d30c1711284bc542c Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Fri, 13 Mar 2009 15:11:59 +0100 Subject: [PATCH] update window title only when playlist or songid changed --- src/status.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/status.cpp b/src/status.cpp index e3f0e311..ecbb9b95 100644 --- a/src/status.cpp +++ b/src/status.cpp @@ -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;