NOISSUE remove more html rom About dialog
This commit is contained in:
parent
e6936212d6
commit
ce7917048a
@ -23,56 +23,43 @@
|
|||||||
|
|
||||||
#include "HoeDown.h"
|
#include "HoeDown.h"
|
||||||
|
|
||||||
|
namespace {
|
||||||
// Credits
|
// Credits
|
||||||
// This is a hack, but I can't think of a better way to do this easily without screwing with QTextDocument...
|
// This is a hack, but I can't think of a better way to do this easily without screwing with QTextDocument...
|
||||||
static QString getCreditsHtml(QStringList patrons)
|
QString getCreditsHtml(QStringList patrons)
|
||||||
{
|
{
|
||||||
QString creditsHtml = QObject::tr(
|
QString patronsHeading = QObject::tr("Patrons", "About Credits");
|
||||||
"<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0//EN' 'http://www.w3.org/TR/REC-html40/strict.dtd'>"
|
QString output;
|
||||||
"<html>"
|
QTextStream stream(&output);
|
||||||
""
|
stream << "<center>\n";
|
||||||
"<head>"
|
// TODO: possibly retrieve from git history at build time?
|
||||||
"<meta name='qrichtext' content='1' />"
|
stream << "<h3>" << QObject::tr("MultiMC Developers", "About Credits") << "</h3>\n";
|
||||||
"<style type='text/css'>"
|
stream << "<p>Andrew Okin <<a href='mailto:forkk@forkk.net'>forkk@forkk.net</a>></p>\n";
|
||||||
"p { white-space: pre-wrap; margin-top:2px; margin-bottom:2px; }"
|
stream << "<p>Petr Mrázek <<a href='mailto:peterix@gmail.com'>peterix@gmail.com</a>></p>\n";
|
||||||
"</style>"
|
stream << "<p>Sky Welch <<a href='mailto:multimc@bunnies.io'>multimc@bunnies.io</a>></p>\n";
|
||||||
"</head>"
|
stream << "<p>Jan (02JanDal) <<a href='mailto:02jandal@gmail.com'>02jandal@gmail.com</a>></p>\n";
|
||||||
""
|
stream << "<p>RoboSky <<a href='https://twitter.com/RoboSky_'>@RoboSky_</a>></p>\n";
|
||||||
"<body style=' font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;'>"
|
stream << "<br />\n";
|
||||||
""
|
|
||||||
"<h3>MultiMC Developers</h3>"
|
stream << "<h3>" << QObject::tr("With thanks to", "About Credits") << "</h3>\n";
|
||||||
"<p>Andrew Okin <<a href='mailto:forkk@forkk.net'>forkk@forkk.net</a>></p>"
|
stream << "<p>Orochimarufan <<a href='mailto:orochimarufan.x3@gmail.com'>orochimarufan.x3@gmail.com</a>></p>\n";
|
||||||
"<p>Petr Mrázek <<a href='mailto:peterix@gmail.com'>peterix@gmail.com</a>></p>"
|
stream << "<p>TakSuyu <<a href='mailto:taksuyu@gmail.com'>taksuyu@gmail.com</a>></p>\n";
|
||||||
"<p>Sky Welch <<a href='mailto:multimc@bunnies.io'>multimc@bunnies.io</a>></p>"
|
stream << "<p>Kilobyte <<a href='mailto:stiepen22@gmx.de'>stiepen22@gmx.de</a>></p>\n";
|
||||||
"<p>Jan (02JanDal) <<a href='mailto:02jandal@gmail.com'>02jandal@gmail.com</a>></p>"
|
stream << "<p>Rootbear75 <<a href='https://twitter.com/rootbear75'>@rootbear75</a>></p>\n";
|
||||||
"<p>RoboSky <<a href='https://twitter.com/RoboSky_'>@RoboSky_</a>></p>"
|
stream << "<br />\n";
|
||||||
""
|
|
||||||
"<h3>With thanks to</h3>"
|
if(!patrons.isEmpty()) {
|
||||||
"<p>Orochimarufan <<a href='mailto:orochimarufan.x3@gmail.com'>orochimarufan.x3@gmail.com</a>></p>"
|
stream << "<h3>" << QObject::tr("Patrons", "About Credits") << "</h3>\n";
|
||||||
"<p>TakSuyu <<a href='mailto:taksuyu@gmail.com'>taksuyu@gmail.com</a>></p>"
|
|
||||||
"<p>Kilobyte <<a href='mailto:stiepen22@gmx.de'>stiepen22@gmx.de</a>></p>"
|
|
||||||
"<p>Rootbear75 <<a href='https://twitter.com/rootbear75'>@rootbear75</a>></p>"
|
|
||||||
""
|
|
||||||
"<h3>Patrons</h3>"
|
|
||||||
"%1"
|
|
||||||
""
|
|
||||||
"</body>"
|
|
||||||
"</html>");
|
|
||||||
if (patrons.isEmpty())
|
|
||||||
return creditsHtml.arg(QObject::tr("<p>Loading...</p>"));
|
|
||||||
else
|
|
||||||
{
|
|
||||||
QString patronsStr;
|
|
||||||
for (QString patron : patrons)
|
for (QString patron : patrons)
|
||||||
{
|
{
|
||||||
patronsStr.append(QString("<p>%1</p>").arg(patron));
|
stream << "<p>" << patron << "</p>\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stream << "</center>\n";
|
||||||
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
return creditsHtml.arg(patronsStr);
|
QString getLicenseHtml()
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static QString getLicenseHtml()
|
|
||||||
{
|
{
|
||||||
HoeDown hoedown;
|
HoeDown hoedown;
|
||||||
QFile dataFile(":/documents/COPYING.md");
|
QFile dataFile(":/documents/COPYING.md");
|
||||||
@ -81,6 +68,8 @@ static QString getLicenseHtml()
|
|||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AboutDialog)
|
AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AboutDialog)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
@ -109,6 +98,15 @@ AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AboutDia
|
|||||||
else
|
else
|
||||||
ui->channelLabel->setVisible(false);
|
ui->channelLabel->setVisible(false);
|
||||||
|
|
||||||
|
ui->redistributionText->setHtml(tr(
|
||||||
|
"<p>We keep MultiMC open source because we think it's important to be able to see the source code for a project like this, and we do so using the Apache license.</p>\n"
|
||||||
|
"<p>Part of the reason for using the Apache license is we don't want people using the "MultiMC" name when redistributing the project. "
|
||||||
|
"This means people must take the time to go through the source code and remove all references to "MultiMC", including but not limited to the project "
|
||||||
|
"icon and the title of windows, (no <b>MultiMC-fork</b> in the title).</p>\n"
|
||||||
|
"<p>The Apache license covers reasonable use for the name - a mention of the project's origins in the About dialog and the license is acceptable. "
|
||||||
|
"However, it should be abundantly clear that the project is a fork <b>without</b> implying that you have our blessing.</p>"
|
||||||
|
));
|
||||||
|
|
||||||
connect(ui->closeButton, SIGNAL(clicked()), SLOT(close()));
|
connect(ui->closeButton, SIGNAL(clicked()), SLOT(close()));
|
||||||
|
|
||||||
connect(ui->aboutQt, &QPushButton::clicked, &QApplication::aboutQt);
|
connect(ui->aboutQt, &QPushButton::clicked, &QApplication::aboutQt);
|
||||||
|
@ -217,16 +217,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="translationInfo">
|
|
||||||
<property name="text">
|
|
||||||
<string extracomment="Hey, Translator, feel free to put credit to you here">No Language file loaded.</string>
|
|
||||||
</property>
|
|
||||||
<property name="readOnly">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="licenseTab">
|
<widget class="QWidget" name="licenseTab">
|
||||||
@ -263,18 +253,7 @@
|
|||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTextEdit" name="textEdit">
|
<widget class="QTextEdit" name="redistributionText">
|
||||||
<property name="html">
|
|
||||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
|
||||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
|
||||||
p, li { white-space: pre-wrap; }
|
|
||||||
</style></head><body style=" font-family:'Noto Sans'; font-size:12pt; font-weight:400; font-style:normal;">
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Bitstream Vera Sans'; font-size:11pt;">We keep MultiMC open source because we think it's important to be able to see the source code for a project like this, and we do so using the Apache license.</span></p>
|
|
||||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Bitstream Vera Sans'; font-size:11pt;"><br /></p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Bitstream Vera Sans'; font-size:11pt;">Part of the reason for using the Apache license is we don't want people using the &quot;MultiMC&quot; name when redistributing the project. This means people must take the time to go through the source code and remove all references to &quot;MultiMC&quot;, including but not limited to the project icon and the title of windows, (no *MultiMC-fork* in the title).</span></p>
|
|
||||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Bitstream Vera Sans'; font-size:11pt;"><br /></p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Bitstream Vera Sans'; font-size:11pt;">The Apache license covers reasonable use for the name - a mention of the project's origins in the About dialog and the license is acceptable. However, it should be abundantly clear that the project is a fork </span><span style=" font-family:'Bitstream Vera Sans'; font-size:11pt; font-weight:600;">without</span><span style=" font-family:'Bitstream Vera Sans'; font-size:11pt;"> implying that you have our blessing.</span></p></body></html></string>
|
|
||||||
</property>
|
|
||||||
<property name="textInteractionFlags">
|
<property name="textInteractionFlags">
|
||||||
<set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
<set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||||
</property>
|
</property>
|
||||||
@ -323,14 +302,11 @@ p, li { white-space: pre-wrap; }
|
|||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>tabWidget</tabstop>
|
<tabstop>tabWidget</tabstop>
|
||||||
<tabstop>creditsText</tabstop>
|
<tabstop>creditsText</tabstop>
|
||||||
<tabstop>translationInfo</tabstop>
|
|
||||||
<tabstop>licenseText</tabstop>
|
<tabstop>licenseText</tabstop>
|
||||||
<tabstop>textEdit</tabstop>
|
<tabstop>redistributionText</tabstop>
|
||||||
<tabstop>aboutQt</tabstop>
|
<tabstop>aboutQt</tabstop>
|
||||||
<tabstop>closeButton</tabstop>
|
<tabstop>closeButton</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources/>
|
||||||
<include location="../../resources/multimc/multimc.qrc"/>
|
|
||||||
</resources>
|
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
Loading…
Reference in New Issue
Block a user