From fb61284b740a811a9bc9b7015eb40af42416219a Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Mon, 28 Aug 2006 12:36:42 -0400 Subject: [PATCH] Disable hardware config if we're read only. Hide unused 'add hardware' option --- src/virtManager/details.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/virtManager/details.py b/src/virtManager/details.py index 8b2e0936..8352e7dc 100644 --- a/src/virtManager/details.py +++ b/src/virtManager/details.py @@ -73,7 +73,7 @@ class vmmDetails(gobject.GObject): hwListModel.append([1, "Memory", gtk.gdk.pixbuf_new_from_file(config.get_icon_dir() + "/icon_cpu.png")]) hwListModel.append([2, "Disk", gtk.gdk.pixbuf_new_from_file(config.get_icon_dir() + "/icon_hdd.png")]) hwListModel.append([3, "Network", gtk.gdk.pixbuf_new_from_file(config.get_icon_dir() + "/icon_ethernet.png")]) - hwListModel.append([4, "Add hardware", gtk.gdk.pixbuf_new_from_file(config.get_icon_dir() + "/icon_addnew.png")]) + #hwListModel.append([4, "Add hardware", gtk.gdk.pixbuf_new_from_file(config.get_icon_dir() + "/icon_addnew.png")]) self.window.get_widget("hw-list").get_selection().connect("changed", self.hw_selected) @@ -144,7 +144,7 @@ class vmmDetails(gobject.GObject): vmlist = self.window.get_widget("hw-list") selection = vmlist.get_selection() active = selection.get_selected() - if active[1] != None: + if active[1] != None and not(self.vm.is_read_only()): self.window.get_widget("hw-panel").set_sensitive(True) self.window.get_widget("hw-panel").set_current_page(active[0].get_value(active[1], 0)) else: