Class: Y2Network::Widgets::S390Protocol

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

Overview

Widget for setting the Ctc device protocol to be used

Instance Method Summary collapse

Constructor Details

#initialize(settings) ⇒ S390Protocol

Constructor

Parameters:


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

def initialize(settings)
  textdomain "network"

  @settings = settings
end

Instance Method Details

#helpObject

See Also:

  • CWM::AbstractWidget

99
100
101
# File 'src/lib/y2network/widgets/s390_common.rb', line 99

def help
  _("<p>Choose the <b>Protocol</b> for this interface.</p>")
end

#initObject

See Also:

  • CWM::AbstractWidget

70
71
72
# File 'src/lib/y2network/widgets/s390_common.rb', line 70

def init
  self.value = @settings.protocol.to_s
end

#itemsObject

See Also:

  • CWM::AbstractWidget

80
81
82
83
84
85
86
87
88
89
90
91
# File 'src/lib/y2network/widgets/s390_common.rb', line 80

def items
  [
    # ComboBox item: CTC device protocol
    ["0", _("Compatibility Mode")],
    # ComboBox item: CTC device protocol
    ["1", _("Extended Mode")],
    # ComboBox item: CTC device protocol
    ["2", _("CTC-Based tty (Linux to Linux Connections)")],
    # ComboBox item: CTC device protocol
    ["3", _("Compatibility Mode with OS/390 and z/OS")]
  ]
end

#labelObject

See Also:

  • CWM::AbstractWidget

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

def label
  _("&Protocol")
end

#storeObject

See Also:

  • CWM::AbstractWidget

94
95
96
# File 'src/lib/y2network/widgets/s390_common.rb', line 94

def store
  @settings.protocol = value.to_i
end