From 732a6e3c8134cb9bed61612e27fdc02461a28db5 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 2 Aug 2011 13:42:41 -0400 Subject: STORM-1534: Derive Credits in About Second Life from doc/ sources --- indra/newview/llfloaterabout.cpp | 46 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 4 deletions(-) (limited to 'indra/newview/llfloaterabout.cpp') diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index 2873bc0059..cf52ee71ea 100644 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -26,6 +26,8 @@ */ #include "llviewerprecompiledheaders.h" +#include +#include #include "llfloaterabout.h" @@ -108,8 +110,11 @@ BOOL LLFloaterAbout::postBuild() LLViewerTextEditor *support_widget = getChild("support_editor", true); - LLViewerTextEditor *credits_widget = - getChild("credits_editor", true); + LLViewerTextEditor *contrib_names_widget = + getChild("contrib_names", true); + + LLViewerTextEditor *trans_names_widget = + getChild("trans_names", true); getChild("copy_btn")->setCommitCallback( boost::bind(&LLFloaterAbout::onClickCopyToClipboard, this)); @@ -190,8 +195,41 @@ BOOL LLFloaterAbout::postBuild() support_widget->setEnabled(FALSE); support_widget->startOfDoc(); - credits_widget->setEnabled(FALSE); - credits_widget->startOfDoc(); + // Get the names of contributors, extracted from .../doc/contributions.txt by viewer_manifest.py at build time + std::string contributors_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"contributors.txt"); + llifstream contrib_file; + std::string contributors; + contrib_file.open(contributors_path); /* Flawfinder: ignore */ + if (contrib_file.is_open()) + { + std::getline(contrib_file, contributors); // all names are on a single line + contrib_file.close(); + } + else + { + LL_WARNS("AboutInit") << "Could not read contributors file at " << contributors_path << LL_ENDL; + } + contrib_names_widget->setText(contributors); + contrib_names_widget->setEnabled(FALSE); + contrib_names_widget->startOfDoc(); + + // Get the names of translators, extracted from .../doc/tranlations.txt by viewer_manifest.py at build time + std::string translators_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"translators.txt"); + llifstream trans_file; + std::string translators; + trans_file.open(translators_path); /* Flawfinder: ignore */ + if (trans_file.is_open()) + { + std::getline(trans_file, translators); // all names are on a single line + trans_file.close(); + } + else + { + LL_WARNS("AboutInit") << "Could not read translators file at " << translators_path << LL_ENDL; + } + trans_names_widget->setText(translators); + trans_names_widget->setEnabled(FALSE); + trans_names_widget->startOfDoc(); return TRUE; } -- cgit v1.2.3 From fc0d74a1fe639a679025bb18a1d18a08fd87b3bc Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 3 Aug 2011 15:46:16 -0400 Subject: storm-1534: code to allow external source of current Linden names --- indra/newview/llfloaterabout.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'indra/newview/llfloaterabout.cpp') diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index cf52ee71ea..849826bb6b 100644 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -110,6 +110,9 @@ BOOL LLFloaterAbout::postBuild() LLViewerTextEditor *support_widget = getChild("support_editor", true); + LLViewerTextEditor *linden_names_widget = + getChild("linden_names", true); + LLViewerTextEditor *contrib_names_widget = getChild("contrib_names", true); @@ -195,6 +198,24 @@ BOOL LLFloaterAbout::postBuild() support_widget->setEnabled(FALSE); support_widget->startOfDoc(); + // Get the names of Lindens, added by viewer_manifest.py at build time + std::string lindens_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"lindens.txt"); + llifstream linden_file; + std::string lindens; + linden_file.open(lindens_path); /* Flawfinder: ignore */ + if (linden_file.is_open()) + { + std::getline(linden_file, lindens); // all names are on a single line + linden_file.close(); + linden_names_widget->setText(lindens); + } + else + { + LL_INFOS("AboutInit") << "Could not read lindens file at " << lindens_path << LL_ENDL; + } + linden_names_widget->setEnabled(FALSE); + linden_names_widget->startOfDoc(); + // Get the names of contributors, extracted from .../doc/contributions.txt by viewer_manifest.py at build time std::string contributors_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"contributors.txt"); llifstream contrib_file; -- cgit v1.2.3