Index: src/Plugins/Banshee.Plugins.NotificationAreaIcon/NotificationAreaIconPlugin.cs
===================================================================
--- src/Plugins/Banshee.Plugins.NotificationAreaIcon/NotificationAreaIconPlugin.cs	(revision 2236)
+++ src/Plugins/Banshee.Plugins.NotificationAreaIcon/NotificationAreaIconPlugin.cs	(working copy)
@@ -40,6 +40,7 @@
 using Banshee.MediaEngine;
 using Banshee.Widgets;
 using Banshee.Configuration;
+using Banshee.Sources;
 
 public static class PluginModuleEntry
 {
@@ -75,6 +76,7 @@
         private EventBox event_box;
         private NotificationArea notif_area;
         private Menu menu;
+        private RatingMenuItem rating_menu_item;
         private ActionGroup actions;
         private uint ui_manager_id;
 
@@ -107,10 +109,21 @@
 
             Globals.ActionManager.UI.InsertActionGroup(actions, 0);
             ui_manager_id = Globals.ActionManager.UI.AddUiFromResource("NotificationAreaIconMenu.xml");      
-            
             menu = (Menu) Globals.ActionManager.UI.GetWidget("/NotificationAreaIconMenu");
+
+            for(int i = 0; i < menu.Children.Length; i++) {
+                if(menu.Children[i].Name == "Next") {
+                    menu.Insert(new SeparatorMenuItem(), i + 1);
+                    rating_menu_item = new RatingMenuItem();
+                    rating_menu_item.Activated += OnItemRatingActivated;
+                    ToggleRatingMenuSensitive();
+                    menu.Insert(rating_menu_item, i + 2);
+                    break;
+                }
+            }
+
             menu.ShowAll();
-        
+            
             popup = new TrackInfoPopup();
             PlayerEngineCore.EventChanged += OnPlayerEngineEventChanged;
 
@@ -309,6 +322,21 @@
             }
         }
 
+        private void OnItemRatingActivated(object o, EventArgs args)
+        {
+            PlayerEngineCore.CurrentTrack.Rating = (uint)rating_menu_item.Value;
+        }
+        
+        private void ToggleRatingMenuSensitive() 
+        {
+            if (PlayerEngineCore.CurrentTrack != null && (SourceManager.ActiveSource is LibrarySource || SourceManager.ActiveSource is PlaylistSource)) {
+                rating_menu_item.Sensitive = true;
+                rating_menu_item.Reset((int)PlayerEngineCore.CurrentTrack.Rating);
+            } else {
+                rating_menu_item.Sensitive = false;
+            }
+        }
+
         private void PositionMenu(Menu menu, out int x, out int y, out bool push_in) 
         {
             PositionWidget(menu, out x, out y, 0);
@@ -424,6 +452,7 @@
                     break;
                 case PlayerEngineEvent.StartOfStream:
                 case PlayerEngineEvent.TrackInfoUpdated:
+                    ToggleRatingMenuSensitive();
                     FillPopup();
                     ShowNotification();
                     break;
@@ -431,6 +460,7 @@
                     // only hide the popup when we don't play again after 250ms
                     GLib.Timeout.Add(250, delegate {
                         if (PlayerEngineCore.CurrentState != PlayerEngineState.Playing) {
+                            ToggleRatingMenuSensitive();
                             popup.Duration = 0;
                             popup.Position = 0;
                             can_show_popup = false;
