Class: Bootloader::Grub2Widget::PMBRWidget

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

Overview

Represents Protective MBR action

Instance Method Summary collapse

Methods included from Grub2Helper

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

Constructor Details

#initializePMBRWidget

Returns a new instance of PMBRWidget.



305
306
307
308
309
# File 'src/lib/bootloader/grub2_widgets.rb', line 305

def initialize
  textdomain "bootloader"

  super
end

Instance Method Details

#helpObject



315
316
317
318
319
320
321
# File 'src/lib/bootloader/grub2_widgets.rb', line 315

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

#initObject



323
324
325
# File 'src/lib/bootloader/grub2_widgets.rb', line 323

def init
  self.value = grub2.pmbr_action
end

#itemsObject



327
328
329
330
331
332
333
334
335
336
# File 'src/lib/bootloader/grub2_widgets.rb', line 327

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

#labelObject



311
312
313
# File 'src/lib/bootloader/grub2_widgets.rb', line 311

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

#storeObject



338
339
340
# File 'src/lib/bootloader/grub2_widgets.rb', line 338

def store
  grub2.pmbr_action = value
end