Class: Registration::UI::AbortConfirmation

Inherits:
Object
  • Object
show all
Includes:
Yast::I18n
Defined in:
src/lib/registration/ui/abort_confirmation.rb

Overview

this class displays a popup for the user to confirm the abort

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeAbortConfirmation

the constructor


21
22
23
# File 'src/lib/registration/ui/abort_confirmation.rb', line 21

def initialize
  textdomain "registration"
end

Class Method Details

.runBoolean

displays a new popup


15
16
17
18
# File 'src/lib/registration/ui/abort_confirmation.rb', line 15

def self.run
  dialog = new
  dialog.run
end

Instance Method Details

#runBoolean

displays the popup


27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'src/lib/registration/ui/abort_confirmation.rb', line 27

def run
  if Yast::Mode.installation
    Yast::Popup.ConfirmAbort(:painless)
  else
    # Use .AnyQuestion instead of .YesNo or .ReallyAbort to have full control
    # on :focus_no and be consistent with the .ConfirmAbort behavior
    Yast::Popup.AnyQuestion(
      Yast::Popup::NoHeadline(),
      _("Really abort?"),
      Yast::Label.YesButton,
      Yast::Label.NoButton,
      :focus_no
    )
  end
end