Skip to content

Commit

Permalink
Display the info for the first addon in the selector
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Feb 28, 2020
1 parent 41a114a commit 50635a8
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/lib/y2packager/dialogs/addon_selector.rb
Expand Up @@ -107,7 +107,7 @@ def create_dialog
res = super
Yast::Wizard.EnableNextButton
Yast::Wizard.EnableBackButton

Yast::UI.SetFocus(Id(:addon_repos))
res
end

Expand Down Expand Up @@ -147,7 +147,7 @@ def select_dependent_products
# the selection has not changed, nothing to do
return if new_selection == selected_products

# add the dependent items to the selected list
# add the dependent items to the selected listx
selected_items = Yast::UI.QueryWidget(Id(:addon_repos), :SelectedItems)
new_items = new_selection - selected_products
new_items.each do |p|
Expand Down Expand Up @@ -205,16 +205,17 @@ def continue_msg
# description widget
# @return [Yast::Term] the addon details widget
def details_widget
VWeight(40, RichText(Id(:details), Opt(:disabled), "<small>" +
description + "</small>"))
VWeight(
40,
RichText(Id(:details), Opt(:disabled), "<small>" + initial_description + "</small>")
)
end

# extra help text
# @return [String] translated text
def description
# TRANSLATORS: inline help text displayed below the product selection widget
_("Select a product to see its description here. The dependent products " \
"are selected automatically.")
# @return [String] first product description
def initial_description
return "" if products.empty?
product_description(products.first)
end

def product_description(product)
Expand Down

0 comments on commit 50635a8

Please sign in to comment.