当前位置: 首页>>代码示例>>Python>>正文


Python GUIObject.refresh方法代码示例

本文整理汇总了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)
开发者ID:cs2c-zhangchao,项目名称:nkwin1.0-anaconda,代码行数:36,代码来源:source.py

示例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)
开发者ID:joesaland,项目名称:qubes-installer-qubes-os,代码行数:27,代码来源:source.py

示例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)
开发者ID:marmarek,项目名称:qubes-installer-qubes-os,代码行数:29,代码来源:custom_storage_helpers.py

示例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)
开发者ID:cs2c-zhangchao,项目名称:nkwin1.0-anaconda,代码行数:9,代码来源:summary.py

示例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)
开发者ID:jaymzh,项目名称:anaconda,代码行数:34,代码来源:custom_storage_helpers.py

示例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)
开发者ID:dougsland,项目名称:anaconda,代码行数:14,代码来源:__init__.py

示例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)
开发者ID:rvykydal,项目名称:anaconda,代码行数:15,代码来源:__init__.py

示例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)
开发者ID:Sabayon,项目名称:anaconda,代码行数:7,代码来源:__init__.py

示例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)
开发者ID:mairin,项目名称:anaconda,代码行数:7,代码来源:summary.py

示例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("")
开发者ID:jresch,项目名称:anaconda,代码行数:5,代码来源:custom_storage_helpers.py


注:本文中的pyanaconda.ui.gui.GUIObject.refresh方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。