diff options
author | Luke Dashjr <luke-jr+git@utopios.org> | 2015-12-22 12:29:13 +0000 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2015-12-22 12:29:18 +0000 |
commit | 917b1d03cf3afa6939113e2fb0bf89dbfd9db2d7 (patch) | |
tree | 3a432549bdbbd012b9e2442f605aab8851992b31 /src | |
parent | c39a6fffd789cb3591ae859c1464703c5fa7f668 (diff) |
Set copyright holders displayed in notices separately from the package name
This helps avoid accidental removal of upstream copyright names
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.qt.include | 2 | ||||
-rw-r--r-- | src/clientversion.h | 2 | ||||
-rw-r--r-- | src/init.cpp | 2 | ||||
-rw-r--r-- | src/qt/splashscreen.cpp | 2 | ||||
-rw-r--r-- | src/util.cpp | 7 | ||||
-rw-r--r-- | src/util.h | 2 |
6 files changed, 13 insertions, 4 deletions
diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include index c93667038f..2d5e715ee5 100644 --- a/src/Makefile.qt.include +++ b/src/Makefile.qt.include @@ -382,7 +382,7 @@ SECONDARY: $(QT_QM) qt/bitcoinstrings.cpp: $(libbitcoin_server_a_SOURCES) $(libbitcoin_wallet_a_SOURCES) @test -n $(XGETTEXT) || echo "xgettext is required for updating translations" - $(AM_V_GEN) cd $(srcdir); XGETTEXT=$(XGETTEXT) PACKAGE_NAME="$(PACKAGE_NAME)" ../share/qt/extract_strings_qt.py $^ + $(AM_V_GEN) cd $(srcdir); XGETTEXT=$(XGETTEXT) PACKAGE_NAME="$(PACKAGE_NAME)" COPYRIGHT_HOLDERS="$(COPYRIGHT_HOLDERS)" ../share/qt/extract_strings_qt.py $^ translate: qt/bitcoinstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(BITCOIN_MM) @test -n $(LUPDATE) || echo "lupdate is required for updating translations" diff --git a/src/clientversion.h b/src/clientversion.h index ba15ebf3bd..6157423f06 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -38,7 +38,7 @@ #define DO_STRINGIZE(X) #X //! Copyright string used in Windows .rc files -#define COPYRIGHT_STR "2009-" STRINGIZE(COPYRIGHT_YEAR) " The " PACKAGE_NAME " Developers" +#define COPYRIGHT_STR "2009-" STRINGIZE(COPYRIGHT_YEAR) " " COPYRIGHT_HOLDERS_FINAL /** * bitcoind-res.rc includes this file, but it cannot cope with real c++ code. diff --git a/src/init.cpp b/src/init.cpp index 4bcf8ec78b..8a9cc6d960 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -513,7 +513,7 @@ std::string HelpMessage(HelpMessageMode mode) std::string LicenseInfo() { // todo: remove urls from translations on next change - return FormatParagraph(strprintf(_("Copyright (C) %i-%i The %s Developers"), 2009, COPYRIGHT_YEAR, _(PACKAGE_NAME))) + "\n" + + return FormatParagraph(strprintf(_("Copyright (C) %i-%i %s"), 2009, COPYRIGHT_YEAR, CopyrightHolders())) + "\n" + "\n" + FormatParagraph(_("This is experimental software.")) + "\n" + "\n" + diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp index ad8d7b3f23..facee62ea1 100644 --- a/src/qt/splashscreen.cpp +++ b/src/qt/splashscreen.cpp @@ -44,7 +44,7 @@ SplashScreen::SplashScreen(Qt::WindowFlags f, const NetworkStyle *networkStyle) // define text to place QString titleText = tr(PACKAGE_NAME); QString versionText = QString("Version %1").arg(QString::fromStdString(FormatFullVersion())); - QString copyrightText = QChar(0xA9)+QString(" %1-%2 ").arg(2009).arg(COPYRIGHT_YEAR) + QString(tr("The %1 developers").arg(tr(PACKAGE_NAME))); + QString copyrightText = QChar(0xA9)+QString(" %1-%2 ").arg(2009).arg(COPYRIGHT_YEAR) + QString::fromStdString(CopyrightHolders()); QString titleAddText = networkStyle->getTitleAddText(); QString font = QApplication::font().toString(); diff --git a/src/util.cpp b/src/util.cpp index e8514a2ef0..66dd45dc8c 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -834,3 +834,10 @@ int GetNumCores() #endif } +std::string CopyrightHolders() +{ + std::string strCopyrightHolders = _(COPYRIGHT_HOLDERS); + if (strCopyrightHolders.find("%s") == strCopyrightHolders.npos) + return strCopyrightHolders; + return strprintf(strCopyrightHolders, _(PACKAGE_NAME)); +} diff --git a/src/util.h b/src/util.h index b2779fe782..88e1fe9fb3 100644 --- a/src/util.h +++ b/src/util.h @@ -242,4 +242,6 @@ template <typename Callable> void TraceThread(const char* name, Callable func) } } +std::string CopyrightHolders(); + #endif // BITCOIN_UTIL_H |