Class: Registration::UI::MigrationSelectionDialog

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

Overview

this class displays and runs the dialog to select the migration target

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(migrations, installed_products) ⇒ MigrationSelectionDialog

constructor


49
50
51
52
53
54
55
# File 'src/lib/registration/ui/migration_selection_dialog.rb', line 49

def initialize(migrations, installed_products)
  textdomain "registration"

  @migrations = migrations
  @installed_products = installed_products
  @manual_repo_selection = false
end

Instance Attribute Details

#installed_productsObject

Returns the value of attribute installed_products


36
37
38
# File 'src/lib/registration/ui/migration_selection_dialog.rb', line 36

def installed_products
  @installed_products
end

#manual_repo_selectionObject

Returns the value of attribute manual_repo_selection


36
37
38
# File 'src/lib/registration/ui/migration_selection_dialog.rb', line 36

def manual_repo_selection
  @manual_repo_selection
end

#selected_migrationObject

Returns the value of attribute selected_migration


36
37
38
# File 'src/lib/registration/ui/migration_selection_dialog.rb', line 36

def selected_migration
  @selected_migration
end

Class Method Details

.run(migrations, installed_products) ⇒ Object

run the dialog


41
42
43
44
# File 'src/lib/registration/ui/migration_selection_dialog.rb', line 41

def self.run(migrations, installed_products)
  dialog = MigrationSelectionDialog.new(migrations, installed_products)
  dialog.run
end

Instance Method Details

#runSymbol

display and run the dialog


59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'src/lib/registration/ui/migration_selection_dialog.rb', line 59

def run
  Yast::Wizard.SetContents(
    # TRANSLATORS: dialog title
    _("Select the Migration Target"),
    dialog_content,
    # TRANSLATORS: help text (1/3)
    _("<p>Here you can select the migration target products. The registration" \
        "server may offer several possible migration to new products.</p>") +
    # TRANSLATORS: help text (2/3)
    _("<p>Only one migration target from the list can be selected.</p>") +
    # TRANSLATORS: help text (3/3), %s is replaced by the (translated) check box label
    (_("<p>Use the <b>%s</b> check box to manually select the migration " \
          "repositories later.</p>") % _("Manually Select Migration Repositories")),
    Yast::GetInstArgs.enable_back,
    true
  )

  update_details

  handle_user_input
end