[gnome-boxes] Don't save last screenshot on display close if stopped
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] Don't save last screenshot on display close if stopped
- Date: Mon, 3 Sep 2012 08:44:59 +0000 (UTC)
commit d1c143405567b1b07e38607d350f9530651c6776
Author: Alexander Larsson <alexl redhat com>
Date: Fri Aug 31 16:03:23 2012 +0200
Don't save last screenshot on display close if stopped
If the display is closed we take a last screenshot and
use this. However, if it is disconnected due to e.g. a forced
shutdown then we incorrectly override black "turned off"
screenshot, so check this.
https://bugzilla.gnome.org/show_bug.cgi?id=683067
src/machine.vala | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/src/machine.vala b/src/machine.vala
index 9671b54..14e42b1 100644
--- a/src/machine.vala
+++ b/src/machine.vala
@@ -203,12 +203,14 @@ private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.IPropertiesPro
if (display == null)
return;
- try {
- var pixbuf = display.get_pixbuf (0);
- if (pixbuf != null)
- set_screenshot (pixbuf, true);
- } catch (GLib.Error error) {
- warning (error.message);
+ if (state != MachineState.STOPPED) {
+ try {
+ var pixbuf = display.get_pixbuf (0);
+ if (pixbuf != null)
+ set_screenshot (pixbuf, true);
+ } catch (GLib.Error error) {
+ warning (error.message);
+ }
}
App.app.display_page.remove_display ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]