virt-manager/virtman-autoyast-label.patch

53 lines
2.6 KiB
Diff

Index: virt-manager-0.9.5/src/virtManager/create.py
===================================================================
--- virt-manager-0.9.5.orig/src/virtManager/create.py
+++ virt-manager-0.9.5/src/virtManager/create.py
@@ -1248,12 +1248,26 @@ class vmmCreate(vmmGObjectUI):
variant = self.widget("install-os-version")
variant.set_active(0)
+ def _update_kickstart_label(self):
+ # Update label based on os version selected to either kickstart vs autoyast
+ combo = self.widget("install-os-version")
+ if combo.get_active() != -1:
+ os_ver = combo.get_active_text()
+ label = self.widget("kickstart-url-label")
+ if label and os_ver:
+ if os_ver.startswith('opensuse') or os_ver.startswith('sle') or os_ver.startswith('oes'):
+ label.set_text("AutoYaST file:")
+ else:
+ label.set_text("Kickstart URL:")
+
def change_os_version(self, box):
model = box.get_model()
idx = box.get_active()
if idx == -1:
return
+ self._update_kickstart_label()
+
# Get previous
os_type_list = self.widget("install-os-type")
os_type_model = os_type_list.get_model()
@@ -2116,6 +2130,7 @@ class vmmCreate(vmmGObjectUI):
dl = self.set_os_val(self.widget("install-os-type"), distro)
vl = self.set_os_val(self.widget("install-os-version"), ver)
self.set_distro_labels(dl, vl)
+ self._update_kickstart_label()
def check_detection(self, idx, forward):
results = None
Index: virt-manager-0.9.5/src/vmm-create.ui
===================================================================
--- virt-manager-0.9.5.orig/src/vmm-create.ui
+++ virt-manager-0.9.5/src/vmm-create.ui
@@ -807,7 +807,7 @@
<property name="column_spacing">6</property>
<property name="row_spacing">4</property>
<child>
- <object class="GtkLabel" id="label25">
+ <object class="GtkLabel" id="kickstart-url-label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>