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


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

def initialize(settings)
  textdomain "network"

  @settings = settings
end

Instance Method Details

#helpObject

See Also:

  • CWM::AbstractWidget

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

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

#initObject

See Also:

  • CWM::AbstractWidget

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

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

#itemsObject

See Also:

  • CWM::AbstractWidget

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

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

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

def label
  _("&Protocol")
end

#storeObject

See Also:

  • CWM::AbstractWidget

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

def store
  @settings.protocol = value.to_i
end