Module: Yast::TftpServerWizardsInclude

Defined in:
../../src/include/tftp-server/wizards.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) initialize_tftp_server_wizards(include_target)



11
12
13
14
15
16
17
18
19
20
21
22
# File '../../src/include/tftp-server/wizards.rb', line 11

def initialize_tftp_server_wizards(include_target)
  Yast.import "UI"

  textdomain "tftp-server"

  Yast.import "Label"
  Yast.import "Popup"
  Yast.import "Sequencer"
  Yast.import "Wizard"

  Yast.include include_target, "tftp-server/dialogs.rb"
end

- (Object) TftpServerAutoSequence

Whole configuration of tftp-server

Returns:

  • sequence result



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
# File '../../src/include/tftp-server/wizards.rb', line 66

def TftpServerAutoSequence
  aliases = { "packages" => [lambda { Packages() }, true], "main" => lambda do
    MainDialog()
  end }

  sequence = {
    "ws_start" => "packages",
    "packages" => { :next => "main" },
    "main"     => { :abort => :abort, :next => :next }
  }

  # Tftp-server dialog caption
  caption = _("TFTP Server Configuration")

  # progress label
  contents = Label(_("Initializing ..."))

  Wizard.CreateDialog
  Wizard.SetDesktopTitleAndIcon("tftp-server")
  Wizard.SetContentsButtons(
    caption,
    contents,
    "",
    Label.BackButton,
    Label.NextButton
  )

  ret = Sequencer.Run(aliases, sequence)

  UI.CloseDialog
  Convert.to_symbol(ret)
end

- (Object) TftpServerSequence

Whole configuration of tftp-server

Returns:

  • sequence result



26
27
28
29
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
# File '../../src/include/tftp-server/wizards.rb', line 26

def TftpServerSequence
  aliases = {
    "packages" => [lambda { Packages() }, true],
    "read"     => [lambda { ReadDialog() }, true],
    "main"     => lambda { MainDialog() },
    "write"    => [lambda { WriteDialog() }, true]
  }

  sequence = {
    "ws_start" => "packages",
    "packages" => { :next => "read", :abort => :abort },
    "read"     => { :abort => :abort, :next => "main" },
    "main"     => { :abort => :abort, :next => "write" },
    "write"    => { :abort => :abort, :next => :next }
  }

  # Tftp-server dialog caption
  caption = _("TFTP Server Configuration")

  # progress label
  contents = Label(_("Initializing..."))

  Wizard.CreateDialog
  Wizard.SetDesktopTitleAndIcon("tftp-server")
  Wizard.SetContentsButtons(
    caption,
    contents,
    "",
    Label.BackButton,
    Label.NextButton
  )

  ret = Sequencer.Run(aliases, sequence)

  UI.CloseDialog
  Convert.to_symbol(ret)
end