Mercurial > audlegacy
annotate audacious/credits.c @ 516:69a70ab41ed7 trunk
[svn] tell_audio returns void, not gint.
author | nenolod |
---|---|
date | Thu, 26 Jan 2006 11:18:52 -0800 |
parents | 9f135663aaee |
children | 79c651988a44 |
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:"), |
3a940b8dac46
[svn] Add credits.c to makefile, and fill in as much information as I have.
nenolod
parents:
500
diff
changeset
|
52 N_("Giacomo Lozito"), |
3a940b8dac46
[svn] Add credits.c to makefile, and fill in as much information as I have.
nenolod
parents:
500
diff
changeset
|
53 N_("William Pitcock"), |
3a940b8dac46
[svn] Add credits.c to makefile, and fill in as much information as I have.
nenolod
parents:
500
diff
changeset
|
54 N_("Tony Vroon"), |
3a940b8dac46
[svn] Add credits.c to makefile, and fill in as much information as I have.
nenolod
parents:
500
diff
changeset
|
55 NULL, |
3a940b8dac46
[svn] Add credits.c to makefile, and fill in as much information as I have.
nenolod
parents:
500
diff
changeset
|
56 |
3a940b8dac46
[svn] Add credits.c to makefile, and fill in as much information as I have.
nenolod
parents:
500
diff
changeset
|
57 N_("Graphics:"), |
503
1cc9edf68ce9
[svn] Remove crap that is unneeded from about.c, update credits information.
nenolod
parents:
501
diff
changeset
|
58 N_("George Averill"), |
504 | 59 N_("Stephan Sokolow"), |
503
1cc9edf68ce9
[svn] Remove crap that is unneeded from about.c, update credits information.
nenolod
parents:
501
diff
changeset
|
60 NULL, |
1cc9edf68ce9
[svn] Remove crap that is unneeded from about.c, update credits information.
nenolod
parents:
501
diff
changeset
|
61 |
1cc9edf68ce9
[svn] Remove crap that is unneeded from about.c, update credits information.
nenolod
parents:
501
diff
changeset
|
62 N_("Default skin:"), |
1cc9edf68ce9
[svn] Remove crap that is unneeded from about.c, update credits information.
nenolod
parents:
501
diff
changeset
|
63 N_("George Averill"), |
1cc9edf68ce9
[svn] Remove crap that is unneeded from about.c, update credits information.
nenolod
parents:
501
diff
changeset
|
64 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
|
65 NULL, |
3a940b8dac46
[svn] Add credits.c to makefile, and fill in as much information as I have.
nenolod
parents:
500
diff
changeset
|
66 |
3a940b8dac46
[svn] Add credits.c to makefile, and fill in as much information as I have.
nenolod
parents:
500
diff
changeset
|
67 N_("Plugin development:"), |
3a940b8dac46
[svn] Add credits.c to makefile, and fill in as much information as I have.
nenolod
parents:
500
diff
changeset
|
68 N_("Kiyoshi Aman"), |
3a940b8dac46
[svn] Add credits.c to makefile, and fill in as much information as I have.
nenolod
parents:
500
diff
changeset
|
69 N_("Shay Green"), |
399 | 70 N_("Giacomo Lozito"), |
0 | 71 N_("William Pitcock"), |
168 | 72 N_("Tony Vroon"), |
0 | 73 NULL, |
74 | |
360
222a0d71cbcf
[svn] - change our slogan to "The future of UNIX multimedia."
nenolod
parents:
232
diff
changeset
|
75 N_("0.1.x developers:"), |
222a0d71cbcf
[svn] - change our slogan to "The future of UNIX multimedia."
nenolod
parents:
232
diff
changeset
|
76 N_("William Pitcock"), |
222a0d71cbcf
[svn] - change our slogan to "The future of UNIX multimedia."
nenolod
parents:
232
diff
changeset
|
77 N_("Mohammed Sameer"), |
222a0d71cbcf
[svn] - change our slogan to "The future of UNIX multimedia."
nenolod
parents:
232
diff
changeset
|
78 N_("Tony Vroon"), |
0 | 79 NULL, |
80 | |
81 N_("BMP Developers:"), | |
82 N_("Artem Baguinski"), | |
83 N_("Edward Brocklesby"), | |
84 N_("Chong Kai Xiong"), | |
85 N_("Milosz Derezynski"), | |
86 N_("David Lau"), | |
87 N_("Ole Andre Vadla Ravnaas"), | |
88 N_("Michiel Sikkes"), | |
89 N_("Andrei Badea"), | |
90 N_("Peter Behroozi"), | |
91 N_("Bernard Blackham"), | |
92 N_("Oliver Blin"), | |
93 N_("Tomas Bzatek"), | |
94 N_("Liviu Danicel"), | |
95 N_("Jon Dowland"), | |
96 N_("Artur Frysiak"), | |
97 N_("Sebastian Kapfer"), | |
98 N_("Lukas Koberstein"), | |
99 N_("Dan Korostelev"), | |
100 N_("Jolan Luff"), | |
101 N_("Michael Marineau"), | |
102 N_("Tim-Philipp Muller"), | |
103 N_("Julien Portalier"), | |
104 N_("Andrew Ruder"), | |
105 N_("Olivier Samyn"), | |
106 N_("Martijn Vernooij"), | |
107 NULL, | |
108 | |
109 NULL | |
110 }; | |
111 | |
112 static const gchar *translators[] = { | |
113 N_("Brazilian Portuguese:"), | |
114 N_("Philipi Pinto"), | |
115 NULL, | |
116 N_("Breton:"), | |
117 N_("Thierry Vignaud"), | |
118 NULL, | |
119 N_("Chinese:"), | |
120 N_("Chong Kai Xiong"), | |
121 N_("Chao-Hsiung Liao"), | |
122 NULL, | |
123 N_("Czech:"), | |
124 N_("Jan Narovec"), | |
125 NULL, | |
126 N_("Dutch:"), | |
127 N_("Laurens Buhler"), | |
128 NULL, | |
129 N_("Finnish:"), | |
130 N_("Pauli Virtanen"), | |
131 NULL, | |
132 N_("French:"), | |
133 N_("David Le Brun"), | |
134 NULL, | |
135 N_("German:"), | |
136 N_("Matthias Debus"), | |
137 NULL, | |
138 N_("Georgian: "), | |
139 N_("George Machitidze"), | |
140 NULL, | |
141 N_("Greek:"), | |
142 N_("Kouzinopoulos Haris"), | |
143 N_("Stavros Giannouris"), | |
144 NULL, | |
145 N_("Hindi:"), | |
146 N_("Dhananjaya Sharma"), | |
147 NULL, | |
148 N_("Hungarian:"), | |
149 N_("Laszlo Dvornik"), | |
150 NULL, | |
151 N_("Italian:"), | |
152 N_("Alessio D'Ascanio"), | |
153 NULL, | |
154 N_("Japanese:"), | |
232 | 155 N_("Dai"), |
0 | 156 NULL, |
157 N_("Korean:"), | |
158 N_("DongCheon Park"), | |
159 NULL, | |
160 N_("Lithuanian:"), | |
161 N_("Rimas Kudelis"), | |
162 NULL, | |
163 N_("Macedonian:"), | |
164 N_("Arangel Angov"), | |
165 NULL, | |
166 N_("Polish:"), | |
167 N_("Jacek Wolszczak"), | |
168 NULL, | |
169 N_("Romanian:"), | |
170 N_("Liviu Danicel"), | |
171 NULL, | |
172 N_("Russian:"), | |
173 N_("Pavlo Bohmat"), | |
174 N_("Dan Korostelev"), | |
175 N_("Vitaly Lipatov"), | |
176 NULL, | |
177 N_("Slovak:"), | |
178 N_("Pavel Kanzelsberger"), | |
179 NULL, | |
180 N_("Spanish:"), | |
181 N_("Francisco Javier F. Serrador"), | |
182 NULL, | |
183 N_("Swedish:"), | |
184 N_("Martin Persenius"), | |
185 NULL, | |
186 N_("Ukrainian:"), | |
187 N_("Mykola Lynnyk"), | |
188 NULL, | |
189 N_("Welsh:"), | |
190 N_("Edward Brocklesby"), | |
191 NULL, | |
192 | |
193 NULL | |
194 }; | |
195 | |
196 | |
197 static GtkWidget * | |
198 generate_credit_list(const gchar * text[], gboolean sec_space) | |
199 { | |
200 GtkWidget *scrollwin; | |
201 GtkWidget *treeview; | |
202 GtkListStore *list_store; | |
203 GtkTreeIter iter; | |
204 GtkTreeViewColumn *column; | |
205 GtkCellRenderer *renderer; | |
206 const gchar *const *item; | |
207 | |
208 list_store = gtk_list_store_new(N_COLS, G_TYPE_STRING, G_TYPE_STRING); | |
209 | |
210 item = text; | |
211 | |
212 while (*item) { | |
213 gtk_list_store_append(list_store, &iter); | |
214 gtk_list_store_set(list_store, &iter, | |
215 COL_LEFT, _(item[0]), COL_RIGHT, _(item[1]), -1); | |
216 item += 2; | |
217 | |
218 while (*item) { | |
219 gtk_list_store_append(list_store, &iter); | |
220 gtk_list_store_set(list_store, &iter, | |
221 COL_LEFT, "", COL_RIGHT, _(*item++), -1); | |
222 } | |
223 | |
224 ++item; | |
225 | |
226 if (*item && sec_space) { | |
227 gtk_list_store_append(list_store, &iter); | |
228 gtk_list_store_set(list_store, &iter, | |
229 COL_LEFT, "", COL_RIGHT, "", -1); | |
230 } | |
231 } | |
232 | |
233 treeview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(list_store)); | |
234 gtk_tree_view_set_headers_clickable(GTK_TREE_VIEW(treeview), FALSE); | |
235 gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(treeview), FALSE); | |
236 gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview)), | |
237 GTK_SELECTION_NONE); | |
238 | |
239 renderer = gtk_cell_renderer_text_new(); | |
240 g_object_set(renderer, "xalign", 1.0, NULL); | |
241 column = gtk_tree_view_column_new_with_attributes("Left", renderer, | |
242 "text", COL_LEFT, NULL); | |
243 gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column); | |
244 | |
245 renderer = gtk_cell_renderer_text_new(); | |
246 g_object_set(renderer, "xalign", 0.0, NULL); | |
247 column = gtk_tree_view_column_new_with_attributes("Right", renderer, | |
248 "text", COL_RIGHT, | |
249 NULL); | |
250 gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column); | |
251 | |
252 scrollwin = gtk_scrolled_window_new(NULL, NULL); | |
253 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollwin), | |
254 GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); | |
255 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrollwin), GTK_SHADOW_IN); | |
256 gtk_container_add(GTK_CONTAINER(scrollwin), treeview); | |
257 gtk_container_set_border_width(GTK_CONTAINER(scrollwin), 10); | |
258 | |
259 gtk_widget_show_all(scrollwin); | |
260 | |
261 return scrollwin; | |
262 } | |
263 | |
264 void | |
500 | 265 show_credits_window(void) |
0 | 266 { |
267 static GtkWidget *about_window = NULL; | |
268 | |
269 GdkPixmap *beep_logo_pmap = NULL, *beep_logo_mask = NULL; | |
270 GtkWidget *about_vbox; | |
271 GtkWidget *about_credits_logo_box, *about_credits_logo_frame; | |
272 GtkWidget *about_credits_logo; | |
273 GtkWidget *about_notebook; | |
274 GtkWidget *list; | |
275 GtkWidget *bbox, *close_btn; | |
276 GtkWidget *label; | |
277 gchar *text; | |
278 | |
279 if (about_window) | |
280 return; | |
281 | |
282 about_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); | |
283 gtk_window_set_type_hint(GTK_WINDOW(about_window), | |
284 GDK_WINDOW_TYPE_HINT_DIALOG); | |
285 | |
501
3a940b8dac46
[svn] Add credits.c to makefile, and fill in as much information as I have.
nenolod
parents:
500
diff
changeset
|
286 gtk_window_set_default_size(GTK_WINDOW(about_window), -1, 512); |
0 | 287 gtk_window_set_title(GTK_WINDOW(about_window), _("About Audacious")); |
288 gtk_window_set_position(GTK_WINDOW(about_window), GTK_WIN_POS_CENTER); | |
289 gtk_window_set_resizable(GTK_WINDOW(about_window), TRUE); | |
290 gtk_container_set_border_width(GTK_CONTAINER(about_window), 10); | |
291 | |
292 g_signal_connect(about_window, "destroy", | |
293 G_CALLBACK(gtk_widget_destroyed), &about_window); | |
294 | |
295 gtk_widget_realize(about_window); | |
296 | |
297 about_vbox = gtk_vbox_new(FALSE, 5); | |
298 gtk_container_add(GTK_CONTAINER(about_window), about_vbox); | |
299 | |
300 if (!beep_logo_pmap) | |
301 beep_logo_pmap = | |
302 gdk_pixmap_create_from_xpm_d(about_window->window, | |
303 &beep_logo_mask, NULL, audacious_logo_xpm); | |
304 | |
305 about_credits_logo_box = gtk_hbox_new(TRUE, 0); | |
306 gtk_box_pack_start(GTK_BOX(about_vbox), about_credits_logo_box, | |
307 FALSE, FALSE, 0); | |
308 | |
309 about_credits_logo_frame = gtk_frame_new(NULL); | |
310 gtk_frame_set_shadow_type(GTK_FRAME(about_credits_logo_frame), | |
311 GTK_SHADOW_ETCHED_OUT); | |
312 gtk_box_pack_start(GTK_BOX(about_credits_logo_box), | |
313 about_credits_logo_frame, FALSE, FALSE, 0); | |
314 | |
315 about_credits_logo = gtk_pixmap_new(beep_logo_pmap, beep_logo_mask); | |
316 gtk_container_add(GTK_CONTAINER(about_credits_logo_frame), | |
317 about_credits_logo); | |
318 | |
319 label = gtk_label_new(NULL); | |
320 text = g_strdup_printf(_(bmp_brief), VERSION); | |
321 gtk_label_set_markup(GTK_LABEL(label), text); | |
322 gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_CENTER); | |
323 g_free(text); | |
324 | |
325 gtk_box_pack_start(GTK_BOX(about_vbox), label, FALSE, FALSE, 0); | |
326 | |
327 about_notebook = gtk_notebook_new(); | |
328 gtk_box_pack_start(GTK_BOX(about_vbox), about_notebook, TRUE, TRUE, 0); | |
329 | |
330 list = generate_credit_list(credit_text, TRUE); | |
331 gtk_notebook_append_page(GTK_NOTEBOOK(about_notebook), list, | |
332 gtk_label_new(_("Credits"))); | |
333 | |
334 list = generate_credit_list(translators, FALSE); | |
335 gtk_notebook_append_page(GTK_NOTEBOOK(about_notebook), list, | |
336 gtk_label_new(_("Translators"))); | |
337 | |
338 bbox = gtk_hbutton_box_new(); | |
339 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END); | |
340 gtk_button_box_set_spacing(GTK_BUTTON_BOX(bbox), 5); | |
341 gtk_box_pack_start(GTK_BOX(about_vbox), bbox, FALSE, FALSE, 0); | |
342 | |
343 close_btn = gtk_button_new_from_stock(GTK_STOCK_CLOSE); | |
344 g_signal_connect_swapped(close_btn, "clicked", | |
345 G_CALLBACK(gtk_widget_destroy), about_window); | |
346 GTK_WIDGET_SET_FLAGS(close_btn, GTK_CAN_DEFAULT); | |
347 gtk_box_pack_start(GTK_BOX(bbox), close_btn, TRUE, TRUE, 0); | |
348 gtk_widget_grab_default(close_btn); | |
349 | |
350 gtk_widget_show_all(about_window); | |
351 } |