GNOME Bugzilla – Bug 686777
Add an explicit pause button
Last modified: 2016-03-31 13:54:57 UTC
We need to have some way to pause a specific VM in case you want to work on some other and not unnecessarily run other VMs. Right now the only way to do this is to exit boxes to stop everything and then start it again and only activate the VMs you want running. I'm not sure what the best place for this is though. The properties page? The collection view? both? I guess this depends on bug 677714 in case we want it in the property page.
(In reply to comment #0) > We need to have some way to pause a specific VM in case you want to work on > some other and not unnecessarily run other VMs. Right now the only way to do > this is to exit boxes to stop everything and then start it again and only > activate the VMs you want running. Based on the last sentence above, you mean 'save' by 'pause'? > I'm not sure what the best place for this is though. The properties page? The > collection view? both? Where in properties would it belong? A button above 'Force Shutdown'?
I guess i mean save, rather than pause as pause is a state we're otherwise not currently exposing. Not sure though. Also not sure about the position, especially how all these minor changes interact. This needs some design work, i'll chat to jimmac about it.
Created attachment 227288 [details] [review] Change how the selection toolbar is built Instead of hardcoding offsets on each item we pack them in order by appending at the end (offset=-1). This means we don't have to change all offsets when we add a new button.
Created attachment 227289 [details] [review] Add Machine.save() with libvirt implementation This will be used to explicitly save a vm.
Created attachment 227290 [details] [review] Add pause button to selection toolbar
Review of attachment 227288 [details] [review]: Looks right
Review of attachment 227289 [details] [review]: ACK
Review of attachment 227290 [details] [review]: Looks good otherwise. ::: src/selectionbar.vala @@ +49,3 @@ + if (machine == null) + continue; + machine.save.begin ( (obj, result) => { This operation is usually pretty heavy and could easily take several seconds. We really want a spinner for this. @@ +50,3 @@ + continue; + machine.save.begin ( (obj, result) => { + var m = obj as Machine; I think this lambda can access 'machine' variable from outer context fine.
Review of attachment 227290 [details] [review]: ::: src/selectionbar.vala @@ +49,3 @@ + if (machine == null) + continue; + machine.save.begin ( (obj, result) => { After talking to you about this on IRC, I don't think we need a spinner here.
Review of attachment 227290 [details] [review]: ::: src/selectionbar.vala @@ +50,3 @@ + continue; + machine.save.begin ( (obj, result) => { + var m = obj as Machine; True, i was afraid of it being reused in the outer block as the loop progressed, but it seems valac uses a new block for each iteration.
Attachment 227288 [details] pushed as 75358ff - Change how the selection toolbar is built Attachment 227289 [details] pushed as 71f5b16 - Add Machine.save() with libvirt implementation Attachment 227290 [details] pushed as a27bc03 - Add pause button to selection toolbar