summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2016-11-04 01:17:28 +0100
committerPetr Mrázek <peterix@gmail.com>2016-11-04 01:19:04 +0100
commit87dd9515052661e622587cafcf972ea1beee8195 (patch)
treeb0e491c544180a9629f78b4fb9df3a383858b26b /application
parent3780a25d27ae5c803ce9ed075928fff365104987 (diff)
downloadMultiMC-87dd9515052661e622587cafcf972ea1beee8195.tar
MultiMC-87dd9515052661e622587cafcf972ea1beee8195.tar.gz
MultiMC-87dd9515052661e622587cafcf972ea1beee8195.tar.lz
MultiMC-87dd9515052661e622587cafcf972ea1beee8195.tar.xz
MultiMC-87dd9515052661e622587cafcf972ea1beee8195.zip
NOISSUE add a badge for crashed instances
Not persistent across MultiMC runs.
Diffstat (limited to 'application')
-rw-r--r--application/groupview/InstanceDelegate.cpp17
-rw-r--r--application/resources/instances/instances.qrc1
-rw-r--r--application/resources/instances/status-bad.pngbin0 -> 1102 bytes
3 files changed, 11 insertions, 7 deletions
diff --git a/application/groupview/InstanceDelegate.cpp b/application/groupview/InstanceDelegate.cpp
index 359dd3cf..b88f9a8a 100644
--- a/application/groupview/InstanceDelegate.cpp
+++ b/application/groupview/InstanceDelegate.cpp
@@ -113,18 +113,21 @@ void drawProgressOverlay(QPainter *painter, const QStyleOptionViewItemV4 &option
void drawBadges(QPainter *painter, const QStyleOptionViewItemV4 &option, BaseInstance *instance)
{
QList<QString> pixmaps;
- const BaseInstance::InstanceFlags flags = instance->flags();
- if (flags & BaseInstance::VersionBrokenFlag)
+ if (instance->isRunning())
{
- pixmaps.append("broken");
+ pixmaps.append("status-running");
}
- if (flags & BaseInstance::UpdateAvailable)
+ else if (instance->hasCrashed())
{
- pixmaps.append("updateavailable");
+ pixmaps.append("status-bad");
}
- if (instance->isRunning())
+ if (instance->hasVersionBroken())
{
- pixmaps.append("status-running");
+ pixmaps.append("broken");
+ }
+ if (instance->hasUpdateAvailable())
+ {
+ pixmaps.append("updateavailable");
}
// begin easter eggs
diff --git a/application/resources/instances/instances.qrc b/application/resources/instances/instances.qrc
index b1f1bb4d..1f90762a 100644
--- a/application/resources/instances/instances.qrc
+++ b/application/resources/instances/instances.qrc
@@ -38,6 +38,7 @@
<file>herobrine.png</file>
<file>derp.png</file>
<file>status-running.png</file>
+ <file>status-bad.png</file>
<!-- Update. GPLv2, https://code.google.com/p/gnome-colors/ -->
<file>updateavailable.png</file>
diff --git a/application/resources/instances/status-bad.png b/application/resources/instances/status-bad.png
new file mode 100644
index 00000000..d1547a47
--- /dev/null
+++ b/application/resources/instances/status-bad.png
Binary files differ