From 9e1cbcd1782b521c7ed85e192d462f2b177881b9 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Wed, 13 Jul 2011 12:27:23 -0400 Subject: [PATCH] details: Take screenshots before launching browse dialog --- src/virtManager/details.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/virtManager/details.py b/src/virtManager/details.py index b811ce5a6..bce3c26c9 100644 --- a/src/virtManager/details.py +++ b/src/virtManager/details.py @@ -1281,6 +1281,8 @@ class vmmDetails(vmmGObjectUI): self.vm.get_connection().get_uri(), self.vm.get_uuid()) def control_vm_screenshot(self, src_ignore): + image = self.console.viewer.get_pixbuf() + # If someone feels kind they could extend this code to allow # user to choose what image format they'd like to save in.... path = util.browse_local( @@ -1294,9 +1296,8 @@ class vmmDetails(vmmGObjectUI): return filename = path - if not(filename.endswith(".png")): + if not filename.endswith(".png"): filename += ".png" - image = self.console.viewer.get_pixbuf() # Save along with a little metadata about us & the domain image.save(filename, 'png',