virt-manager/virt-manager-0.4.0-toolbar-state.patch
2007-05-10 18:54:22 +00:00

76 lines
3.5 KiB
Diff

changeset: 484:92e90dd89dd5
user: "Hugh O. Brock <hbrock@redhat.com>"
date: Wed Apr 25 17:03:55 2007 -0400
summary: initial fix for 236777: make the toolbar show/hide button reflect reality. Next up, persist the value.
diff -r 58c0f8ae6fb8 -r 92e90dd89dd5 src/virtManager/console.py
--- a/src/virtManager/console.py Mon Apr 23 15:26:46 2007 -0400
+++ b/src/virtManager/console.py Wed Apr 25 17:03:55 2007 -0400
@@ -171,7 +171,6 @@ class vmmConsole(gobject.GObject):
dialog = self.window.get_widget("vmm-console")
dialog.show_all()
dialog.present()
-
self.try_login()
self.update_widget_states(self.vm, self.vm.status())
@@ -407,6 +406,7 @@ class vmmConsole(gobject.GObject):
self.emit("action-show-details", self.vm.get_connection().get_uri(), self.vm.get_uuid())
def update_widget_states(self, vm, status):
+ self.toggle_toolbar(self.window.get_widget("menu-view-toolbar"))
self.ignorePause = True
if status in [ libvirt.VIR_DOMAIN_SHUTOFF, libvirt.VIR_DOMAIN_CRASHED ]:
self.window.get_widget("control-run").set_sensitive(True)
@@ -486,4 +486,5 @@ class vmmConsole(gobject.GObject):
self.ignorePause = False
self.ignorePause = False
+
gobject.type_register(vmmConsole)
changeset: 485:1c74c953592e
user: "Hugh O. Brock <hbrock@redhat.com>"
date: Wed Apr 25 17:09:37 2007 -0400
summary: Fix toolbar check/uncheck in details window as well
diff -r 92e90dd89dd5 -r 1c74c953592e src/virtManager/details.py
--- a/src/virtManager/details.py Wed Apr 25 17:03:55 2007 -0400
+++ b/src/virtManager/details.py Wed Apr 25 17:09:37 2007 -0400
@@ -120,8 +120,8 @@ class vmmDetails(gobject.GObject):
self.vm.connect("resources-sampled", self.refresh_resources)
self.window.get_widget("hw-list").get_selection().connect("changed", self.hw_selected)
- self.update_widget_states(vm, vm.status())
- self.refresh_resources(vm)
+ self.update_widget_states(self.vm, self.vm.status())
+ self.refresh_resources(self.vm)
self.pixbuf_processor = gtk.gdk.pixbuf_new_from_file(config.get_icon_dir() + "/icon_cpu.png")
self.pixbuf_memory = gtk.gdk.pixbuf_new_from_file(config.get_icon_dir() + "/icon_cpu.png")
@@ -146,6 +146,7 @@ class vmmDetails(gobject.GObject):
self.window.get_widget("overview-disk-usage-label").hide()
self.network_traffic_graph.hide()
dialog.present()
+ self.update_widget_states(self.vm, self.vm.status())
def show_help(self, src):
# From the Details window, show the help document from the Details page
@@ -263,6 +264,7 @@ class vmmDetails(gobject.GObject):
self.emit("action-destroy-domain", self.vm.get_connection().get_uri(), self.vm.get_uuid())
def update_widget_states(self, vm, status):
+ self.toggle_toolbar(self.window.get_widget("details-menu-view-toolbar"))
self.ignorePause = True
if status in [ libvirt.VIR_DOMAIN_SHUTDOWN, libvirt.VIR_DOMAIN_SHUTOFF ] or vm.is_read_only():
# apologies for the spaghetti, but the destroy choice is a special case
@@ -403,7 +405,6 @@ class vmmDetails(gobject.GObject):
self.window.get_widget("disk-target-device").set_text(diskinfo[3])
def refresh_network_page(self):
- # viewing net page, not adding a device. If adding, don't try to refresh
vmlist = self.window.get_widget("hw-list")
selection = vmlist.get_selection()
active = selection.get_selected()