# pyanaconda.ui.gui.spokes.lib package

## Submodules

## pyanaconda.ui.gui.spokes.lib.accordion module

`pyanaconda.ui.gui.spokes.lib.accordion.``new_selector_from_device`(device, mountpoint='')

`pyanaconda.ui.gui.spokes.lib.accordion.``update_selector_from_device`(selector, device, mountpoint='')

  Create a MountpointSelector from a Device object template. This method should be used whenever constructing a new selector, or when setting a bunch of attributes on an existing selector. For just changing the name or size, it’s probably fine to do it by hand.

  This method returns the selector created.

  If given a selector parameter, attributes will be set on that object instead of creating a new one. The optional mountpoint parameter allows for specifying the mountpoint if it cannot be determined from the device (like for a Root specifying an existing installation).

class `pyanaconda.ui.gui.spokes.lib.accordion.``Accordion`

  Bases: `gi.overrides.Gtk.Box`

  An Accordion is a box that goes on the left side of the custom partitioning spoke. It stores multiple expanders which are here called Pages. These Pages correspond to individual installed OSes on the system plus some special ones. When one Page is expanded, all others are collapsed.

  `add_page`(contents, cb)
  `all_members`
  `all_pages`
  `all_selectors`
  `append_selection`(selectors)

    Append new selectors to the actual selection. This takes list of selectors. If more than 1 item is selected remove the `current_selector`. No current selection is allowed in multiselection.

    Parameters: | selectors (list) – List of selectors which will be

    appended to current selection.

  `clear_current_selector`()

    If current selector is selected, deselect it

  `current_page`

    The current page is really a function of the current selector. Whatever selector on the LHS is selected, the current page is the page containing that selector.

  `current_selector`
  `expand_page`(pageTitle)
  `find_page_by_title`(title)
  `is_current_selected`
  `is_multiselection`
  `page_for_selector`(selector)

    Return page for given selector.

  `process_event`(selector, event, cb)

    Process events from selectors and select items as result. Call cb after selection is done with old selector and new selector as arguments.

    Parameters: | selector – Clicked selector event – Gtk event object cb – Callback which will be called after selection is done.

    This callback is setup in `Page.add_selector()` method.

  `remove_all_pages`()
  `remove_page`(pageTitle)
  `remove_selection`(selectors)

    Remove :param:`selectors` from current selection. If only one item is selected after this operation it’s set as `current_selector`. Items which are not selected are ignored.

    Parameters: | selectors (list) – List of selectors which will be

    removed from current selection.

  `select`(selector)

    Select one item. Remove selection from all other items and clear `current_selector` if set. Add new selector and append it to selected items. Also select the new item.

    Parameters: | selector – Selector which we want to select.

  `selected_items`
  `unselect`()

    Unselect all items and clear current_selector.

class `pyanaconda.ui.gui.spokes.lib.accordion.``Page`(title)

  Bases: `pyanaconda.ui.gui.spokes.lib.accordion.BasePage`

  A Page is a box that is stored in an Accordion. It breaks down all the filesystems that comprise a single installed OS into two categories - Data filesystems and System filesystems. Each filesystem is described by a single MountpointSelector.

class `pyanaconda.ui.gui.spokes.lib.accordion.``UnknownPage`(title)

  Bases: `pyanaconda.ui.gui.spokes.lib.accordion.BasePage`

  `add_selector`(device, cb, mountpoint='')
  `remove_selector`(selector)

class `pyanaconda.ui.gui.spokes.lib.accordion.``CreateNewPage`(title, createClickedCB, autopartTypeChangedCB, partitionsToReuse=True)

  Bases: `pyanaconda.ui.gui.spokes.lib.accordion.BasePage`

  This is a special Page that is displayed when no new installation has been automatically created, and shows the user how to go about doing that. The intention is that an instance of this class will be packed into the Accordion first and then when the new installation is created, it will be removed and replaced with a Page for it.

## pyanaconda.ui.gui.spokes.lib.cart module

class `pyanaconda.ui.gui.spokes.lib.cart.``SelectedDisksDialog`(data)

  Bases: `pyanaconda.ui.gui.GUIObject`

  `builderObjects` = ['selected_disks_dialog', 'disk_store', 'disk_tree_view']
  `initialize`(disks, free, showRemove=True, setBoot=True)
  `mainWidgetName` = 'selected_disks_dialog'
  `on_close_clicked`(button)
  `on_remove_clicked`(button)
  `on_selection_changed`(*args)
  `on_set_as_boot_clicked`(button)
  `refresh`(disks, free, showRemove=True, setBoot=True)
  `run`()
  `uiFile` = 'spokes/lib/cart.glade'

## pyanaconda.ui.gui.spokes.lib.custom_storage_helpers module

Helper functions and classes for custom partitioning.

`pyanaconda.ui.gui.spokes.lib.custom_storage_helpers.``size_from_entry`(entry, lower_bound=None, units=None)

  Get a Size object from an entry field.

  Parameters: | lower_bound (`blivet.size.Size` or NoneType) – lower bound for size returned, units (str or NoneType) – units to use if none obtained from entry
  Returns: | a Size object corresponding to the text in the entry field
  Return type: | `blivet.size.Size` or NoneType

  Units default to bytes if no units specified in entry or units.

  Rounds up to lower_bound, if value in entry field corresponds to a smaller value. The default for lower_bound is None, yielding no rounding.

`pyanaconda.ui.gui.spokes.lib.custom_storage_helpers.``populate_mountpoint_store`(store, used_mountpoints)

`pyanaconda.ui.gui.spokes.lib.custom_storage_helpers.``validate_label`(label, fmt)

  Returns a code indicating either that the given label can be set for this filesystem or the reason why it cannot.

  In the case where the format cannot assign a label, the empty string stands for accept the default, but in the case where the format can assign a label the empty string represents itself.

  Parameters: | label (str) – The label fmt (DeviceFormat) – The device format to label

`pyanaconda.ui.gui.spokes.lib.custom_storage_helpers.``validate_mountpoint`(mountpoint, used_mountpoints, strict=True)

`pyanaconda.ui.gui.spokes.lib.custom_storage_helpers.``get_raid_level`(device)

`pyanaconda.ui.gui.spokes.lib.custom_storage_helpers.``selectedRaidLevel`(raidLevelCombo)

  Interpret the selection of a RAID level combo box.

  Returns: | the selected raid level, None if none selected
  Return type: | instance of blivet.devicelibs.raid.RaidLevel or NoneType

`pyanaconda.ui.gui.spokes.lib.custom_storage_helpers.``raidLevelSelection`(raid_level)

  Returns a string corresponding to the RAID level.

  Parameters: | raid_level (instance of blivet.devicelibs.raid.RAID or None) – a raid level
  Returns: | a string corresponding to this raid level
  Return type: | str

`pyanaconda.ui.gui.spokes.lib.custom_storage_helpers.``defaultRaidLevel`(device_type)

  Returns the default RAID level for this device type.

  Parameters: | device_type (int) – an int representing the device_type
  Returns: | the default RAID level for this device type or None
  Return type: | blivet.devicelibs.raid.RAIDLevel or NoneType

`pyanaconda.ui.gui.spokes.lib.custom_storage_helpers.``requiresRaidSelection`(device_type)

  Whether GUI requires a RAID level be selected for this device type.

`pyanaconda.ui.gui.spokes.lib.custom_storage_helpers.``defaultContainerRaidLevel`(device_type)

  Returns the default RAID level for this device type’s container type.

  Parameters: | device_type (int) – an int representing the device_type
  Returns: | the default RAID level for this device type’s container or None
  Return type: | blivet.devicelibs.raid.RAIDLevel or NoneType

`pyanaconda.ui.gui.spokes.lib.custom_storage_helpers.``containerRaidLevelsSupported`(device_type)

  The raid levels anaconda supports for a container for this device_type.

  For LVM, anaconda supports LVM on RAID, but also allows no RAID.

  Parameters: | device_type (int) – one of an enumeration of device types
  Returns: | a set of supported raid levels
  Return type: | a set of instances of blivet.devicelibs.raid.RAIDLevel

`pyanaconda.ui.gui.spokes.lib.custom_storage_helpers.``raidLevelsSupported`(device_type)

  The raid levels anaconda supports for this device type.

  It supports any RAID levels that it expects to support and that blivet supports for the given device type.

  Since anaconda only ever allows the user to choose RAID levels for device type DEVICE_TYPE_MD, hiding the RAID menu for all other device types, the function only returns a non-empty set for this device type. If this changes, then so should this function, but at this time it is not clear what RAID levels should be offered for other device types.

  Parameters: | device_type (int) – one of an enumeration of device types
  Returns: | a set of supported raid levels
  Return type: | a set of instances of blivet.devicelibs.raid.RAIDLevel

`pyanaconda.ui.gui.spokes.lib.custom_storage_helpers.``get_container_type`(device_type)

class `pyanaconda.ui.gui.spokes.lib.custom_storage_helpers.``AddDialog`(*args, **kwargs)

  Bases: `pyanaconda.ui.gui.GUIObject`

  `MIN_SIZE_ENTRY` = Size (1024 KiB)
  `builderObjects` = ['addDialog', 'mountPointStore', 'mountPointCompletion', 'mountPointEntryBuffer']
  `mainWidgetName` = 'addDialog'
  `on_add_confirm_clicked`(button, *args)
  `refresh`()
  `run`()
  `uiFile` = 'spokes/lib/custom_storage_helpers.glade'

class `pyanaconda.ui.gui.spokes.lib.custom_storage_helpers.``ConfirmDeleteDialog`(*args, **kwargs)

  Bases: `pyanaconda.ui.gui.GUIObject`

  `builderObjects` = ['confirmDeleteDialog']
  `mainWidgetName` = 'confirmDeleteDialog'
  `on_delete_confirm_clicked`(button, *args)
  `option_checked`
  `refresh`(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.

    Parameters: | mountpoint (str) – Mountpoint for device. device (str) – Name of the device. checkbox_text (str) – Text for checkbox. If nothing set do not display the checkbox. snapshot (bool) – If true warn user he’s going to delete snapshots too.

  `run`()
  `uiFile` = 'spokes/lib/custom_storage_helpers.glade'

class `pyanaconda.ui.gui.spokes.lib.custom_storage_helpers.``DisksDialog`(*args, **kwargs)

  Bases: `pyanaconda.ui.gui.GUIObject`

  `builderObjects` = ['disks_dialog', 'disk_store', 'disk_view']
  `mainWidgetName` = 'disks_dialog'
  `on_cancel_clicked`(button)
  `on_select_clicked`(button)
  `run`()
  `uiFile` = 'spokes/lib/custom_storage_helpers.glade'

class `pyanaconda.ui.gui.spokes.lib.custom_storage_helpers.``ContainerDialog`(*args, **kwargs)

  Bases: `pyanaconda.ui.gui.GUIObject`, `pyanaconda.ui.gui.helpers.GUIDialogInputCheckHandler`

  `MIN_SIZE_ENTRY` = Size (1024 KiB)
  `builderObjects` = ['container_dialog', 'disk_store', 'container_disk_view', 'containerRaidStoreFiltered', 'containerRaidLevelLabel', 'containerRaidLevelCombo', 'raidLevelStore', 'containerSizeCombo', 'containerSizeEntry', 'containerSizeLabel', 'containerEncryptedCheckbox']
  `mainWidgetName` = 'container_dialog'
  `on_size_changed`(combo)
  `run`()
  `uiFile` = 'spokes/lib/custom_storage_helpers.glade'

## pyanaconda.ui.gui.spokes.lib.dasdfmt module

class `pyanaconda.ui.gui.spokes.lib.dasdfmt.``DasdFormatDialog`(data, storage, to_format)

  Bases: `pyanaconda.ui.gui.GUIObject`

  `builderObjects` = ['unformattedDasdDialog']
  `mainWidgetName` = 'unformattedDasdDialog'
  `on_format_clicked`(*args)

    Once the format button is clicked, the option to cancel expires. We also need to display the spinner showing activity.

  `return_to_hub_link_clicked`(label, uri)

    The user clicked on the link that takes them back to the hub. We need to kill the _check_format watcher and then emit a special response ID indicating the user did not press OK.

    NOTE: There is no button with response_id=2.

  `run`()
  `run_dasdfmt`(epoch_started, *args)

    Loop through our disks and run dasdfmt against them.

  `uiFile` = 'spokes/lib/dasdfmt.glade'
  `update_dialog`(*args, **kwargs)

    The new body for the decorated method. If needed, it uses closure bound queue_instance variable which is valid until the reference to this method is destroyed.

## pyanaconda.ui.gui.spokes.lib.detailederror module

class `pyanaconda.ui.gui.spokes.lib.detailederror.``DetailedErrorDialog`(*args, **kwargs)

  Bases: `pyanaconda.ui.gui.GUIObject`

  This class provides a lightboxable dialog to display a very detailed set of error messages, like might be required to display the results of package dependency solving or storage sanity checking.

  If no buttons are provided, this dialog will have only a single button: cancel, with a response ID of 0. Otherwise, the kwarg named “buttons” should be a list of translated labels. Each will have an incrementing response ID starting with 0, and any Quit button will be placed on the far left hand side of the dialog. It’s up to the caller of the “run” method to do something with the returned response ID.

  `builderObjects` = ['detailedErrorDialog', 'detailedTextBuffer']
  `mainWidgetName` = 'detailedErrorDialog'
  `refresh`(msg)
  `run`()
  `uiFile` = 'spokes/lib/detailederror.glade'

## pyanaconda.ui.gui.spokes.lib.entropy_dialog module

`pyanaconda.ui.gui.spokes.lib.entropy_dialog.``run_entropy_dialog`(*args, **kwargs)

  The new body for the decorated method. If needed, it uses closure bound queue_instance variable which is valid until the reference to this method is destroyed.

## pyanaconda.ui.gui.spokes.lib.lang_locale_handler module

Module providing the LangLocaleHandler class that could be used as a mixin for screens handling languages or locales configuration.

class `pyanaconda.ui.gui.spokes.lib.lang_locale_handler.``LangLocaleHandler`

  Bases: `object`

  Class that could be used as a mixin for screens handling languages or locales configuration.

  `initialize`()
  `on_clear_icon_clicked`(entry, icon_pos, event)
  `on_entry_changed` = functools.partial(<pyanaconda.ui.gui.utils.timed_action.<locals>.TimedAction object at 0x7fd4da64d438>, None)
  `on_lang_selection_changed`(selection)

## pyanaconda.ui.gui.spokes.lib.passphrase module

class `pyanaconda.ui.gui.spokes.lib.passphrase.``PassphraseDialog`(data)

  Bases: `pyanaconda.ui.gui.GUIObject`, `pyanaconda.ui.gui.helpers.GUIInputCheckHandler`

  `builderObjects` = ['passphrase_dialog']
  `mainWidgetName` = 'passphrase_dialog'
  `on_confirm_changed`(entry)
  `on_entry_activated`(entry)
  `on_passphrase_changed`(entry)
  `refresh`()
  `run`()
  `set_status`(inputcheck)
  `uiFile` = 'spokes/lib/passphrase.glade'

## pyanaconda.ui.gui.spokes.lib.refresh module

class `pyanaconda.ui.gui.spokes.lib.refresh.``RefreshDialog`(data, storage)

  Bases: `pyanaconda.ui.gui.GUIObject`

  `builderObjects` = ['refreshDialog']
  `mainWidgetName` = 'refreshDialog'
  `on_rescan_clicked`(button)
  `return_to_hub_link_clicked`(label, uri)
  `run`()
  `uiFile` = 'spokes/lib/refresh.glade'

## pyanaconda.ui.gui.spokes.lib.resize module

class `pyanaconda.ui.gui.spokes.lib.resize.``ResizeDialog`(data, storage, payload)

  Bases: `pyanaconda.ui.gui.GUIObject`

  `builderObjects` = ['actionStore', 'diskStore', 'resizeDialog', 'resizeAdjustment']
  `mainWidgetName` = 'resizeDialog'
  `on_delete_all_clicked`(button, *args)
  `on_delete_clicked`(button)
  `on_key_pressed`(window, event, *args)
  `on_preserve_clicked`(button)
  `on_resize_clicked`(*args)
  `on_resize_value_changed` = functools.partial(<pyanaconda.ui.gui.utils.timed_action.<locals>.TimedAction object at 0x7fd4d8ec67f0>, None)
  `on_row_clicked`(view, path, column)
  `on_selection_changed`(selection)
  `on_shrink_clicked`(button)
  `populate`(disks)
  `refresh`(disks)
  `resize_slider_format`(scale, value)
  `run`()
  `uiFile` = 'spokes/lib/resize.glade'

## pyanaconda.ui.gui.spokes.lib.summary module

class `pyanaconda.ui.gui.spokes.lib.summary.``ActionSummaryDialog`(data)

  Bases: `pyanaconda.ui.gui.GUIObject`

  `builderObjects` = ['actionStore', 'summaryDialog']
  `initialize`(actions)
  `mainWidgetName` = 'summaryDialog'
  `refresh`(actions)
  `run`()
  `uiFile` = 'spokes/lib/summary.glade'

## Module contents