File virtman-vminstall.diff of Package virt-manager

diff -Nuar virt-manager-0.5.3.orig/src/virtManager/engine.py virt-manager-0.5.3/src/virtManager/engine.py
--- virt-manager-0.5.3.orig/src/virtManager/engine.py	2008-03-12 15:21:57.000000000 -0600
+++ virt-manager-0.5.3/src/virtManager/engine.py	2008-03-12 17:43:02.000000000 -0600
@@ -34,7 +34,7 @@
 from virtManager.details import vmmDetails
 from virtManager.console import vmmConsole
 from virtManager.asyncjob import vmmAsyncJob
-from virtManager.create import vmmCreate
+from vminstall.gtk.interface import VMCreate as vmmCreate
 from virtManager.serialcon import vmmSerialConsole
 from virtManager.host import vmmHost
 from virtManager.error import vmmErrorDialog
@@ -311,16 +311,25 @@
     def show_manager(self):
         self.get_manager().show()
 
-    def show_create(self, uri):
-        con = self.get_connection(uri)
+    def _vmmcreate_closing(self,signal,key):
+        self.windowCreate= None;
 
-        if self.connections[uri]["windowCreate"] == None:
-            create = vmmCreate(self.get_config(), con)
+    def show_create(self, uri):
+        if self.windowCreate == None:
+            create = vmmCreate(virtman=True,key=0)
             create.connect("action-show-console", self._do_show_console)
             create.connect("action-show-terminal", self._do_show_terminal)
-            create.connect("action-show-help", self._do_show_help)
-            self.connections[uri]["windowCreate"] = create
-        self.connections[uri]["windowCreate"].show()
+            create.connect("vmmcreate-closing", self._vmmcreate_closing)
+            self.windowCreate = create
+            self.windowCreate.show()
+        else:
+            message_box = gtk.MessageDialog(None,
+                        gtk.DIALOG_MODAL, 
+                        gtk.MESSAGE_WARNING, 
+                        gtk.BUTTONS_OK,
+                        _("A new installation is already in progress.\n\nUse the YaST \"Create Virtual Machines\" utility for concurrent installations."))
+            message_box.run()
+            message_box.destroy()
 
     def add_connection(self, uri, readOnly=None):
         conn = vmmConnection(self.get_config(), uri, readOnly)
openSUSE Build Service is sponsored by