Mercurial > audlegacy
annotate audacious/credits.c @ 1056:21628529c615 trunk
[svn] add the config option to enable/disable separator line in the playlist
author | yaz |
---|---|
date | Mon, 15 May 2006 08:17:53 -0700 |
parents | 70454b8764d6 |
children | 1c54da168b6c |
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"), | |
132 NULL, | |
133 N_("Finnish:"), | |
134 N_("Pauli Virtanen"), | |
135 NULL, | |
136 N_("French:"), | |
137 N_("David Le Brun"), | |
138 NULL, | |
139 N_("German:"), | |
140 N_("Matthias Debus"), | |
141 NULL, | |
142 N_("Georgian: "), | |
143 N_("George Machitidze"), | |
144 NULL, | |
145 N_("Greek:"), | |
146 N_("Kouzinopoulos Haris"), | |
147 N_("Stavros Giannouris"), | |
148 NULL, | |
149 N_("Hindi:"), | |
150 N_("Dhananjaya Sharma"), | |
151 NULL, | |
152 N_("Hungarian:"), | |
153 N_("Laszlo Dvornik"), | |
154 NULL, | |
155 N_("Italian:"), | |
156 N_("Alessio D'Ascanio"), | |
157 NULL, | |
158 N_("Japanese:"), | |
232 | 159 N_("Dai"), |
0 | 160 NULL, |
161 N_("Korean:"), | |
162 N_("DongCheon Park"), | |
163 NULL, | |
164 N_("Lithuanian:"), | |
165 N_("Rimas Kudelis"), | |
166 NULL, | |
167 N_("Macedonian:"), | |
168 N_("Arangel Angov"), | |
169 NULL, | |
170 N_("Polish:"), | |
171 N_("Jacek Wolszczak"), | |
172 NULL, | |
173 N_("Romanian:"), | |
174 N_("Liviu Danicel"), | |
175 NULL, | |
176 N_("Russian:"), | |
177 N_("Pavlo Bohmat"), | |
178 N_("Dan Korostelev"), | |
179 N_("Vitaly Lipatov"), | |
180 NULL, | |
181 N_("Slovak:"), | |
182 N_("Pavel Kanzelsberger"), | |
183 NULL, | |
184 N_("Spanish:"), | |
988
70454b8764d6
[svn] - Denote Gustavo D. Vranjes as current Spanish translator
nenolod
parents:
888
diff
changeset
|
185 N_("Gustavo D. Vranjes"), |
0 | 186 NULL, |
187 N_("Swedish:"), | |
188 N_("Martin Persenius"), | |
189 NULL, | |
190 N_("Ukrainian:"), | |
191 N_("Mykola Lynnyk"), | |
192 NULL, | |
193 N_("Welsh:"), | |
194 N_("Edward Brocklesby"), | |
195 NULL, | |
196 | |
197 NULL | |
198 }; | |
199 | |
200 | |
201 static GtkWidget * | |
202 generate_credit_list(const gchar * text[], gboolean sec_space) | |
203 { | |
204 GtkWidget *scrollwin; | |
205 GtkWidget *treeview; | |
206 GtkListStore *list_store; | |
207 GtkTreeIter iter; | |
208 GtkTreeViewColumn *column; | |
209 GtkCellRenderer *renderer; | |
210 const gchar *const *item; | |
211 | |
212 list_store = gtk_list_store_new(N_COLS, G_TYPE_STRING, G_TYPE_STRING); | |
213 | |
214 item = text; | |
215 | |
216 while (*item) { | |
217 gtk_list_store_append(list_store, &iter); | |
218 gtk_list_store_set(list_store, &iter, | |
219 COL_LEFT, _(item[0]), COL_RIGHT, _(item[1]), -1); | |
220 item += 2; | |
221 | |
222 while (*item) { | |
223 gtk_list_store_append(list_store, &iter); | |
224 gtk_list_store_set(list_store, &iter, | |
225 COL_LEFT, "", COL_RIGHT, _(*item++), -1); | |
226 } | |
227 | |
228 ++item; | |
229 | |
230 if (*item && sec_space) { | |
231 gtk_list_store_append(list_store, &iter); | |
232 gtk_list_store_set(list_store, &iter, | |
233 COL_LEFT, "", COL_RIGHT, "", -1); | |
234 } | |
235 } | |
236 | |
237 treeview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(list_store)); | |
238 gtk_tree_view_set_headers_clickable(GTK_TREE_VIEW(treeview), FALSE); | |
239 gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(treeview), FALSE); | |
240 gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview)), | |
241 GTK_SELECTION_NONE); | |
242 | |
243 renderer = gtk_cell_renderer_text_new(); | |
244 g_object_set(renderer, "xalign", 1.0, NULL); | |
245 column = gtk_tree_view_column_new_with_attributes("Left", renderer, | |
246 "text", COL_LEFT, NULL); | |
247 gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column); | |
248 | |
249 renderer = gtk_cell_renderer_text_new(); | |
250 g_object_set(renderer, "xalign", 0.0, NULL); | |
251 column = gtk_tree_view_column_new_with_attributes("Right", renderer, | |
252 "text", COL_RIGHT, | |
253 NULL); | |
254 gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column); | |
255 | |
256 scrollwin = gtk_scrolled_window_new(NULL, NULL); | |
257 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollwin), | |
258 GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); | |
259 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrollwin), GTK_SHADOW_IN); | |
260 gtk_container_add(GTK_CONTAINER(scrollwin), treeview); | |
261 gtk_container_set_border_width(GTK_CONTAINER(scrollwin), 10); | |
262 | |
263 gtk_widget_show_all(scrollwin); | |
264 | |
265 return scrollwin; | |
266 } | |
267 | |
268 void | |
500 | 269 show_credits_window(void) |
0 | 270 { |
271 static GtkWidget *about_window = NULL; | |
272 | |
273 GdkPixmap *beep_logo_pmap = NULL, *beep_logo_mask = NULL; | |
274 GtkWidget *about_vbox; | |
275 GtkWidget *about_credits_logo_box, *about_credits_logo_frame; | |
276 GtkWidget *about_credits_logo; | |
277 GtkWidget *about_notebook; | |
278 GtkWidget *list; | |
279 GtkWidget *bbox, *close_btn; | |
280 GtkWidget *label; | |
281 gchar *text; | |
282 | |
283 if (about_window) | |
284 return; | |
285 | |
286 about_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); | |
287 gtk_window_set_type_hint(GTK_WINDOW(about_window), | |
288 GDK_WINDOW_TYPE_HINT_DIALOG); | |
289 | |
501
3a940b8dac46
[svn] Add credits.c to makefile, and fill in as much information as I have.
nenolod
parents:
500
diff
changeset
|
290 gtk_window_set_default_size(GTK_WINDOW(about_window), -1, 512); |
0 | 291 gtk_window_set_title(GTK_WINDOW(about_window), _("About Audacious")); |
292 gtk_window_set_position(GTK_WINDOW(about_window), GTK_WIN_POS_CENTER); | |
293 gtk_window_set_resizable(GTK_WINDOW(about_window), TRUE); | |
294 gtk_container_set_border_width(GTK_CONTAINER(about_window), 10); | |
295 | |
296 g_signal_connect(about_window, "destroy", | |
297 G_CALLBACK(gtk_widget_destroyed), &about_window); | |
298 | |
299 gtk_widget_realize(about_window); | |
300 | |
301 about_vbox = gtk_vbox_new(FALSE, 5); | |
302 gtk_container_add(GTK_CONTAINER(about_window), about_vbox); | |
303 | |
304 if (!beep_logo_pmap) | |
305 beep_logo_pmap = | |
306 gdk_pixmap_create_from_xpm_d(about_window->window, | |
307 &beep_logo_mask, NULL, audacious_logo_xpm); | |
308 | |
309 about_credits_logo_box = gtk_hbox_new(TRUE, 0); | |
310 gtk_box_pack_start(GTK_BOX(about_vbox), about_credits_logo_box, | |
311 FALSE, FALSE, 0); | |
312 | |
313 about_credits_logo_frame = gtk_frame_new(NULL); | |
314 gtk_frame_set_shadow_type(GTK_FRAME(about_credits_logo_frame), | |
315 GTK_SHADOW_ETCHED_OUT); | |
316 gtk_box_pack_start(GTK_BOX(about_credits_logo_box), | |
317 about_credits_logo_frame, FALSE, FALSE, 0); | |
318 | |
319 about_credits_logo = gtk_pixmap_new(beep_logo_pmap, beep_logo_mask); | |
320 gtk_container_add(GTK_CONTAINER(about_credits_logo_frame), | |
321 about_credits_logo); | |
322 | |
323 label = gtk_label_new(NULL); | |
324 text = g_strdup_printf(_(bmp_brief), VERSION); | |
325 gtk_label_set_markup(GTK_LABEL(label), text); | |
326 gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_CENTER); | |
327 g_free(text); | |
328 | |
329 gtk_box_pack_start(GTK_BOX(about_vbox), label, FALSE, FALSE, 0); | |
330 | |
331 about_notebook = gtk_notebook_new(); | |
332 gtk_box_pack_start(GTK_BOX(about_vbox), about_notebook, TRUE, TRUE, 0); | |
333 | |
334 list = generate_credit_list(credit_text, TRUE); | |
335 gtk_notebook_append_page(GTK_NOTEBOOK(about_notebook), list, | |
336 gtk_label_new(_("Credits"))); | |
337 | |
338 list = generate_credit_list(translators, FALSE); | |
339 gtk_notebook_append_page(GTK_NOTEBOOK(about_notebook), list, | |
340 gtk_label_new(_("Translators"))); | |
341 | |
342 bbox = gtk_hbutton_box_new(); | |
343 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END); | |
344 gtk_button_box_set_spacing(GTK_BUTTON_BOX(bbox), 5); | |
345 gtk_box_pack_start(GTK_BOX(about_vbox), bbox, FALSE, FALSE, 0); | |
346 | |
347 close_btn = gtk_button_new_from_stock(GTK_STOCK_CLOSE); | |
348 g_signal_connect_swapped(close_btn, "clicked", | |
349 G_CALLBACK(gtk_widget_destroy), about_window); | |
350 GTK_WIDGET_SET_FLAGS(close_btn, GTK_CAN_DEFAULT); | |
351 gtk_box_pack_start(GTK_BOX(bbox), close_btn, TRUE, TRUE, 0); | |
352 gtk_widget_grab_default(close_btn); | |
353 | |
354 gtk_widget_show_all(about_window); | |
355 } |