Mercurial > audlegacy
annotate audacious/credits.c @ 1111:53f8a1d3a070 trunk
[svn] - improve support of non-standard bitrates
- remove unreached code
author | nenolod |
---|---|
date | Mon, 29 May 2006 17:51:48 -0700 |
parents | 9b612dc7079b |
children | d63b74dd62a3 |
rev | line source |
---|---|
500 | 1 /* Audacious - Cross-platform multimedia player |
2 * Copyright (C) 2005-2006 Audacious Team | |
3 * | |
4 * XMMS - Cross-platform multimedia player | |
0 | 5 * Copyright (C) 1998-2003 Peter Alm, Mikael Alm, Olle Hallnas, |
6 * Thomas Nilsson and 4Front Technologies | |
7 * Copyright (C) 2000-2003 Haavard Kvaalen | |
8 * | |
9 * This program is free software; you can redistribute it and/or modify | |
10 * it under the terms of the GNU General Public Licensse as published by | |
11 * the Free Software Foundation; either version 2 of the License, or | |
12 * (at your option) any later version. | |
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
22 */ | |
23 | |
24 #ifdef HAVE_CONFIG_H | |
25 # include "config.h" | |
26 #endif | |
27 | |
471 | 28 #include "credits.h" |
0 | 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" | |
360
222a0d71cbcf
[svn] - change our slogan to "The future of UNIX multimedia."
nenolod
parents:
232
diff
changeset
|
46 "The future of UNIX multimedia.\n" |
0 | 47 "\n" |
360
222a0d71cbcf
[svn] - change our slogan to "The future of UNIX multimedia."
nenolod
parents:
232
diff
changeset
|
48 "Copyright (C) 2005-2006 Audacious Development Team\n"); |
0 | 49 |
50 static const gchar *credit_text[] = { | |
501
3a940b8dac46
[svn] Add credits.c to makefile, and fill in as much information as I have.
nenolod
parents:
500
diff
changeset
|
51 N_("Audacious core developers:"), |
888
053b35fd1f3e
[svn] - nhjm is now on core so lets make a note of that in the credits
nenolod
parents:
804
diff
changeset
|
52 N_("George Averill"), |
501
3a940b8dac46
[svn] Add credits.c to makefile, and fill in as much information as I have.
nenolod
parents:
500
diff
changeset
|
53 N_("Giacomo Lozito"), |
3a940b8dac46
[svn] Add credits.c to makefile, and fill in as much information as I have.
nenolod
parents:
500
diff
changeset
|
54 N_("William Pitcock"), |
804 | 55 N_("Derek Pomery"), |
501
3a940b8dac46
[svn] Add credits.c to makefile, and fill in as much information as I have.
nenolod
parents:
500
diff
changeset
|
56 N_("Tony Vroon"), |
1056
21628529c615
[svn] add the config option to enable/disable separator line in the playlist
yaz
parents:
988
diff
changeset
|
57 N_("Yoshiki Yazawa"), |
501
3a940b8dac46
[svn] Add credits.c to makefile, and fill in as much information as I have.
nenolod
parents:
500
diff
changeset
|
58 NULL, |
3a940b8dac46
[svn] Add credits.c to makefile, and fill in as much information as I have.
nenolod
parents:
500
diff
changeset
|
59 |
3a940b8dac46
[svn] Add credits.c to makefile, and fill in as much information as I have.
nenolod
parents:
500
diff
changeset
|
60 N_("Graphics:"), |
503
1cc9edf68ce9
[svn] Remove crap that is unneeded from about.c, update credits information.
nenolod
parents:
501
diff
changeset
|
61 N_("George Averill"), |
504 | 62 N_("Stephan Sokolow"), |
503
1cc9edf68ce9
[svn] Remove crap that is unneeded from about.c, update credits information.
nenolod
parents:
501
diff
changeset
|
63 NULL, |
1cc9edf68ce9
[svn] Remove crap that is unneeded from about.c, update credits information.
nenolod
parents:
501
diff
changeset
|
64 |
1cc9edf68ce9
[svn] Remove crap that is unneeded from about.c, update credits information.
nenolod
parents:
501
diff
changeset
|
65 N_("Default skin:"), |
1cc9edf68ce9
[svn] Remove crap that is unneeded from about.c, update credits information.
nenolod
parents:
501
diff
changeset
|
66 N_("George Averill"), |
1cc9edf68ce9
[svn] Remove crap that is unneeded from about.c, update credits information.
nenolod
parents:
501
diff
changeset
|
67 N_("William Pitcock"), |
501
3a940b8dac46
[svn] Add credits.c to makefile, and fill in as much information as I have.
nenolod
parents:
500
diff
changeset
|
68 NULL, |
3a940b8dac46
[svn] Add credits.c to makefile, and fill in as much information as I have.
nenolod
parents:
500
diff
changeset
|
69 |
3a940b8dac46
[svn] Add credits.c to makefile, and fill in as much information as I have.
nenolod
parents:
500
diff
changeset
|
70 N_("Plugin development:"), |
3a940b8dac46
[svn] Add credits.c to makefile, and fill in as much information as I have.
nenolod
parents:
500
diff
changeset
|
71 N_("Kiyoshi Aman"), |
3a940b8dac46
[svn] Add credits.c to makefile, and fill in as much information as I have.
nenolod
parents:
500
diff
changeset
|
72 N_("Shay Green"), |
399 | 73 N_("Giacomo Lozito"), |
0 | 74 N_("William Pitcock"), |
804 | 75 N_("Derek Pomery"), |
168 | 76 N_("Tony Vroon"), |
0 | 77 NULL, |
78 | |
360
222a0d71cbcf
[svn] - change our slogan to "The future of UNIX multimedia."
nenolod
parents:
232
diff
changeset
|
79 N_("0.1.x developers:"), |
222a0d71cbcf
[svn] - change our slogan to "The future of UNIX multimedia."
nenolod
parents:
232
diff
changeset
|
80 N_("William Pitcock"), |
222a0d71cbcf
[svn] - change our slogan to "The future of UNIX multimedia."
nenolod
parents:
232
diff
changeset
|
81 N_("Mohammed Sameer"), |
222a0d71cbcf
[svn] - change our slogan to "The future of UNIX multimedia."
nenolod
parents:
232
diff
changeset
|
82 N_("Tony Vroon"), |
0 | 83 NULL, |
84 | |
85 N_("BMP Developers:"), | |
86 N_("Artem Baguinski"), | |
87 N_("Edward Brocklesby"), | |
88 N_("Chong Kai Xiong"), | |
89 N_("Milosz Derezynski"), | |
90 N_("David Lau"), | |
91 N_("Ole Andre Vadla Ravnaas"), | |
92 N_("Michiel Sikkes"), | |
93 N_("Andrei Badea"), | |
94 N_("Peter Behroozi"), | |
95 N_("Bernard Blackham"), | |
96 N_("Oliver Blin"), | |
97 N_("Tomas Bzatek"), | |
98 N_("Liviu Danicel"), | |
99 N_("Jon Dowland"), | |
100 N_("Artur Frysiak"), | |
101 N_("Sebastian Kapfer"), | |
102 N_("Lukas Koberstein"), | |
103 N_("Dan Korostelev"), | |
104 N_("Jolan Luff"), | |
105 N_("Michael Marineau"), | |
106 N_("Tim-Philipp Muller"), | |
107 N_("Julien Portalier"), | |
108 N_("Andrew Ruder"), | |
109 N_("Olivier Samyn"), | |
110 N_("Martijn Vernooij"), | |
111 NULL, | |
112 | |
113 NULL | |
114 }; | |
115 | |
116 static const gchar *translators[] = { | |
117 N_("Brazilian Portuguese:"), | |
118 N_("Philipi Pinto"), | |
119 NULL, | |
120 N_("Breton:"), | |
121 N_("Thierry Vignaud"), | |
122 NULL, | |
123 N_("Chinese:"), | |
124 N_("Chong Kai Xiong"), | |
125 N_("Chao-Hsiung Liao"), | |
126 NULL, | |
127 N_("Czech:"), | |
128 N_("Jan Narovec"), | |
129 NULL, | |
130 N_("Dutch:"), | |
131 N_("Laurens Buhler"), | |
1088
1c54da168b6c
[svn] Add myself to translation credits for the dutch language.
chainsaw
parents:
1056
diff
changeset
|
132 N_("Tony Vroon"), |
0 | 133 NULL, |
134 N_("Finnish:"), | |
135 N_("Pauli Virtanen"), | |
136 NULL, | |
137 N_("French:"), | |
138 N_("David Le Brun"), | |
139 NULL, | |
140 N_("German:"), | |
141 N_("Matthias Debus"), | |
142 NULL, | |
143 N_("Georgian: "), | |
144 N_("George Machitidze"), | |
145 NULL, | |
146 N_("Greek:"), | |
147 N_("Kouzinopoulos Haris"), | |
148 N_("Stavros Giannouris"), | |
1108
9b612dc7079b
[svn] - add additional greek translator, Stathis Kamperis <ekamperi@auth.gr>
nenolod
parents:
1088
diff
changeset
|
149 N_("Stathis Kamperis"), |
0 | 150 NULL, |
151 N_("Hindi:"), | |
152 N_("Dhananjaya Sharma"), | |
153 NULL, | |
154 N_("Hungarian:"), | |
155 N_("Laszlo Dvornik"), | |
156 NULL, | |
157 N_("Italian:"), | |
158 N_("Alessio D'Ascanio"), | |
159 NULL, | |
160 N_("Japanese:"), | |
232 | 161 N_("Dai"), |
0 | 162 NULL, |
163 N_("Korean:"), | |
164 N_("DongCheon Park"), | |
165 NULL, | |
166 N_("Lithuanian:"), | |
167 N_("Rimas Kudelis"), | |
168 NULL, | |
169 N_("Macedonian:"), | |
170 N_("Arangel Angov"), | |
171 NULL, | |
172 N_("Polish:"), | |
173 N_("Jacek Wolszczak"), | |
174 NULL, | |
175 N_("Romanian:"), | |
176 N_("Liviu Danicel"), | |
177 NULL, | |
178 N_("Russian:"), | |
179 N_("Pavlo Bohmat"), | |
180 N_("Dan Korostelev"), | |
181 N_("Vitaly Lipatov"), | |
182 NULL, | |
183 N_("Slovak:"), | |
184 N_("Pavel Kanzelsberger"), | |
185 NULL, | |
186 N_("Spanish:"), | |
988
70454b8764d6
[svn] - Denote Gustavo D. Vranjes as current Spanish translator
nenolod
parents:
888
diff
changeset
|
187 N_("Gustavo D. Vranjes"), |
0 | 188 NULL, |
189 N_("Swedish:"), | |
190 N_("Martin Persenius"), | |
191 NULL, | |
192 N_("Ukrainian:"), | |
193 N_("Mykola Lynnyk"), | |
194 NULL, | |
195 N_("Welsh:"), | |
196 N_("Edward Brocklesby"), | |
197 NULL, | |
198 | |
199 NULL | |
200 }; | |
201 | |
202 | |
203 static GtkWidget * | |
204 generate_credit_list(const gchar * text[], gboolean sec_space) | |
205 { | |
206 GtkWidget *scrollwin; | |
207 GtkWidget *treeview; | |
208 GtkListStore *list_store; | |
209 GtkTreeIter iter; | |
210 GtkTreeViewColumn *column; | |
211 GtkCellRenderer *renderer; | |
212 const gchar *const *item; | |
213 | |
214 list_store = gtk_list_store_new(N_COLS, G_TYPE_STRING, G_TYPE_STRING); | |
215 | |
216 item = text; | |
217 | |
218 while (*item) { | |
219 gtk_list_store_append(list_store, &iter); | |
220 gtk_list_store_set(list_store, &iter, | |
221 COL_LEFT, _(item[0]), COL_RIGHT, _(item[1]), -1); | |
222 item += 2; | |
223 | |
224 while (*item) { | |
225 gtk_list_store_append(list_store, &iter); | |
226 gtk_list_store_set(list_store, &iter, | |
227 COL_LEFT, "", COL_RIGHT, _(*item++), -1); | |
228 } | |
229 | |
230 ++item; | |
231 | |
232 if (*item && sec_space) { | |
233 gtk_list_store_append(list_store, &iter); | |
234 gtk_list_store_set(list_store, &iter, | |
235 COL_LEFT, "", COL_RIGHT, "", -1); | |
236 } | |
237 } | |
238 | |
239 treeview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(list_store)); | |
240 gtk_tree_view_set_headers_clickable(GTK_TREE_VIEW(treeview), FALSE); | |
241 gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(treeview), FALSE); | |
242 gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview)), | |
243 GTK_SELECTION_NONE); | |
244 | |
245 renderer = gtk_cell_renderer_text_new(); | |
246 g_object_set(renderer, "xalign", 1.0, NULL); | |
247 column = gtk_tree_view_column_new_with_attributes("Left", renderer, | |
248 "text", COL_LEFT, NULL); | |
249 gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column); | |
250 | |
251 renderer = gtk_cell_renderer_text_new(); | |
252 g_object_set(renderer, "xalign", 0.0, NULL); | |
253 column = gtk_tree_view_column_new_with_attributes("Right", renderer, | |
254 "text", COL_RIGHT, | |
255 NULL); | |
256 gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column); | |
257 | |
258 scrollwin = gtk_scrolled_window_new(NULL, NULL); | |
259 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollwin), | |
260 GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); | |
261 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrollwin), GTK_SHADOW_IN); | |
262 gtk_container_add(GTK_CONTAINER(scrollwin), treeview); | |
263 gtk_container_set_border_width(GTK_CONTAINER(scrollwin), 10); | |
264 | |
265 gtk_widget_show_all(scrollwin); | |
266 | |
267 return scrollwin; | |
268 } | |
269 | |
270 void | |
500 | 271 show_credits_window(void) |
0 | 272 { |
273 static GtkWidget *about_window = NULL; | |
274 | |
275 GdkPixmap *beep_logo_pmap = NULL, *beep_logo_mask = NULL; | |
276 GtkWidget *about_vbox; | |
277 GtkWidget *about_credits_logo_box, *about_credits_logo_frame; | |
278 GtkWidget *about_credits_logo; | |
279 GtkWidget *about_notebook; | |
280 GtkWidget *list; | |
281 GtkWidget *bbox, *close_btn; | |
282 GtkWidget *label; | |
283 gchar *text; | |
284 | |
285 if (about_window) | |
286 return; | |
287 | |
288 about_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); | |
289 gtk_window_set_type_hint(GTK_WINDOW(about_window), | |
290 GDK_WINDOW_TYPE_HINT_DIALOG); | |
291 | |
501
3a940b8dac46
[svn] Add credits.c to makefile, and fill in as much information as I have.
nenolod
parents:
500
diff
changeset
|
292 gtk_window_set_default_size(GTK_WINDOW(about_window), -1, 512); |
0 | 293 gtk_window_set_title(GTK_WINDOW(about_window), _("About Audacious")); |
294 gtk_window_set_position(GTK_WINDOW(about_window), GTK_WIN_POS_CENTER); | |
295 gtk_window_set_resizable(GTK_WINDOW(about_window), TRUE); | |
296 gtk_container_set_border_width(GTK_CONTAINER(about_window), 10); | |
297 | |
298 g_signal_connect(about_window, "destroy", | |
299 G_CALLBACK(gtk_widget_destroyed), &about_window); | |
300 | |
301 gtk_widget_realize(about_window); | |
302 | |
303 about_vbox = gtk_vbox_new(FALSE, 5); | |
304 gtk_container_add(GTK_CONTAINER(about_window), about_vbox); | |
305 | |
306 if (!beep_logo_pmap) | |
307 beep_logo_pmap = | |
308 gdk_pixmap_create_from_xpm_d(about_window->window, | |
309 &beep_logo_mask, NULL, audacious_logo_xpm); | |
310 | |
311 about_credits_logo_box = gtk_hbox_new(TRUE, 0); | |
312 gtk_box_pack_start(GTK_BOX(about_vbox), about_credits_logo_box, | |
313 FALSE, FALSE, 0); | |
314 | |
315 about_credits_logo_frame = gtk_frame_new(NULL); | |
316 gtk_frame_set_shadow_type(GTK_FRAME(about_credits_logo_frame), | |
317 GTK_SHADOW_ETCHED_OUT); | |
318 gtk_box_pack_start(GTK_BOX(about_credits_logo_box), | |
319 about_credits_logo_frame, FALSE, FALSE, 0); | |
320 | |
321 about_credits_logo = gtk_pixmap_new(beep_logo_pmap, beep_logo_mask); | |
322 gtk_container_add(GTK_CONTAINER(about_credits_logo_frame), | |
323 about_credits_logo); | |
324 | |
325 label = gtk_label_new(NULL); | |
326 text = g_strdup_printf(_(bmp_brief), VERSION); | |
327 gtk_label_set_markup(GTK_LABEL(label), text); | |
328 gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_CENTER); | |
329 g_free(text); | |
330 | |
331 gtk_box_pack_start(GTK_BOX(about_vbox), label, FALSE, FALSE, 0); | |
332 | |
333 about_notebook = gtk_notebook_new(); | |
334 gtk_box_pack_start(GTK_BOX(about_vbox), about_notebook, TRUE, TRUE, 0); | |
335 | |
336 list = generate_credit_list(credit_text, TRUE); | |
337 gtk_notebook_append_page(GTK_NOTEBOOK(about_notebook), list, | |
338 gtk_label_new(_("Credits"))); | |
339 | |
340 list = generate_credit_list(translators, FALSE); | |
341 gtk_notebook_append_page(GTK_NOTEBOOK(about_notebook), list, | |
342 gtk_label_new(_("Translators"))); | |
343 | |
344 bbox = gtk_hbutton_box_new(); | |
345 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END); | |
346 gtk_button_box_set_spacing(GTK_BUTTON_BOX(bbox), 5); | |
347 gtk_box_pack_start(GTK_BOX(about_vbox), bbox, FALSE, FALSE, 0); | |
348 | |
349 close_btn = gtk_button_new_from_stock(GTK_STOCK_CLOSE); | |
350 g_signal_connect_swapped(close_btn, "clicked", | |
351 G_CALLBACK(gtk_widget_destroy), about_window); | |
352 GTK_WIDGET_SET_FLAGS(close_btn, GTK_CAN_DEFAULT); | |
353 gtk_box_pack_start(GTK_BOX(bbox), close_btn, TRUE, TRUE, 0); | |
354 gtk_widget_grab_default(close_btn); | |
355 | |
356 gtk_widget_show_all(about_window); | |
357 } |