From eaf9d806d1393504efc068a32a5adc8f65eba940 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Sun, 4 Dec 2011 07:31:46 +0100 Subject: [PATCH] * Give instant user feedback when scanner gets kicked off. --- src/libtomahawk/source.cpp | 6 +++++- src/musicscanner.cpp | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/libtomahawk/source.cpp b/src/libtomahawk/source.cpp index c0d39ab2b..17cb3f5a5 100644 --- a/src/libtomahawk/source.cpp +++ b/src/libtomahawk/source.cpp @@ -223,7 +223,11 @@ Source::dbLoaded( unsigned int id, const QString& fname ) void Source::scanningProgress( unsigned int files ) { - m_textStatus = tr( "Scanning (%L1 tracks)" ).arg( files ); + if ( files ) + m_textStatus = tr( "Scanning (%L1 tracks)" ).arg( files ); + else + m_textStatus = tr( "Scanning" ).arg( files ); + emit stateChanged(); } diff --git a/src/musicscanner.cpp b/src/musicscanner.cpp index f2ab167b6..84c22d3e1 100644 --- a/src/musicscanner.cpp +++ b/src/musicscanner.cpp @@ -139,6 +139,8 @@ MusicScanner::startScan() m_scanned = m_skipped = m_cmdQueue = 0; m_skippedFiles.clear(); + SourceList::instance()->getLocal()->scanningProgress( m_scanned ); + // trigger the scan once we've loaded old filemtimes //FIXME: For multiple collection support make sure the right prefix gets passed in...or not... //bear in mind that simply passing in the top-level of a defined collection means it will not return items that need