Class: Bootloader::Grub2Widget::ActivateWidget

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

Overview

Represents decision if bootloader need activated partition

Instance Method Summary collapse

Methods included from Grub2Helper

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

Constructor Details

#initializeActivateWidget

Returns a new instance of ActivateWidget.



95
96
97
98
99
# File 'src/lib/bootloader/grub2_widgets.rb', line 95

def initialize
  textdomain "bootloader"

  super
end

Instance Method Details

#helpObject



105
106
107
108
109
110
111
112
113
114
# File 'src/lib/bootloader/grub2_widgets.rb', line 105

def help
  _(
    "<p><b>Set Active Flag in Partition Table for Boot Partition</b>\n" \
    "specifies whether the partition containing " \
    "the boot loader will have the \"active\" flag." \
    " The generic MBR code will then\n" \
    "boot the active partition. Older BIOSes require one partition to be active even\n" \
    "if the boot loader is installed in the MBR.</p>"
  )
end

#initObject



116
117
118
# File 'src/lib/bootloader/grub2_widgets.rb', line 116

def init
  self.value = stage1.activate?
end

#labelObject



101
102
103
# File 'src/lib/bootloader/grub2_widgets.rb', line 101

def label
  _("Set &active Flag in Partition Table for Boot Partition")
end

#storeObject



120
121
122
# File 'src/lib/bootloader/grub2_widgets.rb', line 120

def store
  stage1.activate = checked?
end