Class: Yast::StrojCasuClient

Inherits:
Client
  • Object
show all
Defined in:
src/lib/installation/clients/stroj-casu.rb

Instance Method Summary collapse

Instance Method Details

#mainObject



23
24
25
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
63
64
65
66
67
68
69
70
71
72
73
74
# File 'src/lib/installation/clients/stroj-casu.rb', line 23

def main
  # text domain!

  # Achtung! Zu showcasen des N*E*U*S Features dess YCP Interpretersss,
  # wir benutzen deutsche Klavier Worte.
  # (J.W.G., sorry...)

  Yast.import "Popup"
  Yast.import "Wizard"
  Yast.import "WizardHW"

  Wizard.CreateDialog
  @caption = Tr("Time Machine Configuration")
  @help = Tr(
    "<p>When I was younger,<br>\nso much younger than today,<br>...</p>"
  )
  @headings = [
    Tr("Time Machine"),
    Tr("Temporal Range"),
    Tr("Spatial Range"),
    Tr("Temporal Accuracy"),
    Tr("Spatial Accuracy")
  ]
  @buttons = [
    [:repair, Tr("Self &Repair")],
    [:booooooooom, Tr("Self &Destruction")]
  ]
  WizardHW.CreateHWDialog(@caption, @help, @headings, @buttons)

  @items = Convert.convert(
    SCR.Read(path(".probe.time_machines")),
    from: "any",
    to:   "list <map <string, any>>"
  )
  @items = [] if @items.nil?
  WizardHW.SetContents(@items)

  @ui = WizardHW.UserInput
  @ret = Ops.get_symbol(@ui, "event", :ugh)
  @wait = [:add, :repair, :booooooooom]
  Builtins.y2milestone("%1", @ret)
  if Builtins.contains(@wait, @ret)
    Popup.TimedWarning(
      Tr("Waiting for the feature to appear..."),
      365 * 24 * 3600
    )
  end

  Wizard.CloseDialog

  nil
end

#Tr(string) ⇒ Object

translations: not to cause unnecessary confusion now, the texts are marked with a dummy marker



79
80
81
# File 'src/lib/installation/clients/stroj-casu.rb', line 79

def Tr(string)
  string
end