Mercurial > audlegacy
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 |
rev | line source |
---|---|
0 | 1 /* XMMS - Cross-platform multimedia player |
2 * Copyright (C) 1998-2003 Peter Alm, Mikael Alm, Olle Hallnas, | |
3 * Thomas Nilsson and 4Front Technologies | |
4 * Copyright (C) 2000-2003 Haavard Kvaalen | |
5 * | |
6 * This program is free software; you can redistribute it and/or modify | |
7 * it under the terms of the GNU General Public Licensse as published by | |
8 * the Free Software Foundation; either version 2 of the License, or | |
9 * (at your option) any later version. | |
10 * | |
11 * This program is distributed in the hope that it will be useful, | |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 * GNU General Public License for more details. | |
15 * | |
16 * You should have received a copy of the GNU General Public License | |
17 * along with this program; if not, write to the Free Software | |
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
19 */ | |
20 | |
21 #ifdef HAVE_CONFIG_H | |
22 # include "config.h" | |
23 #endif | |
24 | |
471 | 25 #include "credits.h" |
0 | 26 |
27 #include <glib.h> | |
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 | 32 #include <gtk/gtk.h> |
33 | |
34 #include "audacious_logo.xpm" | |
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 | 43 |
44 enum { | |
45 COL_LEFT, | |
46 COL_RIGHT, | |
47 N_COLS | |
48 }; | |
49 | |
50 static const gchar *bmp_brief = | |
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 | 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 | 55 |
56 static const gchar *credit_text[] = { | |
57 N_("Developers:"), | |
399 | 58 N_("Giacomo Lozito"), |
0 | 59 N_("William Pitcock"), |
168 | 60 N_("Tony Vroon"), |
0 | 61 NULL, |
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 | 67 NULL, |
68 | |
69 N_("BMP Developers:"), | |
70 N_("Artem Baguinski"), | |
71 N_("Edward Brocklesby"), | |
72 N_("Chong Kai Xiong"), | |
73 N_("Milosz Derezynski"), | |
74 N_("David Lau"), | |
75 N_("Ole Andre Vadla Ravnaas"), | |
76 N_("Michiel Sikkes"), | |
77 N_("Andrei Badea"), | |
78 N_("Peter Behroozi"), | |
79 N_("Bernard Blackham"), | |
80 N_("Oliver Blin"), | |
81 N_("Tomas Bzatek"), | |
82 N_("Liviu Danicel"), | |
83 N_("Jon Dowland"), | |
84 N_("Artur Frysiak"), | |
85 N_("Sebastian Kapfer"), | |
86 N_("Lukas Koberstein"), | |
87 N_("Dan Korostelev"), | |
88 N_("Jolan Luff"), | |
89 N_("Michael Marineau"), | |
90 N_("Tim-Philipp Muller"), | |
91 N_("Julien Portalier"), | |
92 N_("Andrew Ruder"), | |
93 N_("Olivier Samyn"), | |
94 N_("Martijn Vernooij"), | |
95 NULL, | |
96 | |
97 NULL | |
98 }; | |
99 | |
100 static const gchar *translators[] = { | |
101 N_("Brazilian Portuguese:"), | |
102 N_("Philipi Pinto"), | |
103 NULL, | |
104 N_("Breton:"), | |
105 N_("Thierry Vignaud"), | |
106 NULL, | |
107 N_("Chinese:"), | |
108 N_("Chong Kai Xiong"), | |
109 N_("Chao-Hsiung Liao"), | |
110 NULL, | |
111 N_("Czech:"), | |
112 N_("Jan Narovec"), | |
113 NULL, | |
114 N_("Dutch:"), | |
115 N_("Laurens Buhler"), | |
116 NULL, | |
117 N_("Finnish:"), | |
118 N_("Pauli Virtanen"), | |
119 NULL, | |
120 N_("French:"), | |
121 N_("David Le Brun"), | |
122 NULL, | |
123 N_("German:"), | |
124 N_("Matthias Debus"), | |
125 NULL, | |
126 N_("Georgian: "), | |
127 N_("George Machitidze"), | |
128 NULL, | |
129 N_("Greek:"), | |
130 N_("Kouzinopoulos Haris"), | |
131 N_("Stavros Giannouris"), | |
132 NULL, | |
133 N_("Hindi:"), | |
134 N_("Dhananjaya Sharma"), | |
135 NULL, | |
136 N_("Hungarian:"), | |
137 N_("Laszlo Dvornik"), | |
138 NULL, | |
139 N_("Italian:"), | |
140 N_("Alessio D'Ascanio"), | |
141 NULL, | |
142 N_("Japanese:"), | |
232 | 143 N_("Dai"), |
0 | 144 NULL, |
145 N_("Korean:"), | |
146 N_("DongCheon Park"), | |
147 NULL, | |
148 N_("Lithuanian:"), | |
149 N_("Rimas Kudelis"), | |
150 NULL, | |
151 N_("Macedonian:"), | |
152 N_("Arangel Angov"), | |
153 NULL, | |
154 N_("Polish:"), | |
155 N_("Jacek Wolszczak"), | |
156 NULL, | |
157 N_("Romanian:"), | |
158 N_("Liviu Danicel"), | |
159 NULL, | |
160 N_("Russian:"), | |
161 N_("Pavlo Bohmat"), | |
162 N_("Dan Korostelev"), | |
163 N_("Vitaly Lipatov"), | |
164 NULL, | |
165 N_("Slovak:"), | |
166 N_("Pavel Kanzelsberger"), | |
167 NULL, | |
168 N_("Spanish:"), | |
169 N_("Francisco Javier F. Serrador"), | |
170 NULL, | |
171 N_("Swedish:"), | |
172 N_("Martin Persenius"), | |
173 NULL, | |
174 N_("Ukrainian:"), | |
175 N_("Mykola Lynnyk"), | |
176 NULL, | |
177 N_("Welsh:"), | |
178 N_("Edward Brocklesby"), | |
179 NULL, | |
180 | |
181 NULL | |
182 }; | |
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 | 207 |
208 static GtkWidget * | |
209 generate_credit_list(const gchar * text[], gboolean sec_space) | |
210 { | |
211 GtkWidget *scrollwin; | |
212 GtkWidget *treeview; | |
213 GtkListStore *list_store; | |
214 GtkTreeIter iter; | |
215 GtkTreeViewColumn *column; | |
216 GtkCellRenderer *renderer; | |
217 const gchar *const *item; | |
218 | |
219 list_store = gtk_list_store_new(N_COLS, G_TYPE_STRING, G_TYPE_STRING); | |
220 | |
221 item = text; | |
222 | |
223 while (*item) { | |
224 gtk_list_store_append(list_store, &iter); | |
225 gtk_list_store_set(list_store, &iter, | |
226 COL_LEFT, _(item[0]), COL_RIGHT, _(item[1]), -1); | |
227 item += 2; | |
228 | |
229 while (*item) { | |
230 gtk_list_store_append(list_store, &iter); | |
231 gtk_list_store_set(list_store, &iter, | |
232 COL_LEFT, "", COL_RIGHT, _(*item++), -1); | |
233 } | |
234 | |
235 ++item; | |
236 | |
237 if (*item && sec_space) { | |
238 gtk_list_store_append(list_store, &iter); | |
239 gtk_list_store_set(list_store, &iter, | |
240 COL_LEFT, "", COL_RIGHT, "", -1); | |
241 } | |
242 } | |
243 | |
244 treeview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(list_store)); | |
245 gtk_tree_view_set_headers_clickable(GTK_TREE_VIEW(treeview), FALSE); | |
246 gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(treeview), FALSE); | |
247 gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview)), | |
248 GTK_SELECTION_NONE); | |
249 | |
250 renderer = gtk_cell_renderer_text_new(); | |
251 g_object_set(renderer, "xalign", 1.0, NULL); | |
252 column = gtk_tree_view_column_new_with_attributes("Left", renderer, | |
253 "text", COL_LEFT, NULL); | |
254 gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column); | |
255 | |
256 renderer = gtk_cell_renderer_text_new(); | |
257 g_object_set(renderer, "xalign", 0.0, NULL); | |
258 column = gtk_tree_view_column_new_with_attributes("Right", renderer, | |
259 "text", COL_RIGHT, | |
260 NULL); | |
261 gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column); | |
262 | |
263 scrollwin = gtk_scrolled_window_new(NULL, NULL); | |
264 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollwin), | |
265 GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); | |
266 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrollwin), GTK_SHADOW_IN); | |
267 gtk_container_add(GTK_CONTAINER(scrollwin), treeview); | |
268 gtk_container_set_border_width(GTK_CONTAINER(scrollwin), 10); | |
269 | |
270 gtk_widget_show_all(scrollwin); | |
271 | |
272 return scrollwin; | |
273 } | |
274 | |
275 void | |
276 show_about_window(void) | |
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 | 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 | 325 GdkPixmap *beep_logo_pmap = NULL, *beep_logo_mask = NULL; |
326 GtkWidget *about_vbox; | |
327 GtkWidget *about_credits_logo_box, *about_credits_logo_frame; | |
328 GtkWidget *about_credits_logo; | |
329 GtkWidget *about_notebook; | |
330 GtkWidget *list; | |
331 GtkWidget *bbox, *close_btn; | |
332 GtkWidget *label; | |
333 gchar *text; | |
334 | |
335 if (about_window) | |
336 return; | |
337 | |
338 gtk_container_set_border_width(GTK_CONTAINER(about_window), 10); | |
339 | |
340 | |
341 about_vbox = gtk_vbox_new(FALSE, 5); | |
342 gtk_container_add(GTK_CONTAINER(about_window), about_vbox); | |
343 | |
344 if (!beep_logo_pmap) | |
345 beep_logo_pmap = | |
346 gdk_pixmap_create_from_xpm_d(about_window->window, | |
347 &beep_logo_mask, NULL, audacious_logo_xpm); | |
348 | |
349 about_credits_logo_box = gtk_hbox_new(TRUE, 0); | |
350 gtk_box_pack_start(GTK_BOX(about_vbox), about_credits_logo_box, | |
351 FALSE, FALSE, 0); | |
352 | |
353 about_credits_logo_frame = gtk_frame_new(NULL); | |
354 gtk_frame_set_shadow_type(GTK_FRAME(about_credits_logo_frame), | |
355 GTK_SHADOW_ETCHED_OUT); | |
356 gtk_box_pack_start(GTK_BOX(about_credits_logo_box), | |
357 about_credits_logo_frame, FALSE, FALSE, 0); | |
358 | |
359 about_credits_logo = gtk_pixmap_new(beep_logo_pmap, beep_logo_mask); | |
360 gtk_container_add(GTK_CONTAINER(about_credits_logo_frame), | |
361 about_credits_logo); | |
362 | |
363 label = gtk_label_new(NULL); | |
364 text = g_strdup_printf(_(bmp_brief), VERSION); | |
365 gtk_label_set_markup(GTK_LABEL(label), text); | |
366 gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_CENTER); | |
367 g_free(text); | |
368 | |
369 gtk_box_pack_start(GTK_BOX(about_vbox), label, FALSE, FALSE, 0); | |
370 | |
371 about_notebook = gtk_notebook_new(); | |
372 gtk_box_pack_start(GTK_BOX(about_vbox), about_notebook, TRUE, TRUE, 0); | |
373 | |
374 list = generate_credit_list(credit_text, TRUE); | |
375 gtk_notebook_append_page(GTK_NOTEBOOK(about_notebook), list, | |
376 gtk_label_new(_("Credits"))); | |
377 | |
378 list = generate_credit_list(translators, FALSE); | |
379 gtk_notebook_append_page(GTK_NOTEBOOK(about_notebook), list, | |
380 gtk_label_new(_("Translators"))); | |
381 | |
382 bbox = gtk_hbutton_box_new(); | |
383 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END); | |
384 gtk_button_box_set_spacing(GTK_BUTTON_BOX(bbox), 5); | |
385 gtk_box_pack_start(GTK_BOX(about_vbox), bbox, FALSE, FALSE, 0); | |
386 | |
387 close_btn = gtk_button_new_from_stock(GTK_STOCK_CLOSE); | |
388 g_signal_connect_swapped(close_btn, "clicked", | |
389 G_CALLBACK(gtk_widget_destroy), about_window); | |
390 GTK_WIDGET_SET_FLAGS(close_btn, GTK_CAN_DEFAULT); | |
391 gtk_box_pack_start(GTK_BOX(bbox), close_btn, TRUE, TRUE, 0); | |
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 | 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 | 398 } |