Module: Yast::NetworkSummaryInclude
- Defined in:
- ../../src/include/network/summary.rb
Instance Method Summary (collapse)
-
- (Object) BuildTypesList(types, cur)
Create list of Table items.
- - (Object) initialize_network_summary(_include_target)
-
- (Object) OverviewTable(header, contents)
Create table widget for the overview screens.
-
- (Object) OverviewTableContents(caption, header, contents, first)
Create table widget for the overview screens with correct spacings.
-
- (Object) OverviewTableDouble(caption1, header1, contents1, caption2, header2, contents2)
Create two table widgets for the overview screens.
Instance Method Details
- (Object) BuildTypesList(types, cur)
Create list of Table items
46 47 48 49 50 51 |
# File '../../src/include/network/summary.rb', line 46 def BuildTypesList(types, cur) types = deep_copy(types) Builtins.maplist(types) do |t| Item(Id(t), NetworkInterfaces.GetDevTypeDescription(t, false), t == cur) end end |
- (Object) initialize_network_summary(_include_target)
35 36 37 38 39 40 |
# File '../../src/include/network/summary.rb', line 35 def initialize_network_summary(_include_target) textdomain "network" Yast.import "String" Yast.import "NetworkInterfaces" end |
- (Object) OverviewTable(header, contents)
Create table widget for the overview screens
99 100 101 102 103 |
# File '../../src/include/network/summary.rb', line 99 def OverviewTable(header, contents) header = deep_copy(header) contents = deep_copy(contents) VBox(VSpacing(0.5), OverviewTableContents("", header, contents, true)) end |
- (Object) OverviewTableContents(caption, header, contents, first)
Create table widget for the overview screens with correct spacings
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File '../../src/include/network/summary.rb', line 59 def OverviewTableContents(caption, header, contents, first) header = deep_copy(header) contents = deep_copy(contents) = nil = nil = nil if first # Pushbutton label = PushButton(Id(:add), Opt(:key_F3), _("A&dd")) # Pushbutton label = PushButton(Id(:edit), Opt(:key_F4), _("&Edit")) # Pushbutton label = PushButton(Id(:delete), Opt(:key_F5), _("De&lete")) else # Pushbutton label (different shortcut) = PushButton(Id(:Add), _("&Add")) # Pushbutton label (different shortcut) = PushButton(Id(:Edit), _("Ed&it")) # Pushbutton label (different shortcut) = PushButton(Id(:Delete), _("Dele&te")) end HBox( HSpacing(1.5), VBox( VSpacing(0.0), caption != "" ? Left(Heading(caption)) : VSpacing(0.0), Table(Id(first ? :table : :Table), Opt(:notify), header, contents), VSpacing(0.4), HBox(Opt(:hstretch), , , ), VSpacing(0.5) ), HSpacing(1.5) ) end |
- (Object) OverviewTableDouble(caption1, header1, contents1, caption2, header2, contents2)
Create two table widgets for the overview screens
113 114 115 116 117 118 119 120 121 122 123 |
# File '../../src/include/network/summary.rb', line 113 def OverviewTableDouble(caption1, header1, contents1, caption2, header2, contents2) header1 = deep_copy(header1) contents1 = deep_copy(contents1) header2 = deep_copy(header2) contents2 = deep_copy(contents2) VBox( VSpacing(0.5), OverviewTableContents(caption1, header1, contents1, true), OverviewTableContents(caption2, header2, contents2, false) ) end |