From ca0b23334685ebf0c6dd4f0ba792bb1f5e2b318a Mon Sep 17 00:00:00 2001 From: "Hugh O. Brock" Date: Mon, 17 Jul 2006 19:37:24 -0400 Subject: [PATCH] Pop up dialog for saving images (still doesn't actually do anything) --- src/virtManager/engine.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/virtManager/engine.py b/src/virtManager/engine.py index 92d0e03b..a2e7bb28 100644 --- a/src/virtManager/engine.py +++ b/src/virtManager/engine.py @@ -208,4 +208,16 @@ class vmmEngine: if status in [ libvirt.VIR_DOMAIN_SHUTDOWN, libvirt.VIR_DOMAIN_SHUTOFF, libvirt.VIR_DOMAIN_CRASHED, libvirt.VIR_DOMAIN_PAUSED ]: print "Save requested, but machine is shutdown / shutoff / paused" else: + dialog = gtk.FileChooserDialog("Save Virtual Machine", + None, + gtk.FILE_CHOOSER_ACTION_SAVE, + (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, + gtk.STOCK_SAVE, gtk.RESPONSE_ACCEPT), + None) + response = dialog.run() + if(response == gtk.RESPONSE_ACCEPT): + uri_to_save = dialog.get_uri() + print "Got file URI " + uri_to_save + dialog.destroy() + print "XXX actually save the domain"