Class: Y2Network::Dialogs::WirelessWepKeys::WEPKeyLength

Inherits:
CWM::ComboBox
  • Object
show all
Defined in:
src/lib/y2network/dialogs/wireless_wep_keys.rb

Constant Summary collapse

ITEMS =
[
  ["64", "64"],
  ["128", "128"]
].freeze

Instance Method Summary collapse

Constructor Details

#initialize(builder) ⇒ WEPKeyLength


99
100
101
102
103
# File 'src/lib/y2network/dialogs/wireless_wep_keys.rb', line 99

def initialize(builder)
  textdomain "network"

  @builder = builder
end

Instance Method Details

#helpObject


127
128
129
130
131
132
133
134
135
# File 'src/lib/y2network/dialogs/wireless_wep_keys.rb', line 127

def help
  _(
    "<p><b>Key Length</b> defines the bit length of your WEP keys.\n" \
      "Possible are 64 and 128 bit, sometimes also referred to as 40 and 104 bit.\n" \
      "Some older hardware might not be able to handle 128 bit keys, so if your\n" \
      "wireless LAN connection does not establish, you may need to set this\n" \
      "value to 64.</p>"
  )
end

#initObject


114
115
116
117
# File 'src/lib/y2network/dialogs/wireless_wep_keys.rb', line 114

def init
  length_s = @builder.key_length.to_s
  self.value = length_s.empty? ? "128" : length_s
end

#itemsObject


110
111
112
# File 'src/lib/y2network/dialogs/wireless_wep_keys.rb', line 110

def items
  ITEMS
end

#labelObject


123
124
125
# File 'src/lib/y2network/dialogs/wireless_wep_keys.rb', line 123

def label
  _("&Key Length")
end

#storeObject


119
120
121
# File 'src/lib/y2network/dialogs/wireless_wep_keys.rb', line 119

def store
  @builder.key_length = value.to_i
end