Index: data/glade/AddWindow.glade
===================================================================
RCS file: /cvs/gnome/muine/data/glade/AddWindow.glade,v
retrieving revision 1.14
diff -u -r1.14 AddWindow.glade
--- data/glade/AddWindow.glade	25 Jan 2005 22:27:31 -0000	1.14
+++ data/glade/AddWindow.glade	8 Apr 2005 23:12:03 -0000
@@ -47,6 +47,75 @@
 	  </child>
 
 	  <child>
+	    <widget class="GtkButton" id="queuerandom_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">3</property>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment26">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">0</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox52">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkImage" id="queuerandom_button_image">
+			  <property name="visible">True</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label61">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">_Random</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
 	    <widget class="GtkButton" id="queue_button">
 	      <property name="visible">True</property>
 	      <property name="sensitive">False</property>
Index: data/images/Makefile.am
===================================================================
RCS file: /cvs/gnome/muine/data/images/Makefile.am,v
retrieving revision 1.11
diff -u -r1.11 Makefile.am
--- data/images/Makefile.am	14 Dec 2004 13:54:17 -0000	1.11
+++ data/images/Makefile.am	8 Apr 2005 23:12:08 -0000
@@ -10,7 +10,8 @@
 	muine-volume-zero.png			\
 	muine-volume-min.png			\
 	muine-volume-medium.png			\
-	muine-volume-max.png
+	muine-volume-max.png				\
+	muine-queue-random.png
 
 pixmapdir = $(datadir)/pixmaps
 pixmap_DATA = muine.png
Index: src/AddWindow.cs
===================================================================
RCS file: /cvs/gnome/muine/src/AddWindow.cs,v
retrieving revision 1.23
diff -u -r1.23 AddWindow.cs
--- src/AddWindow.cs	15 Mar 2005 11:25:46 -0000	1.23
+++ src/AddWindow.cs	8 Apr 2005 23:12:53 -0000
@@ -31,7 +31,8 @@
 			Close       = Gtk.ResponseType.Close,
 			DeleteEvent = Gtk.ResponseType.DeleteEvent,
 			Play        = 1,
-			Queue       = 2
+			Queue       = 2,
+			QueueRandom	= 3
 		};
 
 		// Events
@@ -49,6 +50,8 @@
 		[Glade.Widget] private Image          play_button_image;
 		[Glade.Widget] private Button         queue_button;
 		[Glade.Widget] private Image          queue_button_image;
+		[Glade.Widget] private Button         queuerandom_button;
+		[Glade.Widget] private Image          queuerandom_button_image;
 		[Glade.Widget] private ScrolledWindow scrolledwindow;
 		
 		private AddWindowEntry entry         = new AddWindowEntry         ();
@@ -85,8 +88,9 @@
 
 			Raw = window.Handle;
 
-			play_button_image.SetFromStock  ("stock_media-play", IconSize.Button);
-			queue_button_image.SetFromStock ("stock_timer"     , IconSize.Button);
+			play_button_image.SetFromStock  ("stock_media-play"  , IconSize.Button);
+			queue_button_image.SetFromStock ("stock_timer"       , IconSize.Button);
+			queuerandom_button_image.SetFromStock ("muine-queue-random" , IconSize.Button);
 
 			// Label
 			search_label.MnemonicWidget = entry;
@@ -513,6 +517,16 @@
 				window.Visible = false;
 				
 				break;
+			
+			case (int) ResponseType.QueueRandom:
+				list.SelectRandom ();
+				
+				if (QueueEvent != null)
+					QueueEvent (list.Selected);
+
+				entry.GrabFocus ();
+
+				break;
 				
 			case (int) ResponseType.Play:
 				window.Visible = false;
@@ -521,7 +535,7 @@
 					PlayEvent (list.Selected);
 
 				break;
-				
+								
 			case (int) ResponseType.Queue:
 				if (QueueEvent != null)
 					QueueEvent (list.Selected);
Index: src/HandleView.cs
===================================================================
RCS file: /cvs/gnome/muine/src/HandleView.cs,v
retrieving revision 1.41
diff -u -r1.41 HandleView.cs
--- src/HandleView.cs	18 Mar 2005 08:03:48 -0000	1.41
+++ src/HandleView.cs	8 Apr 2005 23:13:05 -0000
@@ -29,13 +29,16 @@
 	{
 		// Variables
 		private HandleModel model;
-
+		private Random random;
+		
 		// Constructor
 		public HandleView ()
 		{
 			this.model = new HandleModel ();
 			((TreeView)this).Model = model;
 
+			this.random = new Random();
+			
 			RulesHint      = true;
 			EnableSearch   = false;
 			HeadersVisible = false;
@@ -65,7 +68,7 @@
 			TreePath path = TreePath.NewFirst ();
 			SetCursor (path, Columns [0], false);
 		}
-
+		
 		// Methods :: Public :: SelectNext
 		public bool SelectNext ()
 		{
@@ -102,7 +105,23 @@
 			
 			return false;
 		}
-
+		
+		// Methods :: Public :: SelectRandom
+		public void SelectRandom ()
+		{
+			int selected = random.Next(Model.Length);
+			
+			TreeIter iter;
+			if( !Model.IterNthChild (out iter, selected) )
+			{
+				SelectFirst ();
+			}
+			else
+			{
+				SetCursor (Model.GetPath(iter), Columns [0], true);
+			}
+		}
+		
 		// Methods :: Public :: Select
 		public void Select (IntPtr handle)
 		{
Index: src/Makefile.am
===================================================================
RCS file: /cvs/gnome/muine/src/Makefile.am,v
retrieving revision 1.75
diff -u -r1.75 Makefile.am
--- src/Makefile.am	23 Jan 2005 21:34:11 -0000	1.75
+++ src/Makefile.am	8 Apr 2005 23:13:06 -0000
@@ -82,6 +82,7 @@
 	-resource:$(top_srcdir)/data/images/muine-default-cover.png,muine-default-cover.png		\
 	-resource:$(top_srcdir)/data/images/muine-cover-downloading.png,muine-cover-downloading.png	\
 	-resource:$(top_srcdir)/data/images/muine-about.png,muine-about.png				\
+	-resource:$(top_srcdir)/data/images/muine-queue-random.png				\
 	-resource:$(top_srcdir)/data/images/muine.png,muine.png						
 
 # FIXME MONO_XMLSERIALIZER_THS=no works around Ximian Bugzilla #58194
Index: src/StockIcons.cs
===================================================================
RCS file: /cvs/gnome/muine/src/StockIcons.cs,v
retrieving revision 1.20
diff -u -r1.20 StockIcons.cs
--- src/StockIcons.cs	15 Mar 2005 10:11:13 -0000	1.20
+++ src/StockIcons.cs	8 Apr 2005 23:13:12 -0000
@@ -42,7 +42,8 @@
 			"muine-volume-zero",
 			"muine-volume-min",
 			"muine-volume-medium",
-			"muine-volume-max"
+			"muine-volume-max",
+			"muine-queue-random"
 		};
 
 		// Variables :: Themed Icons
