本文整理汇总了Python中pyanaconda.ui.gui.spokes.NormalSpoke类的典型用法代码示例。如果您正苦于以下问题:Python NormalSpoke类的具体用法?Python NormalSpoke怎么用?Python NormalSpoke使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了NormalSpoke类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, *args, **kwargs):
NormalSpoke.__init__(self, *args, **kwargs)
self._currentIsoFile = None
self._ready = False
self._error = False
self._proxyChange = False
self._cdrom = None
开发者ID:cs2c-zhangchao,项目名称:nkwin1.0-anaconda,代码行数:7,代码来源:source.py
示例2: __init__
def __init__(self, *args):
NormalSpoke.__init__(self, *args)
self.applyOnSkip = True
self.ancestors = []
self.disks = []
self.selected_disks = []
开发者ID:joesaland,项目名称:qubes-installer-qubes-os,代码行数:7,代码来源:filter.py
示例3: initialize
def initialize(self):
NormalSpoke.initialize(self)
self.initialize_start()
self.pages = [SearchPage(self.storage, self.builder),
MultipathPage(self.storage, self.builder),
OtherPage(self.storage, self.builder),
ZPage(self.storage, self.builder)]
self._notebook = self.builder.get_object("advancedNotebook")
if not arch.is_s390():
self._notebook.remove_page(-1)
self.builder.get_object("addZFCPButton").destroy()
self.builder.get_object("addDASDButton").destroy()
if not has_fcoe():
self.builder.get_object("addFCOEButton").destroy()
if not iscsi.available:
self.builder.get_object("addISCSIButton").destroy()
self._store = self.builder.get_object("diskStore")
self._addDisksButton = self.builder.get_object("addDisksButton")
# report that we are done
self.initialize_done()
开发者ID:dougsland,项目名称:anaconda,代码行数:27,代码来源:filter.py
示例4: initialize
def initialize(self):
"""
The initialize method that is called after the instance is created.
The difference between __init__ and this method is that this may take
a long time and thus could be called in a separated thread.
:see: pyanaconda.ui.common.UIObject.initialize
"""
NormalSpoke.initialize(self)
self.button1 = self.builder.get_object("button1")
self.button1a = self.builder.get_object("button1a")
self.button1b = self.builder.get_object("button1b")
self.button2 = self.builder.get_object("button2")
self.link = self.builder.get_object("fileurl")
# Check if Values Provided in KickStart
if self.data.addons.org_centos_cloud.state == "False":
# ADDON : DISABLED
self.button2.set_active(True)
else:
# No Value Given choose : DEFAULT = ENABLED
self.data.addons.org_centos_cloud.state = "True"
self.button1.set_active(True)
# If no argument provided DEFAULT --allinone is assumed
if not (str (self.data.addons.org_centos_cloud.arguments).startswith("--answer-file")):
self.data.addons.org_centos_cloud.arguments = "--allinone"
开发者ID:gbraad,项目名称:anaconda-packstack-addon,代码行数:27,代码来源:cloud_gui.py
示例5: __init__
def __init__(self, *args, **kwargs):
StorageChecker.__init__(self)
NormalSpoke.__init__(self, *args, **kwargs)
self.applyOnSkip = True
self._ready = False
self.autoPartType = None
self.encrypted = False
self.passphrase = ""
self.selected_disks = self.data.ignoredisk.onlyuse[:]
# This list contains all possible disks that can be included in the install.
# All types of advanced disks should be set up for us ahead of time, so
# there should be no need to modify this list.
self.disks = []
if not flags.automatedInstall:
# default to using autopart for interactive installs
self.data.autopart.autopart = True
self.autopart = self.data.autopart.autopart
self.autoPartType = None
self.clearPartType = CLEARPART_TYPE_NONE
if self.data.zerombr.zerombr and arch.isS390():
# run dasdfmt on any unformatted DASDs automatically
threadMgr.add(AnacondaThread(name=constants.THREAD_DASDFMT,
target=self.run_dasdfmt))
self._previous_autopart = False
self._last_clicked_overview = None
self._cur_clicked_overview = None
self._grabObjects()
开发者ID:akozumpl,项目名称:anaconda,代码行数:35,代码来源:storage.py
示例6: refresh
def refresh(self):
NormalSpoke.refresh(self)
threadMgr.wait(constants.THREAD_PAYLOAD_MD)
if self.environment not in self.payload.environments:
self.environment = None
firstEnvironment = True
firstRadio = None
self._clear_listbox(self._environmentListBox)
for environment in self.payload.environments:
(name, desc) = self.payload.environmentDescription(environment)
radio = Gtk.RadioButton(group=firstRadio)
active = environment == self.environment or \
not self.environment and firstEnvironment
radio.set_active(active)
if active:
self.environment = environment
self._add_row(self._environmentListBox, name, desc, radio)
firstRadio = firstRadio or radio
firstEnvironment = False
self.refreshAddons()
开发者ID:pombreda,项目名称:anaconda,代码行数:30,代码来源:software.py
示例7: initialize
def initialize(self):
NormalSpoke.initialize(self)
self._done = False
init_dep_injection()
facts = inj.require(inj.FACTS)
backend = managergui.Backend()
self._registergui = registergui.RegisterScreen(backend, facts,
callbacks=[self.finished])
self._action_area = self.builder.get_object("RHSMSpokeWindow-action_area1")
self._register_box = self._registergui.dialog_vbox6
# FIXME: close_window handling is kind of a mess. Standlone subman gui,
# the firstboot screens, and initial-setup need it to do different
# things. Potentially a 'Im done with this window now' signal, with
# each attaching different handlers.
self._registergui.close_window_callback = self._close_window_callback
# we have a ref to _register_box, but need to remove it from
# the regustergui.window (a GtkDialog), and add it to the main
# box in the action area of our initial-setup screen.
self._registergui.window.remove(self._register_box)
self._action_area.pack_end(self._register_box, True, True, 0)
self._action_area.show()
self._register_box.show_all()
self._registergui.initialize()
开发者ID:vritant,项目名称:subscription-manager,代码行数:27,代码来源:rhsm_gui.py
示例8: __init__
def __init__(self, data, storage, payload, instclass):
"""
:see: pyanaconda.ui.common.Spoke.__init__
:param data: data object passed to every spoke to load/store data
from/to it
:type data: pykickstart.base.BaseHandler
:param storage: object storing storage-related information
(disks, partitioning, bootloader, etc.)
:type storage: blivet.Blivet
:param payload: object storing packaging-related information
:type payload: pyanaconda.packaging.Payload
:param instclass: distribution-specific information
:type instclass: pyanaconda.installclass.BaseInstallClass
"""
NormalSpoke.__init__(self, data, storage, payload, instclass)
self.defaultUrl = "http://central-6-2-x86-64.rocksclusters.org/install/rolls"
self.defaultCDPath = "/mnt/cdrom"
self.selectAll = True
self.rollSource = NETWORK
self.version = "7.0"
self.requireDB = True
self.requiredRolls = ("core",)
开发者ID:rocksclusters,项目名称:kernel,代码行数:27,代码来源:rocks_rolls.py
示例9: __init__
def __init__(self, *args, **kwargs):
NormalSpoke.__init__(self, *args, **kwargs)
self._errorMsgs = None
self._tx_id = None
self._selectFlag = False
self.selectedGroups = []
self.excludedGroups = []
self.environment = None
self._environmentListBox = self.builder.get_object("environmentListBox")
self._addonListBox = self.builder.get_object("addonListBox")
# Connect viewport scrolling with listbox focus events
environmentViewport = self.builder.get_object("environmentViewport")
addonViewport = self.builder.get_object("addonViewport")
self._environmentListBox.set_focus_vadjustment(environmentViewport.get_vadjustment())
self._addonListBox.set_focus_vadjustment(addonViewport.get_vadjustment())
# Used to store how the user has interacted with add-ons for the default add-on
# selection logic. The dictionary keys are group IDs, and the values are selection
# state constants. See refreshAddons for how the values are used.
self._addonStates = {}
# Used for detecting whether anything's changed in the spoke.
self._origAddons = []
self._origEnvironment = None
# Register event listeners to update our status on payload events
payloadMgr.addListener(payloadMgr.STATE_PACKAGE_MD, self._downloading_package_md)
payloadMgr.addListener(payloadMgr.STATE_GROUP_MD, self._downloading_group_md)
payloadMgr.addListener(payloadMgr.STATE_FINISHED, self._payload_finished)
payloadMgr.addListener(payloadMgr.STATE_ERROR, self._payload_error)
开发者ID:cyclefusion,项目名称:anaconda,代码行数:33,代码来源:software.py
示例10: __init__
def __init__(self, data, storage, payload, instclass):
"""
:see: pyanaconda.ui.common.Spoke.__init__
:param data: data object passed to every spoke to load/store data
from/to it
:type data: pykickstart.base.BaseHandler
:param storage: object storing storage-related information
(disks, partitioning, bootloader, etc.)
:type storage: blivet.Blivet
:param payload: object storing packaging-related information
:type payload: pyanaconda.packaging.Payload
:param instclass: distribution-specific information
:type instclass: pyanaconda.installclass.BaseInstallClass
"""
NormalSpoke.__init__(self, data, storage, payload, instclass)
self.logger = logging.getLogger("anaconda")
self.main_box = self.builder.get_object("mainBox")
self.thread_dialog = None
self.qubes_user = None
self.qubes_gid = None
self.default_template = 'fedora-26'
self.set_stage("Start-up")
self.done = False
self.__init_qubes_choices()
开发者ID:adrelanos,项目名称:qubes-installer-qubes-os,代码行数:31,代码来源:qubes_os.py
示例11: initialize
def initialize(self):
"""
The initialize method that is called after the instance is created.
The difference between __init__ and this method is that this may take
a long time and thus could be called in a separated thread.
:see: pyanaconda.ui.common.UIObject.initialize
"""
NormalSpoke.initialize(self)
self.initialize_start()
self._storage_playground = None
config.log_dir = "/tmp"
self.client = osinstall.BlivetGUIAnacondaClient()
box = self.builder.get_object("BlivetGuiViewport")
self.label_actions = self.builder.get_object("summary_label")
self.button_reset = self.builder.get_object("resetAllButton")
self.button_undo = self.builder.get_object("undoLastActionButton")
config.default_fstype = self._storage.default_fstype
self.blivetgui = osinstall.BlivetGUIAnaconda(self.client, self, box)
# this needs to be done when the spoke is already "realized"
self.entered.connect(self.blivetgui.ui_refresh)
# set up keyboard shurtcuts for blivet-gui (and unset them after
# user lefts the spoke)
self.entered.connect(self.blivetgui.set_keyboard_shortcuts)
self.exited.connect(self.blivetgui.unset_keyboard_shortcuts)
self.initialize_done()
开发者ID:jaymzh,项目名称:anaconda,代码行数:35,代码来源:blivet_gui.py
示例12: on_back_clicked
def on_back_clicked(self, button):
# Clear any existing errors
self.clear_errors()
# If back has been clicked on once already and no other changes made on the screen,
# run the storage check now. This handles displaying any errors in the info bar.
if not self._back_already_clicked:
self._back_already_clicked = True
# If we hit any errors while saving things above, stop and let the
# user think about what they have done
if self._error is not None:
return
if not self._do_check():
return
if len(self._storage_playground.devicetree.actions.find()) > 0:
dialog = ActionSummaryDialog(self.data)
dialog.refresh(self._storage_playground.devicetree.actions.find())
with self.main_window.enlightbox(dialog.window):
rc = dialog.run()
if rc != 1:
# Cancel. Stay on the blivet-gui screen.
return
else:
# remove redundant actions and sort them now
self._storage_playground.devicetree.actions.prune()
self._storage_playground.devicetree.actions.sort()
NormalSpoke.on_back_clicked(self, button)
开发者ID:jaymzh,项目名称:anaconda,代码行数:32,代码来源:blivet_gui.py
示例13: __init__
def __init__(self, data, storage, payload, instclass):
"""
:see: pyanaconda.ui.common.Spoke.__init__
:param data: data object passed to every spoke to load/store data
from/to it
:type data: pykickstart.base.BaseHandler
:param storage: object storing storage-related information
(disks, partitioning, bootloader, etc.)
:type storage: blivet.Blivet
:param payload: object storing payload-related information
:type payload: pyanaconda.payload.Payload
:param instclass: distribution-specific information
:type instclass: pyanaconda.installclass.BaseInstallClass
"""
self._error = None
self._back_already_clicked = False
self._storage_playground = None
self.label_actions = None
self.button_reset = None
self.button_undo = None
StorageCheckHandler.__init__(self)
NormalSpoke.__init__(self, data, storage, payload, instclass)
开发者ID:jaymzh,项目名称:anaconda,代码行数:25,代码来源:blivet_gui.py
示例14: refresh
def refresh(self):
NormalSpoke.refresh(self)
threadMgr.wait(constants.THREAD_PAYLOAD_MD)
self._environmentStore.clear()
firstEnvironment = True
for environment in self.payload.environments:
(name, desc) = self.payload.environmentDescription(environment)
itr = self._environmentStore.append([environment == self.environment, "<b>%s</b>\n%s" % (name, desc), environment])
# Either:
# (1) Select the environment given by kickstart or selected last
# time this spoke was displayed; or
# (2) Select the first environment given by display order as the
# default if nothing is selected.
if (environment == self.environment) or \
(not self.environment and firstEnvironment):
self.environment = environment
sel = self.builder.get_object("environmentSelector")
sel.select_iter(itr)
firstEnvironment = False
self.refreshAddons()
开发者ID:Sabayon,项目名称:anaconda,代码行数:26,代码来源:software.py
示例15: __init__
def __init__(self, data, storage, payload):
"""
:see: pyanaconda.ui.common.Spoke.__init__
:param data: data object passed to every spoke to load/store data
from/to it
:type data: pykickstart.base.BaseHandler
:param storage: object storing storage-related information
(disks, partitioning, bootloader, etc.)
:type storage: blivet.Blivet
:param payload: object storing payload-related information
:type payload: pyanaconda.payload.Payload
"""
self._error = None
self._back_already_clicked = False
self._storage_playground = None
self.label_actions = None
self.button_reset = None
self.button_undo = None
self._bootloader_observer = STORAGE.get_observer(BOOTLOADER)
self._bootloader_observer.connect()
StorageCheckHandler.__init__(self)
NormalSpoke.__init__(self, data, storage, payload)
开发者ID:rvykydal,项目名称:anaconda,代码行数:25,代码来源:blivet_gui.py
示例16: __init__
def __init__(self, *args, **kwargs):
NormalSpoke.__init__(self, *args, **kwargs)
self._errorMsgs = None
self._tx_id = None
self._selectFlag = False
self.selectedGroups = []
self.excludedGroups = []
self.environment = None
self._environmentListBox = self.builder.get_object("environmentListBox")
self._addonListBox = self.builder.get_object("addonListBox")
# Used to determine which add-ons to display for each environment.
# The dictionary keys are environment IDs. The dictionary values are two-tuples
# consisting of lists of add-on group IDs. The first list is the add-ons specific
# to the environment, and the second list is the other add-ons possible for the
# environment.
self._environmentAddons = {}
# Used to store how the user has interacted with add-ons for the default add-on
# selection logic. The dictionary keys are group IDs, and the values are selection
# state constants. See refreshAddons for how the values are used.
self._addonStates = {}
# Used for detecting whether anything's changed in the spoke.
self._origAddons = []
self._origEnvironment = None
开发者ID:pombreda,项目名称:anaconda,代码行数:28,代码来源:software.py
示例17: initialize
def initialize(self):
from pyanaconda.ui.gui.utils import setViewportBackground
NormalSpoke.initialize(self)
# Wouldn't it be nice if glade knew how to do this?
label = self.builder.get_object("summary_button").get_children()[0]
markup = "<span foreground='blue'><u>%s</u></span>" % label.get_text()
label.set_use_markup(True)
label.set_markup(markup)
specializedButton = self.builder.get_object("addSpecializedButton")
# It's uh... uh... it's down there somewhere, let me take another look.
label = specializedButton.get_children()[0].get_children()[0].get_children()[1]
markup = "<span size='large'><b>%s</b></span>" % label.get_text()
label.set_use_markup(True)
label.set_markup(markup)
specializedButton.show_all()
self.local_disks_box = self.builder.get_object("local_disks_box")
self.specialized_disks_box = self.builder.get_object("specialized_disks_box")
threadMgr.add(AnacondaThread(name=constants.THREAD_STORAGE_WATCHER,
target=self._initialize))
开发者ID:cs2c-zhangchao,项目名称:nkwin1.0-anaconda,代码行数:25,代码来源:storage.py
示例18: __init__
def __init__(self, *args, **kwargs):
NormalSpoke.__init__(self, *args, **kwargs)
self.applyOnSkip = True
self._ready = False
self.selected_disks = self.data.ignoredisk.onlyuse[:]
# This list contains all possible disks that can be included in the install.
# All types of advanced disks should be set up for us ahead of time, so
# there should be no need to modify this list.
self.disks = []
if not flags.automatedInstall:
# default to using autopart for interactive installs
self.data.autopart.autopart = True
self.autopart = self.data.autopart.autopart
self.autoPartType = None
self.clearPartType = CLEARPART_TYPE_NONE
self._previous_autopart = False
self._last_clicked_overview = None
self._cur_clicked_overview = None
# nkwin7 add begin
self.hubClass = None
self.spokeClass = None
开发者ID:cs2c-zhangchao,项目名称:nkwin1.0-anaconda,代码行数:27,代码来源:storage.py
示例19: initialize
def initialize(self):
NormalSpoke.initialize(self)
self._enableButton = self.builder.get_object("enableKdumpCheck")
self._reservationTypeLabel = self.builder.get_object("reservationTypeLabel")
self._autoButton = self.builder.get_object("autoButton")
self._manualButton = self.builder.get_object("manualButton")
self._currentlyReservedLabel = self.builder.get_object("currentlyReservedLabel")
self._currentlyReservedMB = self.builder.get_object("currentlyReservedMB")
self._toBeReservedLabel = self.builder.get_object("toBeReservedLabel")
self._toBeReservedSpin = self.builder.get_object("toBeReservedSpin")
self._totalMemLabel = self.builder.get_object("totalMemLabel")
self._totalMemMB = self.builder.get_object("totalMemMB")
self._usableMemLabel = self.builder.get_object("usableMemLabel")
self._usableMemMB = self.builder.get_object("usableMemMB")
self._config_buffer = self.builder.get_object("advancedConfigBuffer")
# Set an initial value and adjustment on the spin button
lower, upper, step = getMemoryBounds()
adjustment = Gtk.Adjustment(lower, lower, upper, step, step, 0)
self._toBeReservedSpin.set_adjustment(adjustment)
self._toBeReservedSpin.set_value(lower)
# Initialize the advanced config area with the contents of /etc/kdump.conf
try:
with open(CONFIG_FILE, "r") as fobj:
self._config_buffer.set_text(fobj.read())
except IOError:
self._config_buffer.set_text("")
开发者ID:bcl,项目名称:kdump-anaconda-addon,代码行数:30,代码来源:kdump.py
示例20: initialize
def initialize(self):
"""
The initialize method that is called after the instance is created.
The difference between __init__ and this method is that this may take
a long time and thus could be called in a separated thread.
:see: pyanaconda.ui.common.UIObject.initialize
"""
NormalSpoke.initialize(self)
import logging
self.log = logging.getLogger("anaconda")
self.log.info("Rocks was here")
# self.builder.connect_signals(self)
# Get the Main Window, and connect the "destroy" event
# self.window = self.builder.get_object("RollsWindow")
self.rollUrl = self.builder.get_object("rollUrl")
self.rollUrl.set_text(self.defaultUrl)
self.listStore = self.builder.get_object("listRoll")
self.selectStore = self.builder.get_object("selectedRolls")
self.rollSelectCombo = self.builder.get_object("rollSelectCombo")
sys.path.append("/opt/rocks/lib/python2.7/site-packages")
import rocks.media
import rocks.installcgi
self.media = rocks.media.Media()
self.install = rocks.installcgi.InstallCGI(rootdir="/tmp/rocks")
开发者ID:rocksclusters,项目名称:kernel,代码行数:34,代码来源:rocks_rolls.py
注:本文中的pyanaconda.ui.gui.spokes.NormalSpoke类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论