[gnome-boxes] Handle screenshots correctly on FORCE_STOPPED
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] Handle screenshots correctly on FORCE_STOPPED
- Date: Wed, 31 Oct 2012 13:54:58 +0000 (UTC)
commit 526cd077f9c18893dce69ed2d8eab9b8e5661d86
Author: Alexander Larsson <alexl redhat com>
Date: Wed Oct 31 14:36:46 2012 +0100
Handle screenshots correctly on FORCE_STOPPED
This should be handled just like STOPPED. Without this we get
shaded screenshots instead of black screenshots when you force-stop
a box.
https://bugzilla.gnome.org/show_bug.cgi?id=685846
src/machine.vala | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/machine.vala b/src/machine.vala
index 6904684..974d94e 100644
--- a/src/machine.vala
+++ b/src/machine.vala
@@ -45,7 +45,7 @@ private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.IPropertiesPro
protected set {
_state = value;
debug ("State of '%s' changed to %s", name, state.to_string ());
- if (value == MachineState.STOPPED)
+ if (value == MachineState.STOPPED || value == MachineState.FORCE_STOPPED)
set_screenshot (null, false);
else {
// Update existing screenshot based on machine status
@@ -219,7 +219,7 @@ private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.IPropertiesPro
if (display == null)
return;
- if (state != MachineState.STOPPED) {
+ if (state != MachineState.STOPPED && state != MachineState.FORCE_STOPPED) {
try {
var pixbuf = display.get_pixbuf (0);
if (pixbuf != null)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]