diff -X dontdiff -urNp tunesbrowser-0.2.0/daap.c tunesbrowser-dsd/daap.c --- tunesbrowser-0.2.0/daap.c 2005-01-27 00:25:23.663654968 +0000 +++ tunesbrowser-dsd/daap.c 2005-01-27 00:37:53.817614232 +0000 @@ -772,7 +772,7 @@ void daap_audiocb_finished() if (stop_type == STOP_NEWSONG) { - dbgi("STOP_NEWSONG"); + dbgi("STOP_NEWSONG\n"); daap_host_play_song(next_song.playsource, next_song.host, next_song.song_id); daap_host_release(next_song.host); /* play_song will addref */ next_song.host = NULL; @@ -939,4 +939,7 @@ static int compare_songitems(const void return 0; } - +void daap_stop_playback() +{ + stop_type = STOP_ERROR; +} diff -X dontdiff -urNp tunesbrowser-0.2.0/main.c tunesbrowser-dsd/main.c --- tunesbrowser-0.2.0/main.c 2005-01-27 00:21:51.528904352 +0000 +++ tunesbrowser-dsd/main.c 2005-01-27 00:43:15.526707016 +0000 @@ -58,7 +58,7 @@ static void sighandler_sigpipe(__UNUSED_ fprintf(stderr, "Attach to PID %i\n", getpid()); raise(SIGSTOP); #endif - exit(EXIT_FAILURE); + //exit(EXIT_FAILURE); } static void install_sighandlers() diff -X dontdiff -urNp tunesbrowser-0.2.0/misc_ui.c tunesbrowser-dsd/misc_ui.c --- tunesbrowser-0.2.0/misc_ui.c 2005-01-27 00:21:51.529904200 +0000 +++ tunesbrowser-dsd/misc_ui.c 2005-01-27 00:35:39.113092432 +0000 @@ -261,11 +261,18 @@ void on_playpause_clicked(__UNUSED__ Gtk } } +void on_stop_clicked(__UNUSED__ GtkButton *stop, __UNUSED__ gpointer user_data) +{ + dbgi("Stopping...\n"); + daap_stop_playback(); + audioplayer_stop(); +} + /************** init **************/ void misc_ui_init(GladeXML *xml) { - GtkButton *playpause; + GtkButton *playpause, *stop; playstatus = GTK_LABEL(glade_xml_get_widget(xml, "playstatus")); play_str = GTK_LABEL(glade_xml_get_widget(xml, "play_str")); @@ -277,6 +284,11 @@ void misc_ui_init(GladeXML *xml) g_signal_connect(G_OBJECT(playpause), "clicked", G_CALLBACK(on_playpause_clicked), NULL); + + stop = GTK_BUTTON(glade_xml_get_widget(xml, "stop")); + g_signal_connect(G_OBJECT(stop), "clicked", + G_CALLBACK(on_stop_clicked), + NULL); } void misc_ui_finalize() diff -X dontdiff -urNp tunesbrowser-0.2.0/tunesbrowser.glade tunesbrowser-dsd/tunesbrowser.glade --- tunesbrowser-0.2.0/tunesbrowser.glade 2004-12-13 09:49:00.000000000 +0000 +++ tunesbrowser-dsd/tunesbrowser.glade 2005-01-27 00:26:50.961383696 +0000 @@ -122,6 +122,18 @@ + + True + True + True + gtk-stop + True + GTK_RELIEF_NORMAL + True + + + + True False