Hello community,

here is the log from the commit of package yast2 for openSUSE:Leap:15.2 checked 
in at 2020-03-19 08:35:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/yast2 (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.yast2.new.3160 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2"

Thu Mar 19 08:35:43 2020 rev:176 rq:786011 version:4.2.73

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/yast2/yast2.changes    2020-03-13 
10:55:59.356375390 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.yast2.new.3160/yast2.changes  2020-03-19 
08:35:50.773831033 +0100
@@ -1,0 +2,7 @@
+Fri Mar 13 01:54:58 UTC 2020 - David Diaz <[email protected]>
+
+- CWM::MultiStatusSelector minor improvements (related to
+  bsc#1157780).
+- 4.2.73
+
+-------------------------------------------------------------------

Old:
----
  yast2-4.2.72.tar.bz2

New:
----
  yast2-4.2.73.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2.spec ++++++
--- /var/tmp/diff_new_pack.5xd9xb/_old  2020-03-19 08:35:51.433831437 +0100
+++ /var/tmp/diff_new_pack.5xd9xb/_new  2020-03-19 08:35:51.437831439 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2
-Version:        4.2.72
+Version:        4.2.73
 Release:        0
 Summary:        YaST2 Main Package
 License:        GPL-2.0-only

++++++ yast2-4.2.72.tar.bz2 -> yast2-4.2.73.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-4.2.72/library/cwm/src/lib/cwm/multi_status_selector.rb 
new/yast2-4.2.73/library/cwm/src/lib/cwm/multi_status_selector.rb
--- old/yast2-4.2.72/library/cwm/src/lib/cwm/multi_status_selector.rb   
2020-03-12 10:56:26.000000000 +0100
+++ new/yast2-4.2.73/library/cwm/src/lib/cwm/multi_status_selector.rb   
2020-03-13 11:47:39.000000000 +0100
@@ -121,6 +121,21 @@
       HBox(content)
     end
 
+    # Updates the content based on items list
+    def refresh
+      new_value = items.map do |item|
+        item_content = item.to_richtext
+
+        if Yast::UI.TextMode
+          "#{item_content}<br>"
+        else
+          "<p>#{item_content}</p>"
+        end
+      end
+
+      content.value = new_value.join
+    end
+
     # @macro seeAbstractWidget
     def handle(event)
       if event["ID"].to_s.include?(Item.event_id)
@@ -173,11 +188,6 @@
       items.find { |i| i.id.to_s == needle.to_s }
     end
 
-    # Updates the content based on items list
-    def refresh
-      content.value = items.map(&:to_richtext).join("<br>")
-    end
-
     # Convenience widget to keep the content updated
     #
     # @return [ContentArea]
@@ -210,6 +220,8 @@
     class Item
       extend Yast::I18n
 
+      textdomain "base"
+
       # Map to icons used in GUI to represent all the known statuses in both 
scenarios, during
       # installation (`inst` mode) and in a running system (`normal` mode).
       #
@@ -261,8 +273,6 @@
       LABEL_EVENT_ID = "#{EVENT_ID}label".freeze
       private_constant :LABEL_EVENT_ID
 
-      textdomain "cwm"
-
       # @!method id
       #   The item id
       #   @return [#to_s]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-4.2.72/library/cwm/test/multi_status_selector_test.rb 
new/yast2-4.2.73/library/cwm/test/multi_status_selector_test.rb
--- old/yast2-4.2.72/library/cwm/test/multi_status_selector_test.rb     
2020-03-12 10:56:26.000000000 +0100
+++ new/yast2-4.2.73/library/cwm/test/multi_status_selector_test.rb     
2020-03-13 11:47:39.000000000 +0100
@@ -62,9 +62,48 @@
   let(:first_item) { { id: 1, status: :selected, enabled: false } }
   let(:second_item) { { id: 2, status: :unselected, enabled: true } }
   let(:items) { [first_item, second_item] }
+  let(:content) { subject.contents.nested_find { |i| i.is_a?(CWM::RichText) } }
 
   include_examples "CWM::CustomWidget"
 
+  describe "#refresh" do
+    before do
+      allow(Yast::UI).to receive(:TextMode).and_return(text_mode)
+    end
+
+    context "when running in text mode" do
+      let(:text_mode) { true }
+
+      it "includes <br> tags" do
+        expect(content).to receive(:value=).with(/<br>/)
+
+        subject.refresh
+      end
+
+      it "does not include <p> tags" do
+        expect(content).to_not receive(:value=).with(/<p>/)
+
+        subject.refresh
+      end
+    end
+
+    context "when not running in text mode" do
+      let(:text_mode) { false }
+
+      it "includes <p> tags" do
+        expect(content).to receive(:value=).with(/<p>/)
+
+        subject.refresh
+      end
+
+      it "does not include <br> tags" do
+        expect(content).to_not receive(:value=).with(/<br>/)
+
+        subject.refresh
+      end
+    end
+  end
+
   describe "#init" do
     it "renders all items" do
       expect(subject.items).to all(receive(:to_richtext))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.2.72/package/yast2.changes 
new/yast2-4.2.73/package/yast2.changes
--- old/yast2-4.2.72/package/yast2.changes      2020-03-12 10:56:26.000000000 
+0100
+++ new/yast2-4.2.73/package/yast2.changes      2020-03-13 11:47:39.000000000 
+0100
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Fri Mar 13 01:54:58 UTC 2020 - David Diaz <[email protected]>
+
+- CWM::MultiStatusSelector minor improvements (related to
+  bsc#1157780).
+- 4.2.73
+
+-------------------------------------------------------------------
 Thu Mar 12 09:14:16 UTC 2020 - David Diaz <[email protected]>
 
 - Add the new CWM::MultiStatusSelector custom widget (related to
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.2.72/package/yast2.spec 
new/yast2-4.2.73/package/yast2.spec
--- old/yast2-4.2.72/package/yast2.spec 2020-03-12 10:56:26.000000000 +0100
+++ new/yast2-4.2.73/package/yast2.spec 2020-03-13 11:47:39.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2
-Version:        4.2.72
+Version:        4.2.73
 Release:        0
 Summary:        YaST2 Main Package
 License:        GPL-2.0-only


Reply via email to