create wizard now actually appears when you push the new button. Still doesn't do anything.
This commit is contained in:
parent
229b4db024
commit
58953ba2d9
File diff suppressed because it is too large
Load Diff
|
@ -29,12 +29,14 @@ from virtManager.manager import vmmManager
|
|||
from virtManager.details import vmmDetails
|
||||
from virtManager.console import vmmConsole
|
||||
from virtManager.asyncjob import vmmAsyncJob
|
||||
from virtManager.create import vmmCreate
|
||||
|
||||
class vmmEngine:
|
||||
def __init__(self, config):
|
||||
self.windowConnect = None
|
||||
self.windowPreferences = None
|
||||
self.windowAbout = None
|
||||
self.windowCreate = None
|
||||
self.connections = {}
|
||||
|
||||
self.timer = None
|
||||
|
@ -120,6 +122,8 @@ class vmmEngine:
|
|||
self.show_manager(uri)
|
||||
def _do_show_details(self, src, uri, uuid):
|
||||
self.show_details(uri, uuid)
|
||||
def _do_show_create(self, src):
|
||||
self.show_create()
|
||||
def _do_show_console(self, src, uri, uuid):
|
||||
self.show_console(uri, uuid)
|
||||
def _do_save_domain(self, src, uri, uuid):
|
||||
|
@ -182,11 +186,17 @@ class vmmEngine:
|
|||
manager.connect("action-show-console", self._do_show_console)
|
||||
manager.connect("action-show-details", self._do_show_details)
|
||||
manager.connect("action-show-preferences", self._do_show_preferences)
|
||||
manager.connect("action-show-create", self._do_show_create)
|
||||
manager.connect("action-show-about", self._do_show_about)
|
||||
manager.connect("action-show-connect", self._do_show_connect)
|
||||
self.connections[uri]["windowManager"] = manager
|
||||
self.connections[uri]["windowManager"].show()
|
||||
|
||||
def show_create(self):
|
||||
if self.windowCreate == None:
|
||||
self.windowCreate = vmmCreate(self.get_config())
|
||||
self.windowCreate.show()
|
||||
|
||||
def get_connection(self, uri, readOnly=True):
|
||||
if not(self.connections.has_key(uri)):
|
||||
self.connections[uri] = {
|
||||
|
|
|
@ -45,7 +45,8 @@ class vmmManager(gobject.GObject):
|
|||
gobject.TYPE_NONE, []),
|
||||
"action-show-preferences": (gobject.SIGNAL_RUN_FIRST,
|
||||
gobject.TYPE_NONE, []),
|
||||
}
|
||||
"action-show-create": (gobject.SIGNAL_RUN_FIRST,
|
||||
gobject.TYPE_NONE, []),}
|
||||
def __init__(self, config, connection):
|
||||
self.__gobject_init__()
|
||||
self.window = gtk.glade.XML(config.get_glade_file(), "vmm-manager")
|
||||
|
@ -73,8 +74,8 @@ class vmmManager(gobject.GObject):
|
|||
self.window.get_widget("menu_view_network_traffic").set_active(self.config.is_vmlist_network_traffic_visible())
|
||||
|
||||
|
||||
self.window.get_widget("menu_file_new").set_sensitive(False)
|
||||
self.window.get_widget("vm-new").set_sensitive(False)
|
||||
self.window.get_widget("menu_file_new").set_sensitive(True)
|
||||
self.window.get_widget("vm-new").set_sensitive(True)
|
||||
self.window.get_widget("vm-view").set_sensitive(False)
|
||||
self.window.get_widget("vm-view").set_active(0)
|
||||
|
||||
|
@ -105,12 +106,14 @@ class vmmManager(gobject.GObject):
|
|||
|
||||
"on_vm_manager_delete_event": self.close,
|
||||
"on_menu_file_open_connection_activate": self.open_connection,
|
||||
"on_menu_file_new_activate": self.show_vm_create,
|
||||
"on_menu_file_quit_activate": self.exit_app,
|
||||
"on_menu_file_close_activate": self.close,
|
||||
"on_menu_restore_saved_activate": self.restore_saved,
|
||||
"on_vmm_close_clicked": self.close,
|
||||
"on_vm_details_clicked": self.show_vm_details,
|
||||
"on_vm_open_clicked": self.open_vm_console,
|
||||
"on_vm_new_clicked": self.show_vm_create,
|
||||
"on_menu_edit_details_activate": self.show_vm_details,
|
||||
|
||||
"on_vm_list_row_activated": self.open_vm_console,
|
||||
|
@ -237,6 +240,9 @@ class vmmManager(gobject.GObject):
|
|||
def show_vm_details(self,ignore):
|
||||
self.emit("action-show-details", self.connection.get_uri(), self.current_vm())
|
||||
|
||||
def show_vm_create(self,ignore):
|
||||
self.emit("action-show-create")
|
||||
|
||||
def open_vm_console(self,ignore,ignore2=None,ignore3=None):
|
||||
self.emit("action-show-console", self.connection.get_uri(), self.current_vm())
|
||||
|
||||
|
|
Loading…
Reference in New Issue