Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix which buttons are displayed in firstboot stage #27

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions package/yast2-proxy.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Jul 4 13:49:19 UTC 2019 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>

- Fix 'proxy' behaviour when running in firstboot (bsc#1140199).
- 4.1.1

-------------------------------------------------------------------
Wed Dec 5 11:06:17 UTC 2018 - jreidinger@suse.com

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-proxy.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: yast2-proxy
Version: 4.1.0
Version: 4.1.1
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
27 changes: 22 additions & 5 deletions src/include/proxy/dialogs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 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
1 change: 0 additions & 1 deletion src/lib/proxy/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ def ProxyGUI

Wizard.CreateDialog
Wizard.SetDesktopTitleAndIcon("proxy")
Wizard.SetNextButton(:next, Label.FinishButton)

# main ui function
ret = ProxyMainDialog(true)
Expand Down