Class: Installation::Dialogs::ComplexWelcome
- Inherits:
-
CWM::Dialog
- Object
- CWM::Dialog
- Installation::Dialogs::ComplexWelcome
- Defined in:
- src/lib/installation/dialogs/complex_welcome.rb
Overview
This class implements a welcome dialog for the installer
The dialog contains:
- A language/keyboard selector
- If only 1 product is available, it shows the product's license.
- If more than 1 product is available, it shows the product selector.
Instance Attribute Summary collapse
-
#disable_buttons ⇒ Array<Symbol>
readonly
List of buttons to disable (:next, :abort, :back).
-
#products ⇒ Array<Y2Packager::Product>
readonly
List of available products.
Instance Method Summary collapse
-
#contents ⇒ Yast::Term
Dialog content.
-
#initialize(products, disable_buttons: []) ⇒ ComplexWelcome
constructor
Constructor.
- #run ⇒ Object
- #skip_store_for ⇒ Object
-
#title ⇒ String
Returns the dialog title.
Constructor Details
#initialize(products, disable_buttons: []) ⇒ ComplexWelcome
Constructor
47 48 49 50 51 52 53 54 |
# File 'src/lib/installation/dialogs/complex_welcome.rb', line 47 def initialize(products, disable_buttons: []) super() textdomain "installation" @products = products @disable_buttons = .map { |b| "#{b}_button" } @language_selection = Y2Country::Widgets::LanguageSelection.new(emit_event: true) end |
Instance Attribute Details
#disable_buttons ⇒ Array<Symbol> (readonly)
Returns list of buttons to disable (:next, :abort, :back).
41 42 43 |
# File 'src/lib/installation/dialogs/complex_welcome.rb', line 41 def @disable_buttons end |
#products ⇒ Array<Y2Packager::Product> (readonly)
Returns List of available products.
38 39 40 |
# File 'src/lib/installation/dialogs/complex_welcome.rb', line 38 def products @products end |
Instance Method Details
#contents ⇒ Yast::Term
Dialog content
75 76 77 78 79 80 81 82 83 |
# File 'src/lib/installation/dialogs/complex_welcome.rb', line 75 def contents VBox( filling, , locale_settings, license_or_product_content, filling ) end |
#run ⇒ Object
89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'src/lib/installation/dialogs/complex_welcome.rb', line 89 def run res = nil loop do res = super Yast::Wizard.RetranslateButtons Yast::ProductControl.RetranslateWizardSteps break if res != :redraw end res end |
#skip_store_for ⇒ Object
85 86 87 |
# File 'src/lib/installation/dialogs/complex_welcome.rb', line 85 def skip_store_for [:redraw] end |
#title ⇒ String
Returns the dialog title
The title can vary depending if the license agreement or the product selection is shown.
62 63 64 65 66 67 68 69 70 |
# File 'src/lib/installation/dialogs/complex_welcome.rb', line 62 def title if products.size > 1 _("Language, Keyboard and Product Selection") elsif show_license? _("Language, Keyboard and License Agreement") else _("Language and Keyboard Selection") end end |