本文整理汇总了Python中pyanaconda.ui.gui.GUIObject类的典型用法代码示例。如果您正苦于以下问题:Python GUIObject类的具体用法?Python GUIObject怎么用?Python GUIObject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了GUIObject类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: refresh
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,代码行数:7,代码来源:summary.py
示例2: __init__
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,代码行数:34,代码来源:passphrase.py
示例3: __init__
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,代码行数:7,代码来源:datetime_spoke.py
示例4: refresh
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,代码行数:32,代码来源:custom_storage_helpers.py
示例5: refresh
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,代码行数:25,代码来源:source.py
示例6: refresh
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,代码行数:34,代码来源:source.py
示例7: __init__
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,代码行数:30,代码来源:resize.py
示例8: __init__
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,代码行数:25,代码来源:custom_storage_helpers.py
示例9: __init__
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,代码行数:31,代码来源:resize.py
示例10: __init__
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,代码行数:33,代码来源:iscsi.py
示例11: initialize
def initialize(self):
GUIObject.initialize(self)
self._grabObjects()
# Validate the group input box
self.add_check(self._tGroups, self._validateGroups)
开发者ID:cyclefusion,项目名称:anaconda,代码行数:7,代码来源:user.py
示例12: __init__
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,代码行数:26,代码来源:detailederror.py
示例13: refresh
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,代码行数:27,代码来源:custom_storage_helpers.py
示例14: __init__
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,代码行数:8,代码来源:refresh.py
示例15: __init__
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,代码行数:8,代码来源:entropy_dialog.py
示例16: __init__
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,代码行数:9,代码来源:datetime_spoke.py
示例17: __init__
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,代码行数:9,代码来源:__init__.py
示例18: __init__
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,代码行数:9,代码来源:storage.py
示例19: initialize
def initialize(self):
GUIObject.initialize(self)
self._grabObjects()
# Validate the group input box
self.add_check(self._tGroups, self._validateGroups)
# Send ready signal to main event loop
hubQ.send_ready(self.__class__.__name__, False)
开发者ID:jaymzh,项目名称:anaconda,代码行数:9,代码来源:user.py
示例20: initialize
def initialize(self):
GUIObject.initialize(self)
self._grabObjects()
# Validate the group input box
self.add_check_with_error_label(editable=self._tGroups,
error_label=self._groupsError,
run_check=_validateGroups)
开发者ID:Sabayon,项目名称:anaconda,代码行数:9,代码来源:user.py
注:本文中的pyanaconda.ui.gui.GUIObject类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论