Class: Bootloader::DefaultSectionWidget

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

Overview

represent choosing default section to boot

Instance Method Summary (collapse)

Methods included from Grub2Widget

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

Constructor Details

- (DefaultSectionWidget) initialize

Returns a new instance of DefaultSectionWidget



601
602
603
# File 'src/lib/bootloader/grub2_widgets.rb', line 601

def initialize
  textdomain "bootloader"
end

Instance Method Details

- (Object) help



609
610
611
612
613
614
615
616
617
618
# File 'src/lib/bootloader/grub2_widgets.rb', line 609

def help
  _(
    "<p> By pressing <b>Set as Default</b> you mark the selected section as\n" \
    "the default. When booting, the boot loader will provide a boot menu and\n" \
    "wait for the user to select a kernel or OS to boot. If no\n" \
    "key is pressed before the timeout, the default kernel or OS will\n" \
    "boot. The order of the sections in the boot loader menu can be changed\n" \
    "using the <b>Up</b> and <b>Down</b> buttons.</p>\n"
  )
end

- (Object) init



620
621
622
# File 'src/lib/bootloader/grub2_widgets.rb', line 620

def init
  self.value = sections.default
end

- (Object) items



624
625
626
627
628
# File 'src/lib/bootloader/grub2_widgets.rb', line 624

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

- (Object) label



605
606
607
# File 'src/lib/bootloader/grub2_widgets.rb', line 605

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

- (Object) store



630
631
632
# File 'src/lib/bootloader/grub2_widgets.rb', line 630

def store
  sections.default = value
end