From kde-commits Tue Nov 30 21:35:58 2010 From: "Rick W.Chen" Date: Tue, 30 Nov 2010 21:35:58 +0000 To: kde-commits Subject: [Amarok] ed74f28: labels applet: change title text when labels are n Message-Id: <20101130213558.90B30A60B1 () git ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=129115302029387 commit ed74f285e3cd5a9ece4985ac82b79ab8ec04a023 branch master Author: Rick W. Chen Date: Wed Dec 1 07:13:55 2010 +1300 labels applet: change title text when labels are no longer empty diff --git a/src/context/applets/labels/LabelsApplet.cpp b/src/context/applets/labels/LabelsApplet.cpp index 9c75c0f..a7a8baf 100644 --- a/src/context/applets/labels/LabelsApplet.cpp +++ b/src/context/applets/labels/LabelsApplet.cpp @@ -630,6 +630,9 @@ LabelsApplet::toggleLabel( const QString &label ) m_addLabel.data()->completionObject()->setItems( m_allLabels ); m_addLabel.data()->lineEdit()->setText( saveText ); } + + if( !m_allLabels.isEmpty() ) + m_titleText = i18n( "Labels for %1 by %2", m_title, m_artist ); // usuallay the engine keeps track of label changes of the playing track // (except if the lables get auto added, this is why we have to keep m_userLabels up to date)