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:



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

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

  @settings = settings
end

Instance Method Details

#helpObject

See Also:

  • CWM::AbstractWidget


101
102
103
# File 'src/lib/y2network/widgets/s390_common.rb', line 101

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

#initObject

See Also:

  • CWM::AbstractWidget


72
73
74
# File 'src/lib/y2network/widgets/s390_common.rb', line 72

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

#itemsObject

See Also:

  • CWM::AbstractWidget


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

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


77
78
79
# File 'src/lib/y2network/widgets/s390_common.rb', line 77

def label
  _("&Protocol")
end

#storeObject

See Also:

  • CWM::AbstractWidget


96
97
98
# File 'src/lib/y2network/widgets/s390_common.rb', line 96

def store
  @settings.protocol = value.to_i
end