mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-11 05:17:59 +03:00
Replace get_property("sensitive") with get_sensitive
This commit is contained in:
parent
b6c078ad75
commit
36c669d45a
@ -756,7 +756,7 @@ class vmmAddHardware(vmmGObjectUI):
|
|||||||
def get_config_fs_mode(self):
|
def get_config_fs_mode(self):
|
||||||
name = "fs-mode-combo"
|
name = "fs-mode-combo"
|
||||||
combo = self.widget(name)
|
combo = self.widget(name)
|
||||||
if not combo.get_property("visible"):
|
if not combo.get_visible():
|
||||||
return None
|
return None
|
||||||
|
|
||||||
return combo.get_model()[combo.get_active()][0]
|
return combo.get_model()[combo.get_active()][0]
|
||||||
@ -764,7 +764,7 @@ class vmmAddHardware(vmmGObjectUI):
|
|||||||
def get_config_fs_wrpolicy(self):
|
def get_config_fs_wrpolicy(self):
|
||||||
name = "fs-wrpolicy-combo"
|
name = "fs-wrpolicy-combo"
|
||||||
combo = self.widget(name)
|
combo = self.widget(name)
|
||||||
if not combo.get_property("visible"):
|
if not combo.get_visible():
|
||||||
return None
|
return None
|
||||||
|
|
||||||
return combo.get_model()[combo.get_active()][0]
|
return combo.get_model()[combo.get_active()][0]
|
||||||
@ -772,7 +772,7 @@ class vmmAddHardware(vmmGObjectUI):
|
|||||||
def get_config_fs_type(self):
|
def get_config_fs_type(self):
|
||||||
name = "fs-type-combo"
|
name = "fs-type-combo"
|
||||||
combo = self.widget(name)
|
combo = self.widget(name)
|
||||||
if not combo.get_property("visible"):
|
if not combo.get_visible():
|
||||||
return None
|
return None
|
||||||
|
|
||||||
return combo.get_model()[combo.get_active()][0]
|
return combo.get_model()[combo.get_active()][0]
|
||||||
@ -780,7 +780,7 @@ class vmmAddHardware(vmmGObjectUI):
|
|||||||
def get_config_fs_readonly(self):
|
def get_config_fs_readonly(self):
|
||||||
name = "fs-readonly"
|
name = "fs-readonly"
|
||||||
check = self.widget(name)
|
check = self.widget(name)
|
||||||
if not check.get_property("visible"):
|
if not check.get_visible():
|
||||||
return None
|
return None
|
||||||
|
|
||||||
return check.get_active()
|
return check.get_active()
|
||||||
@ -788,7 +788,7 @@ class vmmAddHardware(vmmGObjectUI):
|
|||||||
def get_config_fs_driver(self):
|
def get_config_fs_driver(self):
|
||||||
name = "fs-driver-combo"
|
name = "fs-driver-combo"
|
||||||
combo = self.widget(name)
|
combo = self.widget(name)
|
||||||
if not combo.get_property("visible"):
|
if not combo.get_visible():
|
||||||
return None
|
return None
|
||||||
|
|
||||||
return combo.get_model()[combo.get_active()][0]
|
return combo.get_model()[combo.get_active()][0]
|
||||||
@ -1068,7 +1068,7 @@ class vmmAddHardware(vmmGObjectUI):
|
|||||||
show_driver_combo = False
|
show_driver_combo = False
|
||||||
show_wrpolicy_combo = self.conn.is_qemu()
|
show_wrpolicy_combo = self.conn.is_qemu()
|
||||||
|
|
||||||
if idx >= 0 and src.get_property("visible"):
|
if idx >= 0 and src.get_visible():
|
||||||
fstype = src.get_model()[idx][0]
|
fstype = src.get_model()[idx][0]
|
||||||
|
|
||||||
if fstype == virtinst.VirtualFilesystem.TYPE_TEMPLATE:
|
if fstype == virtinst.VirtualFilesystem.TYPE_TEMPLATE:
|
||||||
@ -1087,7 +1087,7 @@ class vmmAddHardware(vmmGObjectUI):
|
|||||||
def change_fs_driver(self, src):
|
def change_fs_driver(self, src):
|
||||||
fsdriver = None
|
fsdriver = None
|
||||||
idx = src.get_active()
|
idx = src.get_active()
|
||||||
if idx >= 0 and src.get_property("visible"):
|
if idx >= 0 and src.get_visible():
|
||||||
fsdriver = src.get_model()[idx][0]
|
fsdriver = src.get_model()[idx][0]
|
||||||
|
|
||||||
show_mode = bool(
|
show_mode = bool(
|
||||||
|
@ -892,7 +892,7 @@ class vmmCreate(vmmGObjectUI):
|
|||||||
return curpage == PAGE_INSTALL
|
return curpage == PAGE_INSTALL
|
||||||
|
|
||||||
def get_config_install_page(self):
|
def get_config_install_page(self):
|
||||||
if self.widget("virt-install-box").get_property("visible"):
|
if self.widget("virt-install-box").get_visible():
|
||||||
if self.widget("method-local").get_active():
|
if self.widget("method-local").get_active():
|
||||||
return INSTALL_PAGE_ISO
|
return INSTALL_PAGE_ISO
|
||||||
elif self.widget("method-tree").get_active():
|
elif self.widget("method-tree").get_active():
|
||||||
@ -1200,7 +1200,7 @@ class vmmCreate(vmmGObjectUI):
|
|||||||
self.widget("install-local-browse").set_sensitive(uselocal)
|
self.widget("install-local-browse").set_sensitive(uselocal)
|
||||||
|
|
||||||
def detect_visibility_changed(self, src, ignore=None):
|
def detect_visibility_changed(self, src, ignore=None):
|
||||||
is_visible = src.get_property("visible")
|
is_visible = src.get_visible()
|
||||||
detect_chkbox = self.widget("install-detect-os")
|
detect_chkbox = self.widget("install-detect-os")
|
||||||
nodetect_label = self.widget("install-nodetect-label")
|
nodetect_label = self.widget("install-nodetect-label")
|
||||||
|
|
||||||
|
@ -587,7 +587,7 @@ class vmmCreateInterface(vmmGObjectUI):
|
|||||||
return type_list.get_model()[type_list.get_active()][0]
|
return type_list.get_model()[type_list.get_active()][0]
|
||||||
|
|
||||||
def set_interface_name(self, name):
|
def set_interface_name(self, name):
|
||||||
if self.widget("interface-name-entry").get_property("visible"):
|
if self.widget("interface-name-entry").get_visible():
|
||||||
widget = "interface-name-entry"
|
widget = "interface-name-entry"
|
||||||
else:
|
else:
|
||||||
widget = "interface-name-label"
|
widget = "interface-name-label"
|
||||||
@ -595,7 +595,7 @@ class vmmCreateInterface(vmmGObjectUI):
|
|||||||
self.widget(widget).set_text(name)
|
self.widget(widget).set_text(name)
|
||||||
|
|
||||||
def get_config_interface_name(self):
|
def get_config_interface_name(self):
|
||||||
if self.widget("interface-name-entry").get_property("visible"):
|
if self.widget("interface-name-entry").get_visible():
|
||||||
return self.widget("interface-name-entry").get_text()
|
return self.widget("interface-name-entry").get_text()
|
||||||
else:
|
else:
|
||||||
return self.widget("interface-name-label").get_text()
|
return self.widget("interface-name-label").get_text()
|
||||||
@ -751,7 +751,7 @@ class vmmCreateInterface(vmmGObjectUI):
|
|||||||
self.widget("ip-config-label").set_text(label)
|
self.widget("ip-config-label").set_text(label)
|
||||||
|
|
||||||
def get_config_ip_info(self):
|
def get_config_ip_info(self):
|
||||||
if not self.widget("ip-label").get_property("visible"):
|
if not self.widget("ip-label").get_visible():
|
||||||
return [True, None, None, None, None]
|
return [True, None, None, None, None]
|
||||||
|
|
||||||
if not self.validate_ip_info():
|
if not self.validate_ip_info():
|
||||||
|
@ -377,7 +377,7 @@ class vmmCreatePool(vmmGObjectUI):
|
|||||||
|
|
||||||
def get_config_iqn(self):
|
def get_config_iqn(self):
|
||||||
iqn = self.widget("pool-iqn")
|
iqn = self.widget("pool-iqn")
|
||||||
if iqn.get_sensitive() and iqn.get_property("visible"):
|
if iqn.get_sensitive() and iqn.get_visible():
|
||||||
return iqn.get_text().strip()
|
return iqn.get_text().strip()
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@ -537,7 +537,7 @@ class vmmCreatePool(vmmGObjectUI):
|
|||||||
|
|
||||||
buildval = self.widget("pool-build").get_active()
|
buildval = self.widget("pool-build").get_active()
|
||||||
buildsen = (self.widget("pool-build").get_sensitive() and
|
buildsen = (self.widget("pool-build").get_sensitive() and
|
||||||
self.widget("pool-build-box").get_property("visible"))
|
self.widget("pool-build-box").get_visible())
|
||||||
if buildsen and buildval:
|
if buildsen and buildval:
|
||||||
ret = self.err.yes_no(_("Building a pool of this type will "
|
ret = self.err.yes_no(_("Building a pool of this type will "
|
||||||
"format the source device. Are you "
|
"format the source device. Are you "
|
||||||
|
@ -1085,7 +1085,7 @@ class vmmDetails(vmmGObjectUI):
|
|||||||
label = self.widget(prefix + "-label")
|
label = self.widget(prefix + "-label")
|
||||||
value = None
|
value = None
|
||||||
|
|
||||||
if label.get_property("visible"):
|
if label.get_visible():
|
||||||
value = label.get_text()
|
value = label.get_text()
|
||||||
else:
|
else:
|
||||||
value = self.get_combo_value(comboname, model_idx)
|
value = self.get_combo_value(comboname, model_idx)
|
||||||
|
Loading…
Reference in New Issue
Block a user