Class: Y2Network::Widgets::WirelessTab

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

Overview

Tab for wireless specific stuff. Useful only for wireless cards

Instance Method Summary collapse

Constructor Details

#initialize(builder) ⇒ WirelessTab

Returns a new instance of WirelessTab.

Parameters:

  • builder (Y2network::InterfaceConfigBuilder)


34
35
36
37
38
39
# File 'src/lib/y2network/widgets/wireless_tab.rb', line 34

def initialize(builder)
  super()
  textdomain "network"

  @builder = builder
end

Instance Method Details

#contentsObject



45
46
47
48
49
50
51
52
53
54
55
# File 'src/lib/y2network/widgets/wireless_tab.rb', line 45

def contents
  VBox(
    VSpacing(1),
    HBox(essid_widget, VBox(VSpacing(1), scan_button)),
    VSpacing(1),
    auth_widget,
    VSpacing(1),
    Right(Y2Network::Widgets::WirelessExpertSettings.new(@builder)),
    VStretch()
  )
end

#labelObject



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

def label
  _("&Wireless")
end

#select_network(network) ⇒ Object

Selects the network

It sets the ESSID and the authentication mode according to the given network.

Parameters:



62
63
64
65
66
67
# File 'src/lib/y2network/widgets/wireless_tab.rb', line 62

def select_network(network)
  @builder.essid = network.essid
  @builder.auth_mode = network.auth_mode.to_sym
  essid_widget.value = network.essid
  auth_widget.auth_mode = network.auth_mode.short_name
end