30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
|
# File '../../src/include/printer/dialogs.rb', line 30
def initialize_printer_dialogs(include_target)
Yast.import "UI"
textdomain "printer"
Yast.import "Label"
Yast.import "DialogTree"
Yast.include include_target, "printer/helps.rb"
Yast.include include_target, "printer/overview.rb"
Yast.include include_target, "printer/printingvianetwork.rb"
Yast.include include_target, "printer/sharing.rb"
Yast.include include_target, "printer/policies.rb"
Yast.include include_target, "printer/autoconfig.rb"
@widgets_handling = {
"OVERVIEW" => {
"widget" => :custom,
"custom_widget" => @widgetOverview,
"init" => fun_ref(method(:initOverview), "void (string)"),
"handle" => fun_ref(
method(:handleOverview),
"symbol (string, map)"
),
"help" => Ops.get_string(@HELPS, "overview", "")
},
"NETWORKPRINTING" => {
"widget" => :custom,
"custom_widget" => @widgetNetworkPrinting,
"init" => fun_ref(
method(:initNetworkPrinting),
"void (string)"
),
"handle" => fun_ref(
method(:handleNetworkPrinting),
"symbol (string, map)"
),
"help" => Ops.get_string(
@HELPS,
"printing_via_network_dialog",
""
)
},
"SHARING" => {
"widget" => :custom,
"custom_widget" => @widgetSharing,
"init" => fun_ref(method(:initSharing), "void (string)"),
"handle" => fun_ref(
method(:handleSharing),
"symbol (string, map)"
),
"help" => Ops.get_string(@HELPS, "sharing_dialog", "")
},
"POLICIES" => {
"widget" => :custom,
"custom_widget" => @widgetPolicies,
"init" => fun_ref(method(:initPolicies), "void (string)"),
"handle" => fun_ref(
method(:handlePolicies),
"symbol (string, map)"
),
"help" => Ops.get_string(@HELPS, "policies", "")
},
"AUTOCONFIG" => {
"widget" => :custom,
"custom_widget" => @widgetAutoconfig,
"init" => fun_ref(method(:initAutoconfig), "void (string)"),
"handle" => fun_ref(
method(:handleAutoconfig),
"symbol (string, map)"
),
"help" => Ops.get_string(@HELPS, "autoconfig", "")
}
}
@tabs_description = {
"overview" => {
"header" => _("Printer Configurations"),
"tree_item_label" => _("Printer Configurations"),
"caption" => _("Printer Configurations"),
"contents" => VBox("OVERVIEW"),
"widget_names" => ["OVERVIEW"]
},
"network" => {
"header" => _("Print via Network"),
"tree_item_label" => _("Print via Network"),
"caption" => _("Print via Network"),
"contents" => VBox("NETWORKPRINTING"),
"widget_names" => ["NETWORKPRINTING"]
},
"sharing" => {
"header" => _("Share Printers"),
"tree_item_label" => _("Share Printers"),
"caption" => _("Share Printers"),
"contents" => VBox("SHARING"),
"widget_names" => ["SHARING"]
},
"policies" => {
"header" => _("Policies"),
"tree_item_label" => _("Policies"),
"caption" => _("Policies"),
"contents" => VBox("POLICIES"),
"widget_names" => ["POLICIES"]
},
"autoconfig" => {
"header" => _("Automatic Configuration"),
"tree_item_label" => _("Automatic Configuration"),
"caption" => _("Automatic Configuration"),
"contents" => VBox("AUTOCONFIG"),
"widget_names" => ["AUTOCONFIG"]
}
}
@AutoDialog_widgets_handling = {
"OVERVIEW" => {
"widget" => :custom,
"custom_widget" => @widgetOverview,
"init" => fun_ref(method(:initOverview), "void (string)"),
"handle" => fun_ref(
method(:handleOverview),
"symbol (string, map)"
),
"help" => Ops.get_string(@HELPS, "AutoYaSToverview", "")
},
"NETWORKPRINTING" => {
"widget" => :custom,
"custom_widget" => @widgetNetworkPrinting,
"init" => fun_ref(
method(:initNetworkPrinting),
"void (string)"
),
"handle" => fun_ref(
method(:handleNetworkPrinting),
"symbol (string, map)"
),
"help" => Ops.get_string(
@HELPS,
"printing_via_network_dialog",
""
)
}
}
@AutoDialog_tabs_description = {
"overview" => {
"header" => _("AutoYaST Printer Configurations"),
"tree_item_label" => _("Printer Configurations"),
"caption" => _("AutoYaST Printer Configurations"),
"contents" => VBox("OVERVIEW"),
"widget_names" => ["OVERVIEW"]
},
"network" => {
"header" => _("AutoYaST Print via Network Settings"),
"tree_item_label" => _("Print via Network"),
"caption" => _("AutoYaST Print via Network Settings"),
"contents" => VBox("NETWORKPRINTING"),
"widget_names" => ["NETWORKPRINTING"]
}
}
end
|