Class: Bootloader::PMBRWidget

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

Overview

Represents Protective MBR action

Instance Method Summary (collapse)

Methods included from Grub2Widget

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

Constructor Details

- (PMBRWidget) initialize

Returns a new instance of PMBRWidget



224
225
226
# File 'src/lib/bootloader/grub2_widgets.rb', line 224

def initialize
  textdomain "bootloader"
end

Instance Method Details

- (Object) help



232
233
234
235
236
237
238
# File 'src/lib/bootloader/grub2_widgets.rb', line 232

def help
  _(
    "<p><b>Protective MBR flag</b> is expert only settings, that is needed " \
    "only on exotic hardware. For details see Protective MBR in GPT disks. " \
    "Do not touch if you are not sure.</p>"
  )
end

- (Object) init



240
241
242
# File 'src/lib/bootloader/grub2_widgets.rb', line 240

def init
  self.value = grub2.pmbr_action
end

- (Object) items



244
245
246
247
248
249
250
251
252
253
# File 'src/lib/bootloader/grub2_widgets.rb', line 244

def items
  [
    # TRANSLATORS: set flag on disk
    [:add, _("set")],
    # TRANSLATORS: remove flag from disk
    [:remove, _("remove")],
    # TRANSLATORS: do not change flag on disk
    [:nothing, _("do not change")]
  ]
end

- (Object) label



228
229
230
# File 'src/lib/bootloader/grub2_widgets.rb', line 228

def label
  _("&Protective MBR flag")
end

- (Object) store



255
256
257
# File 'src/lib/bootloader/grub2_widgets.rb', line 255

def store
  grub2.pmbr_action = value
end