summaryrefslogtreecommitdiffstats
path: root/logic
diff options
context:
space:
mode:
authorSky <git@bunnies.cc>2013-12-23 15:46:01 +0000
committerSky <git@bunnies.cc>2013-12-23 15:48:26 +0000
commit027aafc3c1fc5e78c91ee439cd38562387f7ed9f (patch)
tree46213f92e72e0a78161a702bcb90ae8265f12d21 /logic
parent86284196dead29b223b2d4ae1850f84dd9690f9b (diff)
downloadMultiMC-027aafc3c1fc5e78c91ee439cd38562387f7ed9f.tar
MultiMC-027aafc3c1fc5e78c91ee439cd38562387f7ed9f.tar.gz
MultiMC-027aafc3c1fc5e78c91ee439cd38562387f7ed9f.tar.lz
MultiMC-027aafc3c1fc5e78c91ee439cd38562387f7ed9f.tar.xz
MultiMC-027aafc3c1fc5e78c91ee439cd38562387f7ed9f.zip
Tidy status messages a bit
Diffstat (limited to 'logic')
-rw-r--r--logic/LegacyUpdate.cpp18
-rw-r--r--logic/OneSixUpdate.cpp14
-rw-r--r--logic/auth/YggdrasilTask.cpp6
-rw-r--r--logic/auth/flows/AuthenticateTask.cpp4
-rw-r--r--logic/auth/flows/RefreshTask.cpp4
-rw-r--r--logic/auth/flows/ValidateTask.cpp4
-rw-r--r--logic/lists/ForgeVersionList.cpp2
-rw-r--r--logic/lists/JavaVersionList.cpp2
-rw-r--r--logic/lists/MinecraftVersionList.cpp2
-rw-r--r--logic/updater/DownloadUpdateTask.cpp16
10 files changed, 35 insertions, 37 deletions
diff --git a/logic/LegacyUpdate.cpp b/logic/LegacyUpdate.cpp
index e71b270e..fb9dcf2b 100644
--- a/logic/LegacyUpdate.cpp
+++ b/logic/LegacyUpdate.cpp
@@ -76,7 +76,7 @@ void LegacyUpdate::lwjglStart()
return;
}
- setStatus("Downloading new LWJGL.");
+ setStatus(tr("Downloading new LWJGL..."));
auto version = list->getVersion(lwjglVersion);
if (!version)
{
@@ -144,7 +144,7 @@ void LegacyUpdate::lwjglFinished(QNetworkReply *reply)
saveMe.open(QIODevice::WriteOnly);
saveMe.write(m_reply->readAll());
saveMe.close();
- setStatus("Installing new LWJGL...");
+ setStatus(tr("Installing new LWJGL..."));
extractLwjgl();
jarStart();
}
@@ -220,7 +220,7 @@ void LegacyUpdate::extractLwjgl()
// Now if destFileName is still empty, go to the next file.
if (!destFileName.isEmpty())
{
- setStatus("Installing new LWJGL - Extracting " + name);
+ setStatus(tr("Installing new LWJGL - extracting ") + name + "...");
QFile output(destFileName);
output.open(QIODevice::WriteOnly);
output.write(file.readAll()); // FIXME: wste of memory!?
@@ -250,7 +250,7 @@ void LegacyUpdate::jarStart()
return;
}
- setStatus("Checking for jar updates...");
+ setStatus(tr("Checking for jar updates..."));
// Make directories
QDir binDir(inst->binDir());
if (!binDir.exists() && !binDir.mkpath("."))
@@ -260,7 +260,7 @@ void LegacyUpdate::jarStart()
}
// Build a list of URLs that will need to be downloaded.
- setStatus("Downloading new minecraft.jar");
+ setStatus(tr("Downloading new minecraft.jar ..."));
QString version_id = inst->intendedVersionId();
QString localPath = version_id + "/" + version_id + ".jar";
@@ -294,7 +294,7 @@ void LegacyUpdate::jarFailed()
bool LegacyUpdate::MergeZipFiles(QuaZip *into, QFileInfo from, QSet<QString> &contained,
MetainfAction metainf)
{
- setStatus("Installing mods - Adding " + from.fileName());
+ setStatus(tr("Installing mods: Adding ") + from.fileName() + " ...");
QuaZip modZip(from.filePath());
modZip.open(QuaZip::mdUnzip);
@@ -380,7 +380,7 @@ void LegacyUpdate::ModTheJar()
return;
}
- setStatus("Installing mods - backing up minecraft.jar...");
+ setStatus(tr("Installing mods: Backing up minecraft.jar ..."));
if (!baseJar.exists() && !QFile::copy(runnableJar.filePath(), baseJar.filePath()))
{
emitFailed("It seems both the active and base jar are gone. A fresh base jar will "
@@ -405,7 +405,7 @@ void LegacyUpdate::ModTheJar()
}
// TaskStep(); // STEP 1
- setStatus("Installing mods - Opening minecraft.jar");
+ setStatus(tr("Installing mods: Opening minecraft.jar ..."));
QuaZip zipOut(runnableJar.filePath());
if (!zipOut.open(QuaZip::mdCreate))
@@ -419,7 +419,7 @@ void LegacyUpdate::ModTheJar()
QSet<QString> addedFiles;
// Modify the jar
- setStatus("Installing mods - Adding mod files...");
+ setStatus(tr("Installing mods: Adding mod files..."));
for (int i = modList->size() - 1; i >= 0; i--)
{
auto &mod = modList->operator[](i);
diff --git a/logic/OneSixUpdate.cpp b/logic/OneSixUpdate.cpp
index 696eeff0..4d93477a 100644
--- a/logic/OneSixUpdate.cpp
+++ b/logic/OneSixUpdate.cpp
@@ -57,7 +57,7 @@ void OneSixUpdate::executeTask()
/*
* FIXME: in offline mode, do not proceed!
*/
- setStatus("Testing the Java installation.");
+ setStatus(tr("Testing the Java installation..."));
QString java_path = m_inst->settings().get("JavaPath").toString();
checker.reset(new JavaChecker());
@@ -89,7 +89,7 @@ void OneSixUpdate::executeTask()
void OneSixUpdate::checkJavaOnline()
{
- setStatus("Testing the Java installation.");
+ setStatus(tr("Testing the Java installation..."));
QString java_path = m_inst->settings().get("JavaPath").toString();
checker.reset(new JavaChecker());
@@ -128,7 +128,7 @@ void OneSixUpdate::checkFinishedOffline(JavaCheckResult result)
void OneSixUpdate::versionFileStart()
{
QLOG_INFO() << m_inst->name() << ": getting version file.";
- setStatus("Getting the version files from Mojang.");
+ setStatus(tr("Getting the version files from Mojang..."));
QString urlstr = "http://" + URLConstants::AWS_DOWNLOAD_VERSIONS + targetVersion->descriptor() + "/" + targetVersion->descriptor() + ".json";
auto job = new NetJob("Version index");
@@ -196,7 +196,7 @@ void OneSixUpdate::versionFileFailed()
void OneSixUpdate::assetIndexStart()
{
- setStatus("Updating asset index.");
+ setStatus(tr("Updating assets index..."));
OneSixInstance *inst = (OneSixInstance *)m_inst;
std::shared_ptr<OneSixVersion> version = inst->getFullVersion();
QString assetName = version->assets;
@@ -247,7 +247,7 @@ void OneSixUpdate::assetIndexFinished()
}
if(dls.size())
{
- setStatus("Getting the assets files from Mojang...");
+ setStatus(tr("Getting the assets files from Mojang..."));
auto job = new NetJob("Assets for " + inst->name());
for(auto dl: dls)
job->addNetAction(dl);
@@ -281,7 +281,7 @@ void OneSixUpdate::assetsFailed()
void OneSixUpdate::jarlibStart()
{
- setStatus("Getting the library files from Mojang.");
+ setStatus(tr("Getting the library files from Mojang..."));
QLOG_INFO() << m_inst->name() << ": downloading libraries";
OneSixInstance *inst = (OneSixInstance *)m_inst;
bool successful = inst->reloadFullVersion();
@@ -369,7 +369,7 @@ void OneSixUpdate::jarlibFailed()
void OneSixUpdate::prepareForLaunch()
{
- setStatus("Preparing for launch.");
+ setStatus(tr("Preparing for launch..."));
QLOG_INFO() << m_inst->name() << ": preparing for launch";
auto onesix_inst = (OneSixInstance *)m_inst;
diff --git a/logic/auth/YggdrasilTask.cpp b/logic/auth/YggdrasilTask.cpp
index 088e1fc0..573dd57a 100644
--- a/logic/auth/YggdrasilTask.cpp
+++ b/logic/auth/YggdrasilTask.cpp
@@ -172,10 +172,10 @@ QString YggdrasilTask::getStateMessage(const YggdrasilTask::State state) const
switch (state)
{
case STATE_SENDING_REQUEST:
- return tr("Sending request to auth servers.");
+ return tr("Sending request to auth servers...");
case STATE_PROCESSING_RESPONSE:
- return tr("Processing response from servers.");
+ return tr("Processing response from servers...");
default:
- return tr("Processing. Please wait.");
+ return tr("Processing. Please wait...");
}
}
diff --git a/logic/auth/flows/AuthenticateTask.cpp b/logic/auth/flows/AuthenticateTask.cpp
index f60be35d..6548c4e9 100644
--- a/logic/auth/flows/AuthenticateTask.cpp
+++ b/logic/auth/flows/AuthenticateTask.cpp
@@ -194,9 +194,9 @@ QString AuthenticateTask::getStateMessage(const YggdrasilTask::State state) cons
switch (state)
{
case STATE_SENDING_REQUEST:
- return tr("Authenticating: Sending request.");
+ return tr("Authenticating: Sending request...");
case STATE_PROCESSING_RESPONSE:
- return tr("Authenticating: Processing response.");
+ return tr("Authenticating: Processing response...");
default:
return YggdrasilTask::getStateMessage(state);
}
diff --git a/logic/auth/flows/RefreshTask.cpp b/logic/auth/flows/RefreshTask.cpp
index 5f68ccc7..f63c736e 100644
--- a/logic/auth/flows/RefreshTask.cpp
+++ b/logic/auth/flows/RefreshTask.cpp
@@ -145,9 +145,9 @@ QString RefreshTask::getStateMessage(const YggdrasilTask::State state) const
switch (state)
{
case STATE_SENDING_REQUEST:
- return tr("Refreshing login token.");
+ return tr("Refreshing login token...");
case STATE_PROCESSING_RESPONSE:
- return tr("Refreshing login token: Processing response.");
+ return tr("Refreshing login token: Processing response...");
default:
return YggdrasilTask::getStateMessage(state);
}
diff --git a/logic/auth/flows/ValidateTask.cpp b/logic/auth/flows/ValidateTask.cpp
index 84d5e703..4f7323fd 100644
--- a/logic/auth/flows/ValidateTask.cpp
+++ b/logic/auth/flows/ValidateTask.cpp
@@ -55,9 +55,9 @@ QString ValidateTask::getStateMessage(const YggdrasilTask::State state) const
switch (state)
{
case STATE_SENDING_REQUEST:
- return tr("Validating Access Token: Sending request.");
+ return tr("Validating access token: Sending request...");
case STATE_PROCESSING_RESPONSE:
- return tr("Validating Access Token: Processing response.");
+ return tr("Validating access token: Processing response...");
default:
return YggdrasilTask::getStateMessage(state);
}
diff --git a/logic/lists/ForgeVersionList.cpp b/logic/lists/ForgeVersionList.cpp
index 78cb0de0..56eca744 100644
--- a/logic/lists/ForgeVersionList.cpp
+++ b/logic/lists/ForgeVersionList.cpp
@@ -158,7 +158,7 @@ ForgeListLoadTask::ForgeListLoadTask(ForgeVersionList *vlist) : Task()
void ForgeListLoadTask::executeTask()
{
- setStatus(tr("Fetching Forge version list"));
+ setStatus(tr("Fetching Forge version lists..."));
auto job = new NetJob("Version index");
// we do not care if the version is stale or not.
auto forgeListEntry = MMC->metacache()->resolveEntry("minecraftforge", "list.json");
diff --git a/logic/lists/JavaVersionList.cpp b/logic/lists/JavaVersionList.cpp
index c2886c67..e8c5acd0 100644
--- a/logic/lists/JavaVersionList.cpp
+++ b/logic/lists/JavaVersionList.cpp
@@ -172,7 +172,7 @@ JavaListLoadTask::~JavaListLoadTask()
void JavaListLoadTask::executeTask()
{
- setStatus("Detecting Java installations...");
+ setStatus(tr("Detecting Java installations..."));
JavaUtils ju;
QList<QString> candidate_paths = ju.FindJavaPaths();
diff --git a/logic/lists/MinecraftVersionList.cpp b/logic/lists/MinecraftVersionList.cpp
index 523b81ac..91f86df0 100644
--- a/logic/lists/MinecraftVersionList.cpp
+++ b/logic/lists/MinecraftVersionList.cpp
@@ -139,7 +139,7 @@ MCVListLoadTask::~MCVListLoadTask()
void MCVListLoadTask::executeTask()
{
- setStatus("Loading instance version list...");
+ setStatus(tr("Loading instance version list..."));
auto worker = MMC->qnam();
vlistReply = worker->get(QNetworkRequest(QUrl("http://" + URLConstants::AWS_DOWNLOAD_VERSIONS + "versions.json")));
connect(vlistReply, SIGNAL(finished()), this, SLOT(list_downloaded()));
diff --git a/logic/updater/DownloadUpdateTask.cpp b/logic/updater/DownloadUpdateTask.cpp
index b017afeb..cffac75f 100644
--- a/logic/updater/DownloadUpdateTask.cpp
+++ b/logic/updater/DownloadUpdateTask.cpp
@@ -77,7 +77,7 @@ void DownloadUpdateTask::processChannels()
void DownloadUpdateTask::findCurrentVersionInfo()
{
- setStatus(tr("Finding information about the current version."));
+ setStatus(tr("Finding information about the current version..."));
auto checker = MMC->updateChecker();
@@ -98,7 +98,7 @@ void DownloadUpdateTask::findCurrentVersionInfo()
void DownloadUpdateTask::loadVersionInfo()
{
- setStatus(tr("Loading version information."));
+ setStatus(tr("Loading version information..."));
// Create the net job for loading version info.
NetJob *netJob = new NetJob("Version Info");
@@ -153,10 +153,8 @@ void DownloadUpdateTask::vinfoDownloadFailed()
void DownloadUpdateTask::parseDownloadedVersionInfo()
{
- setStatus(tr("Reading file lists."));
-
- setStatus(tr("Reading file list for new version."));
- QLOG_DEBUG() << "Reading file list for new version.";
+ setStatus(tr("Reading file list for new version..."));
+ QLOG_DEBUG() << "Reading file list for new version...";
QString error;
if (!parseVersionInfo(
std::dynamic_pointer_cast<ByteArrayDownload>(m_vinfoNetJob->first())->m_data,
@@ -170,8 +168,8 @@ void DownloadUpdateTask::parseDownloadedVersionInfo()
// info.
if (m_vinfoNetJob->size() >= 2 && m_vinfoNetJob->operator[](1)->m_status != Job_Failed)
{
- setStatus(tr("Reading file list for current version."));
- QLOG_DEBUG() << "Reading file list for current version.";
+ setStatus(tr("Reading file list for current version..."));
+ QLOG_DEBUG() << "Reading file list for current version...";
QString error;
parseVersionInfo(
std::dynamic_pointer_cast<ByteArrayDownload>(m_vinfoNetJob->operator[](1))->m_data,
@@ -278,7 +276,7 @@ DownloadUpdateTask::processFileLists(NetJob *job,
const DownloadUpdateTask::VersionFileList &newVersion,
DownloadUpdateTask::UpdateOperationList &ops)
{
- setStatus(tr("Processing file lists. Figuring out how to install the update."));
+ setStatus(tr("Processing file lists - figuring out how to install the update..."));
// First, if we've loaded the current version's file list, we need to iterate through it and
// delete anything in the current one version's list that isn't in the new version's list.