Bug 301245

Summary: errors should use unique prefix
Product: amarok Reporter: Harald Sitter <sitter>
Component: Services/Amazon MP3 StoreAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: normal CC: sven
Priority: NOR    
Version: 2.5.90 (2.6 beta)   
Target Milestone: 2.7   
Platform: Ubuntu Packages   
OS: Linux   
Latest Commit: Version Fixed In: 2.7

Description Harald Sitter 2012-06-05 21:37:13 UTC
http://wstaw.org/m/2012/06/05/plasma-desktopp19253.png

as the collection notification area is shared it would be good to make errors uniquely identifiable rather than simply saying "Error..." something like "Amazon Store Error ..." would be good.

Reproducible: Always
Comment 1 Sven Krohlas 2012-06-07 21:00:52 UTC
Good catch. It's trivial, but due to string freeze I have to move that to 2.7.
Comment 2 Sven Krohlas 2012-09-10 16:14:04 UTC
Git commit ea4357162d7b0d29bedd336919d6dce32053ac10 by Sven Krohlas.
Committed on 10/09/2012 at 18:11.
Pushed by krohlas into branch 'master'.

use a unique prefix for messages from the mp3 store

BUG:301245
FIXED-IN:2.7

M  +4    -4    src/services/amazon/AmazonStore.cpp

http://commits.kde.org/amarok/ea4357162d7b0d29bedd336919d6dce32053ac10

diff --git a/src/services/amazon/AmazonStore.cpp b/src/services/amazon/AmazonStore.cpp
index 18994f9..0f76892 100644
--- a/src/services/amazon/AmazonStore.cpp
+++ b/src/services/amazon/AmazonStore.cpp
@@ -192,7 +192,7 @@ AmazonStore::addToCart()
     }
 
     AmazonShoppingCart::instance()->add( asin, price, name );
-    Amarok::Components::logger()->shortMessage( i18n( "<em>%1</em> has been added to your shopping cart.", name ) );
+    Amarok::Components::logger()->longMessage( i18n( "<b>MP3 Music Store</b><br/><br/><em>%1</em> has been added to your shopping cart.", name ) );
     m_checkoutButton->setEnabled( true );
 }
 
@@ -323,7 +323,7 @@ AmazonStore::newSearchRequest( const QString request )
 
     if( !tempFile.open() )
     {
-        Amarok::Components::logger()->shortMessage( i18n( "Error: Unable to write temporary file. :-(" ) );
+        Amarok::Components::logger()->longMessage( i18n( "<b>MP3 Music Store</b><br/><br/>Error: Unable to write temporary file. :-(" ) );
         return;
     }
 
@@ -513,7 +513,7 @@ AmazonStore::parseReply( KJob* requestJob )
     DEBUG_BLOCK
     if( requestJob->error() )
     {
-        Amarok::Components::logger()->shortMessage( i18n( "Error: Querying MP3 Music Store database failed. :-(" ) );
+        Amarok::Components::logger()->longMessage( i18n( "<b>MP3 Music Store</b><br/><br/>Error: Querying MP3 Music Store database failed. :-(" ) );
         debug() << requestJob->errorString();
         requestJob->deleteLater();
         m_searchWidget->searchEnded();
@@ -548,7 +548,7 @@ void
 AmazonStore::parsingFailed( ThreadWeaver::Job* parserJob )
 {
     Q_UNUSED( parserJob )
-    Amarok::Components::logger()->shortMessage( i18n( "Error: Received an invalid reply. :-(" ) );
+    Amarok::Components::logger()->longMessage( i18n( "<b>MP3 Music Store</b><br/><br/>Error: Received an invalid reply. :-(" ) );
     m_searchWidget->searchEnded();
 }