summaryrefslogtreecommitdiff
path: root/quacker/quacker.cpp
diff options
context:
space:
mode:
authorJohn Fultz <jfultz@wolfram.com>2015-10-18 23:35:21 -0500
committerJohn Fultz <jfultz@wolfram.com>2015-10-18 23:35:21 -0500
commit2c2a91a6154a8dafa1415ec546ac07b2486b6743 (patch)
treecc2f799c30b4d1fdcfaac9970680998abb0788ec /quacker/quacker.cpp
parent06b0b048147df0387001f8c4bf8f52851d722240 (diff)
parent23f13f666c42068ed086c5a5791063465db653c7 (diff)
Merge branch 'feature/editablesettings'
Diffstat (limited to 'quacker/quacker.cpp')
-rw-r--r--quacker/quacker.cpp36
1 files changed, 25 insertions, 11 deletions
diff --git a/quacker/quacker.cpp b/quacker/quacker.cpp
index 098ff84..2f407fa 100644
--- a/quacker/quacker.cpp
+++ b/quacker/quacker.cpp
@@ -155,13 +155,10 @@ void TopLevel::finishInitialization()
void TopLevel::introduceToUser()
{
CustomQSettings settings;
- QString lexiconName = settings.value("quackle/settings/lexicon-name", QString("twl06")).toString();
- if (lexiconName == "csw12") {
- statusMessage(tr("The WESPA wordlist (CSW12) is copyright Harper Collins 2011."));
- } else {
- statusMessage(tr("Enjoy your quackling. Choose \"New game...\" from the Game menu to begin."));
- }
-
+ QString statusText = QString::fromUtf8(QUACKLE_LEXICON_PARAMETERS->copyrightString().c_str());
+ if (statusText.isEmpty())
+ statusText = tr("Enjoy your quackling. Choose \"New game...\" from the Game menu to begin.");
+ statusMessage(statusText);
parseCommandLineOptions();
if (!CustomQSettings().contains("quackle/hasBeenRun"))
@@ -2120,17 +2117,34 @@ void TopLevel::firstTimeRun()
void TopLevel::about()
{
- QMessageBox::about(this, tr("About Quackle 0.98"), dialogText(tr(
-"<p><b>Quackle</b> 0.98 is a crossword game playing, analysis, and study tool. Visit the Quackle homepage at <tt><a href=\"http://quackle.org\">http://quackle.org</a></tt> for more information.</p>"
+ QString aboutText = tr(
+"<p><b>Quackle</b> 1.0 is a crossword game playing, analysis, and study tool. Visit the Quackle homepage at <tt><a href=\"http://quackle.org\">http://quackle.org</a></tt> for more information.</p>"
"<p>Quackle was written by Jason Katz-Brown, John O'Laughlin, John Fultz, Matt Liberty, and Anand Buddhdev. We thank the anonymous donor who made this software free.</p>"
-"<p>Copyright 2005-2014 by</p>"
+"<p>Copyright 2005-2015 by</p>"
"<ul>"
"<li>Jason Katz-Brown &lt;jasonkatzbrown@gmail.com&gt;</li>"
"<li>John O'Laughlin &lt;olaughlin@gmail.com&gt;</li>"
"</ul>"
"<p>Quackle is free, open-source software licensed under the terms of the GNU General Public License Version 3. See</p>"
"<p><tt><a href=\"http://quackle.org/LICENSE\">http://quackle.org/LICENSE</a></tt></p>"
-)));
+"<p>Dictionary copyrights</p><ul>"
+);
+
+ FILE* file = fopen(QUACKLE_DATAMANAGER->makeDataFilename("lexica", "copyrights.txt", false).c_str(), "r");
+ if (file)
+ {
+ QTextStream strm(file);
+ while (!strm.atEnd())
+ {
+ QString line = strm.readLine();
+ int pos = line.indexOf(':');
+ if (pos != -1 && pos + 1 < line.size())
+ aboutText += "<li>" + line.mid(pos + 1) + "</li>";
+ }
+ fclose(file);
+ aboutText += "</ul>";
+ }
+ QMessageBox::about(this, tr("About Quackle 1.0"), dialogText(aboutText));
}
void TopLevel::hints()