Class: Registration::UI::AddonSelectionBaseDialog

Inherits:
Object
  • Object
show all
Includes:
Yast, Yast::I18n, Yast::Logger, Yast::UIShortcuts
Defined in:
src/lib/registration/ui/addon_selection_base_dialog.rb

Overview

this class displays and runs the dialog with addon selection

Constant Summary collapse

FILTER_BETAS_INITIALLY =
true

Instance Method Summary collapse

Constructor Details

#initialize(registration) ⇒ AddonSelectionBaseDialog

constructor


32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'src/lib/registration/ui/addon_selection_base_dialog.rb', line 32

def initialize(registration)
  textdomain "registration"
  @all_addons = Addon.find_all(registration)

  # sort the addons
  @all_addons.sort!(&::Registration::ADDON_SORTER)

  filter_beta_releases(FILTER_BETAS_INITIALLY)

  @old_selection = Addon.selected.dup

  # activate a workaround on ARM (FATE#320679)
  aarch64_workaround if Arch.aarch64

  log.info "Available addons: #{@all_addons}"
end

Instance Method Details

#addon_widget_id(addon) ⇒ String (protected)

create widget ID for an addon


61
62
63
# File 'src/lib/registration/ui/addon_selection_base_dialog.rb', line 61

def addon_widget_id(addon)
  "#{addon.identifier}-#{addon.version}-#{addon.arch}"
end

#filter_beta_releases(enable) ⇒ Object (protected)

Enables or disables beta addons filtering


67
68
69
# File 'src/lib/registration/ui/addon_selection_base_dialog.rb', line 67

def filter_beta_releases(enable)
  @addons = enable ? @all_addons.reject(&:beta_release?) : @all_addons
end

#runSymbol

reimplement this in a subclass display the extension selection dialog and wait for a button click


52
53
54
# File 'src/lib/registration/ui/addon_selection_base_dialog.rb', line 52

def run
  raise "Not implemented"
end