Index: mail/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3751
diff -u -p -r1.3751 ChangeLog
--- mail/ChangeLog	20 Dec 2005 10:06:39 -0000	1.3751
+++ mail/ChangeLog	21 Dec 2005 08:53:15 -0000
@@ -1,3 +1,10 @@
+2005-11-25  Johnny Jacob  <johnnyjacob@gmail.com>
+
+	Fixes Bug #246431
+	* mail-config.glade: Added a button to play sound preview
+	* em-mailer-prefs.c: (play_sound_preview): Added. Preview
+	the selected sound file
+
 2005-12-20  Veerapuram Varadhan  <vvaradhan@novell.com>
 
 	Fixes #246256
Index: mail/em-mailer-prefs.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-mailer-prefs.c,v
retrieving revision 1.34
diff -u -p -r1.34 em-mailer-prefs.c
--- mail/em-mailer-prefs.c	18 Dec 2005 08:24:26 -0000	1.34
+++ mail/em-mailer-prefs.c	21 Dec 2005 08:53:49 -0000
@@ -669,6 +669,18 @@ notify_sound_changed (GtkWidget *widget,
 	gconf_client_set_string (prefs->gconf, "/apps/evolution/mail/notify/sound", filename, NULL);
 }
 
+static void
+play_sound_preview (GtkWidget *widget, EMMailerPrefs *prefs)
+{
+	const char *filename;
+	GtkWidget *entry;
+
+	entry = gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (prefs->notify_sound_file));
+	filename = gtk_entry_get_text (GTK_ENTRY (entry));
+	if (filename && *filename)
+		gnome_sound_play(filename);
+}
+
 static GtkWidget *
 emmp_widget_glade(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
 {
@@ -811,6 +823,9 @@ em_mailer_prefs_construct (EMMailerPrefs
 	gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (prefs->notify_sound_file)), buf ? buf : "");
 	g_signal_connect (gnome_file_entry_gtk_entry (prefs->notify_sound_file), "changed",
 			  G_CALLBACK (notify_sound_changed), prefs);
+	g_signal_connect (GTK_BUTTON (glade_xml_get_widget (gui,"cmdPlayPreview")),"clicked",
+			  G_CALLBACK (play_sound_preview), prefs);
+
 	if (!gconf_client_key_is_writable (prefs->gconf, "/apps/evolution/mail/notify/sound", NULL))
 		gtk_widget_set_sensitive ((GtkWidget *) prefs->notify_sound_file, FALSE);
 	g_free (buf);
Index: mail/mail-config.glade
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-config.glade,v
retrieving revision 1.164
diff -u -p -r1.164 mail-config.glade
--- mail/mail-config.glade	20 Dec 2005 00:14:41 -0000	1.164
+++ mail/mail-config.glade	21 Dec 2005 08:58:38 -0000
@@ -5514,6 +5510,85 @@ For example: &quot;Work&quot; or &quot;P
 				  <property name="fill">True</property>
 				</packing>
 			      </child>
+
+			      <child>
+				<widget class="GtkButton" id="cmdPlayPreview">
+				  <property name="height_request">26</property>
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+
+				  <child>
+				    <widget class="GtkAlignment" id="alignment36">
+				      <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="hbox233">
+					  <property name="visible">True</property>
+					  <property name="homogeneous">False</property>
+					  <property name="spacing">2</property>
+
+					  <child>
+					    <widget class="GtkImage" id="image11">
+					      <property name="visible">True</property>
+					      <property name="stock">gtk-media-play</property>
+					      <property name="icon_size">4</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="label584">
+					      <property name="visible">True</property>
+					      <property name="label" translatable="yes">_Play</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>
+					      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+					      <property name="width_chars">-1</property>
+					      <property name="single_line_mode">False</property>
+					      <property name="angle">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>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
 			    </widget>
 			    <packing>
 			      <property name="padding">0</property>
