本文整理汇总了Python中pyanaconda.ui.gui.utils.enlightbox函数的典型用法代码示例。如果您正苦于以下问题:Python enlightbox函数的具体用法?Python enlightbox怎么用?Python enlightbox使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了enlightbox函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: on_info_bar_clicked
def on_info_bar_clicked(self, *args):
if self.errors:
label = _("The following errors were encountered when checking your storage "
"configuration. You can modify your storage layout or quit the "
"installer.")
dialog = DetailedErrorDialog(self.data, buttons=[_("_Quit"), _("_Modify Storage Layout")], label=label)
with enlightbox(self.window, dialog.window):
errors = "\n".join(self.errors)
dialog.refresh(errors)
rc = dialog.run()
dialog.window.destroy()
if rc == 0:
# Quit.
sys.exit(0)
elif self.warnings:
label = _("The following warnings were encountered when checking your storage "
"configuration. These are not fatal, but you may wish to make "
"changes to your storage layout.")
dialog = DetailedErrorDialog(self.data, buttons=[_("_OK")], label=label)
with enlightbox(self.window, dialog.window):
warnings = "\n".join(self.warnings)
dialog.refresh(warnings)
rc = dialog.run()
dialog.window.destroy()
开发者ID:cs2c-zhangchao,项目名称:nkwin1.0-anaconda,代码行数:29,代码来源:storage.py
示例2: on_info_bar_clicked
def on_info_bar_clicked(self, *args):
if not self._errorMsgs:
return
label = _("The following software marked for installation has errors. "
"This is likely caused by an error with\nyour installation source. "
"You can change your installation source or quit the installer.")
dialog = DetailedErrorDialog(self.data,
buttons=[C_("GUI|Software Selection|Error Dialog", "_Quit"),
C_("GUI|Software Selection|Error Dialog", "_Cancel"),
C_("GUI|Software Selection|Error Dialog", "_Modify Software Source")],
label=label)
with enlightbox(self.window, dialog.window):
dialog.refresh(self._errorMsgs)
rc = dialog.run()
dialog.window.destroy()
if rc == 0:
# Quit.
sys.exit(0)
elif rc == 1:
# Close the dialog so the user can change selections.
pass
elif rc == 2:
# Send the user to the installation source spoke.
self.skipTo = "SourceSpoke"
self.window.emit("button-clicked")
else:
pass
开发者ID:pombreda,项目名称:anaconda,代码行数:30,代码来源:software.py
示例3: on_add_clicked
def on_add_clicked(self, button):
if not self._add_dialog:
self._add_dialog = AddLayoutDialog(self.data)
self._add_dialog.initialize()
self._add_dialog.refresh()
with enlightbox(self.window, self._add_dialog.window):
response = self._add_dialog.run()
if response == 1:
duplicates = set()
for row in self._store:
item = row[0]
if item in self._add_dialog.chosen_layouts:
duplicates.add(item)
for layout in self._add_dialog.chosen_layouts:
if layout not in duplicates:
self._addLayout(self._store, layout)
if self._remove_last_attempt:
itr = self._store.get_iter_first()
if not self._store[itr][0] in self._add_dialog.chosen_layouts:
self._removeLayout(self._store, itr)
self._remove_last_attempt = False
开发者ID:uofis,项目名称:qubes-installer-qubes-os,代码行数:26,代码来源:keyboard.py
示例4: showError
def showError(self, message):
dlg = ErrorDialog(None)
with enlightbox(self._currentAction.window, dlg.window):
dlg.refresh(message)
dlg.run()
dlg.window.destroy()
开发者ID:akozumpl,项目名称:anaconda,代码行数:7,代码来源:__init__.py
示例5: on_add_clicked
def on_add_clicked(self, button):
self._add_dialog.refresh()
with enlightbox(self.window, self._add_dialog.window):
response = self._add_dialog.run()
if response == 1:
duplicates = set()
for row in self._store:
item = row[0]
if item in self._add_dialog.chosen_layouts:
duplicates.add(item)
for layout in self._add_dialog.chosen_layouts:
if layout not in duplicates:
self._addLayout(self._store, layout)
if self._remove_last_attempt:
itr = self._store.get_iter_first()
if not self._store[itr][0] in self._add_dialog.chosen_layouts:
self._removeLayout(self._store, itr)
self._remove_last_attempt = False
# Update the selection information
self._selection.emit("changed")
开发者ID:akozumpl,项目名称:anaconda,代码行数:25,代码来源:keyboard.py
示例6: on_proxy_clicked
def on_proxy_clicked(self, button):
old_proxy = self.data.method.proxy
dialog = ProxyDialog(self.data)
with enlightbox(self.window, dialog.window):
dialog.refresh()
dialog.run()
self._proxyChange = old_proxy != self.data.method.proxy
开发者ID:cs2c-zhangchao,项目名称:nkwin1.0-anaconda,代码行数:7,代码来源:source.py
示例7: on_verify_media_clicked
def on_verify_media_clicked(self, button):
if not self._cdrom:
return
dialog = MediaCheckDialog(self.data)
with enlightbox(self.window, dialog.window):
dialog.run("/dev/" + self._cdrom.name)
开发者ID:joesaland,项目名称:qubes-installer-qubes-os,代码行数:7,代码来源:source.py
示例8: _on_quit_clicked
def _on_quit_clicked(self):
dialog = self._quitDialog(None)
with enlightbox(self._currentAction.window, dialog.window):
rc = dialog.run()
dialog.window.destroy()
if rc == 1:
sys.exit(0)
开发者ID:joesaland,项目名称:qubes-installer-qubes-os,代码行数:8,代码来源:__init__.py
示例9: showDetailedError
def showDetailedError(self, message, details):
from pyanaconda.ui.gui.spokes.lib.detailederror import DetailedErrorDialog
dlg = DetailedErrorDialog(None, buttons=[_("_Quit")],
label=message)
with enlightbox(self._currentAction.window, dlg.window):
dlg.refresh(details)
rc = dlg.run()
dlg.window.destroy()
开发者ID:joesaland,项目名称:qubes-installer-qubes-os,代码行数:9,代码来源:__init__.py
示例10: on_proxy_clicked
def on_proxy_clicked(self, button):
dialog = ProxyDialog(self.data, self._proxyUrl)
with enlightbox(self.window, dialog.window):
dialog.refresh()
dialog.run()
if self._proxyUrl != dialog.proxyUrl:
self._proxyChange = True
self._proxyUrl = dialog.proxyUrl
开发者ID:joesaland,项目名称:qubes-installer-qubes-os,代码行数:9,代码来源:source.py
示例11: showError
def showError(self, message):
dlg = Gtk.MessageDialog(flags=Gtk.DialogFlags.MODAL,
message_type=Gtk.MessageType.ERROR,
buttons=Gtk.ButtonsType.NONE,
message_format=message)
dlg.add_button(_("_Exit Installer"), 0)
with enlightbox(self._currentAction.window, dlg):
dlg.run()
dlg.destroy()
开发者ID:Sabayon,项目名称:anaconda,代码行数:10,代码来源:__init__.py
示例12: on_add_fcoe_clicked
def on_add_fcoe_clicked(self, widget, *args):
dialog = FCoEDialog(self.data, self.storage)
with enlightbox(self.window, dialog.window):
dialog.refresh()
dialog.run()
# We now need to refresh so any new disks picked up by adding advanced
# storage are displayed in the UI.
self.refresh()
开发者ID:joesaland,项目名称:qubes-installer-qubes-os,代码行数:10,代码来源:filter.py
示例13: _on_continue_clicked
def _on_continue_clicked(self, cb):
# Don't display the betanag dialog if this is the final release.
if not isFinal:
dlg = self.builder.get_object("betaWarnDialog")
with enlightbox(self.window, dlg):
rc = dlg.run()
dlg.destroy()
if rc == 0:
sys.exit(0)
if productName.startswith("Red Hat Enterprise Linux") and \
is_unsupported_hw() and not self.data.unsupportedhardware.unsupported_hardware:
dlg = self.builder.get_object("unsupportedHardwareDialog")
with enlightbox(self.window, dlg):
rc = dlg.run()
dlg.destroy()
if rc == 0:
sys.exit(0)
StandaloneSpoke._on_continue_clicked(self, cb)
开发者ID:Sabayon,项目名称:anaconda,代码行数:20,代码来源:welcome.py
示例14: on_summary_clicked
def on_summary_clicked(self, button):
dialog = SelectedDisksDialog(self.data)
# Include any disks selected in the initial storage spoke, plus any
# selected in this filter UI.
disks = [disk for disk in self.disks if disk.name in self.selected_disks]
free_space = self.storage.getFreeSpace(disks=disks)
with enlightbox(self.window, dialog.window):
dialog.refresh(disks, free_space, showRemove=False, setBoot=False)
dialog.run()
开发者ID:joesaland,项目名称:qubes-installer-qubes-os,代码行数:11,代码来源:filter.py
示例15: showYesNoQuestion
def showYesNoQuestion(self, message):
dlg = Gtk.MessageDialog(flags=Gtk.DialogFlags.MODAL,
message_type=Gtk.MessageType.QUESTION,
buttons=Gtk.ButtonsType.NONE,
message_format=message)
dlg.add_buttons(_("_No"), 0, _("_Yes"), 1)
dlg.set_default_response(1)
with enlightbox(self._currentAction.window, dlg):
rc = dlg.run()
dlg.destroy()
return bool(rc)
开发者ID:Sabayon,项目名称:anaconda,代码行数:13,代码来源:__init__.py
示例16: on_ntp_config_clicked
def on_ntp_config_clicked(self, *args):
self._config_dialog.refresh()
with enlightbox(self.window, self._config_dialog.window):
response = self._config_dialog.run()
if response == 1:
self.data.timezone.ntpservers = self._config_dialog.servers
if self._config_dialog.working_server is None:
self._show_no_ntp_server_warning()
else:
self.clear_info()
开发者ID:cs2c-zhangchao,项目名称:nkwin1.0-anaconda,代码行数:13,代码来源:datetime_spoke.py
示例17: on_preview_clicked
def on_preview_clicked(self, button):
selection = self.builder.get_object("layoutSelection")
(store, cur) = selection.get_selected()
layout_row = store[cur]
if not layout_row:
return
dialog = Gkbd.KeyboardDrawing.dialog_new()
Gkbd.KeyboardDrawing.dialog_set_layout(dialog, self._xkl_wrapper.configreg,
layout_row[0])
with enlightbox(self.window, dialog):
dialog.show_all()
dialog.run()
开发者ID:cs2c-zhangchao,项目名称:nkwin1.0-anaconda,代码行数:13,代码来源:keyboard.py
示例18: _on_continue_clicked
def _on_continue_clicked(self, cb):
# Don't display the betanag dialog if this is the final release.
if isFinal:
StandaloneSpoke._on_continue_clicked(self, cb)
return
dlg = self.builder.get_object("betaWarnDialog")
with enlightbox(self.window, dlg):
rc = dlg.run()
dlg.destroy()
if rc == 0:
sys.exit(0)
else:
StandaloneSpoke._on_continue_clicked(self, cb)
开发者ID:cs2c-zhangchao,项目名称:nkwin1.0-anaconda,代码行数:16,代码来源:welcome.py
示例19: on_preview_clicked
def on_preview_clicked(self, button):
selection = self.builder.get_object("layoutSelection")
(store, cur) = selection.get_selected()
layout_row = store[cur]
if not layout_row:
return
layout, variant = keyboard.parse_layout_variant(layout_row[0])
lay_var_spec = "%s\t%s" % (layout, variant)
dialog = Gkbd.KeyboardDrawing.dialog_new()
Gkbd.KeyboardDrawing.dialog_set_layout(dialog, self._xkl_wrapper.configreg,
lay_var_spec)
dialog.set_size_request(750, 350)
dialog.set_position(Gtk.WindowPosition.CENTER_ALWAYS)
with enlightbox(self.window, dialog):
dialog.show_all()
dialog.run()
开发者ID:Sabayon,项目名称:anaconda,代码行数:17,代码来源:keyboard.py
示例20: on_options_clicked
def on_options_clicked(self, *args):
self._switching_dialog.refresh()
with enlightbox(self.window, self._switching_dialog.window):
response = self._switching_dialog.run()
if response != 1:
# Cancel clicked, dialog destroyed
return
# OK clicked, set and save switching options.
new_options = self._switching_dialog.checked_options
self._xkl_wrapper.set_switching_options(new_options)
self.data.keyboard.switch_options = new_options
# Refresh switching info label.
self._refresh_switching_info()
开发者ID:Sabayon,项目名称:anaconda,代码行数:17,代码来源:keyboard.py
注:本文中的pyanaconda.ui.gui.utils.enlightbox函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论