Module: Yast::PrinterWizardsInclude

Defined in:
../../src/include/printer/wizards.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) AutoSequence

Workflow of the printer configuration for AutoYaST

Returns:

  • sequence result



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/wizards.rb', line 165

def AutoSequence
  aliases = { "overview" => lambda { runAutoDialog } }
  sequence = {
    "ws_start" => "overview",
    "overview" => {
      :abort                                  => :abort,
      :back                                   => "overview",
      :next                                   => :next,
      :add                                    => "overview",
      :modify                                 => "overview",
      :delete                                 => "overview",
      :refresh                                => "overview",
      :printing_via_network_back              => "overview",
      :printing_via_network_next              => "overview",
      :printing_via_network_connection_wizard => "overview",
      :sharing_back                           => "overview",
      :sharing_next                           => "overview",
      :policies_back                          => "overview",
      :policies_next                          => "overview",
      :autoconfig_back                        => "overview",
      :autoconfig_next                        => "overview"
    }
  }
  Sequencer.Run(aliases, sequence)
end

- (Object) initialize_printer_wizards(include_target)



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File '../../src/include/printer/wizards.rb', line 30

def initialize_printer_wizards(include_target)
  Yast.import "UI"

  textdomain "printer"

  Yast.import "Sequencer"
  Yast.import "Wizard"

  Yast.include include_target, "printer/readwrite.rb"
  Yast.include include_target, "printer/basicadd.rb"
  Yast.include include_target, "printer/basicmodify.rb"
  Yast.include include_target, "printer/connectionwizard.rb"
  Yast.include include_target, "printer/printingvianetwork.rb"
  Yast.include include_target, "printer/driveroptions.rb"
  Yast.include include_target, "printer/driveradd.rb"
  Yast.include include_target, "printer/dialogs.rb"
end

- (Object) MainSequence

Workflow of the printer configuration

Returns:

  • sequence result



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
# File '../../src/include/printer/wizards.rb', line 50

def MainSequence
  aliases = {
    "overview"                               => lambda { runMainDialog },
    "add"                                    => lambda { BasicAddDialog() },
    "add_connection_wizard"                  => lambda do
      ConnectionWizardDialog()
    end,
    "add_driver_add"                         => lambda { AddDriverDialog() },
    "modify"                                 => lambda do
      BasicModifyDialog()
    end,
    "modify_connection_wizard"               => lambda do
      ConnectionWizardDialog()
    end,
    "modify_driver_add"                      => lambda { AddDriverDialog() },
    "modify_driver_options"                  => lambda do
      DriverOptionsDialog()
    end,
    "printing_via_network_connection_wizard" => lambda do
      ConnectionWizardDialog()
    end
  }
  sequence = {
    "ws_start"                               => "overview",
    "overview"                               => {
      :abort                                  => :abort,
      :back                                   => :abort,
      :next                                   => :next,
      :add                                    => "add",
      :modify                                 => "modify",
      :delete                                 => "overview",
      :refresh                                => "overview",
      :printing_via_network_back              => "overview",
      :printing_via_network_next              => "overview",
      :printing_via_network_connection_wizard => "printing_via_network_connection_wizard",
      :sharing_back                           => "overview",
      :sharing_next                           => "overview",
      :policies_back                          => "overview",
      :policies_next                          => "overview",
      :autoconfig_back                        => "overview",
      :autoconfig_next                        => "overview"
    },
    "add"                                    => {
      :abort             => :abort,
      :back              => "overview",
      :next              => "overview",
      :connection_wizard => "add_connection_wizard",
      :add_driver        => "add_driver_add",
      :run_hpsetup       => "overview"
    },
    "add_connection_wizard"                  => {
      :abort => :abort,
      :back  => "add",
      :next  => "add"
    },
    "add_driver_add"                         => {
      :abort => :abort,
      :back  => "add",
      :next  => "add"
    },
    "modify"                                 => {
      :abort             => :abort,
      :back              => "overview",
      :next              => "overview",
      :connection_wizard => "modify_connection_wizard",
      :add_driver        => "modify_driver_add",
      :driver_options    => "modify_driver_options"
    },
    "modify_connection_wizard"               => {
      :abort => :abort,
      :back  => "modify",
      :next  => "modify"
    },
    "modify_driver_add"                      => {
      :abort => :abort,
      :back  => "modify",
      :next  => "modify"
    },
    "modify_driver_options"                  => {
      :abort => :abort,
      :back  => "modify",
      :next  => "modify"
    },
    "printing_via_network_connection_wizard" => {
      :abort => :abort,
      :back  => "overview",
      :next  => "add"
    }
  }
  Sequencer.Run(aliases, sequence)
end

- (Object) PrinterAutoSequence

Only “Printing via Network” configuration of printer. For use with autoinstallation.

Returns:

  • sequence result



194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
# File '../../src/include/printer/wizards.rb', line 194

def PrinterAutoSequence
  caption = _("Printer Configuration")
  # Initialization dialog contents
  contents = Label(_("Initializing..."))
  Wizard.CreateDialog
  Wizard.SetContentsButtons(
    caption,
    contents,
    "",
    Label.BackButton,
    Label.NextButton
  )
  ret = AutoSequence()
  UI.CloseDialog
  deep_copy(ret)
end

- (Object) PrinterProposalSequence

Whole configuration of printer but without reading and writing. For use with proposal at the end of the system installation.

Returns:

  • sequence result



214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
# File '../../src/include/printer/wizards.rb', line 214

def PrinterProposalSequence
  caption = _("Printer Configuration")
  # Initialization dialog contents
  contents = Label(_("Initializing..."))
  Wizard.CreateDialog
  Wizard.SetContentsButtons(
    caption,
    contents,
    "",
    Label.BackButton,
    Label.NextButton
  )
  ret = MainSequence()
  UI.CloseDialog
  deep_copy(ret)
end

- (Object) PrinterSequence

Whole configuration of printer

Returns:

  • sequence result



144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# File '../../src/include/printer/wizards.rb', line 144

def PrinterSequence
  aliases = {
    "read"  => [lambda { ReadDialog() }, true],
    "main"  => lambda { MainSequence() },
    "write" => [lambda { WriteDialog() }, true]
  }
  sequence = {
    "ws_start" => "read",
    "read"     => { :abort => :abort, :next => "main" },
    "main"     => { :abort => :abort, :next => "write" },
    "write"    => { :abort => :abort, :next => :next }
  }
  Wizard.CreateDialog
  Wizard.SetDesktopIcon("printer")
  ret = Sequencer.Run(aliases, sequence)
  UI.CloseDialog
  deep_copy(ret)
end