Class: Registration::UI::MigrationReposSelectionDialog

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

Overview

dialog for manual migration repository selection

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeMigrationReposSelectionDialog

constructor


38
39
40
# File 'src/lib/registration/ui/migration_repos_selection_dialog.rb', line 38

def initialize
  textdomain "registration"
end

Instance Attribute Details

#manual_repo_selectionObject

Returns the value of attribute manual_repo_selection


28
29
30
# File 'src/lib/registration/ui/migration_repos_selection_dialog.rb', line 28

def manual_repo_selection
  @manual_repo_selection
end

#selected_migrationObject

Returns the value of attribute selected_migration


28
29
30
# File 'src/lib/registration/ui/migration_repos_selection_dialog.rb', line 28

def selected_migration
  @selected_migration
end

Class Method Details

.runSymbol

display and run the dialog


32
33
34
35
# File 'src/lib/registration/ui/migration_repos_selection_dialog.rb', line 32

def self.run
  dialog = MigrationReposSelectionDialog.new
  dialog.run
end

Instance Method Details

#runSymbol

display and run the dialog


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
# File 'src/lib/registration/ui/migration_repos_selection_dialog.rb', line 44

def run
  Yast::Wizard.SetContents(
    # TRANSLATORS: dialog title
    _("Repositories used for Migration"),
    dialog_content,
    # TRANSLATORS: help text
    _("<p>In this dialog you can manually select which repositories will" \
        "be used for online migration. The packages will be upgraded to the" \
        "highest version found in the selected repositories.</p>"),
    true,
    true
  )

  update_repo_details

  loop do
    ret = Yast::UI.UserInput

    case ret
    when :next
      store_values
    when :repo_mgmt
      repo_mgmt
    when :repos
      update_repo_details
    end

    return ret if [:next, :back, :cancel, :abort].include?(ret)
  end
end