Index: shell/rb-shell.c
===================================================================
--- shell/rb-shell.c	(revision 4742)
+++ shell/rb-shell.c	(working copy)
@@ -413,6 +413,7 @@
 	{ "Edit", NULL, N_("_Edit") },
 	{ "View", NULL, N_("_View") },
 	{ "Control", NULL, N_("_Control") },
+	{ "Rating", NULL, N_("_Rating") },
 	{ "Tools", NULL, N_("_Tools") },
 	{ "Help", NULL, N_("_Help") },
 
Index: shell/rb-shell-player.c
===================================================================
--- shell/rb-shell-player.c	(revision 4742)
+++ shell/rb-shell-player.c	(working copy)
@@ -98,6 +98,12 @@
 					   RBShellPlayer *player);
 static void rb_shell_player_cmd_volume_down (GtkAction *action,
 					     RBShellPlayer *player);
+static void rb_shell_player_rating_up (GtkAction *action,
+                                       RBShellPlayer *player);
+static void rb_shell_player_rating_down (GtkAction *action,
+                                         RBShellPlayer *player);
+static void rb_shell_player_rating_cb (RBShellPlayer *player,
+                                       double change);
 static void rb_shell_player_shuffle_changed_cb (GtkAction *action,
 						RBShellPlayer *player);
 static void rb_shell_player_repeat_changed_cb (GtkAction *action,
@@ -253,6 +259,12 @@
 	{ "ControlVolumeDown", NULL, N_("_Decrease Volume"), "<control>Down",
 	  N_("Decrease playback volume"),
 	  G_CALLBACK (rb_shell_player_cmd_volume_down) },
+	{ "RatingUp", NULL, N_("Increase Rating"), "<control>Right",
+	  N_("Increase the Rating of the song"),
+	  G_CALLBACK (rb_shell_player_rating_up) },
+	{ "RatingDown", NULL, N_("Decrease Rating"), "<control>Left",
+	  N_("Decrease the Rating of the song"),
+	  G_CALLBACK (rb_shell_player_rating_down) },
 };
 static guint rb_shell_player_n_actions = G_N_ELEMENTS (rb_shell_player_actions);
 
@@ -1811,6 +1823,60 @@
 }
 
 static void
+rb_shell_player_rating_up (GtkAction *action,
+			   RBShellPlayer *player)
+{
+	double cha;
+	cha = 1.0;
+	rb_shell_player_rating_cb(player, cha);
+}
+
+static void
+rb_shell_player_rating_down (GtkAction *action,
+			     RBShellPlayer *player)
+{
+	double cha;
+	cha = -1.0;
+	rb_shell_player_rating_cb(player, cha);
+/*	rb_shell_player_set_volume_relative (player, 0.1, NULL); */
+}
+
+
+static void
+rb_shell_player_rating_cb (RBShellPlayer *player, double change)
+{
+	RhythmDBEntry *entry;
+	double score;
+
+	entry = rb_shell_player_get_playing_entry (player);
+
+	if (!entry)
+		return;
+
+	score = rhythmdb_entry_get_double(entry, RHYTHMDB_PROP_RATING);
+
+	score = score + change;
+
+        GValue value = {0, };
+
+/*        g_return_if_fail (RB_IS_RATING (score)); */
+        g_return_if_fail (score >= 0 && score <= 5);
+
+        g_value_init (&value, G_TYPE_DOUBLE);
+        g_value_set_double (&value, score);
+
+        /* set the new value for the song */
+        rhythmdb_entry_set (player->priv->db,
+                            entry,
+                            RHYTHMDB_PROP_RATING,
+                            &value);
+        g_value_unset (&value);
+        rhythmdb_commit (player->priv->db);
+
+/*        g_object_set (G_OBJECT (player->priv->rating), "rating", score, NULL); */
+}
+
+static void
 rb_shell_player_cmd_play (GtkAction *action,
 			  RBShellPlayer *player)
 {
Index: data/ui/rhythmbox-ui.xml
===================================================================
--- data/ui/rhythmbox-ui.xml	(revision 4742)
+++ data/ui/rhythmbox-ui.xml	(working copy)
@@ -74,6 +74,11 @@
       <placeholder name="ToolsOps_5" />
     </menu>
 
+    <menu name="RatingMenu" action="Rating">
+      <menuitem name="RatingUpMenu" action="RatingUp"/>
+      <menuitem name="RatingDownMenu" action="RatingDown"/>
+    </menu>
+ 
     <menu name="ControlMenu" action="Control">
       <menuitem name="ControlPlayMenu" action="ControlPlay"/>
       <separator name="ControlSep1"/>
