Make foldback bus match foldback sends namewise
[ardour.git] / gtk2_ardour / about.cc
index b656c29ad8175fde37d430a630095338fe0c6e93..0066074d207d5c7c9d33a2ce495883ef1b8604c1 100644 (file)
 #include <ctime>
 #include <cstdlib>
 
+#include "pbd/error.h"
 #include "pbd/file_utils.h"
+#include "pbd/openuri.h"
 
+#include "ardour/profile.h"
 #include "ardour/revision.h"
-#include "ardour/version.h"
 #include "ardour/filesystem_paths.h"
 
-#include "utils.h"
-#include "version.h"
-
 #include "about.h"
 #include "configinfo.h"
 #include "rgb_macros.h"
-#include "ardour_ui.h"
 
-#include "i18n.h"
+#include "pbd/i18n.h"
+
+#ifdef WAF_BUILD
+#include "gtk2ardour-version.h"
+#endif
 
 using namespace Gtk;
 using namespace Gdk;
@@ -46,6 +48,10 @@ using namespace std;
 using namespace ARDOUR;
 using namespace PBD;
 
+#ifndef CODENAME
+#define CODENAME ""
+#endif
+
 #ifdef WITH_PAYMENT_OPTIONS
 
 /* XPM */
@@ -118,6 +124,7 @@ static const gchar * paypal_xpm[] = {
 #endif
 
 static const char* authors[] = {
+       N_("Fons Adriaensen"),
        N_("Brian Ahr"),
        N_("John Anderson"),
        N_("Marcus Andersson"),
@@ -125,17 +132,22 @@ static const char* authors[] = {
        N_("Hans Baier"),
        N_("Ben Bell"),
        N_("Sakari Bergen"),
+       N_("Christian Borss"),
+       N_("Thomas Brand"),
        N_("Chris Cannam"),
+       N_("Jeremy Carter"),
        N_("Jesse Chappell"),
        N_("Thomas Charbonnel"),
        N_("Sam Chessman"),
        N_("André Colomb"),
        N_("Paul Davis"),
        N_("Gerard van Dongen"),
+       N_("John Emmas"),
        N_("Colin Fletcher"),
        N_("Dave Flick"),
        N_("Hans Fugal"),
        N_("Robin Gareus"),
+       N_("Nil Geisweiller"),
        N_("Christopher George"),
        N_("Chris Goddard"),
        N_("J. Abelardo Gutierrez"),
@@ -151,6 +163,7 @@ static const char* authors[] = {
        N_("Armand Klenk"),
        N_("Julien de Kozak"),
        N_("Matt Krai"),
+       N_("Georg Krause"),
        N_("Nick Lanham"),
        N_("Colin Law"),
        N_("Joshua Leach"),
@@ -158,27 +171,39 @@ static const char* authors[] = {
        N_("Nick Mainsbridge"),
        N_("Tim Mayberry"),
        N_("Doug Mclain"),
+       N_("Johannes Mueller"),
+       N_("Todd Naugle"),
+       N_("André Nusser"),
+       N_("Bent Bisballe Nyeng"),
        N_("Jack O'Quin"),
+       N_("Len Ovens"),
+       N_("Pavel Potocek"),
        N_("Nimal Ratnayake"),
+       N_("Julien Rivaud"),
        N_("David Robillard"),
+       N_("Julien Roger"),
        N_("Taybin Rutkin"),
        N_("Andreas Ruge"),
        N_("Sampo Savolainen"),
        N_("Rodrigo Severo"),
+       N_("Daniel Sheeler"),
        N_("Per Sigmond"),
        N_("Lincoln Spiteri"),
        N_("Mike Start"),
        N_("Mark Stewart"),
+       N_("Nathan Stewart"),
        N_("Roland Stigge"),
        N_("Petter Sundlöf"),
        N_("Mike Täht"),
        N_("Roy Vegard"),
        N_("Thorsten Wilms"),
+       N_("Damien Zammit"),
+       N_("Grygorii Zharun"),
        0
 };
 
 static const char* translators[] = {
-       N_("French:\n\tAlain Fréhel <alain.frehel@free.fr>\n\tChristophe Combelles <ccomb@free.fr>\n\tMartin Blanchard\n\tRomain Arnaud <roming22@gmail.com>\n"),
+       N_("French:\n\tAlain Fréhel <alain.frehel@free.fr>\n\tChristophe Combelles <ccomb@free.fr>\n\tMartin Blanchard\n\tRomain Arnaud <roming22@gmail.com>\n\tOlivier Humbert <trebmuh@tuxfamily.org>\n"),
        N_("German:\n\tKarsten Petersen <kapet@kapet.de>\
 \n\tSebastian Arnold <mail@sebastian-arnold.net>\
 \n\tRobert Schwede <schwede@ironshark.com>\
@@ -199,6 +224,7 @@ static const char* translators[] = {
        N_("Czech:\n\t Pavel Fric <pavelfric@seznam.cz>\n"),
        N_("Norwegian:\n\t Eivind Ødegård\n"),
        N_("Chinese:\n\t Rui-huai Zhang <zrhzrh@mail.ustc.edu.cn>\n"),
+       N_("Japanese:\n\t Hiroki Inagaki <hiroki.ingk@gmail.com>\n"),
        0
 };
 
@@ -263,8 +289,8 @@ patent must be licensed for everyone's free use or not licensed at all.\n\
 \n\
   The precise terms and conditions for copying, distribution and\n\
 modification follow.\n\
-\f\n\
-                   GNU GENERAL PUBLIC LICENSE\n\
+\n\
+""                 GNU GENERAL PUBLIC LICENSE\n\
    TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\
 \n\
   0. This License applies to any program or other work which contains\n\
@@ -318,7 +344,7 @@ above, provided that you also meet all of these conditions:\n\
     License.  (Exception: if the Program itself is interactive but\n\
     does not normally print such an announcement, your work based on\n\
     the Program is not required to print an announcement.)\n\
-\f\n\
+\n\
 These requirements apply to the modified work as a whole.  If\n\
 identifiable sections of that work are not derived from the Program,\n\
 and can be reasonably considered independent and separate works in\n\
@@ -376,7 +402,7 @@ access to copy from a designated place, then offering equivalent\n\
 access to copy the source code from the same place counts as\n\
 distribution of the source code, even though third parties are not\n\
 compelled to copy the source along with the object code.\n\
-\f\n\
+\n\
   4. You may not copy, modify, sublicense, or distribute the Program\n\
 except as expressly provided under this License.  Any attempt\n\
 otherwise to copy, modify, sublicense or distribute the Program is\n\
@@ -433,7 +459,7 @@ impose that choice.\n\
 \n\
 This section is intended to make thoroughly clear what is believed to\n\
 be a consequence of the rest of this License.\n\
-\f\n\
+\n\
   8. If the distribution and/or use of the Program is restricted in\n\
 certain countries either by patents or by copyrighted interfaces, the\n\
 original copyright holder who places the Program under this License\n\
@@ -486,67 +512,9 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\n\
 POSSIBILITY OF SUCH DAMAGES.\n\
 \n\
                     END OF TERMS AND CONDITIONS\n\
-\f\n\
-           How to Apply These Terms to Your New Programs\n\
-\n\
-  If you develop a new program, and you want it to be of the greatest\n\
-possible use to the public, the best way to achieve this is to make it\n\
-free software which everyone can redistribute and change under these terms.\n\
-\n\
-  To do so, attach the following notices to the program.  It is safest\n\
-to attach them to the start of each source file to most effectively\n\
-convey the exclusion of warranty; and each file should have at least\n\
-the \"copyright\" line and a pointer to where the full notice is found.\n\
-\n\
-    <one line to give the program's name and a brief idea of what it does.>\n\
-    Copyright (C) <year>  <name of author>\n\
-\n\
-    This program is free software; you can redistribute it and/or modify\n\
-    it under the terms of the GNU General Public License as published by\n\
-    the Free Software Foundation; either version 2 of the License, or\n\
-    (at your option) any later version.\n\
-\n\
-    This program is distributed in the hope that it will be useful,\n\
-    but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n\
-    GNU General Public License for more details.\n\
-\n\
-    You should have received a copy of the GNU General Public License\n\
-    along with this program; if not, write to the Free Software\n\
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n\
-\n\
-\n\
-Also add information on how to contact you by electronic and paper mail.\n\
-\n\
-If the program is interactive, make it output a short notice like this\n\
-when it starts in an interactive mode:\n\
-\n\
-    Gnomovision version 69, Copyright (C) year  name of author\n\
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n\
-    This is free software, and you are welcome to redistribute it\n\
-    under certain conditions; type `show c' for details.\n\
-\n\
-The hypothetical commands `show w' and `show c' should show the appropriate\n\
-parts of the General Public License.  Of course, the commands you use may\n\
-be called something other than `show w' and `show c'; they could even be\n\
-mouse-clicks or menu items--whatever suits your program.\n\
-\n\
-You should also get your employer (if you work as a programmer) or your\n\
-school, if any, to sign a \"copyright disclaimer\" for the program, if\n\
-necessary.  Here is a sample; alter the names:\n\
-\n\
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program\n\
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.\n\
-\n\
-  <signature of Ty Coon>, 1 April 1989\n\
-  Ty Coon, President of Vice\n\
-\n\
-This General Public License does not permit incorporating your program into\n\
-proprietary programs.  If your program is a subroutine library, you may\n\
-consider it more useful to permit linking proprietary applications with the\n\
-library.  If this is what you want to do, use the GNU Library General\n\
-Public License instead of this License.\n\
-");
+"); /* Note that at the start of (approximately) line 265, the above license
+       text has been split into two concatenated tokens (to satisfy compilation
+       under MSVC). Hopefully this won't affect gcc */
 
 About::About ()
        : config_info (0)
@@ -561,8 +529,9 @@ About::About ()
        std::string splash_file;
 
        Searchpath spath(ardour_data_search_path());
+       spath.add_subdirectory_to_paths ("resources");
 
-       if (find_file_in_search_path (spath, "splash.png", splash_file)) {
+       if (find_file (spath, PROGRAM_NAME "-splash.png", splash_file)) {
                set_logo (Gdk::Pixbuf::create_from_file (splash_file));
        } else {
                error << "Could not find splash file" << endmsg;
@@ -575,15 +544,40 @@ About::About ()
                t += ' ';
        }
 
+#if defined __x86_64__ || defined _M_X64
+       const std::string cpu_arch = _("Intel 64-bit");
+#elif defined __i386__  || defined _M_IX86
+       const std::string cpu_arch = _("Intel 32-bit");
+#elif defined __ppc__ && defined  __LP64__
+       const std::string cpu_arch = _("PowerPC 64-bit");
+#elif defined __ppc__
+       const std::string cpu_arch = _("PowerPC 32-bit");
+#elif defined  __LP64__
+       const std::string cpu_arch = _("64-bit");
+#else
+       const std::string cpu_arch = _("32-bit"); // ARM, ALPHA,..
+#endif
+       std::string codename = CODENAME;
+       if (ARDOUR::Profile->get_mixbus() || ARDOUR::Profile->get_trx()) {
+               codename = "";
+       }
+
+#ifndef NDEBUG
+       const std::string suffix = _(" - debug");
+#else
+       const std::string suffix = "";
+#endif
+
        set_translator_credits (t);
-       set_copyright (_("Copyright (C) 1999-2013 Paul Davis\n"));
+       set_copyright (_("Copyright (C) 1999-2018 Paul Davis\n"));
        set_license (gpl);
        set_name (X_("Ardour"));
        set_website (X_("http://ardour.org/"));
        set_website_label (_("http://ardour.org/"));
-       set_version ((string_compose(_("%1\n(built from revision %2)"),
+       set_version ((string_compose(_("%1%2\n(rev %3)\n%4%5"),
                                     VERSIONSTRING,
-                                    revision)));
+                                    codename,
+                                    revision, cpu_arch, suffix)));
 
        Gtk::Button* config_button = manage (new Button (_("Config")));
 
@@ -595,6 +589,7 @@ About::About ()
        if (btn) {
                btn->signal_clicked().connect(sigc::mem_fun(static_cast<Gtk::Window*>(this), &Gtk::Window::hide));
        }
+       set_url_hook (sigc::ptr_fun(&About::launch_homepage));
 }
 
 About::~About ()
@@ -613,3 +608,8 @@ About::show_config_info ()
        config_info->hide ();
 }
 
+void
+About::launch_homepage (AboutDialog& /* about */, const Glib::ustring& website_url)
+{
+       PBD::open_uri (website_url);
+}