annotate audacious/about.c @ 500:5c76d862ed49 trunk

[svn] Add show_credits_window() declaration.
author nenolod
date Wed, 25 Jan 2006 18:19:59 -0800
parents cd5793de075c
children 3399d6a41f16
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
1 /* XMMS - Cross-platform multimedia player
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
2 * Copyright (C) 1998-2003 Peter Alm, Mikael Alm, Olle Hallnas,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
3 * Thomas Nilsson and 4Front Technologies
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
4 * Copyright (C) 2000-2003 Haavard Kvaalen
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
5 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
6 * This program is free software; you can redistribute it and/or modify
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
7 * it under the terms of the GNU General Public Licensse as published by
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
8 * the Free Software Foundation; either version 2 of the License, or
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
9 * (at your option) any later version.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
10 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
11 * This program is distributed in the hope that it will be useful,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
14 * GNU General Public License for more details.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
15 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
16 * You should have received a copy of the GNU General Public License
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
17 * along with this program; if not, write to the Free Software
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
19 */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
20
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
21 #ifdef HAVE_CONFIG_H
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
22 # include "config.h"
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
23 #endif
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
24
471
a4ec7dfe5672 [svn] Rename about.c to credits.c
nenolod
parents: 399
diff changeset
25 #include "credits.h"
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
26
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
27 #include <glib.h>
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
28 #include <glib/gi18n.h>
474
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
29 #include <gdk/gdk.h>
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
30 #include <gdk/gdkx.h>
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
31 #include <gdk/gdkkeysyms.h>
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
32 #include <gtk/gtk.h>
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
33
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
34 #include "audacious_logo.xpm"
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
35
474
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
36 static GtkWidget *about_window = NULL;
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
37 static GdkPixbuf *about_pixbuf = NULL;
475
cd5793de075c [svn] More progress towards the about window, no more background being overwritten... we were forgetting to tell X that the window was paintable.
nenolod
parents: 474
diff changeset
38 static GdkPixmap *mask_pixmap_window1 = NULL,
cd5793de075c [svn] More progress towards the about window, no more background being overwritten... we were forgetting to tell X that the window was paintable.
nenolod
parents: 474
diff changeset
39 *mask_pixmap_window2 = NULL;
cd5793de075c [svn] More progress towards the about window, no more background being overwritten... we were forgetting to tell X that the window was paintable.
nenolod
parents: 474
diff changeset
40 static GdkBitmap *mask_bitmap_window1 = NULL,
cd5793de075c [svn] More progress towards the about window, no more background being overwritten... we were forgetting to tell X that the window was paintable.
nenolod
parents: 474
diff changeset
41 *mask_bitmap_window2 = NULL;
cd5793de075c [svn] More progress towards the about window, no more background being overwritten... we were forgetting to tell X that the window was paintable.
nenolod
parents: 474
diff changeset
42
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
43
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
44 enum {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
45 COL_LEFT,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
46 COL_RIGHT,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
47 N_COLS
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
48 };
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
49
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
50 static const gchar *bmp_brief =
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
51 N_("<big><b>Audacious %s</b></big>\n"
360
222a0d71cbcf [svn] - change our slogan to "The future of UNIX multimedia."
nenolod
parents: 232
diff changeset
52 "The future of UNIX multimedia.\n"
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
53 "\n"
360
222a0d71cbcf [svn] - change our slogan to "The future of UNIX multimedia."
nenolod
parents: 232
diff changeset
54 "Copyright (C) 2005-2006 Audacious Development Team\n");
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
55
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
56 static const gchar *credit_text[] = {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
57 N_("Developers:"),
399
db2fcdad1d6d [svn] Add giacomo to credits.
nenolod
parents: 360
diff changeset
58 N_("Giacomo Lozito"),
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
59 N_("William Pitcock"),
168
32653058b307 [svn] Add chainsaw to credits.
nenolod
parents: 71
diff changeset
60 N_("Tony Vroon"),
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
61 NULL,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
62
360
222a0d71cbcf [svn] - change our slogan to "The future of UNIX multimedia."
nenolod
parents: 232
diff changeset
63 N_("0.1.x developers:"),
222a0d71cbcf [svn] - change our slogan to "The future of UNIX multimedia."
nenolod
parents: 232
diff changeset
64 N_("William Pitcock"),
222a0d71cbcf [svn] - change our slogan to "The future of UNIX multimedia."
nenolod
parents: 232
diff changeset
65 N_("Mohammed Sameer"),
222a0d71cbcf [svn] - change our slogan to "The future of UNIX multimedia."
nenolod
parents: 232
diff changeset
66 N_("Tony Vroon"),
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
67 NULL,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
68
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
69 N_("BMP Developers:"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
70 N_("Artem Baguinski"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
71 N_("Edward Brocklesby"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
72 N_("Chong Kai Xiong"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
73 N_("Milosz Derezynski"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
74 N_("David Lau"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
75 N_("Ole Andre Vadla Ravnaas"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
76 N_("Michiel Sikkes"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
77 N_("Andrei Badea"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
78 N_("Peter Behroozi"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
79 N_("Bernard Blackham"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
80 N_("Oliver Blin"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
81 N_("Tomas Bzatek"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
82 N_("Liviu Danicel"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
83 N_("Jon Dowland"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
84 N_("Artur Frysiak"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
85 N_("Sebastian Kapfer"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
86 N_("Lukas Koberstein"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
87 N_("Dan Korostelev"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
88 N_("Jolan Luff"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
89 N_("Michael Marineau"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
90 N_("Tim-Philipp Muller"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
91 N_("Julien Portalier"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
92 N_("Andrew Ruder"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
93 N_("Olivier Samyn"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
94 N_("Martijn Vernooij"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
95 NULL,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
96
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
97 NULL
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
98 };
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
99
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
100 static const gchar *translators[] = {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
101 N_("Brazilian Portuguese:"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
102 N_("Philipi Pinto"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
103 NULL,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
104 N_("Breton:"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
105 N_("Thierry Vignaud"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
106 NULL,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
107 N_("Chinese:"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
108 N_("Chong Kai Xiong"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
109 N_("Chao-Hsiung Liao"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
110 NULL,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
111 N_("Czech:"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
112 N_("Jan Narovec"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
113 NULL,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
114 N_("Dutch:"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
115 N_("Laurens Buhler"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
116 NULL,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
117 N_("Finnish:"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
118 N_("Pauli Virtanen"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
119 NULL,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
120 N_("French:"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
121 N_("David Le Brun"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
122 NULL,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
123 N_("German:"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
124 N_("Matthias Debus"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
125 NULL,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
126 N_("Georgian: "),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
127 N_("George Machitidze"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
128 NULL,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
129 N_("Greek:"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
130 N_("Kouzinopoulos Haris"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
131 N_("Stavros Giannouris"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
132 NULL,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
133 N_("Hindi:"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
134 N_("Dhananjaya Sharma"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
135 NULL,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
136 N_("Hungarian:"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
137 N_("Laszlo Dvornik"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
138 NULL,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
139 N_("Italian:"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
140 N_("Alessio D'Ascanio"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
141 NULL,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
142 N_("Japanese:"),
232
d697b42ca31f [svn] Update japanese translator's name. Whoops.
nenolod
parents: 168
diff changeset
143 N_("Dai"),
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
144 NULL,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
145 N_("Korean:"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
146 N_("DongCheon Park"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
147 NULL,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
148 N_("Lithuanian:"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
149 N_("Rimas Kudelis"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
150 NULL,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
151 N_("Macedonian:"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
152 N_("Arangel Angov"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
153 NULL,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
154 N_("Polish:"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
155 N_("Jacek Wolszczak"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
156 NULL,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
157 N_("Romanian:"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
158 N_("Liviu Danicel"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
159 NULL,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
160 N_("Russian:"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
161 N_("Pavlo Bohmat"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
162 N_("Dan Korostelev"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
163 N_("Vitaly Lipatov"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
164 NULL,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
165 N_("Slovak:"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
166 N_("Pavel Kanzelsberger"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
167 NULL,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
168 N_("Spanish:"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
169 N_("Francisco Javier F. Serrador"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
170 NULL,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
171 N_("Swedish:"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
172 N_("Martin Persenius"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
173 NULL,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
174 N_("Ukrainian:"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
175 N_("Mykola Lynnyk"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
176 NULL,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
177 N_("Welsh:"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
178 N_("Edward Brocklesby"),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
179 NULL,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
180
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
181 NULL
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
182 };
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
183
474
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
184 static gboolean
475
cd5793de075c [svn] More progress towards the about window, no more background being overwritten... we were forgetting to tell X that the window was paintable.
nenolod
parents: 474
diff changeset
185 on_about_window_expose(GtkWidget *widget, GdkEventExpose *expose, gpointer data)
cd5793de075c [svn] More progress towards the about window, no more background being overwritten... we were forgetting to tell X that the window was paintable.
nenolod
parents: 474
diff changeset
186 {
cd5793de075c [svn] More progress towards the about window, no more background being overwritten... we were forgetting to tell X that the window was paintable.
nenolod
parents: 474
diff changeset
187 g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
cd5793de075c [svn] More progress towards the about window, no more background being overwritten... we were forgetting to tell X that the window was paintable.
nenolod
parents: 474
diff changeset
188
cd5793de075c [svn] More progress towards the about window, no more background being overwritten... we were forgetting to tell X that the window was paintable.
nenolod
parents: 474
diff changeset
189 gdk_window_set_back_pixmap(GDK_WINDOW(widget->window), mask_pixmap_window2, 0);
cd5793de075c [svn] More progress towards the about window, no more background being overwritten... we were forgetting to tell X that the window was paintable.
nenolod
parents: 474
diff changeset
190 gdk_window_clear(GDK_WINDOW(widget->window));
cd5793de075c [svn] More progress towards the about window, no more background being overwritten... we were forgetting to tell X that the window was paintable.
nenolod
parents: 474
diff changeset
191
cd5793de075c [svn] More progress towards the about window, no more background being overwritten... we were forgetting to tell X that the window was paintable.
nenolod
parents: 474
diff changeset
192 return FALSE;
cd5793de075c [svn] More progress towards the about window, no more background being overwritten... we were forgetting to tell X that the window was paintable.
nenolod
parents: 474
diff changeset
193 }
cd5793de075c [svn] More progress towards the about window, no more background being overwritten... we were forgetting to tell X that the window was paintable.
nenolod
parents: 474
diff changeset
194
cd5793de075c [svn] More progress towards the about window, no more background being overwritten... we were forgetting to tell X that the window was paintable.
nenolod
parents: 474
diff changeset
195 static gboolean
474
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
196 on_about_window_key_press (GtkWidget *widget, GdkEventKey *event, gpointer data)
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
197 {
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
198 g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
199
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
200 if (event->keyval == GDK_Escape)
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
201 {
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
202 gtk_widget_hide (widget);
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
203 }
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
204
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
205 return FALSE;
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
206 }
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
207
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
208 static GtkWidget *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
209 generate_credit_list(const gchar * text[], gboolean sec_space)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
210 {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
211 GtkWidget *scrollwin;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
212 GtkWidget *treeview;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
213 GtkListStore *list_store;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
214 GtkTreeIter iter;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
215 GtkTreeViewColumn *column;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
216 GtkCellRenderer *renderer;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
217 const gchar *const *item;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
218
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
219 list_store = gtk_list_store_new(N_COLS, G_TYPE_STRING, G_TYPE_STRING);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
220
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
221 item = text;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
222
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
223 while (*item) {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
224 gtk_list_store_append(list_store, &iter);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
225 gtk_list_store_set(list_store, &iter,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
226 COL_LEFT, _(item[0]), COL_RIGHT, _(item[1]), -1);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
227 item += 2;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
228
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
229 while (*item) {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
230 gtk_list_store_append(list_store, &iter);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
231 gtk_list_store_set(list_store, &iter,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
232 COL_LEFT, "", COL_RIGHT, _(*item++), -1);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
233 }
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
234
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
235 ++item;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
236
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
237 if (*item && sec_space) {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
238 gtk_list_store_append(list_store, &iter);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
239 gtk_list_store_set(list_store, &iter,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
240 COL_LEFT, "", COL_RIGHT, "", -1);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
241 }
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
242 }
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
243
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
244 treeview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(list_store));
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
245 gtk_tree_view_set_headers_clickable(GTK_TREE_VIEW(treeview), FALSE);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
246 gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(treeview), FALSE);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
247 gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview)),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
248 GTK_SELECTION_NONE);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
249
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
250 renderer = gtk_cell_renderer_text_new();
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
251 g_object_set(renderer, "xalign", 1.0, NULL);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
252 column = gtk_tree_view_column_new_with_attributes("Left", renderer,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
253 "text", COL_LEFT, NULL);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
254 gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
255
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
256 renderer = gtk_cell_renderer_text_new();
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
257 g_object_set(renderer, "xalign", 0.0, NULL);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
258 column = gtk_tree_view_column_new_with_attributes("Right", renderer,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
259 "text", COL_RIGHT,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
260 NULL);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
261 gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
262
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
263 scrollwin = gtk_scrolled_window_new(NULL, NULL);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
264 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollwin),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
265 GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
266 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrollwin), GTK_SHADOW_IN);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
267 gtk_container_add(GTK_CONTAINER(scrollwin), treeview);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
268 gtk_container_set_border_width(GTK_CONTAINER(scrollwin), 10);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
269
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
270 gtk_widget_show_all(scrollwin);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
271
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
272 return scrollwin;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
273 }
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
274
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
275 void
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
276 show_about_window(void)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
277 {
474
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
278 gchar *filename = DATA_DIR G_DIR_SEPARATOR_S "images" G_DIR_SEPARATOR_S "about-logo.png";
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
279
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
280 if (about_window != NULL)
475
cd5793de075c [svn] More progress towards the about window, no more background being overwritten... we were forgetting to tell X that the window was paintable.
nenolod
parents: 474
diff changeset
281 {
cd5793de075c [svn] More progress towards the about window, no more background being overwritten... we were forgetting to tell X that the window was paintable.
nenolod
parents: 474
diff changeset
282 gtk_window_present(GTK_WINDOW(about_window));
474
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
283 return;
475
cd5793de075c [svn] More progress towards the about window, no more background being overwritten... we were forgetting to tell X that the window was paintable.
nenolod
parents: 474
diff changeset
284 }
474
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
285
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
286 about_window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
287 gtk_window_set_type_hint(GTK_WINDOW(about_window),
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
288 GDK_WINDOW_TYPE_HINT_DIALOG);
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
289
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
290 g_signal_connect(about_window, "destroy",
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
291 G_CALLBACK(gtk_widget_destroyed), &about_window);
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
292
475
cd5793de075c [svn] More progress towards the about window, no more background being overwritten... we were forgetting to tell X that the window was paintable.
nenolod
parents: 474
diff changeset
293 gtk_widget_realize(about_window);
474
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
294
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
295 about_pixbuf = gdk_pixbuf_new_from_file(filename, NULL);
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
296
474
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
297 gtk_widget_set_size_request (GTK_WIDGET (about_window),
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
298 gdk_pixbuf_get_width (about_pixbuf),
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
299 gdk_pixbuf_get_height (about_pixbuf));
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
300
475
cd5793de075c [svn] More progress towards the about window, no more background being overwritten... we were forgetting to tell X that the window was paintable.
nenolod
parents: 474
diff changeset
301 gtk_widget_set_app_paintable (about_window, TRUE);
474
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
302 gtk_window_set_title(GTK_WINDOW(about_window), _("About Audacious"));
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
303 gtk_window_set_position(GTK_WINDOW(about_window), GTK_WIN_POS_CENTER);
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
304 gtk_window_set_resizable(GTK_WINDOW(about_window), FALSE);
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
305
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
306 gdk_pixbuf_render_pixmap_and_mask(about_pixbuf,
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
307 &mask_pixmap_window1,
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
308 &mask_bitmap_window1,
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
309 0);
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
310
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
311 gdk_pixbuf_render_pixmap_and_mask(about_pixbuf,
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
312 &mask_pixmap_window2,
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
313 &mask_bitmap_window2,
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
314 128);
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
315
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
316 gtk_widget_add_events(about_window, GDK_ALL_EVENTS_MASK);
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
317
475
cd5793de075c [svn] More progress towards the about window, no more background being overwritten... we were forgetting to tell X that the window was paintable.
nenolod
parents: 474
diff changeset
318 g_signal_connect(about_window, "expose-event",
cd5793de075c [svn] More progress towards the about window, no more background being overwritten... we were forgetting to tell X that the window was paintable.
nenolod
parents: 474
diff changeset
319 G_CALLBACK(on_about_window_expose), &about_window);
cd5793de075c [svn] More progress towards the about window, no more background being overwritten... we were forgetting to tell X that the window was paintable.
nenolod
parents: 474
diff changeset
320
474
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
321 g_signal_connect(about_window, "key-press-event",
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
322 G_CALLBACK(on_about_window_key_press), &about_window);
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
323
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
324 #if 0
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
325 GdkPixmap *beep_logo_pmap = NULL, *beep_logo_mask = NULL;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
326 GtkWidget *about_vbox;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
327 GtkWidget *about_credits_logo_box, *about_credits_logo_frame;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
328 GtkWidget *about_credits_logo;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
329 GtkWidget *about_notebook;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
330 GtkWidget *list;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
331 GtkWidget *bbox, *close_btn;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
332 GtkWidget *label;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
333 gchar *text;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
334
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
335 if (about_window)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
336 return;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
337
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
338 gtk_container_set_border_width(GTK_CONTAINER(about_window), 10);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
339
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
340
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
341 about_vbox = gtk_vbox_new(FALSE, 5);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
342 gtk_container_add(GTK_CONTAINER(about_window), about_vbox);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
343
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
344 if (!beep_logo_pmap)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
345 beep_logo_pmap =
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
346 gdk_pixmap_create_from_xpm_d(about_window->window,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
347 &beep_logo_mask, NULL, audacious_logo_xpm);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
348
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
349 about_credits_logo_box = gtk_hbox_new(TRUE, 0);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
350 gtk_box_pack_start(GTK_BOX(about_vbox), about_credits_logo_box,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
351 FALSE, FALSE, 0);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
352
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
353 about_credits_logo_frame = gtk_frame_new(NULL);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
354 gtk_frame_set_shadow_type(GTK_FRAME(about_credits_logo_frame),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
355 GTK_SHADOW_ETCHED_OUT);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
356 gtk_box_pack_start(GTK_BOX(about_credits_logo_box),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
357 about_credits_logo_frame, FALSE, FALSE, 0);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
358
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
359 about_credits_logo = gtk_pixmap_new(beep_logo_pmap, beep_logo_mask);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
360 gtk_container_add(GTK_CONTAINER(about_credits_logo_frame),
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
361 about_credits_logo);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
362
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
363 label = gtk_label_new(NULL);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
364 text = g_strdup_printf(_(bmp_brief), VERSION);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
365 gtk_label_set_markup(GTK_LABEL(label), text);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
366 gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_CENTER);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
367 g_free(text);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
368
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
369 gtk_box_pack_start(GTK_BOX(about_vbox), label, FALSE, FALSE, 0);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
370
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
371 about_notebook = gtk_notebook_new();
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
372 gtk_box_pack_start(GTK_BOX(about_vbox), about_notebook, TRUE, TRUE, 0);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
373
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
374 list = generate_credit_list(credit_text, TRUE);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
375 gtk_notebook_append_page(GTK_NOTEBOOK(about_notebook), list,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
376 gtk_label_new(_("Credits")));
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
377
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
378 list = generate_credit_list(translators, FALSE);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
379 gtk_notebook_append_page(GTK_NOTEBOOK(about_notebook), list,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
380 gtk_label_new(_("Translators")));
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
381
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
382 bbox = gtk_hbutton_box_new();
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
383 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
384 gtk_button_box_set_spacing(GTK_BUTTON_BOX(bbox), 5);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
385 gtk_box_pack_start(GTK_BOX(about_vbox), bbox, FALSE, FALSE, 0);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
386
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
387 close_btn = gtk_button_new_from_stock(GTK_STOCK_CLOSE);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
388 g_signal_connect_swapped(close_btn, "clicked",
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
389 G_CALLBACK(gtk_widget_destroy), about_window);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
390 GTK_WIDGET_SET_FLAGS(close_btn, GTK_CAN_DEFAULT);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
391 gtk_box_pack_start(GTK_BOX(bbox), close_btn, TRUE, TRUE, 0);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
392 gtk_widget_grab_default(close_btn);
474
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
393 #endif
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
394
474
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
395 gtk_widget_shape_combine_mask(GTK_WIDGET(about_window), mask_bitmap_window2, 0, 0);
f3b46533da81 [svn] Experimental about box stuff... doesnt work right yet. Work in progress!
nenolod
parents: 471
diff changeset
396
475
cd5793de075c [svn] More progress towards the about window, no more background being overwritten... we were forgetting to tell X that the window was paintable.
nenolod
parents: 474
diff changeset
397 gtk_window_present(GTK_WINDOW(about_window));
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
398 }