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


Python utils.really_hide函数代码示例

本文整理汇总了Python中pyanaconda.ui.gui.utils.really_hide函数的典型用法代码示例。如果您正苦于以下问题:Python really_hide函数的具体用法?Python really_hide怎么用?Python really_hide使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了really_hide函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _wrong_content

 def _wrong_content(self):
     self._addon_data.content_url = ""
     self._addon_data.content_type = ""
     really_hide(self._progress_spinner)
     self._fetch_button.set_sensitive(True)
     self._content_url_entry.set_sensitive(True)
     self._content_url_entry.grab_focus()
     self._content_url_entry.select_region(0, -1)
开发者ID:M4rtinK,项目名称:oscap-anaconda-addon,代码行数:8,代码来源:oscap.py

示例2: _wrong_content

 def _wrong_content(self, msg):
     self._addon_data.clear_all()
     really_hide(self._progress_spinner)
     self._fetch_button.set_sensitive(True)
     self._content_url_entry.set_sensitive(True)
     self._content_url_entry.grab_focus()
     self._content_url_entry.select_region(0, -1)
     self._content_handling_cls = None
     self._set_error(msg)
开发者ID:OpenSCAP,项目名称:oscap-anaconda-addon,代码行数:9,代码来源:oscap.py

示例3: _display_repo_names_message

 def _display_repo_names_message(self):
     """ Displays a warning if the list of repo names is not valid.
         Returns the warning message displayed, if any.
     """
     warning_msg = self._verify_repo_names()
     if warning_msg:
         self._repoNamesWarningLabel.set_text(_(warning_msg))
         really_show(self._repoNamesWarningBox)
         self.set_warning(_("Duplicate repository names not allowed; choose a unique name for each repository."))
         self.window.show_all()
     else:
         self._repoNamesWarningLabel.set_text("")
         really_hide(self._repoNamesWarningBox)
         self.clear_info()
     return warning_msg
开发者ID:joesaland,项目名称:qubes-installer-qubes-os,代码行数:15,代码来源:source.py

示例4: _display_repo_name_message

 def _display_repo_name_message(self, repo, name):
     """ Displays a warning if the repo name is not valid.
         Returns the warning message displayed, if any.
         :param repo: kickstart repository object
         :type repo: RepoData
         :param name: the designated name for the repo
         :type name: string
     """
     warning_msg = self._verify_repo_name(repo, name)
     if warning_msg:
         self._repoNameWarningLabel.set_text(_(warning_msg))
         really_show(self._repoNameWarningBox)
     else:
         self._repoNameWarningLabel.set_text("")
         really_hide(self._repoNameWarningBox)
     return warning_msg
开发者ID:joesaland,项目名称:qubes-installer-qubes-os,代码行数:16,代码来源:source.py

示例5: _update_ids_visibility

    def _update_ids_visibility(self):
        """
        Updates visibility of the combo boxes that are used to select the DS
        and XCCDF IDs.

        """

        if self._using_ds:
            # only show the combo boxes if there are multiple data streams or
            # multiple xccdfs (IOW if there's something to choose from)
            ds_ids = list(self._ds_checklists.keys())
            if len(ds_ids) > 1 or len(self._ds_checklists[ds_ids[0]]) > 1:
                really_show(self._ids_box)
                return

        # not showing, hide instead
        really_hide(self._ids_box)
开发者ID:OpenSCAP,项目名称:oscap-anaconda-addon,代码行数:17,代码来源:oscap.py

示例6: initialize

    def initialize(self):
        NormalSpoke.initialize(self)

        self._grabObjects()

        # I shouldn't have to do this outside GtkBuilder, but it really doesn't
        # want to let me pass in user data.
        self._autodetectButton.connect("toggled", self.on_source_toggled, self._autodetectBox)
        self._isoButton.connect("toggled", self.on_source_toggled, self._isoBox)
        self._networkButton.connect("toggled", self.on_source_toggled, self._networkBox)

        # Show or hide the updates option based on the installclass
        if self.instclass.installUpdates:
            really_show(self._updatesBox)
        else:
            really_hide(self._updatesBox)

        threadMgr.add(AnacondaThread(name=constants.THREAD_SOURCE_WATCHER, target=self._initialize))
开发者ID:Sabayon,项目名称:anaconda,代码行数:18,代码来源:source.py

示例7: __init__

    def __init__(self, title):
        Gtk.Box.__init__(self, orientation=Gtk.Orientation.VERTICAL, spacing=6)

        # Create the Data label and a box to store all its members in.
        self._dataBox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
        self._dataLabel = self._make_category_label(_("DATA"))
        really_hide(self._dataLabel)
        self._dataBox.add(self._dataLabel)
        self._dataBox.connect("add", self._onDataAdded)
        self._dataBox.connect("remove", self._onDataRemoved)
        self.add(self._dataBox)

        # Create the System label and a box to store all its members in.
        self._systemBox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
        self._systemBox.add(self._make_category_label(_("SYSTEM")))
        self.add(self._systemBox)

        self.members = []
        self.pageTitle = title
开发者ID:akozumpl,项目名称:anaconda,代码行数:19,代码来源:accordion.py

示例8: __init__

    def __init__(self, title):
        super().__init__(title)

        # Create the Data label and a box to store all its members in.
        self._dataBox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
        self._dataLabel = self._make_category_label(_("DATA"))
        really_hide(self._dataLabel)
        self._dataBox.add(self._dataLabel)
        self._dataBox.connect("add", self._on_selector_added, self._dataLabel)
        self._dataBox.connect("remove", self._on_selector_removed, self._dataLabel)
        self.add(self._dataBox)

        # Create the System label and a box to store all its members in.
        self._systemBox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
        self._systemLabel = self._make_category_label(_("SYSTEM"))
        really_hide(self._systemLabel)
        self._systemBox.add(self._systemLabel)
        self._systemBox.connect("add", self._on_selector_added, self._systemLabel)
        self._systemBox.connect("remove", self._on_selector_removed, self._systemLabel)
        self.add(self._systemBox)
开发者ID:rvykydal,项目名称:anaconda,代码行数:20,代码来源:accordion.py

示例9: set_status

    def set_status(self, inputcheck):
        # Set the warning message with the result from the first failed check
        failed_check = next(self.failed_checks_with_message, None)

        if failed_check:
            result_icon, result_message = failed_check.check_status
            self._passphrase_warning_image.set_from_icon_name(result_icon, Gtk.IconSize.BUTTON)
            self._passphrase_warning_label.set_text(result_message)
            really_show(self._passphrase_warning_image)
            really_show(self._passphrase_warning_label)
        else:
            really_hide(self._passphrase_warning_image)
            really_hide(self._passphrase_warning_label)

        # The save button should only be sensitive if the match check passes
        if self._passphrase_match_check.check_status == InputCheck.CHECK_OK and \
                (not self.policy.strict or self._strength_check.check_status == InputCheck.CHECK_OK):
            self._save_button.set_sensitive(True)
        else:
            self._save_button.set_sensitive(False)
开发者ID:nandakishore1006,项目名称:anaconda,代码行数:20,代码来源:passphrase.py

示例10: _set_status

    def _set_status(self, error_message):
        """Set UI element states according to passphrase check results.

        NOTE: This method is called every time the checker finishes running all checks.
        """
        success = not error_message
        if success:
            really_hide(self._passphrase_warning_image)
            really_hide(self._passphrase_warning_label)
        else:
            if not self._ascii_check.result.success:
                # ASCII check runs last, so if just it has failed the result is only a warning
                result_icon = "dialog-warning"
            else:
                # something else failed and that's a critical error
                result_icon = "dialog-error"
            self._passphrase_warning_image.set_from_icon_name(result_icon, Gtk.IconSize.BUTTON)
            self._passphrase_warning_label.set_text(error_message)
            really_show(self._passphrase_warning_image)
            really_show(self._passphrase_warning_label)

        # The save button should only be sensitive if both passphrases match
        # and are valid enough for current policy
        self._passphrase_good_enough = False
        if self._checker.success:
            self._passphrase_good_enough = True
        elif len(self._checker.failed_checks) == 1 and self._validity_check in self._checker._failed_checks:
            # only the password validity check failed
            if self._checker.policy.strict:
                # this is not fine for the strict password policy
                self._passphrase_good_enough = False
            else:
                # but is totally fine under the non-strict policy
                self._passphrase_good_enough = True
        elif len(self._checker.failed_checks) == 1 and self._ascii_check in self._checker._failed_checks:
            # enable the save button if only the ascii check has failed
            self._passphrase_good_enough = True

        # set the save button sensitivity accordingly
        self._save_button.set_sensitive(self._passphrase_good_enough)
开发者ID:rvykydal,项目名称:anaconda,代码行数:40,代码来源:passphrase.py

示例11: _populate_raid

    def _populate_raid(self):
        """ Set up the raid-specific portion of the device details.

            Hide the RAID level menu if this device type does not support RAID.
            Choose a default RAID level.
        """
        if not containerRaidLevelsSupported(self.device_type):
            for widget in [self._raidLevelLabel, self._raidLevelCombo]:
                really_hide(widget)
            return

        raid_level = self.raid_level or defaultContainerRaidLevel(self.device_type)
        raid_level_name = raidLevelSelection(raid_level)

        # Set a default RAID level in the combo.
        for (i, row) in enumerate(self._raidLevelCombo.get_model()):
            log.debug("container dialog: raid level %s", row[1])
            if row[1] == raid_level_name:
                self._raidLevelCombo.set_active(i)
                break

        for widget in [self._raidLevelLabel, self._raidLevelCombo]:
            really_show(widget)
        fancy_set_sensitive(self._raidLevelCombo, not self.exists)
开发者ID:jresch,项目名称:anaconda,代码行数:24,代码来源:custom_storage_helpers.py

示例12: _onSelectorRemoved

 def _onSelectorRemoved(self, container, widget, label):
     # This runs before widget is removed from container, so if it's the last
     # item then the container will still not be empty.
     if len(container.get_children()) == 1:
         really_hide(label)
开发者ID:nandakishore1006,项目名称:anaconda,代码行数:5,代码来源:accordion.py

示例13: _on_finished

 def _on_finished(self, obj):
     """Handler for RegisterWidget's 'finished' signal."""
     self._done = True
     really_hide(self.button_box)
开发者ID:Lorquas,项目名称:subscription-manager,代码行数:4,代码来源:rhsm_gui.py

示例14: finished

 def finished(self, obj):
     self._done = True
     really_hide(self.button_box)
开发者ID:alikins,项目名称:subscription-manager,代码行数:3,代码来源:rhsm_gui.py

示例15: refresh

    def refresh(self):
        """
        The refresh method that is called every time the spoke is displayed.
        It should update the UI elements according to the contents of
        self.data.

        :see: pyanaconda.ui.common.UIObject.refresh

        """

        if not self._addon_data.content_defined:
            # hide the control buttons
            really_hide(self._control_buttons)

            # provide SSG if available
            if common.ssg_available():
                # show the SSG button and tweak the rest of the line
                # (the label)
                really_show(self._ssg_button)
                # TRANSLATORS: the other choice if SCAP Security Guide is also
                # available
                tip = _(" or enter data stream content or archive URL below:")
            else:
                # hide the SSG button
                really_hide(self._ssg_button)
                tip = _("No content found. Please enter data stream content or "
                        "archive URL below:")

            self._no_content_label.set_text(tip)

            # hide the progress box, no progress now
            with self._fetch_flag_lock:
                if not self._fetching:
                    really_hide(self._progress_box)

                    self._content_url_entry.set_sensitive(True)
                    self._fetch_button.set_sensitive(True)

                    if not self._content_url_entry.get_text():
                        # no text -> no info/warning
                        self._progress_label.set_text("")

            # switch to the page allowing user to enter content URL and fetch
            # it
            self._main_notebook.set_current_page(GET_CONTENT_PAGE)
            self._content_url_entry.grab_focus()

            # nothing more to do here
            return
        else:
            # show control buttons
            really_show(self._control_buttons)

            self._main_notebook.set_current_page(SET_PARAMS_PAGE)

        self._active_profile = self._addon_data.profile_id

        self._update_ids_visibility()

        if self._using_ds:
            if self._addon_data.datastream_id:
                set_combo_selection(self._ds_combo,
                                    self._addon_data.datastream_id,
                                    unset_first=True)
            else:
                try:
                    default_ds = next(iter(self._ds_checklists.keys()))
                    set_combo_selection(self._ds_combo, default_ds,
                                        unset_first=True)
                except StopIteration:
                    # no data stream available
                    pass

                if self._addon_data.datastream_id and self._addon_data.xccdf_id:
                    set_combo_selection(self._xccdf_combo,
                                        self._addon_data.xccdf_id,
                                        unset_first=True)
        else:
            # no combobox changes --> need to update profiles store manually
            self._update_profiles_store()

        if self._addon_data.profile_id:
            set_treeview_selection(self._profiles_view,
                                   self._addon_data.profile_id)

        self._rule_data = self._addon_data.rule_data

        self._update_message_store()
开发者ID:OpenSCAP,项目名称:oscap-anaconda-addon,代码行数:88,代码来源:oscap.py


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