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

Returns a new instance of GeneralTab.



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

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

  @settings = settings
end

Instance Method Details

#contentsObject



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
74
# File 'src/lib/y2network/widgets/general_tab.rb', line 45

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



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

def label
  _("&General")
end

#typeObject



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

def type
  @settings.type
end