Class: Bootloader::DefaultSectionWidget

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

Overview

represent choosing default section to boot

Instance Method Summary collapse

Constructor Details

#initializeDefaultSectionWidget

Returns a new instance of DefaultSectionWidget.



138
139
140
141
142
# File 'src/lib/bootloader/generic_widgets.rb', line 138

def initialize
  textdomain "bootloader"

  super
end

Instance Method Details

#helpObject



148
149
150
151
152
153
154
# File 'src/lib/bootloader/generic_widgets.rb', line 148

def help
  _(
    "<p><b>Default Boot Section</b> selects the default section for booting.\n" \
    " If sections are not generated yet ( e.g. during installation) \n" \
    "then the box is empty and the default is picked by grub2 itself.</p>\n"
  )
end

#initObject



156
157
158
# File 'src/lib/bootloader/generic_widgets.rb', line 156

def init
  self.value = Bootloader::BootloaderFactory.current.sections.default
end

#itemsObject



160
161
162
163
164
# File 'src/lib/bootloader/generic_widgets.rb', line 160

def items
  Bootloader::BootloaderFactory.current.sections.all.map do |section|
    [section, section]
  end
end

#labelObject



144
145
146
# File 'src/lib/bootloader/generic_widgets.rb', line 144

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

#storeObject



166
167
168
# File 'src/lib/bootloader/generic_widgets.rb', line 166

def store
  Bootloader::BootloaderFactory.current.sections.default = value
end