Bug 146918 - [Patch]track rating via global hotkeys doesn't show OSD anymore
Summary: [Patch]track rating via global hotkeys doesn't show OSD anymore
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-18 15:40 UTC by Vlastimil Babka (Caster)
Modified: 2007-06-27 17:05 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
This should re-enable OSD showing after key shortcut rating change (if playlist window is not shown) (1.12 KB, patch)
2007-06-22 00:23 UTC, Tuomas Nurmi
Details
This one keeps the moodbar shown when cycling through ratings, _without breaking anything(?)_ this time. I feel pretty stupid. (1.08 KB, patch)
2007-06-27 01:08 UTC, Tuomas Nurmi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vlastimil Babka (Caster) 2007-06-18 15:40:06 UTC
Version:           1.4.6_rc2 (using KDE KDE 3.5.7)
Installed from:    Gentoo Packages
Compiler:          gcc version 3.4.6 (Gentoo 3.4.6-r2, ssp-3.4.6-1.0, pie-8.7.10) 
OS:                Linux

Rating via global hotkeys (win+1 - win+5) used to show an OSD with the stars (in versions upto 1.4.5), it does no longer in 1.4.6 rc2. Funnily enough, it will show the starts in the volume OSD if I change volume via hotkey after rating.

IIRC it used to be a bit smaller window than what happens after "Show OSD" hotkey, but I wouldn't mind even just invoking the standard Show OSD, in case you removed this smaller rating window functionality. Indeed, if I invoke it manually and then change rating, it will show the change there.

On an unrelated note, I noticed that you can give half a star rating via hotkey or mouse clicking in playlist, but the rating combobox in track information dialog/statistics tab doesn't have an 0.5 rating and will show half star as "unrated" :)
Comment 1 Tuomas Nurmi 2007-06-22 00:23:48 UTC
Created attachment 20925 [details]
This should re-enable OSD showing after key shortcut rating change (if playlist window is not shown)
Comment 2 Mark Kretschmann 2007-06-25 11:34:35 UTC
SVN commit 680006 by markey:

Show OSD when changing song rating via shortcut. Patch by Tuomas Nurmi.

BUG: 146918



 M  +2 -0      ChangeLog  
 M  +2 -0      src/app.cpp  
 M  +0 -1      src/osd.cpp  


--- branches/stable/extragear/multimedia/amarok/ChangeLog #680005:680006
@@ -10,6 +10,8 @@
       Gosta <gostaj@gmail.com>. (BR 142999)
 
   BUGFIXES:
+   * Show OSD when changing song rating via shortcut. Patch by Tuomas Nurmi
+     <tnurmi@edu.kauhajoki.fi>. (BR 146918)
    * Show the stars indicating rating with the correct size in the OSD. Patch 
      Patch by Tuomas Nurmi <tnurmi@edu.kauhajoki.fi>. (BR 147059)
 
--- branches/stable/extragear/multimedia/amarok/src/app.cpp #680005:680006
@@ -1255,6 +1255,8 @@
         const int rating = CollectionDB::instance()->getSongRating( path );
         EngineController::instance()->updateBundleRating( rating );
         Amarok::OSD::instance()->OSDWidget::ratingChanged( rating );
+        if( !Amarok::OSD::instance()->isShown() && !PlaylistWindow::self()->isReallyShown() )
+            Amarok::OSD::instance()->forceToggleOSD();
     }
     else if( PlaylistWindow::self()->isReallyShown() && Playlist::instance()->qscrollview()->hasFocus() )
         Playlist::instance()->setSelectedRatings( n );
--- branches/stable/extragear/multimedia/amarok/src/osd.cpp #680005:680006
@@ -432,7 +432,6 @@
         graphicsHeight += moodbar.height() + M;
 
         p.drawPixmap( r.left(), r.top(), moodbar );
-        m_moodbarBundle = MetaBundle();
     }
 
     if( m_rating > 0 )
Comment 3 Mark Kretschmann 2007-06-25 11:37:13 UTC
Tuomas, the line that this patch removes from osd.cpp (m_moodbarBundle = MetaBundle()), is it directly related to this bug? I'm worried about side effects, as I'm not using moodbar and can't test. 
Comment 4 Tuomas Nurmi 2007-06-26 12:05:58 UTC
It made moodbar not show up when changing rating... I did minor testing and did not run into any issues, so I crossed my fingers and hoped it doesn't break anything... If anyone encounters any breakages, then the line should be put back and a new way to give moodbar data to OSD when only rating is shown implemented...
Comment 5 Mark Kretschmann 2007-06-26 12:15:48 UTC
It did indeed cause breakage, see BUG 147199

I've reverted this line and now it seems to be OK.
Comment 6 Tuomas Nurmi 2007-06-27 00:37:05 UTC
D'oh.
Comment 7 Tuomas Nurmi 2007-06-27 01:08:19 UTC
Created attachment 20978 [details]
This one keeps the moodbar shown when cycling through ratings, _without breaking anything(?)_ this time. I feel pretty stupid.
Comment 8 copong 2007-06-27 14:34:05 UTC
Did this patch go into 1.4.6 final? Because I still have this problem.

Kubuntu Feisty, KDE 3.5.7, Amarok 1.4.6 final
Comment 9 Mark Kretschmann 2007-06-27 16:53:06 UTC
No, this is post-1.4.6 material.
Comment 10 Mark Kretschmann 2007-06-27 17:05:45 UTC
SVN commit 680951 by markey:

Patch by Tuomas that keeps the moodbar shown when cycling through ratings, _without
breaking anything(?)_ this time. 

CCBUG: 146918
CCBUG: 147199



 M  +1 -0      app.cpp  
 M  +1 -0      osd.cpp  


--- branches/stable/extragear/multimedia/amarok/src/app.cpp #680950:680951
@@ -1254,6 +1254,7 @@
         CollectionDB::instance()->setSongRating( path, n, true );
         const int rating = CollectionDB::instance()->getSongRating( path );
         EngineController::instance()->updateBundleRating( rating );
+        Amarok::OSD::instance()->OSDWidget::setMoodbar( EngineController::instance()->bundle() );
         Amarok::OSD::instance()->OSDWidget::ratingChanged( rating );
         if( !Amarok::OSD::instance()->isShown() && !PlaylistWindow::self()->isReallyShown() )
             Amarok::OSD::instance()->forceToggleOSD();
--- branches/stable/extragear/multimedia/amarok/src/osd.cpp #680950:680951
@@ -94,6 +94,7 @@
     //m_text = '\n' + i18n( "Rating changed" );
     setRating( rating ); //Checks isEnabled() before doing anything
 
+    OSDWidget::setMoodbar( EngineController::instance()->bundle() );
     if( isShown() )
         show();
 }