From 06a4bf9245418d75462ad3254fcd6b815df0ff1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Thu, 4 Jul 2019 12:32:13 +0100 Subject: [PATCH 1/2] Fix which buttons are displayed in firstboot stage --- src/include/proxy/dialogs.rb | 27 ++++++++++++++++++++++----- src/lib/proxy/client.rb | 1 - 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/include/proxy/dialogs.rb b/src/include/proxy/dialogs.rb index b121020..5a024a9 100644 --- a/src/include/proxy/dialogs.rb +++ b/src/include/proxy/dialogs.rb @@ -376,7 +376,7 @@ def UrlContainPassword(url) # If modified, ask for confirmation # @return true if abort is confirmed def ReallyAbortCond - !modified || Popup.ReallyAbort(true) + (!modified || installation?) || Popup.ReallyAbort(true) end # Proxy dialog @@ -541,11 +541,9 @@ def ProxyMainDialog(standalone) contents, help, Label.BackButton, - Label.FinishButton + Label.NextButton ) - Wizard.SetNextButton(:next, Label.OKButton) - Wizard.SetAbortButton(:abort, Label.CancelButton) - Wizard.HideBackButton + adjust_wizard_buttons unless installation? # #103841, relaxed. now avoiding only quotes # #337048 allow using space as well @@ -752,5 +750,24 @@ def ProxyMainDialog(standalone) deep_copy(ret) end + + private + + # Sets OK/Cancel wizard buttons + def adjust_wizard_buttons + Wizard.SetNextButton(:next, Label.OKButton) + Wizard.SetAbortButton(:abort, Label.CancelButton) + Wizard.HideBackButton + end + + # Determines whether running in installation mode + # + # We do not use Stage.initial because of firstboot, which which runs in 'installation' mode + # but in 'firstboot' stage. + # + # @return [Boolean] Boolean if running in installation or update mode + def installation? + Mode.installation || Mode.update + end end end diff --git a/src/lib/proxy/client.rb b/src/lib/proxy/client.rb index e48d7c6..307d3bf 100644 --- a/src/lib/proxy/client.rb +++ b/src/lib/proxy/client.rb @@ -149,7 +149,6 @@ def ProxyGUI Wizard.CreateDialog Wizard.SetDesktopTitleAndIcon("proxy") - Wizard.SetNextButton(:next, Label.FinishButton) # main ui function ret = ProxyMainDialog(true) From 6cbef7e45b66f90825f8e4ef87abc456be81c2c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Thu, 4 Jul 2019 14:50:58 +0100 Subject: [PATCH 2/2] Bump version and update changes file --- package/yast2-proxy.changes | 6 ++++++ package/yast2-proxy.spec | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/package/yast2-proxy.changes b/package/yast2-proxy.changes index e8992c6..97137b4 100644 --- a/package/yast2-proxy.changes +++ b/package/yast2-proxy.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jul 4 13:49:19 UTC 2019 - Imobach Gonzalez Sosa + +- Fix 'proxy' behaviour when running in firstboot (bsc#1140199). +- 4.0.3 + ------------------------------------------------------------------- Wed Jun 27 17:14:44 CEST 2018 - schubi@suse.de diff --git a/package/yast2-proxy.spec b/package/yast2-proxy.spec index 0744d24..e127b52 100644 --- a/package/yast2-proxy.spec +++ b/package/yast2-proxy.spec @@ -17,7 +17,7 @@ Name: yast2-proxy -Version: 4.0.2 +Version: 4.0.3 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build