Skip to content

Commit

Permalink
WIP offer a list of found local SMT servers (bsc#981633)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvidner committed Jun 17, 2016
1 parent 28acd95 commit 8902163
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/lib/registration/ui/base_system_registration_dialog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,15 @@ def register_scc_option
#
# @return [Yast::Term] UI terms
def register_local_option
# If not special URL is used, show an example one.
url = using_default_url? ? EXAMPLE_SMT_URL : reg_options[:custom_url]
# FIXME move to a method
# If not special URL is used, probe with SLP
if using_default_url?
services = UrlHelpers.slp_discovery_feedback
urls = services.map { |svc| UrlHelpers.service_url(svc.slp_url) }
else
urls = [ reg_options[:custom_url] ]
end

VBox(
Left(
RadioButton(
Expand All @@ -296,8 +303,10 @@ def register_local_option
HBox(
HSpacing(5),
VBox(
MinWidth(REG_CODE_WIDTH, InputField(Id(:custom_url),
_("&Local Registration Server URL"), url))
MinWidth(REG_CODE_WIDTH,
ComboBox(Id(:custom_url), Opt(:editable),
_("&Local Registration Server URL"), urls)
)
)
)
),
Expand Down

0 comments on commit 8902163

Please sign in to comment.