mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
virtManager: remove panic iobase from GUI
This is advanced configuration and it's not required to configure at all to have a working panic device. Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
@@ -1743,31 +1743,6 @@
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="panic-iobase-label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">_IO Base:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">panic-iobase</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="panic-iobase">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="invisible_char">●</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">16</property>
|
||||
|
||||
@@ -5674,17 +5674,6 @@ if you know what you are doing.</small></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label96">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">IO Base:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="panic-type">
|
||||
<property name="visible">True</property>
|
||||
@@ -5697,18 +5686,6 @@ if you know what you are doing.</small></property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="panic-iobase">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">panic-iobase</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
||||
@@ -477,9 +477,6 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
for i in ["rng-bind-service", "rng-connect-service"]:
|
||||
self.widget(i).set_text("708")
|
||||
|
||||
# Panic device params
|
||||
self.widget("panic-iobase").set_text("0x505")
|
||||
|
||||
# Controller device params
|
||||
self._populate_controller_type()
|
||||
|
||||
@@ -1758,18 +1755,11 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
def _validate_page_panic(self):
|
||||
conn = self.conn.get_backend()
|
||||
|
||||
iobase = self.widget("panic-iobase").get_text()
|
||||
|
||||
value_mappings = {
|
||||
"iobase": iobase,
|
||||
}
|
||||
type = uiutil.get_list_selection(self.widget("panic-type"))
|
||||
|
||||
try:
|
||||
self._dev = VirtualPanicDevice(conn)
|
||||
if not iobase:
|
||||
iobase = self._dev.IOBASE_DEFAULT
|
||||
for param_name, val in value_mappings.items():
|
||||
setattr(self._dev, param_name, val)
|
||||
self._dev.type = type
|
||||
except Exception as e:
|
||||
return self.err.val_err(_("Panic device parameter error"), e)
|
||||
|
||||
|
||||
@@ -2795,20 +2795,8 @@ class vmmDetails(vmmGObjectUI):
|
||||
if not dev:
|
||||
return
|
||||
|
||||
def show_ui(param, val=None):
|
||||
widgetname = "panic-" + param.replace("_", "-")
|
||||
if not val:
|
||||
val = getattr(dev, param)
|
||||
if not val:
|
||||
propername = param.upper() + "_DEFAULT"
|
||||
val = getattr(virtinst.VirtualPanicDevice, propername, "-").upper()
|
||||
|
||||
uiutil.set_grid_row_visible(self.widget(widgetname), True)
|
||||
self.widget(widgetname).set_text(val or "-")
|
||||
|
||||
ptyp = virtinst.VirtualPanicDevice.get_pretty_type(dev.type)
|
||||
show_ui("type", ptyp)
|
||||
show_ui("iobase")
|
||||
self.widget("panic-type").set_text(ptyp)
|
||||
|
||||
def refresh_rng_page(self):
|
||||
dev = self.get_hw_selection(HW_LIST_COL_DEVICE)
|
||||
|
||||
@@ -25,7 +25,6 @@ class VirtualPanicDevice(VirtualDevice):
|
||||
|
||||
virtual_device_type = VirtualDevice.VIRTUAL_DEV_PANIC
|
||||
ADDRESS_TYPE_ISA = "isa"
|
||||
TYPE_DEFAULT = ADDRESS_TYPE_ISA
|
||||
TYPES = [ADDRESS_TYPE_ISA]
|
||||
IOBASE_DEFAULT = "0x505"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user