[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [Bug 144675] [Patch]"Small Star" Rating Bug
From:       Seb Ruiz <ruiz () kde ! org>
Date:       2007-07-01 6:49:53
Message-ID: 20070701064953.15008.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
         
http://bugs.kde.org/show_bug.cgi?id=144675         
ruiz kde org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From ruiz kde org  2007-07-01 08:49 -------
SVN commit 682013 by seb:

A single half star also has a rating, so don't show "Not Rated" as the label. Now, 0: \
No rating, 0.5: Awful, 1: Bad. Patch by Tuomas Nurmi (Thanks man!)
BUG: 144675


 M  +3 -2      metabundle.cpp  
 M  +6 -6      tagdialog.cpp  
 M  +3 -0      tagdialogbase.ui  


--- branches/stable/extragear/multimedia/amarok/src/metabundle.cpp #682012:682013
 @ -1246,7 +1246,8  @
 {
     switch( r )
     {
-        case 2: return i18n( "Awful" );
+        case 1: return i18n( "Awful" );
+        case 2: return i18n( "Bad" );
         case 3: return i18n( "Barely tolerable" );
         case 4: return i18n( "Tolerable" );
         case 5: return i18n( "Okay" );
 @ -1266,7 +1267,7  @
     QString s = i18n( "rating - description", "%1 - %2" );
     QStringList list;
     list += ratingDescription( 0 );
-    for ( int i = 2; i<=10; i++ )
+    for ( int i = 1; i<=10; i++ )
         list += s.arg( prettyRating( i, true ) ).arg( ratingDescription( i ) );
     return list;
 }
--- branches/stable/extragear/multimedia/amarok/src/tagdialog.cpp #682012:682013
 @ -652,7 +652,7  @
     kComboBox_artist       ->setCurrentText( m_bundle.artist() );
     kComboBox_album        ->setCurrentText( m_bundle.album() );
     kComboBox_genre        ->setCurrentText( m_bundle.genre() );
-    kComboBox_rating       ->setCurrentItem( m_bundle.rating() ? m_bundle.rating() - \
1 : 0 ); +    kComboBox_rating       ->setCurrentItem( m_bundle.rating() );
     kIntSpinBox_track      ->setValue( m_bundle.track() );
     kComboBox_composer     ->setCurrentText( m_bundle.composer() );
     kIntSpinBox_year       ->setValue( m_bundle.year() );
 @ -905,7 +905,7  @
     }
     if (rating) {
         m_bundle.setRating( first.rating() );
-        kComboBox_rating->setCurrentItem( first.rating() ? first.rating() - 1 : 0 );
+        kComboBox_rating->setCurrentItem( first.rating() );
     }
 
     m_currentURL = m_urlList.begin();
 @ -1011,7 +1011,7  @
 
     if (kIntSpinBox_score->value() != m_bundle.score())
         result |= TagDialog::SCORECHANGED;
-    if (kComboBox_rating->currentItem() != ( m_bundle.rating() ? m_bundle.rating() - \
1 : 0 ) ) +    if (kComboBox_rating->currentItem() != ( m_bundle.rating() ) )
         result |= TagDialog::RATINGCHANGED;
 
     if (!m_urlList.count() || m_perTrack) { //ignore these on MultipleTracksMode
 @ -1056,7 +1056,7  @
     if( result & TagDialog::SCORECHANGED )
         storedScores.replace( url, kIntSpinBox_score->value() );
     if( result & TagDialog::RATINGCHANGED )
-        storedRatings.replace( url, kComboBox_rating->currentItem() ? \
kComboBox_rating->currentItem() + 1 : 0 ); +        storedRatings.replace( url, \
kComboBox_rating->currentItem() );  if( result & TagDialog::LYRICSCHANGED ) {
         if ( kTextEdit_lyrics->text().isEmpty() )
             storedLyrics.replace( url, QString::null );
 @ -1299,10 +1299,10  @
             changed |= TagDialog::SCORECHANGED;
         }
 
-        if( kComboBox_rating->currentItem() && kComboBox_rating->currentItem() != \
m_bundle.rating() - 1 || +        if( kComboBox_rating->currentItem() && \
                kComboBox_rating->currentItem() != m_bundle.rating() ||
                 !kComboBox_rating->currentItem() && m_bundle.rating() )
         {
-            mb.setRating( kComboBox_rating->currentItem() ? \
kComboBox_rating->currentItem() + 1 : 0 ); +            mb.setRating( \
kComboBox_rating->currentItem() );  changed |= TagDialog::RATINGCHANGED;
         }
         storeTags( *it, changed, mb );
--- branches/stable/extragear/multimedia/amarok/src/tagdialogbase.ui #682012:682013
 @ -718,6 +718,9  @
                         <property name="name">
                             <cstring>kComboBox_rating</cstring>
                         </property>
+                        <property name="sizeLimit">
+                            <number>11</number>
+                        </property>
                     </widget>
                 </grid>
             </widget>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic