summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
authorSky <git@bunnies.cc>2013-10-21 17:50:45 +0100
committerSky <git@bunnies.cc>2013-10-21 17:50:45 +0100
commitce512e1cf228584336353acbcacbdc30e21f5c4a (patch)
tree597fbcfd5a0aaef3721f33cf6ae26ac42d058ff9 /gui
parent681d36b23251993a8678db8e72859d4018396b63 (diff)
downloadMultiMC-ce512e1cf228584336353acbcacbdc30e21f5c4a.tar
MultiMC-ce512e1cf228584336353acbcacbdc30e21f5c4a.tar.gz
MultiMC-ce512e1cf228584336353acbcacbdc30e21f5c4a.tar.lz
MultiMC-ce512e1cf228584336353acbcacbdc30e21f5c4a.tar.xz
MultiMC-ce512e1cf228584336353acbcacbdc30e21f5c4a.zip
Clean up skins, remove wrapper, save to accounts/skins
Diffstat (limited to 'gui')
-rw-r--r--gui/logindialog.cpp3
-rw-r--r--gui/mainwindow.cpp9
2 files changed, 7 insertions, 5 deletions
diff --git a/gui/logindialog.cpp b/gui/logindialog.cpp
index 332b5d38..aeaaaa9e 100644
--- a/gui/logindialog.cpp
+++ b/gui/logindialog.cpp
@@ -206,8 +206,7 @@ void LoginDialog::userTextChanged ( const QString& user )
}
}
- if(gotFace) ui->lblFace->setVisible(true);
- else ui->lblFace->setVisible(false);
+ ui->lblFace->setVisible(gotFace);
blockToggles = false;
}
diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp
index b68af5fa..f5503754 100644
--- a/gui/mainwindow.cpp
+++ b/gui/mainwindow.cpp
@@ -57,7 +57,6 @@
#include "logic/lists/JavaVersionList.h"
#include "logic/net/LoginTask.h"
-#include "logic/net/SkinDownload.h"
#include "logic/BaseInstance.h"
#include "logic/InstanceFactory.h"
@@ -520,9 +519,13 @@ void MainWindow::onLoginComplete()
delete updateTask;
}
- auto download = new SkinDownload(m_activeLogin.player_name);
- download->start();
+ auto job = new DownloadJob("Player skin: " + m_activeLogin.player_name);
+ auto meta = MMC->metacache()->resolveEntry("skins", m_activeLogin.player_name + ".png");
+ job->addCacheDownload(QUrl("http://skins.minecraft.net/MinecraftSkins/" + m_activeLogin.player_name + ".png"), meta);
+ meta->stale = true;
+
+ job->start();
auto filename = MMC->metacache()->resolveEntry("skins", "skins.json")->getFullPath();
QFile listFile(filename);