create: Fix some minor UI issues with vz installs

This commit is contained in:
Cole Robinson 2017-03-22 11:31:53 -04:00
parent 3f59906af6
commit aefea61fa0
2 changed files with 10 additions and 7 deletions

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.19.0 -->
<!-- Generated with glade 3.20.0 -->
<interface>
<requires lib="gtk+" version="3.14"/>
<object class="GtkAdjustment" id="adjustment2">
@ -450,6 +450,7 @@
<property name="can_focus">False</property>
<child>
<object class="GtkComboBox" id="create-conn">
<property name="width_request">200</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<signal name="changed" handler="on_create_conn_changed" swapped="no"/>
@ -1733,9 +1734,10 @@ is not yet supported.&lt;/small&gt;</property>
<object class="GtkEntry" id="install-container-template">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="width_chars">40</property>
</object>
<packing>
<property name="expand">True</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>

View File

@ -448,6 +448,7 @@ class vmmCreate(vmmGObjectUI):
is_pv = (self._capsinfo.os_type == "xen")
is_container = self.conn.is_container()
is_vz = self.conn.is_vz()
is_vz_container = (is_vz and self._capsinfo.os_type == "exe")
can_remote_url = self.conn.get_backend().support_remote_url_install()
installable_arch = (self._capsinfo.arch in
@ -527,9 +528,10 @@ class vmmCreate(vmmGObjectUI):
# Container install options
method_container_app.set_active(True)
self.widget("virt-install-box").set_visible(not is_container)
self.widget("container-install-box").set_visible(is_container)
self.widget("vz-install-box").set_visible(is_vz)
self.widget("virt-install-box").set_visible(
not is_container and not is_vz_container)
show_dtb = ("arm" in self._capsinfo.arch or
"microblaze" in self._capsinfo.arch or
@ -603,10 +605,10 @@ class vmmCreate(vmmGObjectUI):
has_exe_guests = True
self.widget("vz-virt-type-hvm").set_sensitive(has_hvm_guests)
self.widget("virt-install-box").set_sensitive(has_hvm_guests)
self.widget("vz-virt-type-exe").set_sensitive(has_exe_guests)
if not has_hvm_guests and has_exe_guests:
self.widget("vz-virt-type-exe").set_active(True)
self.widget("vz-virt-type-hvm").set_active(has_hvm_guests)
self.widget("vz-virt-type-exe").set_active(
not has_hvm_guests and has_exe_guests)
# Install local
iso_option = self.widget("install-iso-radio")
@ -1325,7 +1327,6 @@ class vmmCreate(vmmGObjectUI):
def _vz_virt_type_changed(self, ignore):
is_hvm = self.widget("vz-virt-type-hvm").get_active()
self.widget("virt-install-box").set_sensitive(is_hvm)
if is_hvm:
self._change_caps("hvm")
else: