本文整理汇总了Python中pyanaconda.ui.gui.spokes.NormalSpoke类的典型用法代码示例。如果您正苦于以下问题:Python NormalSpoke类的具体用法?Python NormalSpoke怎么用?Python NormalSpoke使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了NormalSpoke类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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
示例2: __init__
def __init__(self, *args):
NormalSpoke.__init__(self, *args)
self.applyOnSkip = True
self.ancestors = []
self.disks = []
self.selected_disks = []
示例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()
示例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"
示例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()
示例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()
示例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()
示例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",)
示例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)
示例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()
示例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()
示例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)
示例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)
示例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()
示例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)