blivetgui.dialogs package

Submodules

blivetgui.dialogs.add_dialog module

class blivetgui.dialogs.add_dialog.AddDialog(parent_window, selected_parent, selected_free, available_free, supported_filesystems, mountpoints=None, installer_mode=False)

Bases: Dialog

Dialog window allowing user to add new partition including selecting size, fs, label etc.

Parameters:
  • parent_type (str) – type of (future) parent device

  • parent_device (blivet.Device instances) – future parent device

  • free_device (blivetgui.utils.FreeSpaceDevice instances) – selected free space device

  • free_pvs (list) – list PVs with no VG

  • free_disks_regions (list of blivetgui.utils.FreeSpaceDevice instances) – list of free regions on non-empty disks

  • mountpoints (list) – list of mountpoints in current devicetree

  • installer_mode (bool) – installer mode

add_advanced_options()
add_device_chooser()
add_fs_chooser()
add_md_type_chooser()
add_mountpoint()
add_name_chooser()
add_parent_list()
add_size_area()
get_selection()
hide_widgets(widget_types)
on_cell_toggled(_event, path)
on_devices_combo_changed(_event)
on_encrypt_check(_toggle)
on_filesystems_combo_changed(_combo)
on_md_type_changed(_event)
on_ok_clicked(_event)
on_raid_type_changed(_widget)
raid_member_max_size()
scrolled_adjust(_widget, _event)

Adjust current size of the dialog (and add scrollbars) if it’s bigger than size limits

select_selected_free_region()

In parent list select the free region user selected checkbox as checked

property selected_fs
property selected_type
show_widgets(widget_types)
update_fs_chooser()
update_parent_list()
update_raid_type_chooser(keep_selection=False)
update_size_area_limits(min_size=None, reserved_size=None)
validate_user_input()

Validate data input

class blivetgui.dialogs.add_dialog.AdvancedOptions(add_dialog, device_type, parent_device, free_device)

Bases: object

destroy()
get_selection()
hide()
lvm_options()
mdraid_options()
on_partition_type_changed(combo)
on_pesize_changed(combo)
partition_options()
set_sensitive(sensitivity)
show()
validate_user_input()

blivetgui.dialogs.constants module

class blivetgui.dialogs.constants.DialogResponseType

Bases: object

BACK = 1
QUIT = 3
REPORT = 2

blivetgui.dialogs.device_info_dialog module

class blivetgui.dialogs.device_info_dialog.DeviceInformationDialog(parent_window, device)

Bases: Dialog

Dialog showing information about selected device

Parameters:
  • parent_window (Gtk.Window) – parent window

  • device – a blviet device

add_device_info()

Display information about the device

add_format_info()

Display information about format of the device

add_parents_info()

Display information about parents of the device

blivetgui.dialogs.edit_dialog module

class blivetgui.dialogs.edit_dialog.FormatDialog(main_window, edit_device, supported_filesystems, mountpoints=None, installer_mode=False)

Bases: object

get_selection()
run()
property selected_fs
set_decorated(decorated)
validate_user_input()
class blivetgui.dialogs.edit_dialog.LVMEditDialog(parent_window, edited_device, free_info)

Bases: Dialog

Dialog window allowing user to edit lvmvg

Parameters:
  • parent_window (Gtk.Window) – parent window

  • edited_device (class blivet.Device) – device selected to edit

add_parent_list()
add_parents()
add_toggle_buttons()
get_selection()
hide_widgets(widget_types)
on_button_toggled(clicked_button, button_type, other_button)
on_cell_radio_toggled(_toggle, path, store)
on_cell_toggled(_toggle, path, store)
remove_parents()
show_widgets(widget_types)
class blivetgui.dialogs.edit_dialog.LabelDialog(main_window, edit_device, installer_mode=False)

Bases: object

run()
set_decorated(decorated)
class blivetgui.dialogs.edit_dialog.MountpointDialog(main_window, edit_device, mountpoints=None, installer_mode=False)

Bases: object

run()
set_decorated(decorated)
validate_user_input()
class blivetgui.dialogs.edit_dialog.ResizeDialog(main_window, resize_device, resize_info)

Bases: object

run()
set_decorated(decorated)
class blivetgui.dialogs.edit_dialog.UnmountDialog(main_window, edit_device, mountpoints, installer_mode=False)

Bases: object

run()
set_decorated(decorated)

blivetgui.dialogs.helpers module

blivetgui.dialogs.helpers.adjust_scrolled_size(scrolledwindow, width_limit, height_limit)

Adjust size of Gtk.ScrolledWindow – show scrollbars only when its size would be bigger than limits

Parameters:
  • scrolledwindow (Gtk.ScrolledWindow) – Gtk.ScrolledWindow

  • width_limit (int) – width limit px

  • height_limit (int) – height limit in px

blivetgui.dialogs.helpers.default_encryption_type()
blivetgui.dialogs.helpers.get_monitor_size(window)

Get size (width x height) of monitor on which window is located.

Parameters:

window (Gtk.Window) – Gtk window

blivetgui.dialogs.helpers.is_label_valid(format_type, label)
blivetgui.dialogs.helpers.is_mountpoint_valid(used_mountpoints, new_mountpoint, old_mountpoint=None)

Kickstart mode; check for duplicate mountpoints

Parameters:
  • used_mountpoints (list of str) – list of mountpoints currently in use

  • new_mountpoint (str) – mountpoint selected by user

  • old_mountpoint (str) – mountpoint previously set for this device (optional)

Returns:

mountpoint validity and error msg

Return type:

(bool, str or None)

blivetgui.dialogs.helpers.is_name_valid(device_type, name)
blivetgui.dialogs.helpers.supported_encryption_types()
blivetgui.dialogs.helpers.supported_raids()

blivetgui.dialogs.message_dialogs module

class blivetgui.dialogs.message_dialogs.ConfirmActionsDialog(parent_window, title, msg, treestore_actions)

Bases: object

Confirm execute actions

run()

Run the dialog

class blivetgui.dialogs.message_dialogs.ConfirmDeleteDialog(parent_window, device, parents=None, children=None)

Bases: object

General confirmation dialog

run()

Run the dialog

set_decorated(decorated)
class blivetgui.dialogs.message_dialogs.ConfirmDialog(parent_window, title, msg, decorated=True)

Bases: object

General confirmation dialog

run()

Run the dialog

class blivetgui.dialogs.message_dialogs.CustomDialog(parent_window, buttons)

Bases: object

Message dialog with custom buttons

run()

Run the dialog

class blivetgui.dialogs.message_dialogs.ErrorDialog(parent_window, msg, decorated=True)

Bases: object

Basic error dialog

class blivetgui.dialogs.message_dialogs.ExceptionDialog(parent_window, allow_ignore, allow_report, msg, traceback, decorated=True)

Bases: object

Error dialog with traceback

run()
class blivetgui.dialogs.message_dialogs.InfoDialog(parent_window, msg, decorated=True)

Bases: object

Basic error dialog

class blivetgui.dialogs.message_dialogs.ShowActionsDialog(parent_window, treestore_actions)

Bases: object

Show dialog with scheduled actions

run()

Run the dialog

set_decorated(decorated)
class blivetgui.dialogs.message_dialogs.WarningDialog(parent_window, msg, decorated=True)

Bases: object

Basic warning dialog

blivetgui.dialogs.message_dialogs.show_actions_list(treestore_actions)

blivetgui.dialogs.other_dialogs module

class blivetgui.dialogs.other_dialogs.AboutDialog(parent_window, version)

Bases: object

Standard ‘about application’ dialog

class blivetgui.dialogs.other_dialogs.AddLabelDialog(parent_window)

Bases: object

Dialog window allowing user to add disklabel to disk

Parameters:

parent_window (Gtk.Window) – parent window

run()
set_decorated(decorated)
class blivetgui.dialogs.other_dialogs.LuksPassphraseDialog(parent_window)

Bases: object

Dialog window allowing user to enter passphrase to decrypt

Parameters:

parent_window (Gtk.Window) – parent window

run()
set_decorated(decorated)

blivetgui.dialogs.size_chooser module

class blivetgui.dialogs.size_chooser.ParentArea(device_type, parents, raid_type, main_chooser)

Bases: GUIWidget

Widget for advanced/manual configuration of parents. ParentArea shows all available parents and allows user to select size for them.

connect(signal_name, signal_handler, *args)

Connect a signal handler

get_selection()
glade_file = 'parent_area.ui'
name = 'parent area'
property selected_choosers
set_choosers_min_size(new_size)

Set (same) new size for all choosers in this area

set_choosers_reserved_size(new_size)

Set (same) new size for all choosers in this area

property total_max

Max size selectable in this area

property total_min

Min size selectable in this area

property total_size

Total size selected in this area

class blivetgui.dialogs.size_chooser.ParentChooser(parent, free_space, min_size, max_size, reserved_size, selected, parent_selectable, size_selectable)

Bases: GUIWidget

Widget that represents one ‘parent’ device in ParentArea. It allows to set size for selected parent and (in some cases) to select or deselect that parent device.

connect(signal_name, signal_handler, *args)

Connect a signal handler

glade_file = 'parent_chooser.ui'
property max_size
property min_size
name = 'parent chooser'
property reserved_size
property selected
property selected_size
class blivetgui.dialogs.size_chooser.ParentSelection(parent_device, free_space, selected_size)

Bases: ProxyDataContainer

class blivetgui.dialogs.size_chooser.SizeArea(device_type, parents, min_limit, max_limit, raid_type)

Bases: GUIWidget

Parameters:
  • device_type – type of device we are creating

  • parents – list of available/selected parents

  • min_limit – minimal size limit for new device based on currently selected options (e.g. filesystem type)

  • max_limit – maximum size limit for new device based on currently selected options (e.g. filesystem type)

  • raid_type – currently selected raid level

connect(signal_name, signal_handler, *args)

Connect a signal handler

get_selection()

Get user selection. Consist of total size selected (‘usable’ size for the newly created device) and list of parents with sizes for them (either specified by user or just fraction of total size)

glade_file = 'size_area.ui'
property max_size

Max size selectable in this area. Depends on currently available parents, raid level and limits for the newly created device

property max_size_limit

Limit for maximum size based on ‘other’ limits, e.g. limits for selected filesystem, device type etc.

property min_size

Minimal size selectable in this area. Depends on currently available parents, raid level and limits for the newly created device

property min_size_limit

Limit for minimal size based on ‘other’ limits, e.g. limits for selected filesystem, device type etc.

name = 'size area'
set_parents_min_size(new_size)

Set (same) min size for all parents

set_parents_reserved_size(reserved_size)

Set (same) reserved size for all parents

set_size_limits(min_size_limit, max_size_limit)

Set both size limits at once avoiding issues with new size limits being outside of existing limits. E.g. when changing limits from (1 MiB, 2 MiB) to (256 MiB, 1 GiB) changing the min limit will fail because it is greater than existing max limit.

validate_user_input()
class blivetgui.dialogs.size_chooser.SizeChooser(max_size, min_size, current_size=None)

Bases: GUIWidget

Widget for size configuration. Consist of Gtk.Scale and Gtk.SpinButton for size selection and Gtk.ComboBox for unit selection.

Parameters:
  • max_size (blivet.size.Size) – maximum size that user can choose

  • min_size (blivet.size.Size) – minimum size that user can choose

  • current_size (blivet.size.Size) – current size of edited device

property available_units

Units that should be available to select in this chooser – depends on size of the device, e.g. TiB will be available only for devices bigger than 2 TiB

connect(signal_name, signal_handler, *args)

Connect a signal handler

property default_unit

Default, preselected unit – GiB for devices larger that 5 GiB, otherwise the biggest available unit

get_selection()

Get selected size

glade_file = 'size_chooser.ui'
property max_size
property min_size
name = 'size chooser'
property selected_size
update_size_limits(min_size=None, max_size=None)
class blivetgui.dialogs.size_chooser.SizeSelection(total_size, parents)

Bases: ProxyDataContainer

blivetgui.dialogs.widgets module

class blivetgui.dialogs.widgets.EncryptionChooser

Bases: GUIWidget

connect(signal_name, signal_handler, *args)
property encrypt

Whether encryption is toggled on or off

get_selection()
glade_file = 'encryption_chooser.ui'
name = 'encryption chooser'
property selected_ess

Currently selected encryption sector size

property selected_type

Currently selected encryption type

set_advanced_visible(visible)
set_visible(visibility)

Hide/show this widget

Parameters:

visibility (bool) – visibility

validate_user_input()
class blivetgui.dialogs.widgets.EncryptionSelection(encrypt, encryption_type, passphrase, rpassphrase, sector_size)

Bases: ProxyDataContainer

class blivetgui.dialogs.widgets.GUIWidget

Bases: object

Helper class for ‘composite’ widgets for blivet-gui that reads given Glade file and implements some useful Gtk.Widget methods

block_handlers(widget, handlers)
connect(signal_name, signal_handler, *args)
destroy()

Destroy this widgets

get_sensitive()
get_visible()
glade_file = None
hide()

Hide this widget

name = None
set_sensitive(sensitivity)

Set sensitivity for this widget

Parameters:

sensitivity (bool) – sensitivity

set_visible(visibility)

Hide/show this widget

Parameters:

visibility (bool) – visibility

show()

Show this widget

class blivetgui.dialogs.widgets.RaidChooser

Bases: GUIWidget

autoselect(device_type)

Automatically select some ‘sane’ level for given device type

connect(signal_name, signal_handler, *args)
glade_file = 'raid_chooser.ui'
name = 'raid chooser'
property selected_level
supported_signals = ('changed',)
update(device_type, num_parents)

Update list of available raid levels based on currently selected device

class blivetgui.dialogs.widgets.SignalHandler(method, args)

Bases: ProxyDataContainer

Parameters:
  • method – method/function that should be called

  • args – additional arguments for calling @method

Module contents