comparison src/xs_about.c @ 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 6e350784aa57
children d3a4d35f2a8f
comparison
equal deleted inserted replaced
252:5a18af547f58 253:fa463b3ca57b
23 #include <gtk/gtk.h> 23 #include <gtk/gtk.h>
24 #include "xmms-sid-logo.xpm" 24 #include "xmms-sid-logo.xpm"
25 25
26 26
27 static GtkWidget *xs_aboutwin = NULL; 27 static GtkWidget *xs_aboutwin = NULL;
28
29
30 #ifdef HAVE_THEMETUNE
31 #include <xmms/xmmsctrl.h>
32
33 gint xs_about_theme(void)
34 {
35 const gint iSession = 0; /* Assume session 0 */
36 gint iPos;
37
38 /* Stop current song, add theme to playlist, play. */
39 xmms_remote_stop(iSession);
40 iPos = xmms_remote_get_playlist_length(iSession);
41 xmms_remote_playlist_add_url_string(iSession, THEMETUNE_FILE);
42 xmms_remote_set_playlist_pos(iSession, iPos);
43 xmms_remote_play(iSession);
44 return 0;
45 }
46 #endif
28 47
29 48
30 gint xs_about_ok(void) 49 gint xs_about_ok(void)
31 { 50 {
32 gtk_widget_destroy(xs_aboutwin); 51 gtk_widget_destroy(xs_aboutwin);
69 gtk_object_set_data_full (GTK_OBJECT (xs_aboutwin), "about_vbox1", about_vbox1, 88 gtk_object_set_data_full (GTK_OBJECT (xs_aboutwin), "about_vbox1", about_vbox1,
70 (GtkDestroyNotify) gtk_widget_unref); 89 (GtkDestroyNotify) gtk_widget_unref);
71 gtk_widget_show (about_vbox1); 90 gtk_widget_show (about_vbox1);
72 gtk_container_add (GTK_CONTAINER (xs_aboutwin), about_vbox1); 91 gtk_container_add (GTK_CONTAINER (xs_aboutwin), about_vbox1);
73 92
93 #ifdef HAVE_THEMETUNE
94 about_frame = gtk_button_new();
95 #else
74 about_frame = gtk_frame_new (NULL); 96 about_frame = gtk_frame_new (NULL);
97 #endif
75 gtk_widget_set_name (about_frame, "about_frame"); 98 gtk_widget_set_name (about_frame, "about_frame");
76 gtk_widget_ref (about_frame); 99 gtk_widget_ref (about_frame);
77 gtk_object_set_data_full (GTK_OBJECT (xs_aboutwin), "about_frame", about_frame, 100 gtk_object_set_data_full (GTK_OBJECT (xs_aboutwin), "about_frame", about_frame,
78 (GtkDestroyNotify) gtk_widget_unref); 101 (GtkDestroyNotify) gtk_widget_unref);
79 gtk_widget_show (about_frame); 102 gtk_widget_show (about_frame);
80 gtk_box_pack_start (GTK_BOX (about_vbox1), about_frame, FALSE, FALSE, 0); 103 gtk_box_pack_start (GTK_BOX (about_vbox1), about_frame, FALSE, FALSE, 0);
81 gtk_container_set_border_width (GTK_CONTAINER (about_frame), 4); 104 gtk_container_set_border_width (GTK_CONTAINER (about_frame), 4);
105
106 #ifdef HAVE_THEMETUNE
107 gtk_signal_connect (GTK_OBJECT (about_frame), "clicked", GTK_SIGNAL_FUNC (xs_about_theme), NULL);
108 #else
82 gtk_frame_set_shadow_type (GTK_FRAME (about_frame), GTK_SHADOW_OUT); 109 gtk_frame_set_shadow_type (GTK_FRAME (about_frame), GTK_SHADOW_OUT);
110 #endif
83 111
84 /* Create the Gdk data for logo pixmap */ 112 /* Create the Gdk data for logo pixmap */
85 gtk_widget_realize (xs_aboutwin); 113 gtk_widget_realize (xs_aboutwin);
86 about_logo_pixmap = gdk_pixmap_create_from_xpm_d( 114 about_logo_pixmap = gdk_pixmap_create_from_xpm_d(
87 xs_aboutwin->window, 115 xs_aboutwin->window,
123 "\tTecnic Software productions (TNSP)\n" 151 "\tTecnic Software productions (TNSP)\n"
124 "\n" 152 "\n"
125 "Programming and design\n" 153 "Programming and design\n"
126 "\tMatti 'ccr/TNSP' Hämäläinen\n" 154 "\tMatti 'ccr/TNSP' Hämäläinen\n"
127 "\n" 155 "\n"
156 #ifdef HAVE_SIDPLAY1
128 "libSIDPlay created by\n" 157 "libSIDPlay created by\n"
129 "\tMichael Schwendt\n" 158 "\tMichael Schwendt\n"
130 "\n" 159 "\n"
160 #endif
161 #ifdef HAVE_SIDPLAY2
131 "libSIDPlay2 and reSID created by\n" 162 "libSIDPlay2 and reSID created by\n"
132 "\tSimon White, Dag Lem,\n" 163 "\tSimon White, Dag Lem,\n"
133 "\tMichael Schwendt and rest.\n" 164 "\tMichael Schwendt and rest.\n"
134 "\n" 165 "\n"
166 #endif
167 #ifdef HAVE_THEMETUNE
168 "\"Kummatti City\", theme of XMMS-SID 0.8\n"
169 "\tby Ari 'Agemixer' Yliaho\n"
170 "\t(C) Copyright 1998 Scallop\n"
171 "\t(Not under GNU GPL, refer to\n"
172 "\tXMMS-SID's README for license)\n"
173 "\n"
174 #endif
135 "Original XMMS-SID created by\n" 175 "Original XMMS-SID created by\n"
136 "\tWillem Monsuwe\n" 176 "\tWillem Monsuwe\n"
137 "\n", -1); 177 "\n"
138 #if 0 178 , -1);
139 "\"XMMS-SID Theme\"-song (SIDtune)\n"
140 "\tPeter 'Brite-Lite' Halin of Dekadence\n"
141 "\t(C) Copyright 2003 Dekadence\n"
142 "\thttp://www.dekadence64.org/\n"
143 "\n"
144 #endif
145 179
146 gtk_text_insert (GTK_TEXT (about_text), NULL, NULL, NULL, 180 gtk_text_insert (GTK_TEXT (about_text), NULL, NULL, NULL,
147 "Thanks and greetings ...\n" 181 "Thanks and greetings ...\n"
148 "\tEveryone at #Linux.Fi, #Fireball,\n" 182 "\tEveryone at #Linux.Fi, #Fireball,\n"
149 "\t#TNSP and #c-64 of IRCNet...\n" 183 "\t#TNSP and #c-64 of IRCNet...\n"