Skip to content

Commit

Permalink
reuse method from input loop abstraction
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Dec 3, 2014
1 parent 7344038 commit 625f9ae
Showing 1 changed file with 1 addition and 48 deletions.
49 changes: 1 addition & 48 deletions src/lib/installation/proposal_runner.rb
Expand Up @@ -275,40 +275,6 @@ def CheckAndCloseWindowsLeft
nil
end


# Call a submodule's MakeProposal() function.
#
# @param [String] submodule name of the submodule's proposal dispatcher
# @param [Boolean] force_reset discard any existing (cached) proposal
# @param [Boolean] language_changed installation language changed since last call
# @return proposal_map see proposal-API.txt
#

def submod_make_proposal(submodule, force_reset, language_changed)
Yast::UI.BusyCursor

proposal = Yast::WFM.CallFunction(
submodule,
[
"MakeProposal",
{
"force_reset" => force_reset,
"language_changed" => language_changed
}
]
)
log.debug "#{submodule} MakeProposal() returns #{proposal}"

# There might be some UI layers left
# we need to close them
CheckAndCloseWindowsLeft()

Yast::UI.NormalCursor

deep_copy(proposal)
end


# Call a submodule's AskUser() function.
#
# @param [String] submodule name of the submodule's proposal dispatcher
Expand Down Expand Up @@ -467,20 +433,7 @@ def make_proposal(force_reset, language_changed)
Yast::Wizard.SetHelpText(@store.help_text)

if @store.has_tabs? && Yast::Ops.less_than(tab_to_switch, 999) && !current_tab_affected
# FIXME copy-paste from event loop (but for last 2 lines)
@current_tab = tab_to_switch
load_matching_submodules_list
proposal = ""
Yast::Builtins.foreach(@submodules_presentation) do |mod|
proposal = Yast::Ops.add(proposal, Yast::Ops.get(@html, mod, ""))
end
display_proposal(proposal)
get_submod_descriptions_and_build_menu

log.info "Switching to tab '#{@current_tab}'"
if Yast::UI.WidgetExists(:_cwm_tab)
Yast::UI.ChangeWidget(Id(:_cwm_tab), :CurrentItem, @current_tab)
end
switch_to_tab(tab_to_switch)
end

# now do the display-only proposals
Expand Down

0 comments on commit 625f9ae

Please sign in to comment.