diff --git a/package/yast2-installation.changes b/package/yast2-installation.changes index 85c84c557..cd7d3d3eb 100644 --- a/package/yast2-installation.changes +++ b/package/yast2-installation.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed May 25 15:49:41 UTC 2016 - kanderssen@suse.com + +- More visual improvements in the SSH keys importing proposal + summary based on blog entry feedback. (Fate#319624) +- 3.1.189 + ------------------------------------------------------------------- Wed May 25 13:07:59 UTC 2016 - lslezak@suse.cz diff --git a/package/yast2-installation.spec b/package/yast2-installation.spec index e2f2d5107..25689fb5e 100644 --- a/package/yast2-installation.spec +++ b/package/yast2-installation.spec @@ -17,7 +17,7 @@ Name: yast2-installation -Version: 3.1.188 +Version: 3.1.189 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build diff --git a/src/lib/installation/clients/inst_pre_install.rb b/src/lib/installation/clients/inst_pre_install.rb index a61eb3eea..bae05da52 100644 --- a/src/lib/installation/clients/inst_pre_install.rb +++ b/src/lib/installation/clients/inst_pre_install.rb @@ -94,6 +94,12 @@ def main read_ssh_info(device, mount_point) end + # The ssh_import proposal doesn't make sense if there is no + # configuration to import from. + if ::Installation::SshImporter.instance.configurations.empty? + ProductControl.DisableSubProposal("inst_initial", "ssh_import") + end + # free the memory @useful_partitions = nil diff --git a/src/lib/installation/clients/ssh_import_proposal.rb b/src/lib/installation/clients/ssh_import_proposal.rb index b216bef1f..ca9587e64 100644 --- a/src/lib/installation/clients/ssh_import_proposal.rb +++ b/src/lib/installation/clients/ssh_import_proposal.rb @@ -38,7 +38,7 @@ def importer def preformatted_proposal if importer.configurations.empty? - return _("No previous Linux installation found - not importing any SSH Key") + return Yast::HTML.List([_("No previous Linux installation found")]) end if importer.device.nil? res = _("No existing SSH host keys will be copied") @@ -55,8 +55,6 @@ def preformatted_proposal res = _("SSH host keys will be copied from %s") % partition end end - # TRANSLATORS: link to change the proposal - res += " " + _("(change)") % '"ssh_import"' Yast::HTML.List([res]) end diff --git a/src/lib/installation/dialogs/ssh_import.rb b/src/lib/installation/dialogs/ssh_import.rb index f39671eeb..ed6e71acf 100644 --- a/src/lib/installation/dialogs/ssh_import.rb +++ b/src/lib/installation/dialogs/ssh_import.rb @@ -34,7 +34,7 @@ def initialize # Event callback for the 'ok' button def next_handler partition = UI.QueryWidget(Id(:device), :Value) - partition = nil if partition == :none + partition = nil unless UI.QueryWidget(Id(:import_ssh_key), :Value) copy_config = UI.QueryWidget(Id(:copy_config), :Value) log.info "SshImportDialog partition => #{partition} copy_config => #{copy_config}" importer.device = partition @@ -63,10 +63,25 @@ def copy_config def dialog_content HSquash( VBox( - Left(Label(_("System to Import SSH Host Keys from"))), - partitions_list_widget, - VSpacing(1), - Left(copy_config_widget) + CheckBoxFrame( + Id(:import_ssh_key), + _("I would like to import SSH keys from a previous installation"), + true, + VBox( + HStretch(), + VSpacing(1), + HBox( + HSpacing(2), + partitions_list_widget + ), + VSpacing(3), + HBox( + HSpacing(2), + Left(copy_config_widget) + ) + ) + ), + HStretch() ) ) end @@ -82,7 +97,7 @@ def help_text "thus the identity- of its SSH server. The key files found in /etc/ssh " \ "(one pair of files per host key) will be copied to the new system " \ "being installed.

" \ - "

Check Copy Whole SSH Configuration to also copy other files " \ + "

Check Import SSH Configuration to also copy other files " \ "found in /etc/ssh, in addition to the keys.

" ) end @@ -96,8 +111,6 @@ def partitions_list_widget RadioButtonGroup( Id(:device), VBox( - # TRANSLATORS: option to select no partition for SSH keys import - Left(RadioButton(Id(:none), _("None"), device.nil?)), *part_widgets ) ) @@ -112,7 +125,7 @@ def partition_widget(dev, partition) end def copy_config_widget - CheckBox(Id(:copy_config), _("Copy Whole SSH Configuration"), copy_config) + CheckBox(Id(:copy_config), _("Import SSH Configuration"), copy_config) end end end