74 lines
2.9 KiB
Diff
74 lines
2.9 KiB
Diff
Index: virt-manager-0.4.0/src/virtManager/engine.py
|
|
===================================================================
|
|
--- virt-manager-0.4.0.orig/src/virtManager/engine.py
|
|
+++ virt-manager-0.4.0/src/virtManager/engine.py
|
|
@@ -32,7 +32,7 @@ from virtManager.manager import vmmManag
|
|
from virtManager.details import vmmDetails
|
|
from virtManager.console import vmmConsole
|
|
from virtManager.asyncjob import vmmAsyncJob
|
|
-from virtManager.create import vmmCreate
|
|
+from xen.install.gui.gui import VMCreate as vmmCreate
|
|
from virtManager.serialcon import vmmSerialConsole
|
|
from virtManager.error import vmmErrorDialog
|
|
from virtManager.host import vmmHost
|
|
@@ -42,7 +42,7 @@ class vmmEngine:
|
|
self.windowConnect = None
|
|
self.windowPreferences = None
|
|
self.windowAbout = None
|
|
- self.windowCreate = None
|
|
+ self.windowCreate = {}
|
|
self.connections = {}
|
|
|
|
self.timer = None
|
|
@@ -162,8 +162,7 @@ class vmmEngine:
|
|
for name in [ "windowManager", "windowHost"]:
|
|
if conn[name] != None and conn[name].is_visible():
|
|
ct += 1
|
|
- if self.windowCreate:
|
|
- ct += self.windowCreate.is_visible()
|
|
+ ct += len(filter(lambda w: w.is_visible(), self.windowCreate.values()))
|
|
return ct
|
|
|
|
def change_timer_interval(self,ignore1,ignore2,ignore3,ignore4):
|
|
@@ -295,14 +294,21 @@ class vmmEngine:
|
|
self.connections[uri]["windowManager"] = manager
|
|
self.connections[uri]["windowManager"].show()
|
|
|
|
+ def _create_closing(self, src, key):
|
|
+ del self.windowCreate[key]
|
|
+
|
|
def show_create(self, uri):
|
|
- if self.windowCreate == None:
|
|
- self.windowCreate = vmmCreate(self.get_config(), self.get_connection(uri, False))
|
|
- self.windowCreate.connect("action-show-console", self._do_show_console)
|
|
- self.windowCreate.connect("action-show-terminal", self._do_show_terminal)
|
|
- self.windowCreate.connect("action-show-help", self._do_show_help)
|
|
- self.windowCreate.reset_state()
|
|
- self.windowCreate.show()
|
|
+ key = 0
|
|
+ while True:
|
|
+ if not self.windowCreate.has_key(key):
|
|
+ break
|
|
+ key += 1
|
|
+ window = vmmCreate(virtman=True, key=key)
|
|
+ self.windowCreate[key] = window
|
|
+ window.connect("action-show-console", self._do_show_console)
|
|
+ window.connect("action-show-terminal", self._do_show_terminal)
|
|
+ window.connect("vmmcreate-closing", self._create_closing)
|
|
+ window.show()
|
|
|
|
def get_connection(self, uri, readOnly=None):
|
|
if not(self.connections.has_key(uri)):
|
|
Index: virt-manager-0.4.0/src/virtManager/createnet.py
|
|
===================================================================
|
|
--- virt-manager-0.4.0.orig/src/virtManager/createnet.py
|
|
+++ virt-manager-0.4.0/src/virtManager/createnet.py
|
|
@@ -22,7 +22,6 @@ import gtk
|
|
import gtk.gdk
|
|
import gtk.glade
|
|
import libvirt
|
|
-import virtinst
|
|
import os, sys
|
|
import logging
|
|
import dbus
|