Mercurial > audlegacy
annotate src/audacious/ui_credits.c @ 2382:d41965d1806a trunk
[svn] - in vfs_buffered_file, we should only switch to live FD after 32768,
not AT 32768.
author | nenolod |
---|---|
date | Mon, 22 Jan 2007 01:01:33 -0800 |
parents | e1513290ee3c |
children | 1102fb4280d7 |
rev | line source |
---|---|
2313 | 1 /* Audacious - Cross-platform multimedia player |
2 * Copyright (C) 2005-2007 Audacious Team | |
3 * | |
4 * Based on BMP: | |
5 * Copyright (C) 2003-2004 BMP development team | |
6 * | |
7 * Based on XMMS: | |
8 * Copyright (C) 1998-2003 XMMS development team | |
9 * | |
10 * This program is free software; you can redistribute it and/or modify | |
11 * it under the terms of the GNU General Public License as published by | |
12 * the Free Software Foundation; under version 2 of the License. | |
13 * | |
14 * This program is distributed in the hope that it will be useful, | |
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 * GNU General Public License for more details. | |
18 * | |
19 * You should have received a copy of the GNU General Public License | |
20 * along with this program; if not, write to the Free Software | |
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |
22 */ | |
23 | |
24 #ifdef HAVE_CONFIG_H | |
25 # include "config.h" | |
26 #endif | |
27 | |
28 #include "ui_credits.h" | |
29 | |
30 #include <glib.h> | |
31 #include <glib/gi18n.h> | |
32 #include <gtk/gtk.h> | |
33 | |
34 #include "audacious_logo.xpm" | |
35 | |
36 | |
37 enum { | |
38 COL_LEFT, | |
39 COL_RIGHT, | |
40 N_COLS | |
41 }; | |
42 | |
43 | |
44 static const gchar *bmp_brief = | |
45 N_("<big><b>Audacious %s</b></big>\n" | |
46 "The future of UNIX multimedia.\n" | |
47 "\n" | |
48 "Copyright (C) 2005-2007 Audacious Development Team\n"); | |
49 | |
50 static const gchar *credit_text[] = { | |
51 N_("Audacious core developers:"), | |
52 "George Averill", | |
2376
e1513290ee3c
[svn] Add a VFSFile method for getting metadata associated with the file.
iabervon
parents:
2330
diff
changeset
|
53 "Daniel Barkalow", |
2313 | 54 "Daniel Bradshaw", |
55 "Adam Cecile", | |
2330 | 56 "Michael Färber", |
2313 | 57 "Troels Bang Jensen", |
58 "Giacomo Lozito", | |
59 "William Pitcock", | |
60 "Derek Pomery", | |
61 "Jonathan Schleifer", | |
62 "Tony Vroon", | |
63 "Yoshiki Yazawa", | |
64 NULL, | |
65 | |
66 N_("Graphics:"), | |
67 "George Averill", | |
68 "Stephan Sokolow", | |
69 NULL, | |
70 | |
71 N_("Default skin:"), | |
72 "George Averill", | |
73 "William Pitcock", | |
74 NULL, | |
75 | |
76 N_("Plugin development:"), | |
77 "Kiyoshi Aman", | |
78 "Luca Barbato", | |
2376
e1513290ee3c
[svn] Add a VFSFile method for getting metadata associated with the file.
iabervon
parents:
2330
diff
changeset
|
79 "Daniel Barkalow", |
2313 | 80 "Shay Green", |
81 "Giacomo Lozito", | |
82 "William Pitcock", | |
83 "Derek Pomery", | |
84 "Jonathan Schleifer", | |
85 "Tony Vroon", | |
86 NULL, | |
87 | |
88 N_("Patch authors:"), | |
89 "Laszlo Dvornik", | |
90 "Ralf Ertzinger", | |
91 "Mike Frysinger", | |
92 "Chris Kehler", | |
93 "Michael Hanselmann", | |
94 "Henrik Johansson", | |
95 "Rodrigo Martins de Matos Ventura", | |
96 "Diego Pettenò", | |
97 "Kazuki Shimura", | |
98 "Valentine Sinitsyn", | |
99 "Johan Tavelin", | |
100 "Tim Yamin", | |
101 NULL, | |
102 | |
103 N_("0.1.x developers:"), | |
104 "William Pitcock", | |
105 "Mohammed Sameer", | |
106 "Tony Vroon", | |
107 NULL, | |
108 | |
109 N_("BMP Developers:"), | |
110 "Artem Baguinski", | |
111 "Edward Brocklesby", | |
112 "Chong Kai Xiong", | |
113 "Milosz Derezynski", | |
114 "David Lau", | |
115 "Ole Andre Vadla Ravnaas", | |
116 "Michiel Sikkes", | |
117 "Andrei Badea", | |
118 "Peter Behroozi", | |
119 "Bernard Blackham", | |
120 "Oliver Blin", | |
121 "Tomas Bzatek", | |
122 "Liviu Danicel", | |
123 "Jon Dowland", | |
124 "Artur Frysiak", | |
125 "Sebastian Kapfer", | |
126 "Lukas Koberstein", | |
127 "Dan Korostelev", | |
128 "Jolan Luff", | |
129 "Michael Marineau", | |
130 "Tim-Philipp Muller", | |
131 "Julien Portalier", | |
132 "Andrew Ruder", | |
133 "Olivier Samyn", | |
134 "Martijn Vernooij", | |
135 NULL, | |
136 | |
137 NULL | |
138 }; | |
139 | |
140 static const gchar *translators[] = { | |
141 N_("Brazilian Portuguese:"), | |
142 "Philipi Pinto", | |
143 NULL, | |
144 N_("Breton:"), | |
145 "Thierry Vignaud", | |
146 NULL, | |
147 N_("Bulgarian:"), | |
148 "Andrew Ivanov", | |
149 NULL, | |
150 N_("Czech:"), | |
151 "Jan Narovec", | |
152 NULL, | |
153 N_("Dutch:"), | |
154 "Laurens Buhler", | |
155 "Tony Vroon", | |
156 NULL, | |
157 N_("Finnish:"), | |
158 "Pauli Virtanen", | |
159 NULL, | |
160 N_("French:"), | |
161 "Adam Cecile", | |
162 NULL, | |
163 N_("German:"), | |
164 "Michael Hanselmann", | |
165 "Matthias Debus", | |
166 NULL, | |
167 N_("Georgian:"), | |
168 "George Machitidze", | |
169 NULL, | |
170 N_("Greek:"), | |
171 "Kouzinopoulos Haris", | |
172 "Stavros Giannouris", | |
173 "Stathis Kamperis", | |
174 NULL, | |
175 N_("Hindi:"), | |
176 "Dhananjaya Sharma", | |
177 NULL, | |
178 N_("Hungarian:"), | |
179 "Laszlo Dvornik", | |
180 NULL, | |
181 N_("Italian:"), | |
182 "Alessio D'Ascanio", | |
183 "Diego Pettenò", | |
184 NULL, | |
185 N_("Japanese:"), | |
186 "Dai", | |
187 NULL, | |
188 N_("Korean:"), | |
189 "DongCheon Park", | |
190 NULL, | |
191 N_("Lithuanian:"), | |
192 "Rimas Kudelis", | |
193 NULL, | |
194 N_("Macedonian:"), | |
195 "Arangel Angov", | |
196 NULL, | |
197 N_("Polish:"), | |
198 "Wojciech Myrda", | |
199 NULL, | |
200 N_("Romanian:"), | |
201 "Daniel Patriche", | |
202 NULL, | |
203 N_("Russian:"), | |
204 "Alexandr Orlov", | |
205 NULL, | |
206 N_("Serbian (Latin):"), | |
207 "Strahinja Kustudić", | |
208 NULL, | |
209 N_("Serbian (Cyrillic):"), | |
210 "Strahinja Kustudić", | |
211 NULL, | |
212 N_("Simplified Chinese:"), | |
213 "Yang Zhang", | |
214 NULL, | |
215 N_("Slovak:"), | |
216 "Pavel Kanzelsberger", | |
217 NULL, | |
218 N_("Spanish:"), | |
219 "Gustavo D. Vranjes", | |
220 NULL, | |
221 N_("Swedish:"), | |
222 "Martin Persenius", | |
223 NULL, | |
224 N_("Traditional Chinese:"), | |
225 "Cheng-Wei Chien", | |
226 NULL, | |
227 N_("Ukrainian:"), | |
228 "Mykola Lynnyk", | |
229 NULL, | |
230 N_("Welsh:"), | |
231 "Edward Brocklesby", | |
232 "William Pitcock", | |
233 NULL, | |
234 | |
235 NULL | |
236 }; | |
237 | |
238 | |
239 static GtkWidget * | |
240 generate_credit_list(const gchar * text[], gboolean sec_space) | |
241 { | |
242 GtkWidget *scrollwin; | |
243 GtkWidget *treeview; | |
244 GtkListStore *list_store; | |
245 GtkTreeIter iter; | |
246 GtkTreeViewColumn *column; | |
247 GtkCellRenderer *renderer; | |
248 const gchar *const *item; | |
249 | |
250 list_store = gtk_list_store_new(N_COLS, G_TYPE_STRING, G_TYPE_STRING); | |
251 | |
252 item = text; | |
253 | |
254 while (*item) { | |
255 gtk_list_store_append(list_store, &iter); | |
256 gtk_list_store_set(list_store, &iter, | |
257 COL_LEFT, _(item[0]), COL_RIGHT, _(item[1]), -1); | |
258 item += 2; | |
259 | |
260 while (*item) { | |
261 gtk_list_store_append(list_store, &iter); | |
262 gtk_list_store_set(list_store, &iter, | |
263 COL_LEFT, "", COL_RIGHT, _(*item++), -1); | |
264 } | |
265 | |
266 ++item; | |
267 | |
268 if (*item && sec_space) { | |
269 gtk_list_store_append(list_store, &iter); | |
270 gtk_list_store_set(list_store, &iter, | |
271 COL_LEFT, "", COL_RIGHT, "", -1); | |
272 } | |
273 } | |
274 | |
275 treeview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(list_store)); | |
276 gtk_tree_view_set_headers_clickable(GTK_TREE_VIEW(treeview), FALSE); | |
277 gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(treeview), FALSE); | |
278 gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview)), | |
279 GTK_SELECTION_NONE); | |
280 | |
281 renderer = gtk_cell_renderer_text_new(); | |
282 g_object_set(renderer, "xalign", 1.0, NULL); | |
283 column = gtk_tree_view_column_new_with_attributes("Left", renderer, | |
284 "text", COL_LEFT, NULL); | |
285 gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column); | |
286 | |
287 renderer = gtk_cell_renderer_text_new(); | |
288 g_object_set(renderer, "xalign", 0.0, NULL); | |
289 column = gtk_tree_view_column_new_with_attributes("Right", renderer, | |
290 "text", COL_RIGHT, | |
291 NULL); | |
292 gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column); | |
293 | |
294 scrollwin = gtk_scrolled_window_new(NULL, NULL); | |
295 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollwin), | |
296 GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); | |
297 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrollwin), GTK_SHADOW_IN); | |
298 gtk_container_add(GTK_CONTAINER(scrollwin), treeview); | |
299 gtk_container_set_border_width(GTK_CONTAINER(scrollwin), 10); | |
300 | |
301 gtk_widget_show_all(scrollwin); | |
302 | |
303 return scrollwin; | |
304 } | |
305 | |
306 void | |
307 show_credits_window(void) | |
308 { | |
309 static GtkWidget *about_window = NULL; | |
310 | |
311 GdkPixmap *beep_logo_pmap = NULL, *beep_logo_mask = NULL; | |
312 GtkWidget *about_vbox; | |
313 GtkWidget *about_credits_logo_box, *about_credits_logo_frame; | |
314 GtkWidget *about_credits_logo; | |
315 GtkWidget *about_notebook; | |
316 GtkWidget *list; | |
317 GtkWidget *bbox, *close_btn; | |
318 GtkWidget *label; | |
319 gchar *text; | |
320 | |
321 if (about_window) | |
322 return; | |
323 | |
324 about_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); | |
325 gtk_window_set_type_hint(GTK_WINDOW(about_window), | |
326 GDK_WINDOW_TYPE_HINT_DIALOG); | |
327 | |
328 gtk_window_set_default_size(GTK_WINDOW(about_window), -1, 512); | |
329 gtk_window_set_title(GTK_WINDOW(about_window), _("About Audacious")); | |
330 gtk_window_set_position(GTK_WINDOW(about_window), GTK_WIN_POS_CENTER); | |
331 gtk_window_set_resizable(GTK_WINDOW(about_window), TRUE); | |
332 gtk_container_set_border_width(GTK_CONTAINER(about_window), 10); | |
333 | |
334 g_signal_connect(about_window, "destroy", | |
335 G_CALLBACK(gtk_widget_destroyed), &about_window); | |
336 | |
337 gtk_widget_realize(about_window); | |
338 | |
339 about_vbox = gtk_vbox_new(FALSE, 5); | |
340 gtk_container_add(GTK_CONTAINER(about_window), about_vbox); | |
341 | |
342 if (!beep_logo_pmap) | |
343 beep_logo_pmap = | |
344 gdk_pixmap_create_from_xpm_d(about_window->window, | |
345 &beep_logo_mask, NULL, audacious_logo_xpm); | |
346 | |
347 about_credits_logo_box = gtk_hbox_new(TRUE, 0); | |
348 gtk_box_pack_start(GTK_BOX(about_vbox), about_credits_logo_box, | |
349 FALSE, FALSE, 0); | |
350 | |
351 about_credits_logo_frame = gtk_frame_new(NULL); | |
352 gtk_frame_set_shadow_type(GTK_FRAME(about_credits_logo_frame), | |
353 GTK_SHADOW_ETCHED_OUT); | |
354 gtk_box_pack_start(GTK_BOX(about_credits_logo_box), | |
355 about_credits_logo_frame, FALSE, FALSE, 0); | |
356 | |
357 about_credits_logo = gtk_pixmap_new(beep_logo_pmap, beep_logo_mask); | |
358 gtk_container_add(GTK_CONTAINER(about_credits_logo_frame), | |
359 about_credits_logo); | |
360 | |
361 label = gtk_label_new(NULL); | |
362 text = g_strdup_printf(_(bmp_brief), VERSION); | |
363 gtk_label_set_markup(GTK_LABEL(label), text); | |
364 gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_CENTER); | |
365 g_free(text); | |
366 | |
367 gtk_box_pack_start(GTK_BOX(about_vbox), label, FALSE, FALSE, 0); | |
368 | |
369 about_notebook = gtk_notebook_new(); | |
370 gtk_box_pack_start(GTK_BOX(about_vbox), about_notebook, TRUE, TRUE, 0); | |
371 | |
372 list = generate_credit_list(credit_text, TRUE); | |
373 gtk_notebook_append_page(GTK_NOTEBOOK(about_notebook), list, | |
374 gtk_label_new(_("Credits"))); | |
375 | |
376 list = generate_credit_list(translators, FALSE); | |
377 gtk_notebook_append_page(GTK_NOTEBOOK(about_notebook), list, | |
378 gtk_label_new(_("Translators"))); | |
379 | |
380 bbox = gtk_hbutton_box_new(); | |
381 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END); | |
382 gtk_button_box_set_spacing(GTK_BUTTON_BOX(bbox), 5); | |
383 gtk_box_pack_start(GTK_BOX(about_vbox), bbox, FALSE, FALSE, 0); | |
384 | |
385 close_btn = gtk_button_new_from_stock(GTK_STOCK_CLOSE); | |
386 g_signal_connect_swapped(close_btn, "clicked", | |
387 G_CALLBACK(gtk_widget_destroy), about_window); | |
388 GTK_WIDGET_SET_FLAGS(close_btn, GTK_CAN_DEFAULT); | |
389 gtk_box_pack_start(GTK_BOX(bbox), close_btn, TRUE, TRUE, 0); | |
390 gtk_widget_grab_default(close_btn); | |
391 | |
392 gtk_widget_show_all(about_window); | |
393 } |