Skip to content

Commit

Permalink
removed "Include Add-on Products from Separate Media" checkbox (bnc#8…
Browse files Browse the repository at this point in the history
…68942)

- it has been moved to registration
- code cleanup
  • Loading branch information
lslezak committed Mar 18, 2014
1 parent 73746d7 commit 1f8b460
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 64 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -37,3 +37,4 @@ home*:*
*.sh
.yardoc
/coverage
/nbproject/private/
93 changes: 29 additions & 64 deletions src/clients/inst_installation_options.rb
@@ -1,7 +1,7 @@
# encoding: utf-8

# ------------------------------------------------------------------------------
# Copyright (c) 2006-2012 Novell, Inc. All Rights Reserved.
# Copyright (c) 2006-2014 Novell, Inc. All Rights Reserved.
#
#
# This program is free software; you can redistribute it and/or modify it under
Expand All @@ -21,7 +21,7 @@

# File: clients/inst_installation_options.rb
# Package: Installation
# Summary: Initialize installation
# Summary: Initialize installation, set installation options
# Authors: Jiri Srain <jsrain@suse.cz>
# Lukas Ocilka <locilka@suse.cz>
#
Expand All @@ -34,7 +34,6 @@ def main
textdomain "installation"

Yast.import "AddOnProduct"
Yast.import "GetInstArgs"
Yast.import "Installation"
Yast.import "InstData"
Yast.import "Linuxrc"
Expand Down Expand Up @@ -73,24 +72,25 @@ def main
Installation.productsources_selected = false
end

SetRequiredPackages()

# nothing to display, simply continue
return :auto unless @show_online_repositories

Wizard.SetContents(
# dialog caption
_("Installation Options"),
InstModeDialogContent(:install),
InstModeDialogHelp(),
InstOptionsDialogContent(),
InstOptionsDialogHelp(),
true,
true
)
Wizard.SetTitleIcon("yast-software")

@ret = nil

@umount_result = Linuxrc.InstallInf("umount_result")
@media = Linuxrc.InstallInf("InstMode")
Builtins.y2milestone(
"Umount result: %1, inst mode: %2",
@umount_result,
@media
Linuxrc.InstallInf("umount_result"),
Linuxrc.InstallInf("InstMode")
)

AdjustStepsAccordingToInstallationSettings()
Expand All @@ -99,36 +99,19 @@ def main
@ret = UI.UserInput
Builtins.y2milestone("ret: %1", @ret)

# Use-Add-On-Product status changed
if @ret == :add_on
if UI.WidgetExists(Id(:add_on))
Installation.add_on_selected = UI.QueryWidget(Id(:add_on), :Value)
Builtins.y2milestone("add_on_selected: %1", Installation.add_on_selected)
AdjustStepsAccordingToInstallationSettings()
end
@ret = nil
next
# Use-Community-Repositories status changed
elsif @ret == :productsources
if UI.WidgetExists(Id(:productsources))
Installation.productsources_selected = UI.QueryWidget(Id(:productsources), :Value)
Builtins.y2milestone(
"productsources_selected: %1",
Installation.productsources_selected
)
AdjustStepsAccordingToInstallationSettings()
end
@ret = nil
if @ret == :productsources
Installation.productsources_selected = UI.QueryWidget(Id(:productsources), :Value)
Builtins.y2milestone(
"productsources_selected: %1",
Installation.productsources_selected
)
AdjustStepsAccordingToInstallationSettings()
next
# Next button
elsif @ret == :next
next
# Abort button
elsif @ret == :abort
if Popup.ConfirmAbort(Stage.initial ? :painless : :incomplete)
return :abort
end
@ret = nil
next
end
end until @ret == :back || @ret == :next
Expand All @@ -147,7 +130,7 @@ def main

# bugzilla #293808
# Check (and setup) the network only when needed
if Installation.add_on_selected || Installation.productsources_selected
if Installation.productsources_selected
# Check and setup network
@inc_ret = Convert.to_symbol(WFM.CallFunction("inst_network_check", []))
Builtins.y2milestone("inst_network_check ret: %1", @inc_ret)
Expand All @@ -166,57 +149,39 @@ def main
Wizard.SetTitleIcon("yast-software")

UpdateWizardSteps()
SetRequiredPackages()

@ret = ProductControl.RunFrom(ProductControl.CurrentStep + 1, false)

@ret = :finish if @ret == :next

@ret
@ret
end

# see bugzilla #156529
def InstModeDialogContent(pre_selected)
def InstOptionsDialogContent()
HBox(
HStretch(),
VBox(
@show_online_repositories == true ?
Left(
CheckBox(
Id(:productsources),
Opt(:notify),
# check box
_("&Add Online Repositories Before Installation"),
Installation.productsources_selected
)
) :
Empty(),
Left(
CheckBox(
Id(:add_on),
Id(:productsources),
Opt(:notify),
# check box
_("In&clude Add-on Products from Separate Media"),
Installation.add_on_selected
_("&Add Online Repositories Before Installation"),
Installation.productsources_selected
)
)
),
HStretch()
)
end

def InstModeDialogHelp
def InstOptionsDialogHelp
# help text for installation method
_("<p><big><b>Installation Options</b></big></p>") +
# help text for installation option
(@show_online_repositories == true ?
_("<p>\nTo use suggested remote repositories during installation or update, select\n" +
"<b>Add Online Repositories Before Installation</b>.</p>") :
"") +
# help text for installation method
_("<p>\nTo install an add-on product from separate media together with &product;, select\n" +
"<b>Include Add-on Products from Separate Media</b>.</p>\n") +
# help text: additional help for installation
_("<p>If you need specific hardware drivers for installation, see <i>http://drivers.suse.com</i> site.</p>")
# help text for installation option
_("<p>\nTo use suggested remote repositories during installation or update, select\n" +
"<b>Add Online Repositories Before Installation</b>.</p>")
end

def SetRequiredPackages
Expand Down

0 comments on commit 1f8b460

Please sign in to comment.