AU state handling, including changes to PathScanner so that it can now do recursive...
[ardour2.git] / gtk2_ardour / about.cc
bloba0e97c9209a07676b0b16b69f8b3cd03398c6f38
1 /*
2 Copyright (C) 2003 Paul Davis
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.
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.
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.
20 #include <algorithm>
21 #include <unistd.h>
22 #include <sys/types.h>
23 #include <sys/wait.h>
24 #include <cstdio>
25 #include <ctime>
26 #include <cstdlib>
28 #include <ardour/svn_revision.h>
29 #include <ardour/ardour.h>
30 #include <ardour/version.h>
32 #include "utils.h"
33 #include "version.h"
35 #include "about.h"
36 #include "rgb_macros.h"
37 //#include "ardour_ui.h"
39 #include "i18n.h"
41 using namespace Gtk;
42 using namespace Gdk;
43 using namespace std;
44 using namespace sigc;
45 using namespace ARDOUR;
46 using namespace PBD;
48 #ifdef WITH_PAYMENT_OPTIONS
50 /* XPM */
51 static const gchar * paypal_xpm[] = {
52 "62 31 33 1",
53 " c None",
54 ". c #325781",
55 "+ c #154170",
56 "@ c #C1CDDA",
57 "# c #4E6E92",
58 "$ c #D1D5DA",
59 "% c #88A0B8",
60 "& c #B4C4D3",
61 "* c #C8D3DE",
62 "= c #D7E1E9",
63 "- c #002158",
64 "; c #F6F8FA",
65 "> c #44658B",
66 ", c #E7ECF0",
67 "' c #A4B7CA",
68 ") c #9DB0C4",
69 "! c #E3F1F7",
70 "~ c #708CA9",
71 "{ c #E1E7ED",
72 "] c #567698",
73 "^ c #7C96B1",
74 "/ c #E7F5FA",
75 "( c #EEF1F4",
76 "_ c #6883A2",
77 ": c #244873",
78 "< c #BBBBBB",
79 "[ c #E9E9E9",
80 "} c #063466",
81 "| c #22364D",
82 "1 c #94A7BD",
83 "2 c #000000",
84 "3 c #EAF7FC",
85 "4 c #FFFFFF",
86 "1'111111111111111111111111111111111111111111111111111111111%_#",
87 "%333333333333333333333333333333333333333333333333333333333333.",
88 "%444444444444444444444444444444444444444444444444444444444444:",
89 "_4333333!!!!!!33333333333333333333!!!!!!33333333333!%%%%1334[:",
90 "_444444@+}}}}+>)44444444444444444,:}}}}}.^(44444444@}..+.44($:",
91 "_433333^:&&&&)_}_33///33333333333&+)&&&'~+./3///333^.(;#]33($:",
92 "_444444>_444444'}_>...#%####~,]##..444444=+#]...>1;#_4;.144($:",
93 "_43333!+'4,>#=4(:+_%%%]}}#~#}_+~~:]44_>&44#}_%%%_+>:14=}@33($:",
94 "_44444*+$4&--)4(+%44444%-)4=--'4{+14,}-~44##44444&}}*4)+444($:",
95 "_433331:;4):_;4*}_]:.$4*-~4{}>44#-=4@.#{4;+>_:.&4,++;4_#333($:",
96 "_44444_#444444=.-.%&*,41-#4(:@4'-:(44444(_-:^&*,4*}#44.%444($:",
97 "_43333:%4;@@'~+-%44*&44]-.;;'4,:-#44*@&%:-];4{'(4)-%4{+&333($:",
98 "_4444{}@4*}}+>#:;4^-#4;.>+,444_+:^4(:}+.]}=4'-+(4_-&4&+{444($:",
99 "_4333'+(41:*=3'.44*)(4=+)+*44@}%+@4=}&=/@}{4{1{44:+,4^.3333($:",
100 "_4444~>,,]#444*})(;**,':*}'4;._@}=,%:444(+~(;{&,*}.,,>~4444($:",
101 "_4333>}}}}^3333~}::}}}}>].;4^+=~}}}}]3333'}+:}}}}}}}}}'3333($:",
102 "_4444$@@@@(44444$))@*@*^}$4=}14=@@@@{44444=))&*@@@@@@@;4444($:",
103 "_433333333333333333333=+:%%.>/33333333333333333333333333333($:",
104 "_4444444444444444444441....>=444444444444444444444444444444($:",
105 "_4333333333333333333333333333333333333333333333333333333333($:",
106 "_4444444444444444444444444444444444444444444444444444444444($:",
107 "_4333333333333333333333333333333333333333333333333333333333($:",
108 "_4444442222444222442444242444244222242444242222244222244444($:",
109 "_4333332333232333233232332232233233332233233323332333333333($:",
110 "_4444442222442222244424442424244222442424244424444222444444($:",
111 "_4333332333332333233323332333233233332332233323333333233333($:",
112 "_4444442444442444244424442444244222242444244424442222444444($:",
113 "_433333333333333333333333333333333333333333333333333333333344:",
114 "#4([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[=&:",
115 ".=&<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<1|",
116 "::||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||"};
117 #endif
119 static const char* authors[] = {
120 N_("Brian Ahr"),
121 N_("John Anderson"),
122 N_("Marcus Andersson"),
123 N_("Nedko Arnaudov"),
124 N_("Ben Bell"),
125 N_("Chris Cannam"),
126 N_("Jesse Chappell"),
127 N_("Thomas Charbonnel"),
128 N_("Sam Chessman"),
129 N_("Paul Davis"),
130 N_("Gerard van Dongen"),
131 N_("Colin Fletcher"),
132 N_("Hans Fugal"),
133 N_("Christopher George"),
134 N_("Jeremy Hall"),
135 N_("Audun Halland"),
136 N_("Steve Harris"),
137 N_("Carl Hetherington"),
138 N_("Rob Holland"),
139 N_("Robert Jordens"),
140 N_("Stefan Kersten"),
141 N_("Armand Klenk"),
142 N_("Matt Krai"),
143 N_("Colin Law"),
144 N_("Joshua Leach"),
145 N_("Ben Loftis"),
146 N_("Nick Mainsbridge"),
147 N_("Tim Mayberry"),
148 N_("Doug Mclain"),
149 N_("Jack O'Quin"),
150 N_("Nimal Ratnayake"),
151 N_("Dave Robillard"),
152 N_("Taybin Rutkin"),
153 N_("Sampo Savolainen"),
154 N_("Per Sigmond"),
155 N_("Mark Stewart"),
156 N_("Roland Stigge"),
157 N_("Petter Sundlöf"),
158 N_("Mike Täht"),
159 N_("Thorsten Wilms"),
163 static const char* translators[] = {
164 N_("French:\n\tAlain Fréhel <alain.frehel@free.fr>\n\tChristophe Combelles <ccomb@free.fr>\n"),
165 N_("German:\n\tKarsten Petersen <kapet@kapet.de>\
166 \n\tSebastian Arnold <mail@sebastian-arnold.net>\
167 \n\tRobert Schwede<schwede@ironshark.com>\n"),
168 N_("Italian:\n\tFilippo Pappalardo <filippo@email.it>\n"),
169 N_("Portuguese:\n\tRui Nuno Capela <rncbc@rncbc.org>\n"),
170 N_("Brazilian Portuguese:\n\tAlexander da Franca Fernandes <alexander@nautae.eti.br>\
171 \n\tChris Ross <chris@tebibyte.org>\n"),
172 N_("Spanish:\n\t Alex Krohn <alexkrohn@fastmail.fm>\n"),
173 N_("Russian:\n\t Igor Blinov <pitstop@nm.ru>\n"),
174 N_("Greek:\n\t Klearchos Gourgourinis <muadib@in.gr>\n"),
175 N_("Swedish:\n\t Petter Sundlöf <petter.sundlof@gmail.com>\n"),
176 N_("Polish:\n\t Piotr Zaryk <pzaryk@gmail.com>\n"),
181 About::About ()
182 #ifdef WITH_PAYMENT_OPTIONS
183 : paypal_pixmap (paypal_xpm)
184 #endif
186 // set_type_hint(Gdk::WINDOW_TYPE_HINT_SPLASHSCREEN);
188 string path;
189 string t;
191 path = find_data_file ("splash.png");
193 Glib::RefPtr<Pixbuf> pixbuf = Gdk::Pixbuf::create_from_file (path);
195 set_logo (Gdk::Pixbuf::create_from_file (path));
196 set_authors (authors);
198 for (int n = 0; translators[n]; ++n) {
199 t += translators[n];
200 t += ' ';
203 set_translator_credits (t);
204 set_copyright (_("Copyright (C) 1999-2008 Paul Davis\n"));
205 set_license (_("Ardour comes with ABSOLUTELY NO WARRANTY\n"
206 "This is free software, and you are welcome to redistribute it\n"
207 "under certain conditions; see the file COPYING for details.\n"));
208 set_name (X_("ardour"));
209 set_website (X_("http://ardour.org/"));
210 set_website_label (_("visit http://www.ardour.org/"));
211 set_version ((string_compose(_("%1\n(built from revision %2)"),
212 VERSIONSTRING,
213 svn_revision)));
216 #ifdef WITH_PAYMENT_OPTIONS
217 paypal_button.add (paypal_pixmap);
219 HBox *payment_box = manage (new HBox);
220 payment_box->pack_start (paypal_button, true, false);
222 subvbox.pack_start (*payment_box, false, false);
223 #endif
227 About::~About ()
231 #ifdef WITH_PAYMENT_OPTIONS
232 void
233 About::goto_paypal ()
235 char buf[PATH_MAX+16];
236 char *argv[4];
237 char *docfile = "foo";
238 int grandchild;
240 if (fork() == 0) {
242 /* child */
244 if ((grandchild = fork()) == 0) {
246 /* grandchild */
248 argv[0] = "mozilla";
249 argv[1] = "-remote";
250 snprintf (buf, sizeof(buf), "openurl(%s)", docfile);
251 argv[2] = buf;
252 argv[3] = 0;
254 execvp ("mozilla", argv);
255 error << "could not start mozilla" << endmsg;
257 } else {
258 int status;
259 waitpid (grandchild, &status, 0);
264 #endif