# HG changeset patch # User Matti Hamalainen # Date 1103660222 0 # Node ID fa463b3ca57bc2712053ca116e18609a97c969ac # Parent 5a18af547f58315d00414d98f4a503800b1e022c Compile-time optionally enabled themetune support in about-dialog (click the logo image) diff -r 5a18af547f58 -r fa463b3ca57b src/config.h.in --- a/src/config.h.in Tue Dec 21 20:15:04 2004 +0000 +++ b/src/config.h.in Tue Dec 21 20:17:02 2004 +0000 @@ -65,6 +65,10 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H +/* Define if you want to build code to play XMMS-SID theme SID-tune. The tune + needs to be installed too, though. */ +#undef HAVE_THEMETUNE + /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H diff -r 5a18af547f58 -r fa463b3ca57b src/xmms-sid.c --- a/src/xmms-sid.c Tue Dec 21 20:15:04 2004 +0000 +++ b/src/xmms-sid.c Tue Dec 21 20:17:02 2004 +0000 @@ -145,6 +145,7 @@ { isInitialized = TRUE; xs_status.sidPlayer = (t_xs_player *) &xs_playerlist[iPlayer]; + xs_cfg.playerEngine = xs_playerlist[iPlayer].plrIdent; } else iPlayer++; } diff -r 5a18af547f58 -r fa463b3ca57b src/xs_about.c --- a/src/xs_about.c Tue Dec 21 20:15:04 2004 +0000 +++ b/src/xs_about.c Tue Dec 21 20:17:02 2004 +0000 @@ -27,6 +27,25 @@ static GtkWidget *xs_aboutwin = NULL; +#ifdef HAVE_THEMETUNE +#include + +gint xs_about_theme(void) +{ + const gint iSession = 0; /* Assume session 0 */ + gint iPos; + + /* Stop current song, add theme to playlist, play. */ + xmms_remote_stop(iSession); + iPos = xmms_remote_get_playlist_length(iSession); + xmms_remote_playlist_add_url_string(iSession, THEMETUNE_FILE); + xmms_remote_set_playlist_pos(iSession, iPos); + xmms_remote_play(iSession); + return 0; +} +#endif + + gint xs_about_ok(void) { gtk_widget_destroy(xs_aboutwin); @@ -71,7 +90,11 @@ gtk_widget_show (about_vbox1); gtk_container_add (GTK_CONTAINER (xs_aboutwin), about_vbox1); +#ifdef HAVE_THEMETUNE + about_frame = gtk_button_new(); +#else about_frame = gtk_frame_new (NULL); +#endif gtk_widget_set_name (about_frame, "about_frame"); gtk_widget_ref (about_frame); gtk_object_set_data_full (GTK_OBJECT (xs_aboutwin), "about_frame", about_frame, @@ -79,7 +102,12 @@ gtk_widget_show (about_frame); gtk_box_pack_start (GTK_BOX (about_vbox1), about_frame, FALSE, FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (about_frame), 4); + +#ifdef HAVE_THEMETUNE + gtk_signal_connect (GTK_OBJECT (about_frame), "clicked", GTK_SIGNAL_FUNC (xs_about_theme), NULL); +#else gtk_frame_set_shadow_type (GTK_FRAME (about_frame), GTK_SHADOW_OUT); +#endif /* Create the Gdk data for logo pixmap */ gtk_widget_realize (xs_aboutwin); @@ -125,23 +153,29 @@ "Programming and design\n" "\tMatti 'ccr/TNSP' Hämäläinen\n" "\n" +#ifdef HAVE_SIDPLAY1 "libSIDPlay created by\n" "\tMichael Schwendt\n" "\n" +#endif +#ifdef HAVE_SIDPLAY2 "libSIDPlay2 and reSID created by\n" "\tSimon White, Dag Lem,\n" "\tMichael Schwendt and rest.\n" "\n" +#endif +#ifdef HAVE_THEMETUNE + "\"Kummatti City\", theme of XMMS-SID 0.8\n" + "\tby Ari 'Agemixer' Yliaho\n" + "\t(C) Copyright 1998 Scallop\n" + "\t(Not under GNU GPL, refer to\n" + "\tXMMS-SID's README for license)\n" + "\n" +#endif "Original XMMS-SID created by\n" "\tWillem Monsuwe\n" - "\n", -1); -#if 0 - "\"XMMS-SID Theme\"-song (SIDtune)\n" - "\tPeter 'Brite-Lite' Halin of Dekadence\n" - "\t(C) Copyright 2003 Dekadence\n" - "\thttp://www.dekadence64.org/\n" "\n" -#endif + , -1); gtk_text_insert (GTK_TEXT (about_text), NULL, NULL, NULL, "Thanks and greetings ...\n"