Hello community,

here is the log from the commit of package yast2-ycp-ui-bindings for 
openSUSE:Factory checked in at 2020-06-10 00:38:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-ycp-ui-bindings (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-ycp-ui-bindings.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-ycp-ui-bindings"

Wed Jun 10 00:38:36 2020 rev:79 rq:812539 version:4.3.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/yast2-ycp-ui-bindings/yast2-ycp-ui-bindings.changes  
    2020-01-24 14:11:05.854408131 +0100
+++ 
/work/SRC/openSUSE:Factory/.yast2-ycp-ui-bindings.new.3606/yast2-ycp-ui-bindings.changes
    2020-06-10 00:38:59.685490899 +0200
@@ -1,0 +2,7 @@
+Thu Jun  4 11:52:17 UTC 2020 - Stefan Hundhammer <[email protected]>
+
+- Added widget option autoWrap for label widget (bsc#1172513) 
+- Require libyui.so.12
+- 4.3.10
+
+-------------------------------------------------------------------

Old:
----
  yast2-ycp-ui-bindings-4.2.9.tar.bz2

New:
----
  yast2-ycp-ui-bindings-4.3.0.tar.bz2

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

Other differences:
------------------
++++++ yast2-ycp-ui-bindings.spec ++++++
--- /var/tmp/diff_new_pack.MN4J0L/_old  2020-06-10 00:39:02.001496973 +0200
+++ /var/tmp/diff_new_pack.MN4J0L/_new  2020-06-10 00:39:02.005496983 +0200
@@ -17,11 +17,11 @@
 
 
 # YUIWidget_CustomStatusItemSelector
-%define min_yui_version        3.9.1
-%define yui_so         11
+%define min_yui_version        3.10.0
+%define yui_so         12
 
 Name:           yast2-ycp-ui-bindings
-Version:        4.2.9
+Version:        4.3.0
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-ycp-ui-bindings-4.2.9.tar.bz2 -> 
yast2-ycp-ui-bindings-4.3.0.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-ycp-ui-bindings-4.2.9/examples/Label-AutoWrap1.rb 
new/yast2-ycp-ui-bindings-4.3.0/examples/Label-AutoWrap1.rb
--- old/yast2-ycp-ui-bindings-4.2.9/examples/Label-AutoWrap1.rb 1970-01-01 
01:00:00.000000000 +0100
+++ new/yast2-ycp-ui-bindings-4.3.0/examples/Label-AutoWrap1.rb 2020-06-08 
12:26:06.000000000 +0200
@@ -0,0 +1,28 @@
+# encoding: utf-8
+
+module Yast
+  class LabelAutoWrap1Client < Client
+    def main
+      Yast.import "UI"
+
+      width = 40
+      text  = "This is an example of a lengthy text that needs to be 
auto-wrapped to make it fit. "
+      text += "And it goes on and on and on; it does not have any newline. "
+      text += "It's just one single very long line. "
+      text += "The widget has to find appropriate places to break that long 
text into lines."
+
+      UI.OpenDialog(
+        VBox(
+          MinWidth( width, Label(Opt(:autoWrap), text) ),
+          PushButton("&OK")
+        )
+      )
+      UI.UserInput
+      UI.CloseDialog
+
+      nil
+    end
+  end
+end
+
+Yast::LabelAutoWrap1Client.new.main
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-ycp-ui-bindings-4.2.9/package/yast2-ycp-ui-bindings.changes 
new/yast2-ycp-ui-bindings-4.3.0/package/yast2-ycp-ui-bindings.changes
--- old/yast2-ycp-ui-bindings-4.2.9/package/yast2-ycp-ui-bindings.changes       
2020-01-23 17:53:14.000000000 +0100
+++ new/yast2-ycp-ui-bindings-4.3.0/package/yast2-ycp-ui-bindings.changes       
2020-06-08 12:26:06.000000000 +0200
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Thu Jun  4 11:52:17 UTC 2020 - Stefan Hundhammer <[email protected]>
+
+- Added widget option autoWrap for label widget (bsc#1172513) 
+- Require libyui.so.12
+- 4.3.10
+
+-------------------------------------------------------------------
 Thu Jan 23 16:47:02 UTC 2020 - Imobach Gonzalez Sosa <[email protected]>
 
 - Add support for the option to enable the online search
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-ycp-ui-bindings-4.2.9/package/yast2-ycp-ui-bindings.spec 
new/yast2-ycp-ui-bindings-4.3.0/package/yast2-ycp-ui-bindings.spec
--- old/yast2-ycp-ui-bindings-4.2.9/package/yast2-ycp-ui-bindings.spec  
2020-01-23 17:53:14.000000000 +0100
+++ new/yast2-ycp-ui-bindings-4.3.0/package/yast2-ycp-ui-bindings.spec  
2020-06-08 12:26:06.000000000 +0200
@@ -16,11 +16,11 @@
 #
 
 # YUIWidget_CustomStatusItemSelector
-%define min_yui_version        3.9.1
-%define yui_so         11
+%define min_yui_version        3.10.0
+%define yui_so         12
 
 Name:           yast2-ycp-ui-bindings
-Version:        4.2.9
+Version:        4.3.0
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-ycp-ui-bindings-4.2.9/src/YCPDialogParser.cc 
new/yast2-ycp-ui-bindings-4.3.0/src/YCPDialogParser.cc
--- old/yast2-ycp-ui-bindings-4.2.9/src/YCPDialogParser.cc      2020-01-23 
17:53:14.000000000 +0100
+++ new/yast2-ycp-ui-bindings-4.3.0/src/YCPDialogParser.cc      2020-06-08 
12:26:06.000000000 +0200
@@ -1196,6 +1196,7 @@
  * @class      YLabel
  * @arg                string label
  * @option     outputField make the label look like an input field in 
read-only mode
+ * @option     autoWrap automatic word wrapping (use with caution!)
  * @option     boldFont use a bold font
  *
  * @example    Label1.rb
@@ -1211,6 +1212,16 @@
  * A <tt>Label</tt> is static text displayed in the dialog.
  * A <tt>Heading</tt> is static text with a bold and/or larger font.
  * In both cases, the text may contain newlines.
+ *
+ * The <tt>autoWrap</tt> option makes the label wrap words automatically: Any
+ * whitespace between words is normalized to a single blank, and then newlines
+ * are added as needed to make it fit into its assigned width. The height
+ * changes accordingly. An auto-wrap label does not have a reasonable preferred
+ * width, so it is strongly advised to put it into a MinWidth container widget
+ * or otherwise enforce a reasonable width from the outside. A dialog with many
+ * auto-wrapping labels might have trouble finding a reasonable geometry to
+ * accomodate all widgets, so use this option sparingly. In particular, do not
+ * simply add this option to all labels; this is bound to fail.
  **/
 
 YWidget *
@@ -1228,10 +1239,12 @@
     // Parse options
 
     bool isOutputField = false;
+    bool autoWrap      = false;
 
     for ( int o=0; o < optList->size(); o++ )
     {
-       if ( optList->value(o)->isSymbol() && 
optList->value(o)->asSymbol()->symbol() == YUIOpt_outputField ) isOutputField = 
true;
+       if      ( optList->value(o)->isSymbol() && 
optList->value(o)->asSymbol()->symbol() == YUIOpt_outputField ) isOutputField = 
true;
+       else if ( optList->value(o)->isSymbol() && 
optList->value(o)->asSymbol()->symbol() == YUIOpt_autoWrap    ) autoWrap      = 
true;
        else logUnknownOption( term, optList->value(o) );
     }
 
@@ -1245,6 +1258,9 @@
     if ( opt.boldFont.value() )
        label->setUseBoldFont();
 
+    if ( autoWrap )
+        label->setAutoWrap();
+
     return label;
 }
 


Reply via email to