1 /* -*- linux-c -*-
2 Copyright (C) 2004 Tom Szilagyi
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18 $Id: about.c 1305 2014-08-15 10:01:38Z tszilagyi $
19 */
20
21 #include <config.h>
22
23 #include <stdio.h>
24 #include <glib.h>
25 #include <glib-object.h>
26 #include <gdk/gdk.h>
27 #include <gdk/gdkkeysyms.h>
28 #include <gdk-pixbuf/gdk-pixbuf.h>
29 #include <gtk/gtk.h>
30
31 #include "common.h"
32 #include "version.h"
33 #include "i18n.h"
34 #include "about.h"
35
36
37 #define BUILT_IN " [+] "
38 #define LEFT_OUT " [ ] "
39 #ifndef HAVE_LADSPA
40 #define BUILT_W_LADSPA LEFT_OUT
41 #else /* HAVE_LADSPA */
42 #define BUILT_W_LADSPA BUILT_IN
43 #endif /* HAVE_LADSPA */
44 #ifndef HAVE_CDDA
45 #define BUILT_W_CDDA LEFT_OUT
46 #else /* HAVE_CDDA */
47 #define BUILT_W_CDDA BUILT_IN
48 #endif /* HAVE_CDDA */
49 #ifndef HAVE_CDDB
50 #define BUILT_W_CDDB LEFT_OUT
51 #else /* HAVE_CDDB */
52 #define BUILT_W_CDDB BUILT_IN
53 #endif /* HAVE_CDDB */
54 #ifndef HAVE_SRC
55 #define BUILT_W_SRC LEFT_OUT
56 #else /* HAVE_SRC */
57 #define BUILT_W_SRC BUILT_IN
58 #endif /* HAVE_SRC */
59 #ifndef HAVE_IFP
60 #define BUILT_W_IFP LEFT_OUT
61 #else /* HAVE_IFP */
62 #define BUILT_W_IFP BUILT_IN
63 #endif /* HAVE_IFP */
64 #ifndef HAVE_JACK_MGMT
65 #define BUILT_W_JACK_MGMT LEFT_OUT
66 #else /* HAVE_JACK_MGMT */
67 #define BUILT_W_JACK_MGMT BUILT_IN
68 #endif /* HAVE_JACK_MGMT */
69 #ifndef HAVE_LOOP
70 #define BUILT_W_LOOP LEFT_OUT
71 #else /* HAVE_LOOP */
72 #define BUILT_W_LOOP BUILT_IN
73 #endif /* HAVE_LOOP */
74 #ifndef HAVE_SYSTRAY
75 #define BUILT_W_SYSTRAY LEFT_OUT
76 #else /* HAVE_SYSTRAY */
77 #define BUILT_W_SYSTRAY BUILT_IN
78 #endif /* HAVE_SYSTRAY */
79 #ifndef HAVE_PODCAST
80 #define BUILT_W_PODCAST LEFT_OUT
81 #else /* HAVE_PODCAST */
82 #define BUILT_W_PODCAST BUILT_IN
83 #endif /* HAVE_PODCAST */
84 #ifndef HAVE_LUA
85 #define BUILT_W_LUA LEFT_OUT
86 #else /* HAVE_LUA */
87 #define BUILT_W_LUA BUILT_IN
88 #endif /* HAVE_LUA */
89 #ifndef HAVE_SNDFILE
90 #define BUILT_W_SNDFILE LEFT_OUT
91 #else /* HAVE_SNDFILE */
92 #define BUILT_W_SNDFILE BUILT_IN
93 #endif /* HAVE_SNDFILE */
94 #ifndef HAVE_FLAC
95 #define BUILT_W_FLAC LEFT_OUT
96 #else /* HAVE_FLAC */
97 #define BUILT_W_FLAC BUILT_IN
98 #endif /* HAVE_FLAC */
99 #ifndef HAVE_VORBIS
100 #define BUILT_W_VORBIS LEFT_OUT
101 #else /* HAVE_VORBIS */
102 #define BUILT_W_VORBIS BUILT_IN
103 #endif /* HAVE_VORBIS */
104 #ifndef HAVE_SPEEX
105 #define BUILT_W_SPEEX LEFT_OUT
106 #else /* HAVE_SPEEX */
107 #define BUILT_W_SPEEX BUILT_IN
108 #endif /* HAVE_SPEEX */
109 #ifndef HAVE_MPEG
110 #define BUILT_W_MPEG LEFT_OUT
111 #else /* HAVE_MPEG */
112 #define BUILT_W_MPEG BUILT_IN
113 #endif /* HAVE_MPEG */
114 #ifndef HAVE_MOD
115 #define BUILT_W_MOD LEFT_OUT
116 #else /* HAVE_MOD */
117 #define BUILT_W_MOD BUILT_IN
118 #endif /* HAVE_MOD */
119 #ifndef HAVE_MPC
120 #define BUILT_W_MPC LEFT_OUT
121 #else /* HAVE_MPC */
122 #define BUILT_W_MPC BUILT_IN
123 #endif /* HAVE_MPC */
124 #ifndef HAVE_MAC
125 #define BUILT_W_MAC LEFT_OUT
126 #else /* HAVE_MAC */
127 #define BUILT_W_MAC BUILT_IN
128 #endif /* HAVE_MAC */
129 #ifndef HAVE_WAVPACK
130 #define BUILT_W_WAVPACK LEFT_OUT
131 #else /* HAVE_WAVPACK */
132 #define BUILT_W_WAVPACK BUILT_IN
133 #endif /* HAVE_WAVPACK */
134 #ifndef HAVE_LAVC
135 #define BUILT_W_LAVC LEFT_OUT
136 #else /* HAVE_LAVC */
137 #define BUILT_W_LAVC BUILT_IN
138 #endif /* HAVE_LAVC */
139 #ifndef HAVE_SNDFILE_ENC
140 #define BUILT_W_SNDFILE_ENC LEFT_OUT
141 #else /* HAVE_SNDFILE_ENC */
142 #define BUILT_W_SNDFILE_ENC BUILT_IN
143 #endif /* HAVE_SNDFILE_ENC */
144 #ifndef HAVE_FLAC_ENC
145 #define BUILT_W_FLAC_ENC LEFT_OUT
146 #else /* HAVE_FLAC_ENC */
147 #define BUILT_W_FLAC_ENC BUILT_IN
148 #endif /* HAVE_FLAC_ENC */
149 #ifndef HAVE_VORBISENC
150 #define BUILT_W_VORBISENC LEFT_OUT
151 #else /* HAVE_VORBISENC */
152 #define BUILT_W_VORBISENC BUILT_IN
153 #endif /* HAVE_VORBISENC */
154 #ifndef HAVE_LAME
155 #define BUILT_W_LAME LEFT_OUT
156 #else /* HAVE_LAME */
157 #define BUILT_W_LAME BUILT_IN
158 #endif /* HAVE_LAME */
159 #ifndef HAVE_SNDIO
160 #define BUILT_W_SNDIO LEFT_OUT
161 #else /* HAVE_SNDIO */
162 #define BUILT_W_SNDIO BUILT_IN
163 #endif /* HAVE_SNDIO */
164 #ifndef HAVE_OSS
165 #define BUILT_W_OSS LEFT_OUT
166 #else /* HAVE_OSS */
167 #define BUILT_W_OSS BUILT_IN
168 #endif /* HAVE_OSS */
169 #ifndef HAVE_ALSA
170 #define BUILT_W_ALSA LEFT_OUT
171 #else /* HAVE_ALSA */
172 #define BUILT_W_ALSA BUILT_IN
173 #endif /* HAVE_ALSA */
174 #ifndef HAVE_JACK
175 #define BUILT_W_JACK LEFT_OUT
176 #else /* HAVE_JACK */
177 #define BUILT_W_JACK BUILT_IN
178 #endif /* HAVE_JACK */
179 #ifndef HAVE_PULSE
180 #define BUILT_W_PULSE LEFT_OUT
181 #else /* HAVE_PULSE */
182 #define BUILT_W_PULSE BUILT_IN
183 #endif /* HAVE_PULSE */
184 #ifndef HAVE_WINMM
185 #define BUILT_W_WINMM LEFT_OUT
186 #else /* HAVE_WINMM */
187 #define BUILT_W_WINMM BUILT_IN
188 #endif /* HAVE_WINMM */
189
190
191 GtkWidget * about_window;
192 extern GtkWidget * main_window;
193
194
195 static gint
ok(GtkWidget * widget,gpointer data)196 ok(GtkWidget * widget, gpointer data) {
197
198 gtk_widget_destroy(about_window);
199 return TRUE;
200 }
201
202
203 gint
about_key_pressed(GtkWidget * widget,GdkEventKey * event,gpointer * data)204 about_key_pressed(GtkWidget * widget, GdkEventKey * event, gpointer * data) {
205
206 switch (event->keyval) {
207 case GDK_q:
208 case GDK_Q:
209 case GDK_Escape:
210 ok(NULL, NULL);
211 return TRUE;
212 };
213
214 return FALSE;
215 }
216
217 gchar *
about_build(void)218 about_build(void) {
219
220 return g_strconcat(
221 "\n ", _("Optional features:"), "\n",
222 BUILT_W_LADSPA, _("LADSPA plugin support\n"),
223 BUILT_W_CDDA, _("CDDA (Audio CD) support\n"),
224 BUILT_W_CDDB, _("CDDB support\n"),
225 BUILT_W_SRC, _("Sample Rate Converter support\n"),
226 BUILT_W_IFP, _("iRiver iFP driver support\n"),
227 BUILT_W_JACK_MGMT, _("JACK port management support\n"),
228 BUILT_W_LOOP, _("Loop playback support\n"),
229 BUILT_W_SYSTRAY, _("Systray support\n"),
230 BUILT_W_PODCAST, _("Podcast support\n"),
231 BUILT_W_LUA, _("Lua extension support\n"),
232 "\n ", _("Decoding support:"), "\n",
233 BUILT_W_SNDFILE, _("sndfile (WAV, AIFF, etc.)\n"),
234 BUILT_W_FLAC, _("Free Lossless Audio Codec (FLAC)\n"),
235 BUILT_W_VORBIS, _("Ogg Vorbis\n"),
236 BUILT_W_SPEEX, _("Ogg Speex\n"),
237 BUILT_W_MPEG, _("MPEG Audio (MPEG 1-2.5 Layer I-III)\n"),
238 BUILT_W_MOD, _("MOD Audio (MOD, S3M, XM, IT, etc.)\n"),
239 BUILT_W_MPC, _("Musepack\n"),
240 BUILT_W_MAC, _("Monkey's Audio Codec\n"),
241 BUILT_W_WAVPACK, _("WavPack\n"),
242 BUILT_W_LAVC, _("LAVC (AC3, AAC, WavPack, WMA, etc.)\n"),
243 "\n ", _("Encoding support:"), "\n",
244 BUILT_W_SNDFILE_ENC, _("sndfile (WAV)\n"),
245 BUILT_W_FLAC_ENC, _("Free Lossless Audio Codec (FLAC)\n"),
246 BUILT_W_VORBISENC, _("Ogg Vorbis\n"),
247 BUILT_W_LAME, _("LAME (MP3)\n"),
248 "\n ", _("Output driver support:"), "\n",
249 BUILT_W_SNDIO, _("sndio Audio\n"),
250 BUILT_W_OSS, _("OSS Audio\n"),
251 BUILT_W_ALSA, _("ALSA Audio\n"),
252 BUILT_W_JACK, _("JACK Audio Server\n"),
253 BUILT_W_PULSE, _("PulseAudio\n"),
254 BUILT_W_WINMM, _("Win32 Sound API\n"),
255 NULL);
256 }
257
258 void
create_about_window()259 create_about_window() {
260
261 GtkWidget * vbox0;
262 GtkWidget * vbox;
263
264 GtkWidget * xpm;
265 GdkPixbuf * pixbuf;
266
267 GtkWidget * frame;
268 GtkWidget * scrolled_win;
269 GtkWidget * vscrollbar;
270 GtkWidget * view;
271 GtkTextBuffer * buffer;
272 GtkTextIter iter;
273
274 GtkWidget * hbuttonbox;
275 GtkWidget * ok_btn;
276
277 GdkColor white = { 0, 49152, 51118, 52429 };
278 GdkColor blue1 = { 0, 41288, 47841, 55050 };
279 GdkColor blue2 = { 0, 45288, 51841, 60050 };
280 GdkColor blue3 = { 0, 55552, 56832, 57600};
281
282 GtkTextTag * tag;
283 GtkTextTag * tag2;
284
285 char path[MAXLEN];
286 gchar * build_info = about_build();
287
288 about_window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
289 gtk_window_set_transient_for(GTK_WINDOW(about_window), GTK_WINDOW(main_window));
290 gtk_widget_set_name(about_window, "");
291 gtk_window_set_title(GTK_WINDOW(about_window), _("About"));
292 gtk_widget_set_size_request(about_window, 483, 430);
293 gtk_window_set_position(GTK_WINDOW(about_window), GTK_WIN_POS_CENTER);
294 gtk_widget_modify_bg(about_window, GTK_STATE_NORMAL, &white);
295 g_signal_connect(G_OBJECT(about_window), "key_press_event", G_CALLBACK(about_key_pressed), NULL);
296
297 vbox0 = gtk_vbox_new(FALSE, 0);
298 gtk_container_add(GTK_CONTAINER(about_window), vbox0);
299
300 vbox = gtk_vbox_new(FALSE, 0);
301 gtk_container_set_border_width(GTK_CONTAINER(vbox), 5);
302 gtk_box_pack_end(GTK_BOX(vbox0), vbox, TRUE, TRUE, 0);
303
304 hbuttonbox = gtk_hbutton_box_new();
305 gtk_widget_set_name(hbuttonbox, "");
306 gtk_box_pack_end(GTK_BOX(vbox), hbuttonbox, FALSE, TRUE, 0);
307 gtk_button_box_set_layout(GTK_BUTTON_BOX(hbuttonbox), GTK_BUTTONBOX_END);
308
309 ok_btn = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
310 gtk_widget_set_name(ok_btn, "");
311 g_signal_connect(ok_btn, "clicked", G_CALLBACK(ok), NULL);
312 gtk_container_add(GTK_CONTAINER(hbuttonbox), ok_btn);
313 gtk_widget_modify_bg(ok_btn, GTK_STATE_NORMAL, &blue1);
314 gtk_widget_modify_bg(ok_btn, GTK_STATE_PRELIGHT, &blue2);
315 gtk_widget_modify_bg(ok_btn, GTK_STATE_ACTIVE, &blue2);
316
317 frame = gtk_frame_new(NULL);
318 gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN);
319
320 scrolled_win = gtk_scrolled_window_new(NULL, NULL);
321 gtk_widget_set_name(scrolled_win, "");
322 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_win),
323 GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
324
325 vscrollbar = gtk_scrolled_window_get_vscrollbar(GTK_SCROLLED_WINDOW(scrolled_win));
326 gtk_widget_set_name(vscrollbar, "");
327 gtk_widget_modify_bg(vscrollbar, GTK_STATE_NORMAL, &blue1);
328 gtk_widget_modify_bg(vscrollbar, GTK_STATE_PRELIGHT, &blue2);
329 gtk_widget_modify_bg(vscrollbar, GTK_STATE_ACTIVE, &blue3);
330 gtk_widget_modify_bg(vscrollbar, GTK_STATE_INSENSITIVE, &blue2);
331
332
333 view = gtk_text_view_new();
334 gtk_widget_set_name(view, "");
335
336 gtk_widget_modify_base(view, GTK_STATE_NORMAL, &blue3);
337 gtk_text_view_set_left_margin(GTK_TEXT_VIEW(view), 3);
338 gtk_text_view_set_right_margin(GTK_TEXT_VIEW(view), 3);
339 gtk_text_view_set_editable(GTK_TEXT_VIEW(view), FALSE);
340 gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(view), FALSE);
341 gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(view), GTK_WRAP_WORD);
342 buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(view));
343 gtk_text_view_set_buffer(GTK_TEXT_VIEW(view), buffer);
344
345 tag = gtk_text_buffer_create_tag(buffer, NULL, "foreground", "#0000C0", NULL);
346 tag2 = gtk_text_buffer_create_tag(buffer, NULL, "family", "monospace", NULL);
347
348
349 /* insert text */
350
351 gtk_text_buffer_get_end_iter(buffer, &iter);
352 gtk_text_buffer_insert_with_tags(buffer, &iter, _("Build version: "), -1, tag, NULL);
353 gtk_text_buffer_insert_at_cursor(buffer, AQUALUNG_VERSION, -1);
354
355 gtk_text_buffer_insert_at_cursor(buffer, "\n\n", -1);
356 gtk_text_buffer_get_end_iter(buffer, &iter);
357 gtk_text_buffer_insert_with_tags(buffer, &iter, _("Homepage:"), -1, tag, NULL);
358 gtk_text_buffer_insert_at_cursor(buffer, " http://aqualung.factorial.hu\n", -1);
359
360 gtk_text_buffer_insert_at_cursor(buffer, "\nCopyright (C) 2004-2014 Tom Szilagyi\n\n\n", -1);
361
362 gtk_text_buffer_get_end_iter(buffer, &iter);
363 gtk_text_buffer_insert_with_tags(buffer, &iter, _("Authors:"), -1, tag, NULL);
364 gtk_text_buffer_insert_at_cursor(buffer, "\n\n", -1);
365 gtk_text_buffer_insert_at_cursor(buffer, _("Core design, engineering & programming:\n"), -1);
366 gtk_text_buffer_insert_at_cursor(buffer, "\tTom Szilagyi <tszilagyi@users.sourceforge.net>\n\n", -1);
367 gtk_text_buffer_insert_at_cursor(buffer, _("Skin support, look & feel, GUI hacks:\n"), -1);
368 gtk_text_buffer_insert_at_cursor(buffer, "\tPeter Szilagyi <peterszilagyi@users.sourceforge.net>\n\n", -1);
369 gtk_text_buffer_insert_at_cursor(buffer, _("Programming, GUI engineering:\n"), -1);
370 gtk_text_buffer_insert_at_cursor(buffer, "\tTomasz Maka <pasp@users.sourceforge.net>\n\n", -1);
371 gtk_text_buffer_insert_at_cursor(buffer, _("OpenBSD compatibility, metadata tweaks:\n"), -1);
372 gtk_text_buffer_insert_at_cursor(buffer, "\tJeremy Evans <code@jeremyevans.net>\n\n", -1);
373 gtk_text_buffer_insert_at_cursor(buffer, _("Miscellaneous, minimalism:\n"), -1);
374 gtk_text_buffer_insert_at_cursor(buffer, "\tJamie Heilman <jamie@audible.transient.net>\n\n\n", -1);
375
376 gtk_text_buffer_get_end_iter(buffer, &iter);
377 gtk_text_buffer_insert_with_tags(buffer, &iter, _("Translators:"), -1, tag, NULL);
378 gtk_text_buffer_insert_at_cursor(buffer, "\n\n", -1);
379 gtk_text_buffer_insert_at_cursor(buffer, _("Chinese (simplified):\n"), -1);
380 gtk_text_buffer_insert_at_cursor(buffer, "\tYinghua Wang <wantinghard@gmail.com>\n\n", -1);
381 gtk_text_buffer_insert_at_cursor(buffer, _("Czech:\n"), -1);
382 gtk_text_buffer_insert_at_cursor(buffer, "\tPavel Fric <pavelfric@seznam.cz>\n\n", -1);
383 gtk_text_buffer_insert_at_cursor(buffer, _("Dutch:\n"), -1);
384 gtk_text_buffer_insert_at_cursor(buffer, "\tIvo van Poorten <ivop@free.fr>\n\n", -1);
385 gtk_text_buffer_insert_at_cursor(buffer, _("French:\n"), -1);
386 gtk_text_buffer_insert_at_cursor(buffer, "\tJulien Lavergne <gilir@ubuntu.com>\n", -1);
387 gtk_text_buffer_insert_at_cursor(buffer, "\tLouis Opter <kalessin@kalessin.fr>\n\n", -1);
388 gtk_text_buffer_insert_at_cursor(buffer, _("German:\n"), -1);
389 gtk_text_buffer_insert_at_cursor(buffer, "\tWolfgang St\303\266ggl <c72578@yahoo.de>\n\n", -1);
390 gtk_text_buffer_insert_at_cursor(buffer, _("Hungarian:\n"), -1);
391 gtk_text_buffer_insert_at_cursor(buffer, "\tPeter Szilagyi <peterszilagyi@users.sourceforge.net>\n\n", -1);
392 gtk_text_buffer_insert_at_cursor(buffer, _("Italian:\n"), -1);
393 gtk_text_buffer_insert_at_cursor(buffer, "\tMichele Petrecca <michelinux@alice.it>\n\n", -1);
394 gtk_text_buffer_insert_at_cursor(buffer, _("Japanese:\n"), -1);
395 gtk_text_buffer_insert_at_cursor(buffer, "\tNorihiro Yoneda <aoba@avis.ne.jp>\n\n", -1);
396 gtk_text_buffer_insert_at_cursor(buffer, _("Polish:\n"), -1);
397 gtk_text_buffer_insert_at_cursor(buffer, "\tRobert Wojewódzki <robwoj44@poczta.onet.pl>\n\n", -1);
398 gtk_text_buffer_insert_at_cursor(buffer, _("Russian:\n"), -1);
399 gtk_text_buffer_insert_at_cursor(buffer, "\tAlexander Ilyashov <alexander.ilyashov@gmail.com>\n", -1);
400 gtk_text_buffer_insert_at_cursor(buffer, "\tVladimir Smolyar <v_2e@ukr.net>\n\n", -1);
401 gtk_text_buffer_insert_at_cursor(buffer, _("Spanish:\n"), -1);
402 gtk_text_buffer_insert_at_cursor(buffer, "\tJorge Andrés Alvarez Oré <winninglero@gmail.com>\n\n", -1);
403 gtk_text_buffer_insert_at_cursor(buffer, _("Swedish:\n"), -1);
404 gtk_text_buffer_insert_at_cursor(buffer, "\tNiklas 'Nixon' Grahn <terra.unknown@yahoo.com>\n\n", -1);
405 gtk_text_buffer_insert_at_cursor(buffer, _("Ukrainian:\n"), -1);
406 gtk_text_buffer_insert_at_cursor(buffer, "\tSergiy Niskorodov <sgh_punk@users.sourceforge.net>\n", -1);
407 gtk_text_buffer_insert_at_cursor(buffer, "\tVladimir Smolyar <v_2e@ukr.net>\n\n\n", -1);
408
409 gtk_text_buffer_get_end_iter(buffer, &iter);
410 gtk_text_buffer_insert_with_tags(buffer, &iter, _("Graphics:"), -1, tag, NULL);
411 gtk_text_buffer_insert_at_cursor(buffer, "\n\n", -1);
412 gtk_text_buffer_insert_at_cursor(buffer, _("Logo, icons:\n"), -1);
413 gtk_text_buffer_insert_at_cursor(buffer, "\tMaja Kocon <ironya@pinky-babble.org>\n\n\n", -1);
414
415
416 gtk_text_buffer_get_end_iter(buffer, &iter);
417 gtk_text_buffer_insert_with_tags(buffer, &iter,
418 _("This Aqualung binary is compiled with:"), -1, tag, NULL);
419 gtk_text_buffer_insert_at_cursor(buffer, "\n", -1);
420 gtk_text_buffer_get_end_iter(buffer, &iter);
421 gtk_text_buffer_insert_with_tags(buffer, &iter, build_info, -1,
422 tag2, NULL);
423 g_free(build_info);
424
425
426 gtk_text_buffer_insert_at_cursor(buffer, "\n\n", -1);
427 gtk_text_buffer_insert_at_cursor(buffer,
428 _("This program is free software; you can redistribute it and/or modify "
429 "it under the terms of the GNU General Public License as published by "
430 "the Free Software Foundation; either version 2 of the License, or "
431 "(at your option) any later version.\n\n"
432 "This program is distributed in the hope that it will be useful, "
433 "but WITHOUT ANY WARRANTY; without even the implied warranty of "
434 "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the "
435 "GNU General Public License for more details.\n\n"
436 "You should have received a copy of the GNU General Public License "
437 "along with this program; if not, write to the Free Software "
438 "Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA."), -1);
439
440 gtk_text_buffer_get_iter_at_offset(buffer, &iter, 0);
441 gtk_text_buffer_place_cursor(buffer, &iter);
442
443 gtk_box_pack_end(GTK_BOX(vbox), frame, TRUE, TRUE, 6);
444 gtk_container_add(GTK_CONTAINER(frame), scrolled_win);
445 gtk_container_add(GTK_CONTAINER(scrolled_win), view);
446
447 sprintf(path, "%s/logo.png", AQUALUNG_DATADIR);
448 if ((pixbuf = gdk_pixbuf_new_from_file(path, NULL)) != NULL) {
449 xpm = gtk_image_new_from_pixbuf (pixbuf);
450 gtk_box_pack_start(GTK_BOX(vbox0), xpm, FALSE, FALSE, 0);
451 gtk_widget_show(xpm);
452 }
453
454 gtk_widget_show_all(about_window);
455
456 gtk_widget_grab_focus(ok_btn);
457 }
458
459 // vim: shiftwidth=8:tabstop=8:softtabstop=8 :
460
461