--- rhythmbox-0.5.3.orig/shell/main.c	2003-09-03 23:25:44.000000000 +0200
+++ rhythmbox-0.5.3/shell/main.c	2003-10-19 16:29:16.000000000 +0200
@@ -48,7 +48,6 @@
 #include "eel-gconf-extensions.h"
 
 static gboolean rb_init (RBShell *shell);
-static gboolean sound_error_dialog (gpointer unused);
 static void rb_handle_cmdline (char **argv, int argc,
 			       gboolean already_running);
 
@@ -66,7 +65,7 @@ main (int argc, char **argv)
 	GnomeProgram *program;
 	CORBA_Object object;
 	RBShell *rb_shell;
-	gboolean sound_events_borked = FALSE;
+	char **new_argv;
 
 	const struct poptOption popt_options[] =
 	{
@@ -79,9 +78,15 @@ main (int argc, char **argv)
 		POPT_TABLEEND
 	};
 
+	/* Disable event sounds by passing "--disable-sound" to libgnomeui */
+	new_argv = g_strdupv (argv);
+	new_argv = g_realloc (new_argv, (argc+2)*sizeof(char*));
+	new_argv[argc] = g_strdup ("--disable-sound");
+	new_argv[argc+1] = NULL;
+
 	gtk_set_locale ();
 	program = gnome_program_init (PACKAGE, VERSION,
-				      LIBGNOMEUI_MODULE, argc, argv,
+				      LIBGNOMEUI_MODULE, argc+1, new_argv,
 				      GNOME_PARAM_POPT_TABLE, popt_options,
 				      GNOME_PARAM_HUMAN_READABLE_NAME, _("Rhythmbox"),
 				      GNOME_PARAM_APP_DATADIR, DATADIR,
@@ -95,23 +100,12 @@ main (int argc, char **argv)
 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 	textdomain (GETTEXT_PACKAGE);
 #endif
-
-#ifdef HAVE_GSTREAMER	
-	/* rb currently does not work with esd + gnome event sounds enabled */
-	if (eel_gconf_get_boolean ("/desktop/gnome/sound/event_sounds")
-			&& eel_gconf_get_boolean ("/desktop/gnome/sound/enable_esd")
-	    && strstr (gst_gconf_get_string ("default/audiosink"), "esdsink"))
-		sound_events_borked = TRUE;
-#endif
 	
 	gdk_threads_init ();
 
 	CORBA_exception_init (&ev);
 
-	/* Work around a GTK+ bug.  Inititalizing a dialog causes
-	 * a GTK+ warning, which then dies because it's a warning. */
-	if (!sound_events_borked)
-		rb_debug_init (debug);
+	rb_debug_init (debug);
 
 	rb_file_helpers_init ();
 
@@ -130,16 +124,12 @@ main (int argc, char **argv)
 
 		rb_stock_icons_init ();
 
-		if (sound_events_borked) {
-			g_idle_add ((GSourceFunc) sound_error_dialog, NULL);
-		} else {
-			rb_shell = rb_shell_new ();
-			
-			g_object_set_data (G_OBJECT (rb_shell), "argv", argv);
-			g_object_set_data (G_OBJECT (rb_shell), "argc", GINT_TO_POINTER (argc));
-			
-			g_idle_add ((GSourceFunc) rb_init, rb_shell);
-		}
+		rb_shell = rb_shell_new ();
+		
+		g_object_set_data (G_OBJECT (rb_shell), "argv", argv);
+		g_object_set_data (G_OBJECT (rb_shell), "argc", GINT_TO_POINTER (argc));
+		
+		g_idle_add ((GSourceFunc) rb_init, rb_shell);
 		
 		bonobo_main ();
 	} else {
@@ -155,26 +145,9 @@ main (int argc, char **argv)
 
 	monkey_media_shutdown ();
 
-	return 0;
-}
-
+	g_strfreev (new_argv);
 
-static gboolean
-sound_error_dialog (gpointer unused)
-{
-	GtkWidget *dialog;
-
-	GDK_THREADS_ENTER ();
-
-	dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_DESTROY_WITH_PARENT,
-					 GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
-					 _("Rhythmbox does not currently work if GNOME sound events are are enabled and esdsink is in use."));
-	gtk_dialog_run (GTK_DIALOG (dialog));
-
-	bonobo_main_quit ();
-
-	GDK_THREADS_LEAVE ();
-	return FALSE;
+	return 0;
 }
 
 static gboolean
