Class: Y2Network::Widgets::WirelessMode

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

Overview

Widget to select mode in which wifi card operate

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ WirelessMode


27
28
29
30
# File 'src/lib/y2network/widgets/wireless_mode.rb', line 27

def initialize(config)
  @config = config
  textdomain "network"
end

Instance Method Details

#initObject


36
37
38
# File 'src/lib/y2network/widgets/wireless_mode.rb', line 36

def init
  self.value = @config.mode
end

#itemsObject


49
50
51
52
53
54
55
# File 'src/lib/y2network/widgets/wireless_mode.rb', line 49

def items
  [
    ["ad-hoc", _("Ad-hoc")],
    ["Managed", _("Managed")],
    ["master", _("Master")]
  ]
end

#labelObject


32
33
34
# File 'src/lib/y2network/widgets/wireless_mode.rb', line 32

def label
  _("O&perating Mode")
end

#optObject

notify when mode change as it affect other elements


41
42
43
# File 'src/lib/y2network/widgets/wireless_mode.rb', line 41

def opt
  [:notify, :hstretch]
end

#storeObject


45
46
47
# File 'src/lib/y2network/widgets/wireless_mode.rb', line 45

def store
  @config.mode = value
end