2011-09-20 17:08:57 +02:00
|
|
|
Index: virt-manager-0.9.0/src/virtManager/engine.py
|
2009-08-01 11:46:10 +02:00
|
|
|
===================================================================
|
2011-09-20 17:08:57 +02:00
|
|
|
--- virt-manager-0.9.0.orig/src/virtManager/engine.py
|
|
|
|
+++ virt-manager-0.9.0/src/virtManager/engine.py
|
2011-03-21 20:38:43 +01:00
|
|
|
@@ -41,7 +41,6 @@ from virtManager.manager import vmmManag
|
2010-02-16 17:11:41 +01:00
|
|
|
from virtManager.migrate import vmmMigrateDialog
|
2008-02-04 17:42:11 +01:00
|
|
|
from virtManager.details import vmmDetails
|
|
|
|
from virtManager.asyncjob import vmmAsyncJob
|
|
|
|
-from virtManager.create import vmmCreate
|
|
|
|
from virtManager.host import vmmHost
|
|
|
|
from virtManager.error import vmmErrorDialog
|
2009-08-01 11:46:10 +02:00
|
|
|
from virtManager.systray import vmmSystray
|
2011-09-20 17:08:57 +02:00
|
|
|
@@ -818,11 +817,45 @@ class vmmEngine(vmmGObject):
|
2011-03-21 20:38:43 +01:00
|
|
|
self.windowCreate = obj
|
|
|
|
return self.windowCreate
|
2008-02-04 17:42:11 +01:00
|
|
|
|
2008-04-12 21:33:47 +02:00
|
|
|
+ def _vmmcreate_closing(self,signal,key):
|
2009-05-04 18:36:17 +02:00
|
|
|
+ self.windowCreate = None
|
|
|
|
+
|
2011-03-21 20:38:43 +01:00
|
|
|
def _do_show_create(self, src, uri):
|
|
|
|
- try:
|
2011-09-20 17:08:57 +02:00
|
|
|
- self._get_create_dialog().show(src.topwin, uri)
|
2011-03-21 20:38:43 +01:00
|
|
|
- except Exception, e:
|
2011-09-20 17:08:57 +02:00
|
|
|
- src.err.show_err(_("Error launching manager: %s") % str(e))
|
|
|
|
+ conn = self._lookup_connection(uri)
|
|
|
|
+ do_remote = conn.is_remote()
|
2011-01-08 00:33:16 +01:00
|
|
|
+ if self.windowCreate == None or do_remote != self.remote_install:
|
2010-03-21 11:56:54 +01:00
|
|
|
+ try:
|
2011-01-08 00:33:16 +01:00
|
|
|
+ if do_remote:
|
2010-12-20 22:07:40 +01:00
|
|
|
+ from virtManager.create import vmmCreate
|
2011-03-21 20:38:43 +01:00
|
|
|
+ create = vmmCreate(self)
|
2010-12-20 22:07:40 +01:00
|
|
|
+ create.connect("action-show-console", self._do_show_console)
|
|
|
|
+ create.connect("action-show-help", self._do_show_help)
|
2011-01-08 00:33:16 +01:00
|
|
|
+ create.connect("vmmcreate-closing", self._vmmcreate_closing)
|
|
|
|
+ self.remote_install = True
|
|
|
|
+ self.windowCreate = create
|
|
|
|
+ self.windowCreate.show(uri)
|
2010-12-20 22:07:40 +01:00
|
|
|
+ else:
|
|
|
|
+ from vminstall.gtk.interface import VMCreate as vmmCreate
|
|
|
|
+ create = vmmCreate(virtman=True,key=0)
|
|
|
|
+ create.connect("action-show-console", self._do_show_console)
|
|
|
|
+ create.connect("vmmcreate-closing", self._vmmcreate_closing)
|
2011-01-08 00:33:16 +01:00
|
|
|
+ self.remote_install = False
|
|
|
|
+ self.windowCreate = create
|
|
|
|
+ self.windowCreate.show()
|
2010-03-21 11:56:54 +01:00
|
|
|
+ except Exception, e:
|
2011-03-21 20:38:43 +01:00
|
|
|
+ src.err.show_err(_("Error launching manager: %s") % str(e),
|
|
|
|
+ "".join(traceback.format_exc()))
|
2008-04-12 21:33:47 +02:00
|
|
|
+ else:
|
2011-01-08 00:33:16 +01:00
|
|
|
+ if do_remote:
|
|
|
|
+ self.windowCreate.show(uri)
|
|
|
|
+ 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()
|
2008-02-04 17:42:11 +01:00
|
|
|
|
2011-03-21 20:38:43 +01:00
|
|
|
def _do_show_migrate(self, src, uri, uuid):
|
|
|
|
try:
|
2011-09-20 17:08:57 +02:00
|
|
|
Index: virt-manager-0.9.0/src/virtManager/create.py
|
2011-01-08 00:33:16 +01:00
|
|
|
===================================================================
|
2011-09-20 17:08:57 +02:00
|
|
|
--- virt-manager-0.9.0.orig/src/virtManager/create.py
|
|
|
|
+++ virt-manager-0.9.0/src/virtManager/create.py
|
|
|
|
@@ -154,6 +154,7 @@ class vmmCreate(vmmGObjectUI):
|
2011-01-08 00:33:16 +01:00
|
|
|
self.topwin.present()
|
|
|
|
|
|
|
|
def close(self, ignore1=None, ignore2=None):
|
|
|
|
+ self.emit('vmmcreate-closing', 0)
|
|
|
|
self.topwin.hide()
|
|
|
|
self.remove_timers()
|
|
|
|
|
2011-09-20 17:08:57 +02:00
|
|
|
@@ -2127,3 +2128,4 @@ class vmmCreate(vmmGObjectUI):
|
|
|
|
vmmGObjectUI.type_register(vmmCreate)
|
|
|
|
vmmCreate.signal_new(vmmCreate, "action-show-vm", [str, str])
|
|
|
|
vmmCreate.signal_new(vmmCreate, "action-show-help", [str])
|
|
|
|
+vmmCreate.signal_new(vmmCreate, "vmmcreate-closing", [str])
|