Skip to content

Commit

Permalink
Merge pull request #30 from yast/merge-sle-15-sp1
Browse files Browse the repository at this point in the history
Fix which buttons are displayed in firstboot stage
  • Loading branch information
imobachgs committed Jul 12, 2019
2 parents a174f3b + 9cb9004 commit 09b567c
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 7 deletions.
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.2.1

-------------------------------------------------------------------
Fri May 31 12:35:58 UTC 2019 - Stasiek Michalski <hellcp@mailbox.org>

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.2.0
Version: 4.2.1
Release: 0
Summary: YaST2 - Proxy Configuration
License: GPL-2.0-or-later
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("org.opensuse.yast.Proxy")
Wizard.SetNextButton(:next, Label.FinishButton)

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

0 comments on commit 09b567c

Please sign in to comment.