changeset 253:fa463b3ca57b

Compile-time optionally enabled themetune support in about-dialog (click the logo image)
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 21 Dec 2004 20:17:02 +0000
parents 5a18af547f58
children d3a4d35f2a8f
files src/config.h.in src/xmms-sid.c src/xs_about.c
diffstat 3 files changed, 46 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- 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 <sys/types.h> 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 <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
--- 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++;
  	}
--- 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 <xmms/xmmsctrl.h>
+
+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"