mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-03-14 00:58:28 +03:00
details: Don't allow changing machine type for existing VM
But still allow it from the customize dialog. It's one of those things that rarely can be changed for a working VM and things continue to work.
This commit is contained in:
parent
c7c772b200
commit
0ddec9199b
@ -959,7 +959,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="overview-machine-label">
|
||||
<object class="GtkLabel" id="machine-type-title">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">start</property>
|
||||
@ -972,18 +972,6 @@
|
||||
<property name="top_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBox" id="machine-type">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<signal name="changed" handler="on_machine_type_changed" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="overview-chipset-title">
|
||||
<property name="visible">True</property>
|
||||
@ -1162,6 +1150,41 @@ if you know what you are doing.</small></property>
|
||||
<property name="top_attach">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="box17">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkComboBox" id="machine-type">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<signal name="changed" handler="on_machine_type_changed" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="machine-type-label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label">label</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -780,7 +780,8 @@ class vmmDetails(vmmGObjectUI):
|
||||
|
||||
show_machine = (arch not in ["i686", "x86_64"] and
|
||||
not self.vm.is_management_domain())
|
||||
uiutil.set_grid_row_visible(self.widget("machine-type"), show_machine)
|
||||
uiutil.set_grid_row_visible(self.widget("machine-type-title"),
|
||||
show_machine)
|
||||
|
||||
if show_machine:
|
||||
for machine in machines:
|
||||
@ -788,6 +789,10 @@ class vmmDetails(vmmGObjectUI):
|
||||
continue
|
||||
machtype_model.append([machine])
|
||||
|
||||
self.widget("machine-type").set_visible(self.is_customize_dialog)
|
||||
self.widget("machine-type-label").set_visible(
|
||||
not self.is_customize_dialog)
|
||||
|
||||
# Firmware
|
||||
combo = self.widget("overview-firmware")
|
||||
model = Gtk.ListStore(str, str, bool)
|
||||
@ -2405,10 +2410,13 @@ class vmmDetails(vmmGObjectUI):
|
||||
|
||||
# Machine settings
|
||||
machtype = self.vm.get_machtype()
|
||||
if arch not in ["i686", "x86_64"]:
|
||||
if machtype is not None:
|
||||
uiutil.set_combo_entry(self.widget("machine-type"), machtype)
|
||||
if self.widget("machine-type").is_visible():
|
||||
uiutil.set_combo_entry(
|
||||
self.widget("machine-type"), machtype)
|
||||
elif self.widget("machine-type-label").is_visible():
|
||||
self.widget("machine-type-label").set_text(machtype)
|
||||
|
||||
# Chipset
|
||||
chipset = _chipset_label_from_machine(machtype)
|
||||
if self.widget("overview-chipset").is_visible():
|
||||
uiutil.set_combo_entry(
|
||||
|
Loading…
x
Reference in New Issue
Block a user