Hello community, here is the log from the commit of package yast2 for openSUSE:Factory checked in at 2018-03-26 12:17:00 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2 (Old) and /work/SRC/openSUSE:Factory/.yast2.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2" Mon Mar 26 12:17:00 2018 rev:423 rq:590631 version:4.0.60 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2/yast2.changes 2018-03-14 19:34:03.871800709 +0100 +++ /work/SRC/openSUSE:Factory/.yast2.new/yast2.changes 2018-03-26 12:17:07.780576901 +0200 @@ -1,0 +2,7 @@ +Fri Mar 23 09:17:01 UTC 2018 - [email protected] + +- fix behavior of showing timed error popup (found during + debugging bsc#1083672) +- 4.0.60 + +------------------------------------------------------------------- Old: ---- yast2-4.0.59.tar.bz2 New: ---- yast2-4.0.60.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2.spec ++++++ --- /var/tmp/diff_new_pack.BS4Q2j/_old 2018-03-26 12:17:09.044531579 +0200 +++ /var/tmp/diff_new_pack.BS4Q2j/_new 2018-03-26 12:17:09.052531292 +0200 @@ -17,7 +17,7 @@ Name: yast2 -Version: 4.0.59 +Version: 4.0.60 Release: 0 Summary: YaST2 - Main Package License: GPL-2.0 ++++++ yast2-4.0.59.tar.bz2 -> yast2-4.0.60.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.0.59/library/general/example/old_popup.rb new/yast2-4.0.60/library/general/example/old_popup.rb --- old/yast2-4.0.59/library/general/example/old_popup.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-4.0.60/library/general/example/old_popup.rb 2018-03-23 12:49:40.000000000 +0100 @@ -0,0 +1,6 @@ +require "yast" + +Yast.import "Popup" + +ret = Yast::Popup.TimedErrorAnyQuestion("head", "msg", "yes", "no", :focus_no, 10) +Yast::Popup.Message("Returned #{ret.inspect}") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.0.59/library/general/src/lib/yast2/popup.rb new/yast2-4.0.60/library/general/src/lib/yast2/popup.rb --- old/yast2-4.0.59/library/general/src/lib/yast2/popup.rb 2018-03-12 11:12:43.000000000 +0100 +++ new/yast2-4.0.60/library/general/src/lib/yast2/popup.rb 2018-03-23 12:49:40.000000000 +0100 @@ -275,6 +275,8 @@ end when :__stop loop do + Yast::UI.ChangeWidget(:__stop, :Enabled, false) + Yast::UI.SetFocus(focus) res = Yast::UI.UserInput res = handle_event(res, details, remaining_time, focus) return res if res diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.0.59/library/general/src/modules/Popup.rb new/yast2-4.0.60/library/general/src/modules/Popup.rb --- old/yast2-4.0.59/library/general/src/modules/Popup.rb 2018-03-12 11:12:43.000000000 +0100 +++ new/yast2-4.0.60/library/general/src/modules/Popup.rb 2018-03-23 12:49:40.000000000 +0100 @@ -37,6 +37,8 @@ # See also <a href="../wizard/README.popups">README.popups</a> require "yast" require "erb" +# when we need to modify some old method, then sometimes it is easier to replace it with new one +require "yast2/popup" module Yast class PopupClass < Module @@ -447,56 +449,12 @@ # @return [Boolean] True if Yes, False if no # @see #AnyQuestion def TimedErrorAnyQuestion(headline, message, yes_button_message, no_button_message, focus, timeout_seconds) - button_box = AnyQuestionButtonBox( - yes_button_message, - no_button_message, - focus - ) - timed = ReplacePoint( - Id(:replace_buttons), - VBox( - HCenter(Label(Id(:remaining_time), Ops.add("", timeout_seconds))), - ButtonBox( - # FIXME: BNC #422612, Use `opt(`noSanityCheck) later - PushButton(Id(:timed_stop), Opt(:cancelButton), Label.StopButton), - PushButton( - Id(:timed_ok), - Opt(:default, :key_F10, :okButton), - Label.OKButton - ) - ), - VSpacing(0.2) - ) - ) - - success = UI.OpenDialog( - Opt(:decorated), - popupLayoutInternal(headline, message, timed) - ) - - while Ops.greater_than(timeout_seconds, 0) - which_input = UI.TimeoutUserInput(1000) + buttons = { yes: yes_button_message, no: no_button_message } + focus_symbol = focus == :focus_no ? :no : :yes + ret = Yast2::Popup.show(message, headline: headline, buttons: buttons, + focus: focus_symbol, timeout: timeout_seconds) - break if which_input == :timed_ok - if which_input == :timed_stop - UI.ReplaceWidget(Id(:replace_buttons), button_box) - which_input = UI.UserInput while which_input == :timed_stop - break - end - timeout_seconds = Ops.subtract(timeout_seconds, 1) - - next unless success - - UI.ChangeWidget( - Id(:remaining_time), - :Value, - Ops.add("", timeout_seconds) - ) - end - - UI.CloseDialog if success == true - - which_input == :yes + ret == :yes end # Dialog which displays the "message" and has a <b>Continue</b> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.0.59/library/general/test/popup_test.rb new/yast2-4.0.60/library/general/test/popup_test.rb --- old/yast2-4.0.59/library/general/test/popup_test.rb 2018-03-12 11:12:43.000000000 +0100 +++ new/yast2-4.0.60/library/general/test/popup_test.rb 2018-03-23 12:49:40.000000000 +0100 @@ -2,6 +2,7 @@ require_relative "test_helper" require "erb" +require "yast2/popup_rspec" Yast.import "Popup" @@ -159,6 +160,18 @@ end end + describe ".TimedErrorAnyQuestion" do + it "returns true when user click on yes" do + expect_to_show_popup_which_return(:yes) + expect(subject.TimedErrorAnyQuestion("head", "msg", "yes", "no", :focus_no, 10)).to eq true + end + + it "returns false when user click on no" do + expect_to_show_popup_which_return(:no) + expect(subject.TimedErrorAnyQuestion("head", "msg", "yes", "no", :focus_no, 10)).to eq false + end + end + # # LongWarning # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.0.59/package/yast2.changes new/yast2-4.0.60/package/yast2.changes --- old/yast2-4.0.59/package/yast2.changes 2018-03-12 11:12:43.000000000 +0100 +++ new/yast2-4.0.60/package/yast2.changes 2018-03-23 12:49:40.000000000 +0100 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Fri Mar 23 09:17:01 UTC 2018 - [email protected] + +- fix behavior of showing timed error popup (found during + debugging bsc#1083672) +- 4.0.60 + +------------------------------------------------------------------- Fri Mar 9 11:51:07 UTC 2018 - [email protected] - Fix extracting kernel parameters from installation when there is diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.0.59/package/yast2.spec new/yast2-4.0.60/package/yast2.spec --- old/yast2-4.0.59/package/yast2.spec 2018-03-12 11:12:43.000000000 +0100 +++ new/yast2-4.0.60/package/yast2.spec 2018-03-23 12:49:40.000000000 +0100 @@ -16,7 +16,7 @@ # Name: yast2 -Version: 4.0.59 +Version: 4.0.60 Release: 0 Summary: YaST2 - Main Package License: GPL-2.0
