rhythmbox r5694 - in trunk: . data/ui sources
- From: jmatthew svn gnome org
- To: svn-commits-list gnome org
- Subject: rhythmbox r5694 - in trunk: . data/ui sources
- Date: Wed, 30 Apr 2008 13:21:46 +0100 (BST)
Author: jmatthew
Date: Wed Apr 30 12:21:45 2008
New Revision: 5694
URL: http://svn.gnome.org/viewvc/rhythmbox?rev=5694&view=rev
Log:
2008-04-30 Jonathan Matthew <jonathan d14n org>
* data/ui/rhythmbox-ui.xml:
* sources/rb-play-queue-source.c:
(rb_play_queue_source_update_count),
(rb_play_queue_source_cmd_shuffle):
Add 'shuffle queue' action that, um, shuffles the queue.
Modified:
trunk/ChangeLog
trunk/data/ui/rhythmbox-ui.xml
trunk/sources/rb-play-queue-source.c
Modified: trunk/data/ui/rhythmbox-ui.xml
==============================================================================
--- trunk/data/ui/rhythmbox-ui.xml (original)
+++ trunk/data/ui/rhythmbox-ui.xml Wed Apr 30 12:21:45 2008
@@ -165,6 +165,7 @@
<popup name="QueuePlaylistViewPopup">
<menuitem name="DeletePlaylistPopup" action="EditDelete"/>
+ <menuitem name="ShufflePlaylistPopup" action="ShuffleQueue"/>
<separator/>
<menuitem name="PropertiesPlaylistPopup" action="MusicProperties"/>
</popup>
@@ -172,12 +173,14 @@
<popup name="QueueSidebarViewPopup">
<menuitem name="DeletePlaylistPopup" action="QueueDelete"/>
<menuitem name="ClearPlaylistPopup" action="ClearQueue"/>
+ <menuitem name="ShufflePlaylistPopup" action="ShuffleQueue"/>
<separator/>
<menuitem name="PropertiesPlaylistPopup" action="QueueMusicProperties"/>
</popup>
<popup name="QueueSourcePopup">
<menuitem name="ClearPlaylistPopup" action="ClearQueue"/>
+ <menuitem name="ShufflePlaylistPopup" action="ShuffleQueue"/>
<placeholder name="QueueSourcePopupPluginPlaceholder" />
<separator/>
</popup>
Modified: trunk/sources/rb-play-queue-source.c
==============================================================================
--- trunk/sources/rb-play-queue-source.c (original)
+++ trunk/sources/rb-play-queue-source.c Wed Apr 30 12:21:45 2008
@@ -36,6 +36,7 @@
#include "rb-play-queue-source.h"
#include "rb-playlist-xml.h"
#include "rb-song-info.h"
+#include "rb-stock-icons.h"
#include "rb-util.h"
#include "rb-debug.h"
@@ -80,6 +81,8 @@
xmlNodePtr node);
static void rb_play_queue_source_cmd_clear (GtkAction *action,
RBPlayQueueSource *source);
+static void rb_play_queue_source_cmd_shuffle (GtkAction *action,
+ RBPlayQueueSource *source);
static GList *impl_get_ui_actions (RBSource *source);
static gboolean impl_show_popup (RBSource *asource);
@@ -109,7 +112,10 @@
{
{ "ClearQueue", GTK_STOCK_CLEAR, N_("Clear _Queue"), NULL,
N_("Remove all songs from the play queue"),
- G_CALLBACK (rb_play_queue_source_cmd_clear) }
+ G_CALLBACK (rb_play_queue_source_cmd_clear) },
+ { "ShuffleQueue", GNOME_MEDIA_SHUFFLE, N_("Shuffle Queue"), NULL,
+ N_("Shuffle the tracks in the play queue"),
+ G_CALLBACK (rb_play_queue_source_cmd_shuffle) }
};
static void
@@ -439,10 +445,13 @@
if (count > 0)
g_free (name);
- /* make 'clear queue' action sensitive when there are entries in the queue */
+ /* make 'clear queue' and 'shuffle queue' actions sensitive when there are entries in the queue */
action = gtk_action_group_get_action (priv->action_group,
"ClearQueue");
g_object_set (G_OBJECT (action), "sensitive", (count > 0), NULL);
+
+ action = gtk_action_group_get_action (priv->action_group, "ShuffleQueue");
+ g_object_set (G_OBJECT (action), "sensitive", (count > 0), NULL);
}
static void
@@ -460,6 +469,16 @@
rb_play_queue_source_clear_queue (source);
}
+static void
+rb_play_queue_source_cmd_shuffle (GtkAction *action,
+ RBPlayQueueSource *source)
+{
+ RhythmDBQueryModel *model;
+
+ model = rb_playlist_source_get_query_model (RB_PLAYLIST_SOURCE (source));
+ rhythmdb_query_model_shuffle_entries (model);
+}
+
static gboolean
impl_show_popup (RBSource *asource)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]