aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bitcoind.cpp3
-rw-r--r--src/init.cpp9
-rw-r--r--src/qt/splashscreen.cpp11
-rw-r--r--src/qt/utilitydialog.cpp2
-rw-r--r--src/util.cpp14
-rw-r--r--src/util.h2
6 files changed, 25 insertions, 16 deletions
diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp
index 440356aa80..9ad5a47869 100644
--- a/src/bitcoind.cpp
+++ b/src/bitcoind.cpp
@@ -17,6 +17,7 @@
#include "httpserver.h"
#include "httprpc.h"
#include "rpcserver.h"
+#include "utilstrencodings.h"
#include <boost/algorithm/string/predicate.hpp>
#include <boost/filesystem.hpp>
@@ -82,7 +83,7 @@ bool AppInit(int argc, char* argv[])
if (mapArgs.count("-version"))
{
- strUsage += LicenseInfo();
+ strUsage += FormatParagraph(LicenseInfo());
}
else
{
diff --git a/src/init.cpp b/src/init.cpp
index 8a9cc6d960..5746fb5120 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -33,7 +33,6 @@
#include "ui_interface.h"
#include "util.h"
#include "utilmoneystr.h"
-#include "utilstrencodings.h"
#include "validationinterface.h"
#ifdef ENABLE_WALLET
#include "wallet/db.h"
@@ -513,13 +512,13 @@ std::string HelpMessage(HelpMessageMode mode)
std::string LicenseInfo()
{
// todo: remove urls from translations on next change
- return FormatParagraph(strprintf(_("Copyright (C) %i-%i %s"), 2009, COPYRIGHT_YEAR, CopyrightHolders())) + "\n" +
+ return CopyrightHolders(strprintf(_("Copyright (C) %i-%i"), 2009, COPYRIGHT_YEAR) + " ") + "\n" +
"\n" +
- FormatParagraph(_("This is experimental software.")) + "\n" +
+ _("This is experimental software.") + "\n" +
"\n" +
- FormatParagraph(_("Distributed under the MIT software license, see the accompanying file COPYING or <http://www.opensource.org/licenses/mit-license.php>.")) + "\n" +
+ _("Distributed under the MIT software license, see the accompanying file COPYING or <http://www.opensource.org/licenses/mit-license.php>.") + "\n" +
"\n" +
- FormatParagraph(_("This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.")) +
+ _("This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.") +
"\n";
}
diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp
index 4d745088ac..21dab957f3 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::fromStdString(CopyrightHolders());
+ QString copyrightText = QString::fromUtf8(CopyrightHolders(strprintf("\xc2\xA9 %u-%u ", 2009, COPYRIGHT_YEAR)).c_str());
QString titleAddText = networkStyle->getTitleAddText();
QString font = QApplication::font().toString();
@@ -101,8 +101,13 @@ SplashScreen::SplashScreen(Qt::WindowFlags f, const NetworkStyle *networkStyle)
pixPaint.drawText(pixmap.width()/devicePixelRatio-titleTextWidth-paddingRight+2,paddingTop+titleVersionVSpace,versionText);
// draw copyright stuff
- pixPaint.setFont(QFont(font, 10*fontFactor));
- pixPaint.drawText(pixmap.width()/devicePixelRatio-titleTextWidth-paddingRight,paddingTop+titleCopyrightVSpace,copyrightText);
+ {
+ pixPaint.setFont(QFont(font, 10*fontFactor));
+ const int x = pixmap.width()/devicePixelRatio-titleTextWidth-paddingRight;
+ const int y = paddingTop+titleCopyrightVSpace;
+ QRect copyrightRect(x, y, pixmap.width() - x - paddingRight, pixmap.height() - y);
+ pixPaint.drawText(copyrightRect, Qt::AlignLeft | Qt::AlignTop | Qt::TextWordWrap, copyrightText);
+ }
// draw additional text if special network
if(!titleAddText.isEmpty()) {
diff --git a/src/qt/utilitydialog.cpp b/src/qt/utilitydialog.cpp
index 3e96f26b3a..5fafa57598 100644
--- a/src/qt/utilitydialog.cpp
+++ b/src/qt/utilitydialog.cpp
@@ -56,7 +56,7 @@ HelpMessageDialog::HelpMessageDialog(QWidget *parent, bool about) :
uri.setMinimal(true); // use non-greedy matching
licenseInfoHTML.replace(uri, "<a href=\"\\1\">\\1</a>");
// Replace newlines with HTML breaks
- licenseInfoHTML.replace("\n\n", "<br><br>");
+ licenseInfoHTML.replace("\n", "<br>");
ui->aboutMessage->setTextFormat(Qt::RichText);
ui->scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
diff --git a/src/util.cpp b/src/util.cpp
index 0439ead476..1f6b84119a 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -834,10 +834,14 @@ int GetNumCores()
#endif
}
-std::string CopyrightHolders()
+std::string CopyrightHolders(const std::string& strPrefix)
{
- std::string strCopyrightHolders = _(COPYRIGHT_HOLDERS);
- if (strCopyrightHolders.find("%s") == strCopyrightHolders.npos)
- return strCopyrightHolders;
- return strprintf(strCopyrightHolders, _(COPYRIGHT_HOLDERS_SUBSTITUTION));
+ std::string strCopyrightHolders = strPrefix + _(COPYRIGHT_HOLDERS);
+ if (strCopyrightHolders.find("%s") != strCopyrightHolders.npos) {
+ strCopyrightHolders = strprintf(strCopyrightHolders, _(COPYRIGHT_HOLDERS_SUBSTITUTION));
+ }
+ if (strCopyrightHolders.find("Bitcoin Core developers") == strCopyrightHolders.npos) {
+ strCopyrightHolders += "\n" + strPrefix + "The Bitcoin Core developers";
+ }
+ return strCopyrightHolders;
}
diff --git a/src/util.h b/src/util.h
index 88e1fe9fb3..5a948c6a9c 100644
--- a/src/util.h
+++ b/src/util.h
@@ -242,6 +242,6 @@ template <typename Callable> void TraceThread(const char* name, Callable func)
}
}
-std::string CopyrightHolders();
+std::string CopyrightHolders(const std::string& strPrefix);
#endif // BITCOIN_UTIL_H