Index: libsounds/sound-view.c
===================================================================
RCS file: /cvs/gnome/libsounds/libsounds/sound-view.c,v
retrieving revision 1.25
diff -u -r1.25 sound-view.c
--- libsounds/sound-view.c	2 Mar 2004 17:17:31 -0000	1.25
+++ libsounds/sound-view.c	24 Oct 2004 23:18:44 -0000
@@ -19,6 +19,7 @@
 	GtkTreeView *view;
 	GtkTreeSelection *selection;
 	SoundProperties *props;
+	GtkWidget *remove_button;
 	GtkWidget *play_button;
 	GtkWidget *entry;
 	GtkWidget *label;
@@ -158,6 +159,37 @@
 }
 
 static void
+remove_cb (GtkButton *button, SoundView *view)
+{
+	GtkTreeIter iter;
+	GValue tval = {0};
+	GValue eval = {0};
+	SoundEvent *event;
+	gchar *text;
+    
+	if (view->priv->ignore_changed)
+		return;
+
+	if (!gtk_tree_selection_get_selected (view->priv->selection, NULL, &iter))
+		return;
+    
+	gtk_tree_model_get_value (view->priv->smodel, &iter, TYPE_COLUMN, &tval);
+	if (g_value_get_uint (&tval) != EVENT) return;
+
+	gtk_tree_model_get_value (view->priv->smodel, &iter, DATA_COLUMN, &eval);
+	event = g_value_get_pointer (&eval);
+
+	text = g_strdup ("");
+	sound_event_set_file (event, text);
+	sound_properties_event_changed (view->priv->props, event);
+
+	view->priv->ignore_changed = TRUE;
+	gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (view->priv->entry))), text);
+	view->priv->ignore_changed = FALSE;
+	g_free(text);
+}
+
+static void
 entry_changed_cb (GtkEditable *entry, SoundView *view)
 {
 	const gchar *file;
@@ -327,7 +359,18 @@
 	g_object_set_data (G_OBJECT (view->priv->play_button), "gnome_disable_sound_events", GINT_TO_POINTER(1));
 	g_signal_connect (G_OBJECT (view->priv->play_button), "clicked", (GCallback) play_cb, view);
 
+	view->priv->remove_button = gtk_button_new ();
+	bbox = gtk_hbox_new (FALSE, 6);
+	gtk_box_pack_start (GTK_BOX (bbox), gtk_image_new_from_stock (GNOME_STOCK_TRASH, GTK_ICON_SIZE_BUTTON), 
+			    FALSE, FALSE, 0);
+	gtk_box_pack_start (GTK_BOX (bbox), gtk_label_new_with_mnemonic (_("_Remove")), FALSE, FALSE, 0);
+	gtk_container_add (GTK_CONTAINER (view->priv->remove_button), bbox);
+	gtk_box_pack_start (GTK_BOX (hbox), view->priv->remove_button, FALSE, FALSE, 0);
+	g_object_set_data (G_OBJECT (view->priv->remove_button), "gnome_disable_sound_events", GINT_TO_POINTER(1));
+	g_signal_connect (G_OBJECT (view->priv->remove_button), "clicked", (GCallback) remove_cb, view);
+    
 	gtk_widget_set_sensitive (view->priv->play_button, FALSE);
+	gtk_widget_set_sensitive (view->priv->remove_button, FALSE);
 	gtk_widget_set_sensitive (view->priv->label, FALSE);	
 	gtk_widget_set_sensitive (view->priv->entry, FALSE);
 	
@@ -466,11 +509,13 @@
 		}
 
 		gtk_widget_set_sensitive (view->priv->play_button, TRUE);
+		gtk_widget_set_sensitive (view->priv->remove_button, TRUE);
 		gtk_widget_set_sensitive (view->priv->label, TRUE);
 		gtk_widget_set_sensitive (view->priv->entry, TRUE);
 	} else {
 		text = g_strdup ("");
 		gtk_widget_set_sensitive (view->priv->play_button, FALSE);
+		gtk_widget_set_sensitive (view->priv->remove_button, FALSE);
 		gtk_widget_set_sensitive (view->priv->label, FALSE);
 		gtk_widget_set_sensitive (view->priv->entry, FALSE);
 	}
