Class: Y2Network::Dialogs::WirelessExpertSettings

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

Overview

Dialog that shows when expert button is clicked on wireless tab.

Instance Method Summary collapse

Constructor Details

#initialize(settings) ⇒ WirelessExpertSettings


31
32
33
34
35
# File 'src/lib/y2network/dialogs/wireless_expert_settings.rb', line 31

def initialize(settings)
  @settings = settings

  textdomain "network"
end

Instance Method Details

#contentsObject


41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'src/lib/y2network/dialogs/wireless_expert_settings.rb', line 41

def contents
  HBox(
    HSpacing(4),
    VBox(
      VSpacing(0.5),
      Frame(
        _("Wireless Expert Settings"),
        HBox(
          HSpacing(2),
          VBox(
            VSpacing(1),
            channel_widget, # TODO: channel only when mode is master or adhoc
            VSpacing(0.2),
            bitrate_widget,
            VSpacing(0.2),
            access_point_widget, # TODO: Access point only in managed mode
            VSpacing(0.2),
            Left(ap_scan_mode_widget), # TODO: AP scan mode only in managed mode
            VSpacing(1)
          ),
          HSpacing(2)
        )
      ),
      VSpacing(0.5)
    ),
    HSpacing(4)
  )
end

#helpObject


70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# File 'src/lib/y2network/dialogs/wireless_expert_settings.rb', line 70

def help
  # Wireless expert dialog help 1/5
  _(
    "<p>Here, set additional configuration parameters\n(rarely needed).</p>"
  ) +
    # Wireless expert dialog help 2/5
    _(
      "<p>To use your wireless LAN card in master or ad-hoc mode,\n" \
        "set the <b>Channel</b> the card should use here. This is not needed\n" \
        "for managed mode--the card will hop through the channels searching for access\n" \
        "points in that case.</p>\n"
    ) +
    # Wireless expert dialog help 3/5
    _(
      "<p>In some rare cases, you may want to set a transmission\n<b>Bit Rate</b> explicitly. The default is to go as fast as possible.</p>"
    ) +
    # Wireless expert dialog help 4/5
    _(
      "<p>In an environment with multiple <b>Access Points</b>, you may want to\ndefine the one to which to connect by entering its MAC address.</p>"
    ) +
    # Wireless expert dialog help 5/5
    _(
      "<p><b>Use Power Management</b> enables power saving mechanisms.\n" \
        "This is generally a good idea, especially if you are a laptop user and may\n" \
        "be disconnected from AC power.</p>\n"
    )
end

#should_open_dialog?Boolean

Always open new dialog to work properly in sequence


99
100
101
# File 'src/lib/y2network/dialogs/wireless_expert_settings.rb', line 99

def should_open_dialog?
  true
end

#titleObject


37
38
39
# File 'src/lib/y2network/dialogs/wireless_expert_settings.rb', line 37

def title
  _("Wireless Expert Settings")
end