Class: Y2Network::Widgets::GeneralTab

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

Instance Method Summary collapse

Constructor Details

#initialize(settings) ⇒ GeneralTab


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

def initialize(settings)
  textdomain "network"

  @settings = settings
end

Instance Method Details

#contentsObject


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
69
70
71
72
73
# File 'src/lib/y2network/widgets/general_tab.rb', line 44

def contents
  ifplugd_widget = IfplugdPriority.new(@settings)
  MarginBox(
    1,
    0,
    VBox(
      MarginBox(
        1,
        0,
        VBox(
          InterfaceNaming.new(@settings),
          Frame(
            _("Device Activation"),
            HBox(Startmode.new(@settings, ifplugd_widget), ifplugd_widget, HStretch())
          ),
          VSpacing(0.4),
          Frame(_("Firewall Zone"), HBox(FirewallZone.new(@settings), HStretch())),
          VSpacing(0.4),
          type.infiniband? ? HBox(IPoIBMode.new(@settings)) : Empty(),
          type.infiniband? ? VSpacing(0.4) : Empty(),
          Frame(
            _("Maximum Transfer Unit (MTU)"),
            HBox(MTU.new(@settings), HStretch())
          ),
          VStretch()
        )
      )
    )
  )
end

#labelObject


40
41
42
# File 'src/lib/y2network/widgets/general_tab.rb', line 40

def label
  _("&General")
end

#typeObject


75
76
77
# File 'src/lib/y2network/widgets/general_tab.rb', line 75

def type
  @settings.type
end