diff --git a/pixmaps/icon_shutdown.png b/pixmaps/icon_shutdown.png
new file mode 100644
index 000000000..db63a1865
Binary files /dev/null and b/pixmaps/icon_shutdown.png differ
diff --git a/src/Makefile.am b/src/Makefile.am
index 9828414f5..bc1e330e2 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -6,7 +6,7 @@ bin_SCRIPTS = virt-manager
pythondir = $(pkgdatadir)
python_SOURCES = $(PACKAGE).py.in
-python_DATA = $(PACKAGE).py
+python_SCRIPTS = $(PACKAGE).py
libexec_SOURCES = $(PACKAGE)-launch.in
libexec_SCRIPTS = $(PACKAGE)-launch
@@ -22,7 +22,7 @@ dbusdir = $(datadir)/dbus-1/services
dbus_SOURCES = $(PACKAGE).service.in
dbus_DATA = $(PACKAGE).service
-CLEANFILES = $(bin_SCRIPTS) $(desktop_DATA) $(dbus_DATA) $(python_DATA) $(libexec_SCRIPTS)
+CLEANFILES = $(bin_SCRIPTS) $(desktop_DATA) $(dbus_DATA) $(python_SCRIPTS) $(libexec_SCRIPTS)
EXTRA_DIST = $(bin_SOURCES) $(desktop_SOURCES) $(dbus_SOURCES) $(python_SOURCES) $(glade_DATA) $(libexec_SOURCES)
diff --git a/src/virt-manager.glade b/src/virt-manager.glade
index fdcf0f5f3..0c7070b06 100644
--- a/src/virt-manager.glade
+++ b/src/virt-manager.glade
@@ -3265,4 +3265,70 @@ Inactive virtual machines
+
+ True
+ Saving VM Image
+ GTK_WINDOW_TOPLEVEL
+ GTK_WIN_POS_CENTER_ON_PARENT
+ False
+ True
+ False
+ True
+ False
+ False
+ GDK_WINDOW_TYPE_HINT_DIALOG
+ GDK_GRAVITY_NORTH_WEST
+ True
+ True
+
+
+
+ True
+ False
+ 0
+
+
+
+ True
+ Please wait while the VM image saves...
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0.5
+ 0.600000023842
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 10
+ False
+ False
+
+
+
+
+
+ True
+ GTK_PROGRESS_LEFT_TO_RIGHT
+ 0
+ 0.10000000149
+
+ PANGO_ELLIPSIZE_NONE
+
+
+ 5
+ False
+ False
+
+
+
+
+
+
diff --git a/src/virtManager/Makefile.am b/src/virtManager/Makefile.am
index 6aa887c60..b9cf5196c 100644
--- a/src/virtManager/Makefile.am
+++ b/src/virtManager/Makefile.am
@@ -1,5 +1,5 @@
pythondir = $(pkgdatadir)/virtManager
-python_DATA = $(wildcard $(srcdir)/*.py)
+python_SCRIPTS = $(wildcard $(srcdir)/*.py)
-EXTRA_DIST = $(python_DATA)
+EXTRA_DIST = $(python_SCRIPTS)
diff --git a/src/virtManager/console.py b/src/virtManager/console.py
index 1b2e654f9..5ddcf4bdf 100644
--- a/src/virtManager/console.py
+++ b/src/virtManager/console.py
@@ -51,7 +51,7 @@ class vmmConsole(gobject.GObject):
self.window.get_widget("control-pause").get_icon_widget().set_from_file(config.get_icon_dir() + "/icon_pause.png")
self.window.get_widget("control-shutdown").set_icon_widget(gtk.Image())
- #self.window.get_widget("control-shutdown").get_icon_widget().set_from_file(config.get_icon_dir() + "/icon_run.png")
+ self.window.get_widget("control-shutdown").get_icon_widget().set_from_file(config.get_icon_dir() + "/icon_shutdown.png")
self.window.get_widget("control-terminal").set_icon_widget(gtk.Image())
self.window.get_widget("control-terminal").get_icon_widget().set_from_file(config.get_icon_dir() + "/icon_launch_term.png")
diff --git a/src/virtManager/details.py b/src/virtManager/details.py
index eed80b9c6..11fcca223 100644
--- a/src/virtManager/details.py
+++ b/src/virtManager/details.py
@@ -52,7 +52,7 @@ class vmmDetails(gobject.GObject):
self.window.get_widget("control-pause").get_icon_widget().set_from_file(config.get_icon_dir() + "/icon_pause.png")
self.window.get_widget("control-shutdown").set_icon_widget(gtk.Image())
- #self.window.get_widget("control-shutdown").get_icon_widget().set_from_file(config.get_icon_dir() + "/icon_run.png")
+ self.window.get_widget("control-shutdown").get_icon_widget().set_from_file(config.get_icon_dir() + "/icon_shutdown.png")
self.window.get_widget("control-terminal").set_icon_widget(gtk.Image())
self.window.get_widget("control-terminal").get_icon_widget().set_from_file(config.get_icon_dir() + "/icon_launch_term.png")
@@ -61,7 +61,7 @@ class vmmDetails(gobject.GObject):
self.window.get_widget("control-save-domain").get_icon_widget().set_from_file(config.get_icon_dir() + "/icon_snapshot.png")
self.window.get_widget("control-console").set_icon_widget(gtk.Image())
- #self.window.get_widget("control-console").get_icon_widget().set_from_file(config.get_icon_dir() + "/icon_snapshot.png")
+ self.window.get_widget("control-console").get_icon_widget().set_from_file(config.get_icon_dir() + "/icon_launch_term.png")
self.window.get_widget("hw-panel").set_show_tabs(False)
diff --git a/src/virtManager/domain.py b/src/virtManager/domain.py
index 54b7e2617..da070d573 100644
--- a/src/virtManager/domain.py
+++ b/src/virtManager/domain.py
@@ -117,7 +117,6 @@ class vmmDomain(gobject.GObject):
}
self.record.insert(0, newStats)
-
nSamples = 5
#nSamples = len(self.record)
if nSamples > len(self.record):
@@ -240,6 +239,10 @@ class vmmDomain(gobject.GObject):
self.vm.resume()
self._update_status()
+ def save(self, file):
+ self.vm.save(file)
+ self._update_status()
+
def status(self):
return self.lastStatus
diff --git a/src/virtManager/engine.py b/src/virtManager/engine.py
index 92d0e03b5..361e651c6 100644
--- a/src/virtManager/engine.py
+++ b/src/virtManager/engine.py
@@ -28,14 +28,12 @@ from virtManager.preferences import vmmPreferences
from virtManager.manager import vmmManager
from virtManager.details import vmmDetails
from virtManager.console import vmmConsole
-# from virtManager.savedialog import vmmSaveDialog
class vmmEngine:
def __init__(self, config):
self.windowConnect = None
self.windowPreferences = None
self.windowAbout = None
-
self.connections = {}
self.timer = None
@@ -124,7 +122,7 @@ class vmmEngine:
def _do_show_console(self, src, uri, uuid):
self.show_console(uri, uuid)
def _do_save_domain(self, src, uri, uuid):
- self.save_domain(uri, uuid)
+ self.save_domain(src, uri, uuid)
def show_about(self):
if self.windowAbout == None:
@@ -201,11 +199,41 @@ class vmmEngine:
return self.connections[uri]["connection"]
- def save_domain(self, uri, uuid):
+ def save_domain(self, src, uri, uuid):
con = self.get_connection(uri, False)
vm = con.get_vm(uuid)
status = vm.status()
- if status in [ libvirt.VIR_DOMAIN_SHUTDOWN, libvirt.VIR_DOMAIN_SHUTOFF, libvirt.VIR_DOMAIN_CRASHED, libvirt.VIR_DOMAIN_PAUSED ]:
+ 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:
- print "XXX actually save the domain"
+ self.fcdialog = gtk.FileChooserDialog("Save Virtual Machine",
+ src.window.get_widget("vmm-details"),
+ gtk.FILE_CHOOSER_ACTION_SAVE,
+ (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
+ gtk.STOCK_SAVE, gtk.RESPONSE_ACCEPT),
+ None)
+ self.fcdialog.set_do_overwrite_confirmation(True)
+ # also set up the progress bar now
+ self.pbar_glade = gtk.glade.XML(config.get_glade_file(), "vmm-save-progress")
+ self.pbar_win = self.pbar_glade.get_widget("vmm-save-progress")
+ self.pbar_win.hide()
+
+ response = self.fcdialog.run()
+ self.fcdialog.hide()
+ if(response == gtk.RESPONSE_ACCEPT):
+ uri_to_save = self.fcdialog.get_filename()
+ # show a lovely bouncing progress bar until the vm actually saves
+ self.timer = gobject.timeout_add (100,
+ self.pbar_glade.get_widget("pbar").pulse)
+ self.pbar_win.present()
+
+ # actually save the vm
+ vm.save( uri_to_save )
+ gobject.source_remove(self.timer)
+ self.timer = 0
+ self.pbar_win.hide()
+ self.fcdialog.destroy()
+ self.pbar_win.destroy()
diff --git a/src/vncViewer/Makefile.am b/src/vncViewer/Makefile.am
index 708f6e9af..f000a51c7 100644
--- a/src/vncViewer/Makefile.am
+++ b/src/vncViewer/Makefile.am
@@ -1,5 +1,5 @@
pythondir = $(pkgdatadir)/vncViewer
-python_DATA = $(wildcard $(srcdir)/*.py)
+python_SCRIPTS = $(wildcard $(srcdir)/*.py)
-EXTRA_DIST = $(python_DATA)
+EXTRA_DIST = $(python_SCRIPTS)
diff --git a/virt-manager.spec.in b/virt-manager.spec.in
index d541406d5..103bc8231 100644
--- a/virt-manager.spec.in
+++ b/virt-manager.spec.in
@@ -8,8 +8,8 @@ Release: 1%{_extra_release}
Summary: Virtual Machine Manager
Group: Applications/Emulators
-License: GPL v2+
-URL: http://people.redhat.com/berrange/virt-manager/
+License: GPL
+URL: http://virt-manager.et.redhat.com/
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -28,12 +28,9 @@ Requires: gnome-keyring >= 0.4.9
# Minimum we've tested with
Requires: python-ctypes >= 0.9.9.6
-# src/vncViewer/image.py needs either this
+# src/vncViewer/image.py needs this but we'd like to kill it off
+# soon because it pulls in TCL/TK :-(
Requires: python-imaging
-# Or this
-# pygame pulls in crazy dependancies such as Tcl, so we use python-imaging for now
-#Requires: pygame
-# But not both!
BuildRequires: pygtk2-devel
BuildRequires: gtk2-devel
@@ -63,6 +60,7 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
+%doc README COPYING AUTHORS ChangeLog NEWS
%{_bindir}/%{name}
%{_libexecdir}/%{name}-launch
%{_libdir}/%{name}/*
@@ -71,6 +69,10 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/dbus-1/services/%{name}.service
%changelog
+* Mon Jul 17 2006 Daniel Berrange - 0.1.3-1
+- Fix License tag
+- Updated for new release
+
* Wed Jun 28 2006 Daniel Berrange - 0.1.2-3
- Added missing copyright headers on all .py files