Class: Installation::Widgets::LSMSelector
- Inherits:
-
CWM::ComboBox
- Object
- CWM::ComboBox
- Installation::Widgets::LSMSelector
- Defined in:
- src/lib/installation/widgets/lsm.rb
Overview
This class is a ComboBox for selecting the desired Linux Security Module to be used after the instalaltion
Instance Attribute Summary collapse
-
#settings ⇒ Object
readonly
Returns the value of attribute settings.
Instance Method Summary collapse
- #help ⇒ Object
- #init ⇒ Object
-
#initialize(settings) ⇒ LSMSelector
constructor
Constructor.
- #items ⇒ Object
- #label ⇒ Object
- #opt ⇒ Object
- #store ⇒ Object
Constructor Details
#initialize(settings) ⇒ LSMSelector
Constructor
103 104 105 106 107 108 |
# File 'src/lib/installation/widgets/lsm.rb', line 103 def initialize(settings) super() textdomain "installation" @settings = settings end |
Instance Attribute Details
#settings ⇒ Object (readonly)
Returns the value of attribute settings.
98 99 100 |
# File 'src/lib/installation/widgets/lsm.rb', line 98 def settings @settings end |
Instance Method Details
#help ⇒ Object
132 133 134 135 136 137 138 |
# File 'src/lib/installation/widgets/lsm.rb', line 132 def help Yast::HTML.Para( # TRANSLATORS: Linux Security Module Selector help. _("Allows to choose between available major Linux Security Modules like:") + Yast::HTML.List(available_modules.map(&:label)) ) end |
#init ⇒ Object
110 111 112 113 |
# File 'src/lib/installation/widgets/lsm.rb', line 110 def init self.value = settings.selected&.id.to_s disable if items.size <= 1 end |
#items ⇒ Object
124 125 126 |
# File 'src/lib/installation/widgets/lsm.rb', line 124 def items available_modules.map { |m| [m.id.to_s, m.label] } end |
#label ⇒ Object
119 120 121 122 |
# File 'src/lib/installation/widgets/lsm.rb', line 119 def label # TRANSLATORS: Linux Security Module Selector label. _("Selected Module") end |
#opt ⇒ Object
115 116 117 |
# File 'src/lib/installation/widgets/lsm.rb', line 115 def opt [:notify, :hstretch] end |
#store ⇒ Object
128 129 130 |
# File 'src/lib/installation/widgets/lsm.rb', line 128 def store settings.select(value) end |