2013-02-04 20:46:15 +01:00
|
|
|
Index: virt-manager-0.9.4/src/virtManager/engine.py
|
2009-08-01 11:46:10 +02:00
|
|
|
===================================================================
|
2013-02-04 20:46:15 +01:00
|
|
|
--- virt-manager-0.9.4.orig/src/virtManager/engine.py
|
|
|
|
+++ virt-manager-0.9.4/src/virtManager/engine.py
|
|
|
|
@@ -24,6 +24,7 @@ import gtk
|
|
|
|
import logging
|
|
|
|
import threading
|
|
|
|
import os
|
|
|
|
+import traceback
|
|
|
|
|
|
|
|
import libvirt
|
|
|
|
import virtinst
|
|
|
|
@@ -42,7 +43,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
|
2013-02-04 20:46:15 +01:00
|
|
|
@@ -671,11 +671,47 @@ 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))
|
2011-11-28 20:35:50 +01:00
|
|
|
+ if uri is None:
|
|
|
|
+ uri = default_uri()
|
2011-09-27 20:22:09 +02:00
|
|
|
+ conn = self._lookup_conn(uri)
|
2011-09-20 17:08:57 +02:00
|
|
|
+ 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)
|
2011-09-27 20:22:09 +02:00
|
|
|
+ create.connect("action-show-vm", self._do_show_vm)
|
2010-12-20 22:07:40 +01:00
|
|
|
+ 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
|
2011-09-27 20:22:09 +02:00
|
|
|
+ self.windowCreate.show(src.topwin, uri)
|
2010-12-20 22:07:40 +01:00
|
|
|
+ else:
|
|
|
|
+ from vminstall.gtk.interface import VMCreate as vmmCreate
|
|
|
|
+ create = vmmCreate(virtman=True,key=0)
|
2011-09-27 23:42:35 +02:00
|
|
|
+ create.connect("action-show-vm", self._do_show_vm)
|
2010-12-20 22:07:40 +01:00
|
|
|
+ create.connect("vmmcreate-closing", self._vmmcreate_closing)
|
2011-01-08 00:33:16 +01:00
|
|
|
+ self.remote_install = False
|
|
|
|
+ self.windowCreate = create
|
2011-09-27 20:22:09 +02:00
|
|
|
+ self.windowCreate.show(src.topwin)
|
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:
|
2011-09-27 20:22:09 +02:00
|
|
|
+ self.windowCreate.show(src.topwin, uri)
|
2011-01-08 00:33:16 +01:00
|
|
|
+ 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:
|
2013-02-04 20:46:15 +01:00
|
|
|
Index: virt-manager-0.9.4/src/virtManager/create.py
|
2011-01-08 00:33:16 +01:00
|
|
|
===================================================================
|
2013-02-04 20:46:15 +01:00
|
|
|
--- virt-manager-0.9.4.orig/src/virtManager/create.py
|
|
|
|
+++ virt-manager-0.9.4/src/virtManager/create.py
|
2012-07-13 22:11:20 +02:00
|
|
|
@@ -176,6 +176,7 @@ class vmmCreate(vmmGObjectUI):
|
2011-01-08 00:33:16 +01:00
|
|
|
|
|
|
|
def close(self, ignore1=None, ignore2=None):
|
2012-02-03 16:47:45 +01:00
|
|
|
logging.debug("Closing new vm wizard")
|
2011-01-08 00:33:16 +01:00
|
|
|
+ self.emit('vmmcreate-closing', 0)
|
|
|
|
self.topwin.hide()
|
|
|
|
self.remove_timers()
|
|
|
|
|
2012-07-13 22:11:20 +02:00
|
|
|
@@ -2152,3 +2153,4 @@ class vmmCreate(vmmGObjectUI):
|
2011-09-20 17:08:57 +02:00
|
|
|
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])
|