2005-09-25 14:42:24 -04:00
|
|
|
/*
|
|
|
|
Copyright (C) 2003 Paul Davis
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <algorithm>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/wait.h>
|
|
|
|
#include <cstdio>
|
|
|
|
#include <ctime>
|
|
|
|
#include <cstdlib>
|
|
|
|
|
2007-06-27 08:12:52 -04:00
|
|
|
#include <pbd/file_utils.h>
|
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
#include <ardour/ardour.h>
|
|
|
|
#include <ardour/version.h>
|
2007-06-27 08:12:52 -04:00
|
|
|
#include <ardour/filesystem_paths.h>
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
#include "utils.h"
|
|
|
|
#include "version.h"
|
|
|
|
|
2006-11-12 15:41:06 -05:00
|
|
|
#include "svn_revision.h"
|
2005-09-25 14:42:24 -04:00
|
|
|
#include "about.h"
|
|
|
|
#include "rgb_macros.h"
|
|
|
|
#include "ardour_ui.h"
|
|
|
|
|
|
|
|
#include "i18n.h"
|
|
|
|
|
|
|
|
using namespace Gtk;
|
2005-09-25 22:09:02 -04:00
|
|
|
using namespace Gdk;
|
2005-09-25 14:42:24 -04:00
|
|
|
using namespace std;
|
2005-09-25 16:33:00 -04:00
|
|
|
using namespace sigc;
|
2005-09-25 14:42:24 -04:00
|
|
|
using namespace ARDOUR;
|
2006-06-21 19:01:03 -04:00
|
|
|
using namespace PBD;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
#ifdef WITH_PAYMENT_OPTIONS
|
|
|
|
|
|
|
|
/* XPM */
|
|
|
|
static const gchar * paypal_xpm[] = {
|
|
|
|
"62 31 33 1",
|
|
|
|
" c None",
|
|
|
|
". c #325781",
|
|
|
|
"+ c #154170",
|
|
|
|
"@ c #C1CDDA",
|
|
|
|
"# c #4E6E92",
|
|
|
|
"$ c #D1D5DA",
|
|
|
|
"% c #88A0B8",
|
|
|
|
"& c #B4C4D3",
|
|
|
|
"* c #C8D3DE",
|
|
|
|
"= c #D7E1E9",
|
|
|
|
"- c #002158",
|
|
|
|
"; c #F6F8FA",
|
|
|
|
"> c #44658B",
|
|
|
|
", c #E7ECF0",
|
|
|
|
"' c #A4B7CA",
|
|
|
|
") c #9DB0C4",
|
|
|
|
"! c #E3F1F7",
|
|
|
|
"~ c #708CA9",
|
|
|
|
"{ c #E1E7ED",
|
|
|
|
"] c #567698",
|
|
|
|
"^ c #7C96B1",
|
|
|
|
"/ c #E7F5FA",
|
|
|
|
"( c #EEF1F4",
|
|
|
|
"_ c #6883A2",
|
|
|
|
": c #244873",
|
|
|
|
"< c #BBBBBB",
|
|
|
|
"[ c #E9E9E9",
|
|
|
|
"} c #063466",
|
|
|
|
"| c #22364D",
|
|
|
|
"1 c #94A7BD",
|
|
|
|
"2 c #000000",
|
|
|
|
"3 c #EAF7FC",
|
|
|
|
"4 c #FFFFFF",
|
|
|
|
"1'111111111111111111111111111111111111111111111111111111111%_#",
|
|
|
|
"%333333333333333333333333333333333333333333333333333333333333.",
|
|
|
|
"%444444444444444444444444444444444444444444444444444444444444:",
|
|
|
|
"_4333333!!!!!!33333333333333333333!!!!!!33333333333!%%%%1334[:",
|
|
|
|
"_444444@+}}}}+>)44444444444444444,:}}}}}.^(44444444@}..+.44($:",
|
|
|
|
"_433333^:&&&&)_}_33///33333333333&+)&&&'~+./3///333^.(;#]33($:",
|
|
|
|
"_444444>_444444'}_>...#%####~,]##..444444=+#]...>1;#_4;.144($:",
|
|
|
|
"_43333!+'4,>#=4(:+_%%%]}}#~#}_+~~:]44_>&44#}_%%%_+>:14=}@33($:",
|
|
|
|
"_44444*+$4&--)4(+%44444%-)4=--'4{+14,}-~44##44444&}}*4)+444($:",
|
|
|
|
"_433331:;4):_;4*}_]:.$4*-~4{}>44#-=4@.#{4;+>_:.&4,++;4_#333($:",
|
|
|
|
"_44444_#444444=.-.%&*,41-#4(:@4'-:(44444(_-:^&*,4*}#44.%444($:",
|
|
|
|
"_43333:%4;@@'~+-%44*&44]-.;;'4,:-#44*@&%:-];4{'(4)-%4{+&333($:",
|
|
|
|
"_4444{}@4*}}+>#:;4^-#4;.>+,444_+:^4(:}+.]}=4'-+(4_-&4&+{444($:",
|
|
|
|
"_4333'+(41:*=3'.44*)(4=+)+*44@}%+@4=}&=/@}{4{1{44:+,4^.3333($:",
|
|
|
|
"_4444~>,,]#444*})(;**,':*}'4;._@}=,%:444(+~(;{&,*}.,,>~4444($:",
|
|
|
|
"_4333>}}}}^3333~}::}}}}>].;4^+=~}}}}]3333'}+:}}}}}}}}}'3333($:",
|
|
|
|
"_4444$@@@@(44444$))@*@*^}$4=}14=@@@@{44444=))&*@@@@@@@;4444($:",
|
|
|
|
"_433333333333333333333=+:%%.>/33333333333333333333333333333($:",
|
|
|
|
"_4444444444444444444441....>=444444444444444444444444444444($:",
|
|
|
|
"_4333333333333333333333333333333333333333333333333333333333($:",
|
|
|
|
"_4444444444444444444444444444444444444444444444444444444444($:",
|
|
|
|
"_4333333333333333333333333333333333333333333333333333333333($:",
|
|
|
|
"_4444442222444222442444242444244222242444242222244222244444($:",
|
|
|
|
"_4333332333232333233232332232233233332233233323332333333333($:",
|
|
|
|
"_4444442222442222244424442424244222442424244424444222444444($:",
|
|
|
|
"_4333332333332333233323332333233233332332233323333333233333($:",
|
|
|
|
"_4444442444442444244424442444244222242444244424442222444444($:",
|
|
|
|
"_433333333333333333333333333333333333333333333333333333333344:",
|
|
|
|
"#4([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[=&:",
|
|
|
|
".=&<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<1|",
|
|
|
|
"::||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||"};
|
|
|
|
#endif
|
|
|
|
|
2005-09-25 22:09:02 -04:00
|
|
|
static const char* authors[] = {
|
|
|
|
N_("Paul Davis"),
|
|
|
|
N_("Jesse Chappell"),
|
|
|
|
N_("Taybin Rutkin"),
|
2005-09-25 14:42:24 -04:00
|
|
|
N_("Marcus Andersson"),
|
|
|
|
N_("Jeremy Hall"),
|
|
|
|
N_("Steve Harris"),
|
|
|
|
N_("Tim Mayberry"),
|
|
|
|
N_("Mark Stewart"),
|
|
|
|
N_("Sam Chessman"),
|
|
|
|
N_("Jack O'Quin"),
|
|
|
|
N_("Matt Krai"),
|
|
|
|
N_("Ben Bell"),
|
|
|
|
N_("Gerard van Dongen"),
|
|
|
|
N_("Thomas Charbonnel"),
|
|
|
|
N_("Nick Mainsbridge"),
|
|
|
|
N_("Colin Law"),
|
|
|
|
N_("Sampo Savolainen"),
|
|
|
|
N_("Joshua Leach"),
|
|
|
|
N_("Rob Holland"),
|
|
|
|
N_("Per Sigmond"),
|
|
|
|
N_("Doug Mclain"),
|
2005-11-14 10:55:36 -05:00
|
|
|
N_("Petter Sundlöf"),
|
2006-10-26 10:14:21 -04:00
|
|
|
N_("Thorsten Wilms"),
|
2006-10-26 07:45:57 -04:00
|
|
|
N_("Ben Loftis"),
|
2006-10-26 09:14:40 -04:00
|
|
|
N_("Stefan Kersten"),
|
|
|
|
N_("Christopher George"),
|
|
|
|
N_("Robert Jordens"),
|
2007-04-11 09:07:51 -04:00
|
|
|
N_("Dave Robillard"),
|
|
|
|
N_("Hans Fugal"),
|
2006-12-06 14:00:57 -05:00
|
|
|
N_("Brian Ahr"),
|
|
|
|
N_("Nimal Ratnayake"),
|
2007-04-11 09:07:51 -04:00
|
|
|
N_("Mike Täht"),
|
|
|
|
N_("John Anderson"),
|
|
|
|
N_("Nedko Arnaudov"),
|
2007-04-26 16:54:31 -04:00
|
|
|
N_("Carl Hetherington"),
|
2008-01-10 17:22:29 -05:00
|
|
|
N_("Colin Fletcher"),
|
2008-01-18 22:49:52 -05:00
|
|
|
N_("Roland Stigge"),
|
|
|
|
N_("Audun Halland"),
|
2008-03-17 16:54:03 -04:00
|
|
|
N_("Armand Klenk"),
|
2005-09-25 14:42:24 -04:00
|
|
|
0
|
|
|
|
};
|
|
|
|
|
|
|
|
static const char* translators[] = {
|
2006-11-06 15:35:44 -05:00
|
|
|
N_("French:\n\tAlain Fréhel <alain.frehel@free.fr>\n\tChristophe Combelles <ccomb@free.fr>\n"),
|
2007-04-11 09:07:51 -04:00
|
|
|
N_("German:\n\tKarsten Petersen <kapet@kapet.de>\n\tSebastian Arnold <mail@sebastian-arnold.net>\n"),
|
2006-03-09 22:16:38 -05:00
|
|
|
N_("Italian:\n\tFilippo Pappalardo <filippo@email.it>\n"),
|
|
|
|
N_("Portuguese:\n\tRui Nuno Capela <rncbc@rncbc.org>\n"),
|
2005-09-25 14:42:24 -04:00
|
|
|
N_("Brazilian Portuguese:\n\tAlexander da Franca Fernandes <alexander@nautae.eti.br>\
|
2006-03-09 22:16:38 -05:00
|
|
|
\n\tChris Ross <chris@tebibyte.org>\n"),
|
|
|
|
N_("Spanish:\n\t Alex Krohn <alexkrohn@fastmail.fm>\n"),
|
|
|
|
N_("Russian:\n\t Igor Blinov <pitstop@nm.ru>\n"),
|
2007-04-26 16:54:31 -04:00
|
|
|
N_("Greek:\n\t Klearchos Gourgourinis <muadib@in.gr>\n"),
|
2008-04-11 10:06:50 -04:00
|
|
|
N_("Swedish:\n\t Petter Sundlöf <petter.sundlof@gmail.com>\n"),
|
|
|
|
N_("Polish:\n\t Piotr Zaryk <pzaryk@gmail.com>\n"),
|
2005-09-25 14:42:24 -04:00
|
|
|
0
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2005-09-25 22:09:02 -04:00
|
|
|
About::About ()
|
2005-09-25 14:42:24 -04:00
|
|
|
#ifdef WITH_PAYMENT_OPTIONS
|
2005-09-25 22:09:02 -04:00
|
|
|
: paypal_pixmap (paypal_xpm)
|
2005-09-25 14:42:24 -04:00
|
|
|
#endif
|
|
|
|
{
|
2008-01-18 22:49:52 -05:00
|
|
|
// set_type_hint(Gdk::WINDOW_TYPE_HINT_SPLASHSCREEN);
|
2006-01-04 00:53:51 -05:00
|
|
|
|
2005-09-25 22:09:02 -04:00
|
|
|
string path;
|
|
|
|
string t;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2007-06-27 08:12:52 -04:00
|
|
|
sys::path splash_file;
|
|
|
|
|
|
|
|
SearchPath spath(ardour_search_path() + system_data_search_path());
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2007-06-27 08:12:52 -04:00
|
|
|
if (find_file_in_search_path (spath, "splash.png", splash_file)) {
|
|
|
|
set_logo (Gdk::Pixbuf::create_from_file (splash_file.to_string()));
|
|
|
|
} else {
|
|
|
|
error << "Could not find splash file" << endmsg;
|
|
|
|
}
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2005-09-25 22:09:02 -04:00
|
|
|
set_authors (authors);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2005-09-25 22:09:02 -04:00
|
|
|
for (int n = 0; translators[n]; ++n) {
|
|
|
|
t += translators[n];
|
|
|
|
t += ' ';
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
|
2005-09-25 22:09:02 -04:00
|
|
|
set_translator_credits (t);
|
2008-01-10 17:22:29 -05:00
|
|
|
set_copyright (_("Copyright (C) 1999-2008 Paul Davis\n"));
|
2005-09-25 22:09:02 -04:00
|
|
|
set_license (_("Ardour comes with ABSOLUTELY NO WARRANTY\n"
|
|
|
|
"This is free software, and you are welcome to redistribute it\n"
|
|
|
|
"under certain conditions; see the file COPYING for details.\n"));
|
|
|
|
set_name (X_("ardour"));
|
|
|
|
set_website (X_("http://ardour.org/"));
|
2006-11-02 20:42:51 -05:00
|
|
|
set_website_label (_("visit http://www.ardour.org/"));
|
2006-10-26 10:13:10 -04:00
|
|
|
set_version ((string_compose(_("%1\n(built from revision %2)"),
|
2006-08-24 21:07:15 -04:00
|
|
|
VERSIONSTRING,
|
2006-11-12 15:41:06 -05:00
|
|
|
ardour_svn_revision)));
|
2006-10-26 09:14:40 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
#ifdef WITH_PAYMENT_OPTIONS
|
|
|
|
paypal_button.add (paypal_pixmap);
|
|
|
|
|
|
|
|
HBox *payment_box = manage (new HBox);
|
|
|
|
payment_box->pack_start (paypal_button, true, false);
|
|
|
|
|
|
|
|
subvbox.pack_start (*payment_box, false, false);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
About::~About ()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef WITH_PAYMENT_OPTIONS
|
|
|
|
void
|
|
|
|
About::goto_paypal ()
|
|
|
|
{
|
|
|
|
char buf[PATH_MAX+16];
|
|
|
|
char *argv[4];
|
|
|
|
char *docfile = "foo";
|
|
|
|
int grandchild;
|
|
|
|
|
|
|
|
if (fork() == 0) {
|
|
|
|
|
|
|
|
/* child */
|
|
|
|
|
|
|
|
if ((grandchild = fork()) == 0) {
|
|
|
|
|
|
|
|
/* grandchild */
|
|
|
|
|
|
|
|
argv[0] = "mozilla";
|
|
|
|
argv[1] = "-remote";
|
|
|
|
snprintf (buf, sizeof(buf), "openurl(%s)", docfile);
|
|
|
|
argv[2] = buf;
|
|
|
|
argv[3] = 0;
|
|
|
|
|
|
|
|
execvp ("mozilla", argv);
|
|
|
|
error << "could not start mozilla" << endmsg;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
int status;
|
|
|
|
waitpid (grandchild, &status, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|