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.



215
216
217
218
219
# File 'src/lib/bootloader/grub2_widgets.rb', line 215

def initialize
  textdomain "bootloader"

  super
end

Instance Method Details

#helpObject



225
226
227
228
229
230
231
# File 'src/lib/bootloader/grub2_widgets.rb', line 225

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



233
234
235
# File 'src/lib/bootloader/grub2_widgets.rb', line 233

def init
  self.value = grub2.pmbr_action
end

#itemsObject



237
238
239
240
241
242
243
244
245
246
# File 'src/lib/bootloader/grub2_widgets.rb', line 237

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



221
222
223
# File 'src/lib/bootloader/grub2_widgets.rb', line 221

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

#storeObject



248
249
250
# File 'src/lib/bootloader/grub2_widgets.rb', line 248

def store
  grub2.pmbr_action = value
end