After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 683067 - Make it easier to see which boxes are turned off
Make it easier to see which boxes are turned off
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
3.5.x (unsupported)
Other Linux
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
: 678463 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-08-30 20:36 UTC by Alexander Larsson
Modified: 2016-03-31 14:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Always show the fallback icon for stopped VMs (1.84 KB, patch)
2012-08-30 20:40 UTC, Alexander Larsson
none Details | Review
Ignore almost-black screenshots (3.01 KB, patch)
2012-08-30 20:40 UTC, Alexander Larsson
none Details | Review
Always show the fallback icon for stopped VMs (3.24 KB, patch)
2012-08-31 11:28 UTC, Alexander Larsson
committed Details | Review
Ignore almost-black screenshots (3.03 KB, patch)
2012-08-31 11:28 UTC, Alexander Larsson
committed Details | Review
Draw stopped machines as black screenshots (1.53 KB, patch)
2012-08-31 11:28 UTC, Alexander Larsson
committed Details | Review
Add new SAVED MachineState (2.27 KB, patch)
2012-08-31 11:28 UTC, Alexander Larsson
committed Details | Review
Don't save last screenshot on display close if stopped (1.38 KB, patch)
2012-08-31 14:37 UTC, Alexander Larsson
committed Details | Review

Description Alexander Larsson 2012-08-30 20:36:15 UTC
Its impossible to tell which boxes are hibernated/paused and which are turned off in the collection view. If you click on a shaded screenshot you expect to end up at something like that screenshot, but if the box was turned off it will show some random "last saved" screenshot, and then when you click it will start booting.

I talked about this with jimmac, and the result is that:
1) We only show thumbnails for running and paused VMs (greyed out for paused)
2) For turned off VMs we show a black thumbnail, overlaid with a OS logo if 
   availible.
3) To avoid having black or almost black screensaver/lock-screen thumbnails
   that look like a turned off VMs we disallow these thumbnails, keeping the
   last thumbnail instead.
Comment 1 Alexander Larsson 2012-08-30 20:40:17 UTC
Created attachment 222992 [details] [review]
Always show the fallback icon for stopped VMs

Showing a random last-saved screenshot isn't right for stopped
VMs as this is not at all what will be seen when clicking on them,
and its hard to tell which VMs are turned off.
Comment 2 Alexander Larsson 2012-08-30 20:40:20 UTC
Created attachment 222993 [details] [review]
Ignore almost-black screenshots

Black and almost black screenshots are almost always screensaver
or lock screens. These just make the collection view icons
be full of black screenshots after a while, which is not very
useful. It is also easy to confuse with turned off boxes which
we want to make black.

To fix this we just ignore all screenshot that are too dark.
Comment 3 Alexander Larsson 2012-08-30 20:41:22 UTC
These patches are a step on the way, we now only have to make draw_fallback_vm draw a black with an optional logo on it.
Comment 4 Alexander Larsson 2012-08-31 11:28:18 UTC
Created attachment 223037 [details] [review]
Always show the fallback icon for stopped VMs

Showing a random last-saved screenshot isn't right for stopped
VMs as this is not at all what will be seen when clicking on them,
and its hard to tell which VMs are turned off.
Comment 5 Alexander Larsson 2012-08-31 11:28:20 UTC
Created attachment 223038 [details] [review]
Ignore almost-black screenshots

Black and almost black screenshots are almost always screensaver
or lock screens. These just make the collection view icons
be full of black screenshots after a while, which is not very
useful. It is also easy to confuse with turned off boxes which
we want to make black.

To fix this we just ignore all screenshot that are too dark.
Comment 6 Alexander Larsson 2012-08-31 11:28:23 UTC
Created attachment 223039 [details] [review]
Draw stopped machines as black screenshots

Later we want to also overlay logos if availible.
Comment 7 Alexander Larsson 2012-08-31 11:28:26 UTC
Created attachment 223040 [details] [review]
Add new SAVED MachineState

This way we can show a greyed out last screenshot in the collection
view, rather than a completely black one. While restoring takes a
while, the screenshot is typically what you will get back to when
restored, so this makes more sense.
Comment 8 Alexander Larsson 2012-08-31 11:31:20 UTC
With this set things are looking pretty good. All we need is a logo added in draw_stopped_vm() when we have that availible.
Comment 9 Zeeshan Ali 2012-08-31 12:02:14 UTC
Review of attachment 223037 [details] [review]:

Looks good but I really think this should simply be merged with 'Draw stopped machines as black screenshots'
Comment 10 Zeeshan Ali 2012-08-31 12:05:53 UTC
Review of attachment 223038 [details] [review]:

Assuming by 'ignore' you mean we show fallback icon and you have tested this against a few VMs, ACK!
Comment 11 Zeeshan Ali 2012-08-31 12:06:13 UTC
Review of attachment 223037 [details] [review]:

Looks good but I really think this should simply be merged with 'Draw stopped machines as black screenshots'
Comment 12 Zeeshan Ali 2012-08-31 12:06:58 UTC
Review of attachment 223039 [details] [review]:

availible -> available

ACK otherwise.
Comment 13 Zeeshan Ali 2012-08-31 12:10:09 UTC
Review of attachment 223040 [details] [review]:

Looks good otherwise.

::: src/libvirt-machine.vala
@@ +125,3 @@
         domain.resumed.connect (() => { state = MachineState.RUNNING; });
+        domain.stopped.connect (() => {
+            if (Signal.get_invocation_hint (domain).detail == Quark.from_string ("saved"))

you don't need that, you can simply use the signal details syntax and have two handlers:

domain.stopped["saved"].connect(..);
domain.stopped["otherdetails"].connect(..);
Comment 14 Alexander Larsson 2012-08-31 13:22:16 UTC
Attachment 223038 [details] pushed as bd3aa14 - Ignore almost-black screenshots
Attachment 223039 [details] pushed as d134749 - Draw stopped machines as black screenshots
Attachment 223040 [details] pushed as 4f6f421 - Add new SAVED MachineState
Comment 15 Alexander Larsson 2012-08-31 14:36:47 UTC
There is still an issue where showing a vm and force shutdown it will make it show as paused, not stopped.
Comment 16 Alexander Larsson 2012-08-31 14:37:00 UTC
Created attachment 223072 [details] [review]
Don't save last screenshot on display close if stopped

If the display is closed we take a last screenshot and
use this. However, it is disconnected due to e.g. a forced
shutdown then we incorrectly override black "turned off"
screenshot, so check this.
Comment 17 Christophe Fergeau 2012-09-03 08:25:42 UTC
Review of attachment 223072 [details] [review]:

"_if_ it is disconnected" in the log

Rest of the patch looks good though I'm not very familiar with this code
Comment 18 Alexander Larsson 2012-09-03 08:45:07 UTC
Attachment 223072 [details] pushed as d1c1434 - Don't save last screenshot on display close if stopped
Comment 19 Zeeshan Ali 2014-07-16 13:45:00 UTC
*** Bug 678463 has been marked as a duplicate of this bug. ***