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


Python GUIObject.__init__方法代码示例

本文整理汇总了Python中pyanaconda.ui.gui.GUIObject.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python GUIObject.__init__方法的具体用法?Python GUIObject.__init__怎么用?Python GUIObject.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pyanaconda.ui.gui.GUIObject的用法示例。


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

示例1: __init__

# 需要导入模块: from pyanaconda.ui.gui import GUIObject [as 别名]
# 或者: from pyanaconda.ui.gui.GUIObject import __init__ [as 别名]
    def __init__(self, *args, **kwargs):
        self._disks = kwargs.pop("disks")
        free = kwargs.pop("free")
        self.selected = kwargs.pop("selected")[:]
        GUIObject.__init__(self, *args, **kwargs)
        self._store = self.builder.get_object("disk_store")
        # populate the store
        for disk in self._disks:
            self._store.append(["%s (%s)" % (disk.description, disk.serial),
                                str(disk.size),
                                str(free[disk.name][0]),
                                disk.name,
                                disk.id])

        treeview = self.builder.get_object("disk_view")
        model = treeview.get_model()
        itr = model.get_iter_first()
        selected_ids = [d.id for d in self.selected]
        selection = treeview.get_selection()
        while itr:
            disk_id = model.get_value(itr, 4)
            if disk_id in selected_ids:
                selection.select_iter(itr)

            itr = model.iter_next(itr)
开发者ID:jresch,项目名称:anaconda,代码行数:27,代码来源:custom_storage_helpers.py

示例2: __init__

# 需要导入模块: from pyanaconda.ui.gui import GUIObject [as 别名]
# 或者: from pyanaconda.ui.gui.GUIObject import __init__ [as 别名]
    def __init__(self, *args, **kwargs):
        buttons = kwargs.pop("buttons", [])
        label = kwargs.pop("label", None)
        GUIObject.__init__(self, *args, **kwargs)

        if not buttons:
            widget = self.window.add_button(C_("GUI|Detailed Error Dialog", "_Cancel"), 0)
        else:
            buttonbox = self.builder.get_object("detailedButtonBox")
            i = 0

            for button in buttons:
                widget = self.window.add_button(button, i)

                # Quit buttons should always appear left-most, unless it's the
                # only button.  Then it should appear on the right.
                if button == C_("GUI|Detailed Error Dialog", "_Quit") and len(buttons) > 1:
                    buttonbox.set_child_secondary(widget, True)

                i += 1

        widget.set_can_default(True)
        widget.grab_default()

        if label:
            self.builder.get_object("detailedLabel").set_text(label)
开发者ID:bwann,项目名称:anaconda,代码行数:28,代码来源:detailederror.py

示例3: __init__

# 需要导入模块: from pyanaconda.ui.gui import GUIObject [as 别名]
# 或者: from pyanaconda.ui.gui.GUIObject import __init__ [as 别名]
    def __init__(self, data, storage):
        GUIObject.__init__(self, data)
        self.storage = storage
        self.iscsi = self.storage.iscsi()

        self._discoveryError = None
        self._loginError = False

        self._discoveredNodes = []
        self._update_devicetree = False

        self._authTypeCombo = self.builder.get_object("authTypeCombo")
        self._authNotebook = self.builder.get_object("authNotebook")
        self._iscsiNotebook = self.builder.get_object("iscsiNotebook")

        self._loginButton = self.builder.get_object("loginButton")
        self._loginAuthTypeCombo = self.builder.get_object("loginAuthTypeCombo")
        self._loginAuthNotebook = self.builder.get_object("loginAuthNotebook")
        self._loginGrid = self.builder.get_object("loginGrid")
        self._loginConditionNotebook = self.builder.get_object("loginConditionNotebook")

        self._configureGrid = self.builder.get_object("configureGrid")
        self._conditionNotebook = self.builder.get_object("conditionNotebook")

        self._bindCheckbox = self.builder.get_object("bindCheckbutton")

        self._startButton = self.builder.get_object("startButton")
        self._okButton = self.builder.get_object("okButton")
        self._cancelButton = self.builder.get_object("cancelButton")

        self._initiatorEntry = self.builder.get_object("initiatorEntry")

        self._store = self.builder.get_object("nodeStore")
开发者ID:mairin,项目名称:anaconda,代码行数:35,代码来源:iscsi.py

示例4: __init__

# 需要导入模块: from pyanaconda.ui.gui import GUIObject [as 别名]
# 或者: from pyanaconda.ui.gui.GUIObject import __init__ [as 别名]
    def __init__(self, data, storage, payload):
        GUIObject.__init__(self, data)
        self.storage = storage
        self.payload = payload

        self._initialFreeSpace = Size(0)
        self._selectedReclaimableSpace = Size(0)

        self._actionStore = self.builder.get_object("actionStore")
        self._diskStore = self.builder.get_object("diskStore")

        self._selection = self.builder.get_object("diskView-selection")

        self._view = self.builder.get_object("diskView")
        self._diskStore = self.builder.get_object("diskStore")
        self._reclaimable_label = self.builder.get_object("reclaimableSpaceLabel")
        self._selected_label = self.builder.get_object("selectedSpaceLabel")

        self._required_label = self.builder.get_object("requiredSpaceLabel")
        markup = self._required_label.get_label()
        self._required_label.set_markup(markup % escape_markup(str(self.payload.spaceRequired)))

        self._reclaimDescLabel = self.builder.get_object("reclaimDescLabel")

        self._resizeButton = self.builder.get_object("resizeButton")

        self._preserveButton = self.builder.get_object("preserveButton")
        self._shrinkButton = self.builder.get_object("shrinkButton")
        self._deleteButton = self.builder.get_object("deleteButton")
        self._resizeSlider = self.builder.get_object("resizeSlider")
开发者ID:cyclefusion,项目名称:anaconda,代码行数:32,代码来源:resize.py

示例5: __init__

# 需要导入模块: from pyanaconda.ui.gui import GUIObject [as 别名]
# 或者: from pyanaconda.ui.gui.GUIObject import __init__ [as 别名]
    def __init__(self, data, storage, payload):
        GUIObject.__init__(self, data)
        self.storage = storage
        self.payload = payload

        self._initialFreeSpace = Size(0)
        self._selectedReclaimableSpace = Size(0)

        self._actionStore = self.builder.get_object("actionStore")
        self._diskStore = self.builder.get_object("diskStore")

        self._selection = self.builder.get_object("diskView-selection")

        self._view = self.builder.get_object("diskView")
        self._diskStore = self.builder.get_object("diskStore")
        self._reclaimable_label = self.builder.get_object("reclaimableSpaceLabel")
        self._selected_label = self.builder.get_object("selectedSpaceLabel")

        self._required_label = self.builder.get_object("requiredSpaceLabel")
        markup = _("Installation requires a total of <b>%s</b> for system data.")
        required_dev_size = self.payload.requiredDeviceSize(FS.biggest_overhead_FS())
        self._required_label.set_markup(markup % escape_markup(str(required_dev_size)))

        self._reclaimDescLabel = self.builder.get_object("reclaimDescLabel")

        self._resizeButton = self.builder.get_object("resizeButton")

        self._preserveButton = self.builder.get_object("preserveButton")
        self._shrinkButton = self.builder.get_object("shrinkButton")
        self._deleteButton = self.builder.get_object("deleteButton")
        self._resizeSlider = self.builder.get_object("resizeSlider")
开发者ID:bwann,项目名称:anaconda,代码行数:33,代码来源:resize.py

示例6: __init__

# 需要导入模块: from pyanaconda.ui.gui import GUIObject [as 别名]
# 或者: from pyanaconda.ui.gui.GUIObject import __init__ [as 别名]
    def __init__(self, *args):
        GUIObject.__init__(self, *args)
        GUIDialogInputCheckHandler.__init__(self)

        #epoch is increased when serversStore is repopulated
        self._epoch = 0
        self._epoch_lock = threading.Lock()
开发者ID:cyclefusion,项目名称:anaconda,代码行数:9,代码来源:datetime_spoke.py

示例7: __init__

# 需要导入模块: from pyanaconda.ui.gui import GUIObject [as 别名]
# 或者: from pyanaconda.ui.gui.GUIObject import __init__ [as 别名]
    def __init__(self, data):
        GUIObject.__init__(self, data)
        GUIInputCheckHandler.__init__(self)

        self._confirm_entry = self.builder.get_object("confirm_pw_entry")
        self._passphrase_entry = self.builder.get_object("passphrase_entry")

        self._save_button = self.builder.get_object("passphrase_save_button")

        self._strength_bar = self.builder.get_object("strength_bar")
        self._strength_label = self.builder.get_object("strength_label")

        self._passphrase_warning_image = self.builder.get_object("passphrase_warning_image")
        self._passphrase_warning_label = self.builder.get_object("passphrase_warning_label")

        # Set the offset values for the strength bar colors
        self._strength_bar.add_offset_value("low", 2)
        self._strength_bar.add_offset_value("medium", 3)
        self._strength_bar.add_offset_value("high", 4)

        # Configure the password policy, if available. Otherwise use defaults.
        self.policy = self.data.anaconda.pwpolicy.get_policy("luks")
        if not self.policy:
            self.policy = self.data.anaconda.PwPolicyData()

        # These will be set up later.
        self._pwq = None
        self._pwq_error = None
        self.passphrase = ""

        self._passphrase_match_check = self.add_check(self._passphrase_entry, self._checkMatch)
        self._confirm_match_check = self.add_check(self._confirm_entry, self._checkMatch)
        self._strength_check = self.add_check(self._passphrase_entry, self._checkStrength)
        self._ascii_check = self.add_check(self._passphrase_entry, self._checkASCII)
开发者ID:cyclefusion,项目名称:anaconda,代码行数:36,代码来源:passphrase.py

示例8: __init__

# 需要导入模块: from pyanaconda.ui.gui import GUIObject [as 别名]
# 或者: from pyanaconda.ui.gui.GUIObject import __init__ [as 别名]
 def __init__(self, data, desired_entropy):
     GUIObject.__init__(self, data)
     self._desired_entropy = desired_entropy
     self._progress_bar = self.builder.get_object("progressBar")
     self._terminate = False
     self._started = 0
     self.force_cont = False
     self._num_loops = 0
开发者ID:bwann,项目名称:anaconda,代码行数:10,代码来源:entropy_dialog.py

示例9: __init__

# 需要导入模块: from pyanaconda.ui.gui import GUIObject [as 别名]
# 或者: from pyanaconda.ui.gui.GUIObject import __init__ [as 别名]
    def __init__(self, data, storage):
        GUIObject.__init__(self, data)

        self.storage = storage

        self._notebook = self.builder.get_object("refreshNotebook")
        self._cancel_button = self.builder.get_object("refreshCancelButton")
        self._ok_button = self.builder.get_object("refreshOKButton")
开发者ID:cs2c-zhangchao,项目名称:nkwin1.0-anaconda,代码行数:10,代码来源:refresh.py

示例10: __init__

# 需要导入模块: from pyanaconda.ui.gui import GUIObject [as 别名]
# 或者: from pyanaconda.ui.gui.GUIObject import __init__ [as 别名]
    def __init__(self, *args, **kwargs):
        self.payload = kwargs.pop("payload", None)
        self.showReclaim = kwargs.pop("showReclaim", None)
        GUIObject.__init__(self, *args, **kwargs)

        self.autoPartType = None
        self.encrypted = False

        self._grabObjects()
开发者ID:joesaland,项目名称:qubes-installer-qubes-os,代码行数:11,代码来源:storage.py

示例11: __init__

# 需要导入模块: from pyanaconda.ui.gui import GUIObject [as 别名]
# 或者: from pyanaconda.ui.gui.GUIObject import __init__ [as 别名]
    def __init__(self, data, storage):
        GUIObject.__init__(self, data)
        self.storage = storage
        self.iscsi = self.storage.iscsi()

        self._discoveryError = None
        self._loginError = False

        self._discoveredNodes = []
开发者ID:cs2c-zhangchao,项目名称:nkwin1.0-anaconda,代码行数:11,代码来源:iscsi.py

示例12: __init__

# 需要导入模块: from pyanaconda.ui.gui import GUIObject [as 别名]
# 或者: from pyanaconda.ui.gui.GUIObject import __init__ [as 别名]
    def __init__(self, *args):
        GUIObject.__init__(self, *args)

        #used to ensure uniqueness of the threads' names
        self._threads_counter = 0

        #epoch is increased when serversStore is repopulated
        self._epoch = 0
        self._epoch_lock = threading.Lock()
开发者ID:cs2c-zhangchao,项目名称:nkwin1.0-anaconda,代码行数:11,代码来源:datetime_spoke.py

示例13: __init__

# 需要导入模块: from pyanaconda.ui.gui import GUIObject [as 别名]
# 或者: from pyanaconda.ui.gui.GUIObject import __init__ [as 别名]
    def __init__(self, data, storage, payload, instclass):
        GUIObject.__init__(self, data)
        common.NormalSpoke.__init__(self, storage, payload, instclass)

        # Add a help handler
        self.window.connect_after("help-button-clicked", self._on_help_clicked)

        # warning message
        self._current_warning_message = ""
开发者ID:zhangsju,项目名称:anaconda,代码行数:11,代码来源:__init__.py

示例14: __init__

# 需要导入模块: from pyanaconda.ui.gui import GUIObject [as 别名]
# 或者: from pyanaconda.ui.gui.GUIObject import __init__ [as 别名]
    def __init__(self, data):
        GUIObject.__init__(self, data)

        self._view = self.builder.get_object("disk_tree_view")
        self._store = self.builder.get_object("disk_store")
        self._selection = self.builder.get_object("disk_selection")
        self._summary_label = self.builder.get_object("summary_label")

        self._set_button = self.builder.get_object("set_as_boot_button")
        self._remove_button = self.builder.get_object("remove_button")
开发者ID:cyclefusion,项目名称:anaconda,代码行数:12,代码来源:cart.py

示例15: __init__

# 需要导入模块: from pyanaconda.ui.gui import GUIObject [as 别名]
# 或者: from pyanaconda.ui.gui.GUIObject import __init__ [as 别名]
    def __init__(self, user, groupDict, data):
        GUIObject.__init__(self, data)
        GUIDialogInputCheckHandler.__init__(self)
        self._user = user
        self._groupDict = groupDict

        # Track whether the user has requested a home directory other
        # than the default.
        self._origHome = None
        self._homeSet = False
开发者ID:cyclefusion,项目名称:anaconda,代码行数:12,代码来源:user.py


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