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