Mercurial > audlegacy
annotate src/audacious/ui_credits.c @ 3915:86c9abc83fbd
audacious remote functions:
- functions for equalizer manipulation have been implemented.
audtool:
- test suite for equalizer manipulation has been implemented.
author | Yoshiki Yazawa <yaz@cc.rim.or.jp> |
---|---|
date | Wed, 07 Nov 2007 23:18:29 +0900 |
parents | b0329bf3c2f5 |
children | efccc622bbfd |
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 | |
3121
3b6d316f8b09
GPL3 relicensing.
William Pitcock <nenolod@atheme-project.org>
parents:
3104
diff
changeset
|
12 * the Free Software Foundation; under version 3 of the License. |
2313 | 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 | |
3121
3b6d316f8b09
GPL3 relicensing.
William Pitcock <nenolod@atheme-project.org>
parents:
3104
diff
changeset
|
20 * along with this program. If not, see <http://www.gnu.org/licenses>. |
3123
f1c756f39e6c
Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents:
3121
diff
changeset
|
21 * |
f1c756f39e6c
Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents:
3121
diff
changeset
|
22 * The Audacious team does not consider modular code linking to |
f1c756f39e6c
Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents:
3121
diff
changeset
|
23 * Audacious or using our public API to be a derived work. |
2313 | 24 */ |
25 | |
26 #ifdef HAVE_CONFIG_H | |
27 # include "config.h" | |
28 #endif | |
29 | |
30 #include "ui_credits.h" | |
31 | |
32 #include <glib.h> | |
33 #include <glib/gi18n.h> | |
34 #include <gtk/gtk.h> | |
35 | |
36 #include "audacious_logo.xpm" | |
37 | |
38 | |
39 enum { | |
40 COL_LEFT, | |
41 COL_RIGHT, | |
42 N_COLS | |
43 }; | |
44 | |
45 | |
3457
16690eeb7db5
Added myself to credits in "plugin authors" section... and what BMP?
Matti Hamalainen <ccr@tnsp.org>
parents:
3426
diff
changeset
|
46 static const gchar *audacious_brief = |
2313 | 47 N_("<big><b>Audacious %s</b></big>\n" |
3697
cdc65ca04db4
We're multi-platform now and stuff.
William Pitcock <nenolod@atheme.org>
parents:
3589
diff
changeset
|
48 "A skinned multimedia player for many platforms.\n" |
2313 | 49 "\n" |
50 "Copyright (C) 2005-2007 Audacious Development Team\n"); | |
51 | |
52 static const gchar *credit_text[] = { | |
53 N_("Audacious core developers:"), | |
54 "George Averill", | |
2376
e1513290ee3c
[svn] Add a VFSFile method for getting metadata associated with the file.
iabervon
parents:
2330
diff
changeset
|
55 "Daniel Barkalow", |
3239
d2eec0a406e9
Update credits a little bit.
William Pitcock <nenolod@atheme-project.org>
parents:
3163
diff
changeset
|
56 "Christian Birchinger", |
2313 | 57 "Daniel Bradshaw", |
58 "Adam Cecile", | |
2330 | 59 "Michael Färber", |
2313 | 60 "Troels Bang Jensen", |
61 "Giacomo Lozito", | |
3398
f1eb9642a601
added myself to the credits
Cristi Magherusan <majeru@atheme-project.org>
parents:
3294
diff
changeset
|
62 "Cristi Măgherușan", |
3294
2c167f1fbbe9
oops, I haven't noticed that credits are sorted alphabetically by surname
Tomasz Mon <desowin@gmail.com>
parents:
3239
diff
changeset
|
63 "Tomasz Moń", |
2313 | 64 "William Pitcock", |
65 "Derek Pomery", | |
66 "Jonathan Schleifer", | |
67 "Tony Vroon", | |
68 "Yoshiki Yazawa", | |
69 NULL, | |
70 | |
71 N_("Graphics:"), | |
72 "George Averill", | |
73 "Stephan Sokolow", | |
74 NULL, | |
75 | |
76 N_("Default skin:"), | |
77 "George Averill", | |
3876 | 78 "Michael Färber", |
2313 | 79 "William Pitcock", |
80 NULL, | |
81 | |
82 N_("Plugin development:"), | |
83 "Kiyoshi Aman", | |
84 "Luca Barbato", | |
2376
e1513290ee3c
[svn] Add a VFSFile method for getting metadata associated with the file.
iabervon
parents:
2330
diff
changeset
|
85 "Daniel Barkalow", |
2972
3298ebb6f5db
Gave myself the well-earned credit :P
mf0102 <0102@gmx.at>
parents:
2921
diff
changeset
|
86 "Michael Färber", |
2313 | 87 "Shay Green", |
3458
2048a7c9572f
credits are alphabetical order
William Pitcock <nenolod@atheme.org>
parents:
3457
diff
changeset
|
88 "Matti Hämäläinen", |
2313 | 89 "Giacomo Lozito", |
3398
f1eb9642a601
added myself to the credits
Cristi Magherusan <majeru@atheme-project.org>
parents:
3294
diff
changeset
|
90 "Cristi Măgherușan", |
2313 | 91 "William Pitcock", |
92 "Derek Pomery", | |
93 "Jonathan Schleifer", | |
94 "Tony Vroon", | |
2594 | 95 "Yoshiki Yazawa", |
2313 | 96 NULL, |
97 | |
98 N_("Patch authors:"), | |
3239
d2eec0a406e9
Update credits a little bit.
William Pitcock <nenolod@atheme-project.org>
parents:
3163
diff
changeset
|
99 "Massimo Cavalleri", |
2313 | 100 "Laszlo Dvornik", |
101 "Ralf Ertzinger", | |
102 "Mike Frysinger", | |
2493
b7f48f00a342
[svn] - patch from Mark Glines to ad https:// URI support to playlists.
nenolod
parents:
2470
diff
changeset
|
103 "Mark Glines", |
2594 | 104 "Teru KAMOGASHIRA", |
2313 | 105 "Chris Kehler", |
2591
f14a639354b3
[svn] - there was a missing delimeter in the patch credits
nenolod
parents:
2582
diff
changeset
|
106 "Alex Maclean", |
2313 | 107 "Michael Hanselmann", |
2434
1102fb4280d7
[svn] Add Joseph Jezak to the list of patch submitters.
chainsaw
parents:
2376
diff
changeset
|
108 "Joseph Jezak", |
2313 | 109 "Henrik Johansson", |
110 "Rodrigo Martins de Matos Ventura", | |
111 "Diego Pettenò", | |
112 "Kazuki Shimura", | |
113 "Valentine Sinitsyn", | |
114 "Johan Tavelin", | |
115 "Tim Yamin", | |
116 NULL, | |
117 | |
118 N_("0.1.x developers:"), | |
119 "William Pitcock", | |
120 "Mohammed Sameer", | |
121 "Tony Vroon", | |
122 NULL, | |
123 | |
124 N_("BMP Developers:"), | |
125 "Artem Baguinski", | |
126 "Edward Brocklesby", | |
127 "Chong Kai Xiong", | |
128 "Milosz Derezynski", | |
129 "David Lau", | |
130 "Ole Andre Vadla Ravnaas", | |
131 "Michiel Sikkes", | |
132 "Andrei Badea", | |
133 "Peter Behroozi", | |
134 "Bernard Blackham", | |
135 "Oliver Blin", | |
136 "Tomas Bzatek", | |
137 "Liviu Danicel", | |
138 "Jon Dowland", | |
139 "Artur Frysiak", | |
140 "Sebastian Kapfer", | |
141 "Lukas Koberstein", | |
142 "Dan Korostelev", | |
143 "Jolan Luff", | |
144 "Michael Marineau", | |
145 "Tim-Philipp Muller", | |
146 "Julien Portalier", | |
147 "Andrew Ruder", | |
148 "Olivier Samyn", | |
149 "Martijn Vernooij", | |
150 NULL, | |
151 | |
152 NULL | |
153 }; | |
154 | |
155 static const gchar *translators[] = { | |
156 N_("Brazilian Portuguese:"), | |
3426 | 157 "Fábio Antunes", |
2313 | 158 "Philipi Pinto", |
159 NULL, | |
160 N_("Breton:"), | |
161 "Thierry Vignaud", | |
162 NULL, | |
163 N_("Bulgarian:"), | |
164 "Andrew Ivanov", | |
165 NULL, | |
2511
0197fb284f79
[svn] - add Catalan translation file. Closes #786.
nenolod
parents:
2493
diff
changeset
|
166 N_("Catalan:"), |
0197fb284f79
[svn] - add Catalan translation file. Closes #786.
nenolod
parents:
2493
diff
changeset
|
167 "Ernest Adrogu", |
0197fb284f79
[svn] - add Catalan translation file. Closes #786.
nenolod
parents:
2493
diff
changeset
|
168 NULL, |
2435
5b23e9b07317
[svn] - new croatian translation from Marin Glibic
nenolod
parents:
2434
diff
changeset
|
169 N_("Croatian:"), |
5b23e9b07317
[svn] - new croatian translation from Marin Glibic
nenolod
parents:
2434
diff
changeset
|
170 "Marin Glibic", |
5b23e9b07317
[svn] - new croatian translation from Marin Glibic
nenolod
parents:
2434
diff
changeset
|
171 NULL, |
2313 | 172 N_("Czech:"), |
2582 | 173 "Petr Pisar", |
2313 | 174 NULL, |
175 N_("Dutch:"), | |
176 "Laurens Buhler", | |
177 "Tony Vroon", | |
178 NULL, | |
179 N_("Finnish:"), | |
180 "Pauli Virtanen", | |
181 NULL, | |
182 N_("French:"), | |
183 "Adam Cecile", | |
3589
9197ea39a08a
Include new French translation and add translator to credits
mf0102 <0102@gmx.at>
parents:
3458
diff
changeset
|
184 "Stanislas Zeller", |
2313 | 185 NULL, |
186 N_("German:"), | |
3163
d087e747efb7
- Took over the German translation and fixed tiny language inaccuracies
mf0102 <0102@gmx.at>
parents:
3123
diff
changeset
|
187 "Michael Färber", |
2313 | 188 "Michael Hanselmann", |
189 "Matthias Debus", | |
190 NULL, | |
191 N_("Georgian:"), | |
192 "George Machitidze", | |
193 NULL, | |
194 N_("Greek:"), | |
195 "Kouzinopoulos Haris", | |
196 "Stavros Giannouris", | |
197 "Stathis Kamperis", | |
198 NULL, | |
199 N_("Hindi:"), | |
200 "Dhananjaya Sharma", | |
201 NULL, | |
202 N_("Hungarian:"), | |
203 "Laszlo Dvornik", | |
204 NULL, | |
205 N_("Italian:"), | |
206 "Alessio D'Ascanio", | |
207 "Diego Pettenò", | |
208 NULL, | |
209 N_("Japanese:"), | |
210 "Dai", | |
211 NULL, | |
212 N_("Korean:"), | |
213 "DongCheon Park", | |
214 NULL, | |
215 N_("Lithuanian:"), | |
216 "Rimas Kudelis", | |
217 NULL, | |
218 N_("Macedonian:"), | |
219 "Arangel Angov", | |
220 NULL, | |
221 N_("Polish:"), | |
222 "Wojciech Myrda", | |
223 NULL, | |
224 N_("Romanian:"), | |
225 "Daniel Patriche", | |
3398
f1eb9642a601
added myself to the credits
Cristi Magherusan <majeru@atheme-project.org>
parents:
3294
diff
changeset
|
226 "Cristi Măgherușan", |
2313 | 227 NULL, |
228 N_("Russian:"), | |
229 "Alexandr Orlov", | |
230 NULL, | |
231 N_("Serbian (Latin):"), | |
232 "Strahinja Kustudić", | |
233 NULL, | |
234 N_("Serbian (Cyrillic):"), | |
235 "Strahinja Kustudić", | |
236 NULL, | |
237 N_("Simplified Chinese:"), | |
238 "Yang Zhang", | |
239 NULL, | |
240 N_("Slovak:"), | |
2617 | 241 "Andrej Herceg", |
2313 | 242 NULL, |
243 N_("Spanish:"), | |
244 "Gustavo D. Vranjes", | |
245 NULL, | |
246 N_("Swedish:"), | |
247 "Martin Persenius", | |
248 NULL, | |
249 N_("Traditional Chinese:"), | |
250 "Cheng-Wei Chien", | |
251 NULL, | |
2470 | 252 N_("Turkish:"), |
2815
b04dffba4449
[svn] Correct name of turkish translator Murat enel.
chainsaw
parents:
2617
diff
changeset
|
253 "Murat Şenel", |
2470 | 254 "Eren Turkay", |
255 NULL, | |
2313 | 256 N_("Ukrainian:"), |
257 "Mykola Lynnyk", | |
258 NULL, | |
259 N_("Welsh:"), | |
260 "Edward Brocklesby", | |
261 "William Pitcock", | |
262 NULL, | |
263 | |
264 NULL | |
265 }; | |
266 | |
267 | |
268 static GtkWidget * | |
269 generate_credit_list(const gchar * text[], gboolean sec_space) | |
270 { | |
271 GtkWidget *scrollwin; | |
272 GtkWidget *treeview; | |
273 GtkListStore *list_store; | |
274 GtkTreeIter iter; | |
275 GtkTreeViewColumn *column; | |
276 GtkCellRenderer *renderer; | |
277 const gchar *const *item; | |
278 | |
279 list_store = gtk_list_store_new(N_COLS, G_TYPE_STRING, G_TYPE_STRING); | |
280 | |
281 item = text; | |
282 | |
283 while (*item) { | |
284 gtk_list_store_append(list_store, &iter); | |
285 gtk_list_store_set(list_store, &iter, | |
286 COL_LEFT, _(item[0]), COL_RIGHT, _(item[1]), -1); | |
287 item += 2; | |
288 | |
289 while (*item) { | |
290 gtk_list_store_append(list_store, &iter); | |
291 gtk_list_store_set(list_store, &iter, | |
292 COL_LEFT, "", COL_RIGHT, _(*item++), -1); | |
293 } | |
294 | |
295 ++item; | |
296 | |
297 if (*item && sec_space) { | |
298 gtk_list_store_append(list_store, &iter); | |
299 gtk_list_store_set(list_store, &iter, | |
300 COL_LEFT, "", COL_RIGHT, "", -1); | |
301 } | |
302 } | |
303 | |
304 treeview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(list_store)); | |
305 gtk_tree_view_set_headers_clickable(GTK_TREE_VIEW(treeview), FALSE); | |
306 gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(treeview), FALSE); | |
307 gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview)), | |
308 GTK_SELECTION_NONE); | |
309 | |
310 renderer = gtk_cell_renderer_text_new(); | |
311 g_object_set(renderer, "xalign", 1.0, NULL); | |
312 column = gtk_tree_view_column_new_with_attributes("Left", renderer, | |
313 "text", COL_LEFT, NULL); | |
314 gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column); | |
315 | |
316 renderer = gtk_cell_renderer_text_new(); | |
317 g_object_set(renderer, "xalign", 0.0, NULL); | |
318 column = gtk_tree_view_column_new_with_attributes("Right", renderer, | |
319 "text", COL_RIGHT, | |
320 NULL); | |
321 gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column); | |
322 | |
323 scrollwin = gtk_scrolled_window_new(NULL, NULL); | |
324 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollwin), | |
325 GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); | |
326 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrollwin), GTK_SHADOW_IN); | |
327 gtk_container_add(GTK_CONTAINER(scrollwin), treeview); | |
328 gtk_container_set_border_width(GTK_CONTAINER(scrollwin), 10); | |
329 | |
330 gtk_widget_show_all(scrollwin); | |
331 | |
332 return scrollwin; | |
333 } | |
334 | |
335 void | |
336 show_credits_window(void) | |
337 { | |
338 static GtkWidget *about_window = NULL; | |
339 | |
3078
407395e030c7
Use GdkPixbuf to display the credits logo.
William Pitcock <nenolod@atheme-project.org>
parents:
2972
diff
changeset
|
340 GdkPixbuf *logo_pixbuf; |
2313 | 341 GtkWidget *about_vbox; |
342 GtkWidget *about_credits_logo_box, *about_credits_logo_frame; | |
343 GtkWidget *about_credits_logo; | |
344 GtkWidget *about_notebook; | |
345 GtkWidget *list; | |
346 GtkWidget *bbox, *close_btn; | |
347 GtkWidget *label; | |
348 gchar *text; | |
349 | |
350 if (about_window) | |
351 return; | |
352 | |
353 about_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); | |
354 gtk_window_set_type_hint(GTK_WINDOW(about_window), | |
355 GDK_WINDOW_TYPE_HINT_DIALOG); | |
356 | |
357 gtk_window_set_default_size(GTK_WINDOW(about_window), -1, 512); | |
358 gtk_window_set_title(GTK_WINDOW(about_window), _("About Audacious")); | |
359 gtk_window_set_position(GTK_WINDOW(about_window), GTK_WIN_POS_CENTER); | |
360 gtk_window_set_resizable(GTK_WINDOW(about_window), TRUE); | |
361 gtk_container_set_border_width(GTK_CONTAINER(about_window), 10); | |
362 | |
363 g_signal_connect(about_window, "destroy", | |
364 G_CALLBACK(gtk_widget_destroyed), &about_window); | |
365 | |
366 gtk_widget_realize(about_window); | |
367 | |
368 about_vbox = gtk_vbox_new(FALSE, 5); | |
369 gtk_container_add(GTK_CONTAINER(about_window), about_vbox); | |
370 | |
3104 | 371 logo_pixbuf = gdk_pixbuf_new_from_xpm_data((const char **)audacious_logo_xpm); |
2313 | 372 |
373 about_credits_logo_box = gtk_hbox_new(TRUE, 0); | |
374 gtk_box_pack_start(GTK_BOX(about_vbox), about_credits_logo_box, | |
375 FALSE, FALSE, 0); | |
376 | |
377 about_credits_logo_frame = gtk_frame_new(NULL); | |
378 gtk_frame_set_shadow_type(GTK_FRAME(about_credits_logo_frame), | |
379 GTK_SHADOW_ETCHED_OUT); | |
380 gtk_box_pack_start(GTK_BOX(about_credits_logo_box), | |
381 about_credits_logo_frame, FALSE, FALSE, 0); | |
382 | |
3078
407395e030c7
Use GdkPixbuf to display the credits logo.
William Pitcock <nenolod@atheme-project.org>
parents:
2972
diff
changeset
|
383 about_credits_logo = gtk_image_new_from_pixbuf(logo_pixbuf); |
2313 | 384 gtk_container_add(GTK_CONTAINER(about_credits_logo_frame), |
385 about_credits_logo); | |
3078
407395e030c7
Use GdkPixbuf to display the credits logo.
William Pitcock <nenolod@atheme-project.org>
parents:
2972
diff
changeset
|
386 g_object_unref(logo_pixbuf); |
2313 | 387 |
388 label = gtk_label_new(NULL); | |
3457
16690eeb7db5
Added myself to credits in "plugin authors" section... and what BMP?
Matti Hamalainen <ccr@tnsp.org>
parents:
3426
diff
changeset
|
389 text = g_strdup_printf(_(audacious_brief), VERSION); |
2313 | 390 gtk_label_set_markup(GTK_LABEL(label), text); |
391 gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_CENTER); | |
392 g_free(text); | |
393 | |
394 gtk_box_pack_start(GTK_BOX(about_vbox), label, FALSE, FALSE, 0); | |
395 | |
396 about_notebook = gtk_notebook_new(); | |
397 gtk_box_pack_start(GTK_BOX(about_vbox), about_notebook, TRUE, TRUE, 0); | |
398 | |
399 list = generate_credit_list(credit_text, TRUE); | |
400 gtk_notebook_append_page(GTK_NOTEBOOK(about_notebook), list, | |
401 gtk_label_new(_("Credits"))); | |
402 | |
403 list = generate_credit_list(translators, FALSE); | |
404 gtk_notebook_append_page(GTK_NOTEBOOK(about_notebook), list, | |
405 gtk_label_new(_("Translators"))); | |
406 | |
407 bbox = gtk_hbutton_box_new(); | |
408 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END); | |
409 gtk_button_box_set_spacing(GTK_BUTTON_BOX(bbox), 5); | |
410 gtk_box_pack_start(GTK_BOX(about_vbox), bbox, FALSE, FALSE, 0); | |
411 | |
412 close_btn = gtk_button_new_from_stock(GTK_STOCK_CLOSE); | |
413 g_signal_connect_swapped(close_btn, "clicked", | |
414 G_CALLBACK(gtk_widget_destroy), about_window); | |
415 GTK_WIDGET_SET_FLAGS(close_btn, GTK_CAN_DEFAULT); | |
416 gtk_box_pack_start(GTK_BOX(bbox), close_btn, TRUE, TRUE, 0); | |
417 gtk_widget_grab_default(close_btn); | |
418 | |
419 gtk_widget_show_all(about_window); | |
420 } |