mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
details: Take screenshots before launching browse dialog
This commit is contained in:
parent
7818e628b3
commit
9e1cbcd178
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user