Class: Y2Network::Widgets::WirelessAuth

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

Overview

Top level widget for wireless authentication. It changes content dynamically depending on selected authentication method.

Defined Under Namespace

Classes: WirelessWepKeys

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(settings) ⇒ WirelessAuth


36
37
38
39
40
# File 'src/lib/y2network/widgets/wireless_auth.rb', line 36

def initialize(settings)
  @settings = settings
  self.handle_all_events = true
  textdomain "network"
end

Instance Attribute Details

#settingsObject (readonly)

Returns the value of attribute settings


33
34
35
# File 'src/lib/y2network/widgets/wireless_auth.rb', line 33

def settings
  @settings
end

Instance Method Details

#contentsObject


55
56
57
58
59
60
61
62
63
64
65
66
# File 'src/lib/y2network/widgets/wireless_auth.rb', line 55

def contents
  Frame(
    _("Wireless Authentication"),
    VBox(
      VSpacing(0.5),
      auth_mode_widget,
      VSpacing(0.2),
      replace_widget,
      VSpacing(0.5)
    )
  )
end

#handle(event) ⇒ Object


48
49
50
51
52
53
# File 'src/lib/y2network/widgets/wireless_auth.rb', line 48

def handle(event)
  return if event["ID"] != auth_mode_widget.widget_id

  refresh
  nil
end

#initObject


42
43
44
45
46
# File 'src/lib/y2network/widgets/wireless_auth.rb', line 42

def init
  auth_mode_widget.init # force init of auth to ensure that refresh has correct value
  replace_widget.init
  refresh
end