# HG changeset patch # User William Pitcock # Date 1185237239 18000 # Node ID f9d34bc5079fdaec97cf88a495852e298621f786 # Parent 4a0e216bc825bc4facd20c94d114ed58933d6afb Remove check for playback->error. diff -r 4a0e216bc825 -r f9d34bc5079f src/audacious/ui_main.c --- a/src/audacious/ui_main.c Mon Jul 23 19:24:51 2007 -0500 +++ b/src/audacious/ui_main.c Mon Jul 23 19:33:59 2007 -0500 @@ -2219,8 +2219,8 @@ gtk_widget_destroy(dialog); } -static void -run_no_output_device_dialog(void) +void +run_no_output_device_dialog(gpointer hook_data, gpointer user_data) { const gchar *markup = N_("Couldn't open audio.\n\n" @@ -2229,6 +2229,7 @@ "2. No other programs is blocking the soundcard.\n" "3. Your soundcard is configured properly.\n"); + GDK_THREADS_ENTER(); GtkWidget *dialog = gtk_message_dialog_new_with_markup(GTK_WINDOW(mainwin), GTK_DIALOG_DESTROY_WITH_PARENT, @@ -2237,6 +2238,7 @@ _(markup)); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); + GDK_THREADS_LEAVE(); } @@ -2838,6 +2840,9 @@ /* Dang well better set an error message or you'll see this */ gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(err), "Boo! Bad stuff! Booga Booga!"); + + hook_associate("playback audio error", (void *) mainwin_stop_pushed, NULL); + hook_associate("playback audio error", (void *) run_no_output_device_dialog, NULL); } static void @@ -2993,14 +2998,6 @@ switch((time = playback_get_time())) { - case -2: - /* no usable output device */ - GDK_THREADS_ENTER(); - run_no_output_device_dialog(); - mainwin_stop_pushed(); - GDK_THREADS_LEAVE(); - break; - default: input_update_vis(time); /* nothing at this time */