Class: Bootloader::Grub2Widget::DefaultSectionWidget

Inherits:
CWM::ComboBox
  • Object
show all
Includes:
Grub2Helper
Defined in:
src/lib/bootloader/grub2_widgets.rb

Overview

represent choosing default section to boot

Instance Method Summary collapse

Methods included from Grub2Helper

#grub2, #grub_default, #password, #sections, #stage1

Constructor Details

#initializeDefaultSectionWidget

Returns a new instance of DefaultSectionWidget.



817
818
819
820
821
# File 'src/lib/bootloader/grub2_widgets.rb', line 817

def initialize
  textdomain "bootloader"

  super
end

Instance Method Details

#helpObject



827
828
829
830
831
832
833
# File 'src/lib/bootloader/grub2_widgets.rb', line 827

def help
  _(
    "<p><b>Default Boot Section</b> selects the default section for booting.\n" \
    " If sections are not generated yet ( e.g. during installation) \n" \
    "then the box is empty and the default is picked by grub2 itself.</p>\n"
  )
end

#initObject



835
836
837
# File 'src/lib/bootloader/grub2_widgets.rb', line 835

def init
  self.value = sections.default
end

#itemsObject



839
840
841
842
843
# File 'src/lib/bootloader/grub2_widgets.rb', line 839

def items
  sections.all.map do |section|
    [section, section]
  end
end

#labelObject



823
824
825
# File 'src/lib/bootloader/grub2_widgets.rb', line 823

def label
  _("&Default Boot Section")
end

#storeObject



845
846
847
# File 'src/lib/bootloader/grub2_widgets.rb', line 845

def store
  sections.default = value
end