Class: Y2Network::Widgets::HardwareTab

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

Instance Method Summary collapse

Constructor Details

#initialize(settings) ⇒ HardwareTab


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

def initialize(settings)
  textdomain "network"

  @settings = settings
end

Instance Method Details

#contentsObject


41
42
43
44
45
46
47
48
49
50
# File 'src/lib/y2network/widgets/hardware_tab.rb', line 41

def contents
  VBox(
    # FIXME: ensure that only eth, maybe also ib?
    eth? ? BlinkButton.new(@settings) : Empty(),
    Driver.new(@settings),
    # FIXME: probably makes sense only for eth
    EthtoolsOptions.new(@settings),
    VStretch()
  )
end

#eth?Boolean


52
53
54
# File 'src/lib/y2network/widgets/hardware_tab.rb', line 52

def eth?
  @settings.type.ethernet?
end

#labelObject


37
38
39
# File 'src/lib/y2network/widgets/hardware_tab.rb', line 37

def label
  _("&Hardware")
end