Skip to content

Commit

Permalink
Display correct license URL for add-on repositories (bnc#899891)
Browse files Browse the repository at this point in the history
  • Loading branch information
cwh42 committed Mar 16, 2015
1 parent 9c54baf commit 9c953df
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/modules/ProductLicense.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1163,6 +1163,8 @@ def AskLicenseAgreement(src_id, dir, patterns, action, enable_back, base_product
)
licenses = licenses_ref.value

update_license_archive_location(src_id)

# Display info as a popup if exists
InstShowInfo.show_info_txt(@info_file) if @info_file != nil

Expand Down Expand Up @@ -1611,6 +1613,15 @@ def update_license_location(lang, licenses)
end
end

# update license location displayed in the dialog
# @param [Fixnum] src_id integer repository to get the license from.
def update_license_archive_location(src_id)
src_url = Pkg::SourceGeneralData(src_id)["url"]
if location_is_url?(src_url) && UI.WidgetExists(:printing_hint)
lic_url = File.join(src_url, @license_file_print)
UI.ReplaceWidget(:printing_hint, Label(license_download_label(lic_url)))
end
end
end

ProductLicense = ProductLicenseClass.new
Expand Down

0 comments on commit 9c953df

Please sign in to comment.