本文整理汇总了Python中pyanaconda.ui.gui.GUIObject.refresh方法的典型用法代码示例。如果您正苦于以下问题:Python GUIObject.refresh方法的具体用法?Python GUIObject.refresh怎么用?Python GUIObject.refresh使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyanaconda.ui.gui.GUIObject
的用法示例。
在下文中一共展示了GUIObject.refresh方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: refresh
# 需要导入模块: from pyanaconda.ui.gui import GUIObject [as 别名]
# 或者: from pyanaconda.ui.gui.GUIObject import refresh [as 别名]
def refresh(self):
GUIObject.refresh(self)
self._proxyCheck = self.builder.get_object("enableProxyCheck")
self._proxyInfoBox = self.builder.get_object("proxyInfoBox")
self._authCheck = self.builder.get_object("enableAuthCheck")
self._proxyAuthBox = self.builder.get_object("proxyAuthBox")
self._proxyURLEntry = self.builder.get_object("proxyURLEntry")
self._proxyUsernameEntry = self.builder.get_object("proxyUsernameEntry")
self._proxyPasswordEntry = self.builder.get_object("proxyPasswordEntry")
if not self.data.method.proxy:
self._proxyCheck.set_active(False)
self.on_proxy_enable_toggled(self._proxyCheck)
self._authCheck.set_active(False)
self.on_proxy_auth_toggled(self._authCheck)
return
try:
proxy = ProxyString(self.data.method.proxy)
if proxy.username:
self._proxyUsernameEntry.set_text(proxy.username)
if proxy.password:
self._proxyPasswordEntry.set_text(proxy.password)
self._proxyURLEntry.set_text(proxy.noauth_url)
except ProxyStringError as e:
log.error("Failed to parse proxy for ProxyDialog.refresh %s: %s" % (self.data.method.proxy, e))
return
self._proxyCheck.set_active(True)
self._authCheck.set_active(bool(proxy.username or proxy.password))
self.on_proxy_enable_toggled(self._proxyCheck)
self.on_proxy_auth_toggled(self._authCheck)
示例2: refresh
# 需要导入模块: from pyanaconda.ui.gui import GUIObject [as 别名]
# 或者: from pyanaconda.ui.gui.GUIObject import refresh [as 别名]
def refresh(self):
GUIObject.refresh(self)
if not self.proxyUrl:
self._proxyCheck.set_active(False)
self.on_proxy_enable_toggled(self._proxyCheck)
self._authCheck.set_active(False)
self.on_proxy_auth_toggled(self._authCheck)
return
try:
proxy = ProxyString(self.proxyUrl)
if proxy.username:
self._proxyUsernameEntry.set_text(proxy.username)
if proxy.password:
self._proxyPasswordEntry.set_text(proxy.password)
self._proxyURLEntry.set_text(proxy.noauth_url)
except ProxyStringError as e:
log.error("Failed to parse proxy for ProxyDialog.refresh %s: %s", self.proxyUrl, e)
return
self._proxyCheck.set_active(True)
self._authCheck.set_active(bool(proxy.username or proxy.password))
self.on_proxy_enable_toggled(self._proxyCheck)
self.on_proxy_auth_toggled(self._authCheck)
示例3: refresh
# 需要导入模块: from pyanaconda.ui.gui import GUIObject [as 别名]
# 或者: from pyanaconda.ui.gui.GUIObject import refresh [as 别名]
def refresh(self, mountpoint, device, rootName, snapshots=False):
GUIObject.refresh(self)
label = self.builder.get_object("confirmLabel")
if rootName and "_" in rootName:
rootName = rootName.replace("_", "__")
delete_all_text = (C_("GUI|Custom Partitioning|Confirm Delete Dialog",
"Delete _all other file systems in the %s root as well.") +
"\n" +
C_("GUI|Custom Partitioning|Confirm Delete Dialog",
"(This includes those shared with other installed operating systems.)"))
self._removeAll.set_label(
delete_all_text
% rootName)
self._removeAll.set_sensitive(rootName is not None)
if mountpoint:
txt = "%s (%s)" % (mountpoint, device)
else:
txt = device
if not snapshots:
label_text = _("Are you sure you want to delete all of the data on %s?") % txt
else:
label_text = _("Are you sure you want to delete all of the data on %s, including snapshots and/or subvolumes?") % txt
label.set_text(label_text)
示例4: refresh
# 需要导入模块: from pyanaconda.ui.gui import GUIObject [as 别名]
# 或者: from pyanaconda.ui.gui.GUIObject import refresh [as 别名]
def refresh(self, actions):
GUIObject.refresh(self)
self._store = self.builder.get_object("actionStore")
self._store.clear()
self.initialize(actions)
示例5: refresh
# 需要导入模块: from pyanaconda.ui.gui import GUIObject [as 别名]
# 或者: from pyanaconda.ui.gui.GUIObject import refresh [as 别名]
def refresh(self, mountpoint, device, checkbox_text = "", snapshots=False, bootpart = False):
""" Show confirmation dialog with the optional checkbox. If the
`checkbox_text` for the checkbox is not set then the checkbox
will not be showed.
:param str mountpoint: Mountpoint for device.
:param str device: Name of the device.
:param str checkbox_text: Text for checkbox. If nothing set do
not display the checkbox.
:param bool snapshot: If true warn user he's going to delete snapshots too.
"""
GUIObject.refresh(self)
label = self.builder.get_object("confirmLabel")
if checkbox_text:
self._optional_checkbox.set_label(checkbox_text)
else:
self._optional_checkbox.hide()
if mountpoint:
txt = "%s (%s)" % (mountpoint, device)
else:
txt = device
if bootpart:
label_text = _("%s may be a system boot partition! Deleting it may break other operating systems. Are you sure you want to delete it?") % txt
elif not snapshots:
label_text = _("Are you sure you want to delete all of the data on %s?") % txt
else:
label_text = _("Are you sure you want to delete all of the data on %s, including snapshots and/or subvolumes?") % txt
label.set_text(label_text)
示例6: refresh
# 需要导入模块: from pyanaconda.ui.gui import GUIObject [as 别名]
# 或者: from pyanaconda.ui.gui.GUIObject import refresh [as 别名]
def refresh(self):
GUIObject.refresh(self)
self._createBox()
for hub in Hub._hubs_collection:
if hub.timeout_id is not None:
log.debug("Disabling event loop for hub %s", hub.__class__.__name__)
GLib.source_remove(hub.timeout_id)
hub.timeout_id = None
log.debug("Starting event loop for hub %s", self.__class__.__name__)
self.timeout_id = GLib.timeout_add(100, self._update_spokes)
示例7: refresh
# 需要导入模块: from pyanaconda.ui.gui import GUIObject [as 别名]
# 或者: from pyanaconda.ui.gui.GUIObject import refresh [as 别名]
def refresh(self):
GUIObject.refresh(self)
self._createBox()
for hub in Hub._hubs_collection:
if hub.timeout is not None:
log.debug("Disabling event loop for hub %s", hub.__class__.__name__)
hub.timeout.cancel()
hub.timeout = None
log.debug("Starting event loop for hub %s", self.__class__.__name__)
self.timeout = Timer()
self.timeout.timeout_msec(100, self._update_spokes)
示例8: refresh
# 需要导入模块: from pyanaconda.ui.gui import GUIObject [as 别名]
# 或者: from pyanaconda.ui.gui.GUIObject import refresh [as 别名]
def refresh(self):
GUIObject.refresh(self)
self._createBox()
GLib.timeout_add(100, self._update_spokes)
示例9: refresh
# 需要导入模块: from pyanaconda.ui.gui import GUIObject [as 别名]
# 或者: from pyanaconda.ui.gui.GUIObject import refresh [as 别名]
def refresh(self, actions):
GUIObject.refresh(self)
self._store.clear()
self.initialize(actions)
示例10: refresh
# 需要导入模块: from pyanaconda.ui.gui import GUIObject [as 别名]
# 或者: from pyanaconda.ui.gui.GUIObject import refresh [as 别名]
def refresh(self):
GUIObject.refresh(self)
self._warningLabel.set_text("")