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