Class: Y2Network::Widgets::WirelessAuth
- Inherits:
-
CWM::CustomWidget
- Object
- CWM::CustomWidget
- Y2Network::Widgets::WirelessAuth
- 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
-
#settings ⇒ Object
readonly
Returns the value of attribute settings.
Instance Method Summary collapse
-
#auth_mode=(mode) ⇒ Object
Sets the authentication mode.
- #contents ⇒ Object
- #handle(event) ⇒ Object
- #init ⇒ Object
-
#initialize(settings) ⇒ WirelessAuth
constructor
A new instance of WirelessAuth.
Constructor Details
#initialize(settings) ⇒ WirelessAuth
Returns a new instance of 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
#settings ⇒ Object (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
#auth_mode=(mode) ⇒ Object
Sets the authentication mode
It sets the auth mode to the given value and refreshes the widgets accordingly.
71 72 73 74 |
# File 'src/lib/y2network/widgets/wireless_auth.rb', line 71 def auth_mode=(mode) .value = mode.to_s refresh end |
#contents ⇒ Object
55 56 57 58 59 60 61 62 63 64 |
# File 'src/lib/y2network/widgets/wireless_auth.rb', line 55 def contents Frame( _("Authentication"), VBox( , VSpacing(0.2), ) ) 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"] != . refresh nil end |
#init ⇒ Object
42 43 44 45 46 |
# File 'src/lib/y2network/widgets/wireless_auth.rb', line 42 def init .init # force init of auth to ensure that refresh has correct value .init refresh end |