Hello community,

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

Package is "libyui"

Wed Jun 10 00:38:01 2020 rev:51 rq:811535 version:3.10.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/libyui/libyui.changes    2020-03-01 
21:26:47.616407731 +0100
+++ /work/SRC/openSUSE:Factory/.libyui.new.3606/libyui.changes  2020-06-10 
00:38:19.057382362 +0200
@@ -1,0 +2,7 @@
+Thu Jun  4 11:11:20 UTC 2020 - Stefan Hundhammer <[email protected]>
+
+- Added autoWrap to label widget (bsc#1172513)
+- Bumped SO version to 12
+- 3.10.0
+
+-------------------------------------------------------------------

Old:
----
  libyui-3.9.3.tar.bz2

New:
----
  libyui-3.10.0.tar.bz2

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

Other differences:
------------------
++++++ libyui-doc.spec ++++++
--- /var/tmp/diff_new_pack.jQua15/_old  2020-06-10 00:38:20.965387480 +0200
+++ /var/tmp/diff_new_pack.jQua15/_new  2020-06-10 00:38:20.969387491 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package libyui-doc
 #
-# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,15 +12,15 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 %define parent libyui
-%define so_version 11
+%define so_version 12
 
 Name:           %{parent}-doc
-Version:        3.9.3
+Version:        3.10.0
 Release:        0
 Source:         %{parent}-%{version}.tar.bz2
 
@@ -34,7 +34,7 @@
 BuildRequires:  libyui-devel >= 3.0.4
 BuildRequires:  texlive-latex
 
-Url:            http://github.com/libyui/
+URL:            http://github.com/libyui/
 Summary:        Libyui documentation
 License:        LGPL-2.1-only OR LGPL-3.0-only
 Group:          Documentation/HTML

++++++ libyui.spec ++++++
--- /var/tmp/diff_new_pack.jQua15/_old  2020-06-10 00:38:20.985387534 +0200
+++ /var/tmp/diff_new_pack.jQua15/_new  2020-06-10 00:38:20.989387545 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package libyui
 #
-# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,16 +12,16 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 Name:           libyui
-Version:        3.9.3
+Version:        3.10.0
 Release:        0
 Source:         %{name}-%{version}.tar.bz2
 
-%define so_version 11
+%define so_version 12
 %define bin_name %{name}%{so_version}
 
 # optionally build with code coverage reporting,
@@ -44,7 +44,7 @@
 BuildRequires:  lcov
 %endif
 
-Url:            http://github.com/libyui/
+URL:            http://github.com/libyui/
 Summary:        GUI-abstraction library
 License:        LGPL-2.1-only OR LGPL-3.0-only
 Group:          System/Libraries
@@ -64,7 +64,7 @@
 Obsoletes:      yast2-libyui < 2.42.0
 Requires:       yui_backend = %{so_version}
 
-Url:            http://github.com/libyui/
+URL:            http://github.com/libyui/
 Summary:        Libyui - GUI-abstraction library
 Group:          System/Libraries
 
@@ -89,7 +89,7 @@
 Requires:       glibc-devel
 Requires:       libstdc++-devel
 
-Url:            http://github.com/libyui/
+URL:            http://github.com/libyui/
 Summary:        Libyui header files
 Group:          Development/Languages/C and C++
 

++++++ libyui-3.9.3.tar.bz2 -> libyui-3.10.0.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-3.9.3/SOURCECONF.cmake 
new/libyui-3.10.0/SOURCECONF.cmake
--- old/libyui-3.9.3/SOURCECONF.cmake   2020-02-17 12:10:52.000000000 +0100
+++ new/libyui-3.10.0/SOURCECONF.cmake  2020-06-04 13:53:49.000000000 +0200
@@ -189,13 +189,16 @@
 )
 
 SET( EXAMPLES_LIST
-  ComboBox1-editable.cc
+  AutoWrap1.cc
+  AutoWrap2.cc
   ComboBox1.cc
+  ComboBox1-editable.cc
   CustomStatusItemSelector1.cc
   HelloWorld.cc
   ItemSelector1.cc
   ItemSelector2-minimalistic.cc
   ManyWidgets.cc
+  MenuButtons.cc
   PollEvent.cc
   SelectionBox1.cc
   SelectionBox2.cc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-3.9.3/VERSION.cmake 
new/libyui-3.10.0/VERSION.cmake
--- old/libyui-3.9.3/VERSION.cmake      2020-02-17 12:10:52.000000000 +0100
+++ new/libyui-3.10.0/VERSION.cmake     2020-06-04 13:53:49.000000000 +0200
@@ -1,6 +1,6 @@
 SET( VERSION_MAJOR "3")
-SET( VERSION_MINOR "9" )
-SET( VERSION_PATCH "3" )
+SET( VERSION_MINOR "10" )
+SET( VERSION_PATCH "0" )
 SET( VERSION 
"${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${GIT_SHA1_VERSION}" )
 
 ##### This is need for the libyui core, ONLY.
@@ -8,7 +8,7 @@
 # Currently you must also change so_version in libyui.spec
 # *and also in **all** other* libyui-*.spec files in the other repositories.
 # Yes, such a design is suboptimal.
-SET( SONAME_MAJOR "11" )
-SET( SONAME_MINOR "1" )
+SET( SONAME_MAJOR "12" )
+SET( SONAME_MINOR "0" )
 SET( SONAME_PATCH "0" )
 SET( SONAME "${SONAME_MAJOR}.${SONAME_MINOR}.${SONAME_PATCH}" )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-3.9.3/examples/AutoWrap1.cc 
new/libyui-3.10.0/examples/AutoWrap1.cc
--- old/libyui-3.9.3/examples/AutoWrap1.cc      1970-01-01 01:00:00.000000000 
+0100
+++ new/libyui-3.10.0/examples/AutoWrap1.cc     2020-06-04 13:53:49.000000000 
+0200
@@ -0,0 +1,61 @@
+/*
+  Copyright (c) [2020] SUSE LLC
+
+  This library is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License as
+  published by the Free Software Foundation; either version 2.1 of the
+  License, or (at your option) version 3.0 of the License. This library
+  is distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+  License for more details. You should have received a copy of the GNU
+  Lesser General Public License along with this library; if not, write
+  to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+  Floor, Boston, MA 02110-1301 USA
+*/
+
+
+
+// Libyui example for auto-wrapping labels.
+//
+// Local Variables:
+//    compile-command: "g++ -I/usr/include/yui -lyui AutoWrap1.cc -o AutoWrap1"
+// End:
+
+#define YUILogComponent "example"
+#include "YUILog.h"
+
+#include "YUI.h"
+#include "YWidgetFactory.h"
+#include "YDialog.h"
+#include "YLayoutBox.h"
+#include "YAlignment.h"
+#include "YLabel.h"
+#include "YEvent.h"
+
+#include "LoremIpsum.h"
+
+using std::string;
+
+// This should also fit in NCurses 80x24.
+#define TEXT_LEN        986
+
+
+int main( int argc, char **argv )
+{
+    YUILog::setLogFileName( "/tmp/libyui-examples.log" );
+    YUILog::enableDebugLogging();
+
+    YWidgetFactory * fac = YUI::widgetFactory();
+    YDialog    * dialog  = fac->createPopupDialog();
+    YLayoutBox * vbox    = fac->createVBox( dialog );
+    YAlignment * mbox    = fac->createMarginBox( vbox, 1, 0.5 );
+    YAlignment * minSize = fac->createMinWidth( mbox, 74 );
+    YLabel     * label   = fac->createOutputField( minSize, loremIpsum( 
TEXT_LEN ) );
+    label->setAutoWrap();
+
+    fac->createPushButton( vbox, "&OK" );
+
+    dialog->waitForEvent();
+    dialog->destroy();
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-3.9.3/examples/AutoWrap2.cc 
new/libyui-3.10.0/examples/AutoWrap2.cc
--- old/libyui-3.9.3/examples/AutoWrap2.cc      1970-01-01 01:00:00.000000000 
+0100
+++ new/libyui-3.10.0/examples/AutoWrap2.cc     2020-06-04 13:53:49.000000000 
+0200
@@ -0,0 +1,104 @@
+/*
+  Copyright (c) [2020] SUSE LLC
+
+  This library is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License as
+  published by the Free Software Foundation; either version 2.1 of the
+  License, or (at your option) version 3.0 of the License. This library
+  is distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+  License for more details. You should have received a copy of the GNU
+  Lesser General Public License along with this library; if not, write
+  to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+  Floor, Boston, MA 02110-1301 USA
+*/
+
+
+
+// Libyui example for auto-wrapping labels.
+//
+// Local Variables:
+//    compile-command: "g++ -I/usr/include/yui -lyui AutoWrap1.cc -o AutoWrap1"
+// End:
+
+
+#include <algorithm>
+
+#define YUILogComponent "example"
+#include "YUILog.h"
+
+#include "YUI.h"
+#include "YWidgetFactory.h"
+#include "YDialog.h"
+#include "YLayoutBox.h"
+#include "YAlignment.h"
+#include "YLabel.h"
+#include "YEvent.h"
+
+#include "LoremIpsum.h"
+
+// This should also fit in NCurses 80x24.
+#define TEXT_LEN  250
+
+using std::string;
+
+
+string toPath ( const string & orig );
+
+
+int main( int argc, char **argv )
+{
+    YUILog::setLogFileName( "/tmp/libyui-examples.log" );
+    YUILog::enableDebugLogging();
+
+    YWidgetFactory * fac   = YUI::widgetFactory();
+    YDialog    * dialog    = fac->createPopupDialog();
+    YLayoutBox * vbox1     = fac->createVBox( dialog );
+    YAlignment * mbox      = fac->createMarginBox( vbox1, 1, 0.5 );
+    YAlignment * minSize   = fac->createMinWidth( mbox, 50 );
+    YLayoutBox * vbox2     = fac->createVBox( minSize );
+
+    YLabel     * label1    = fac->createOutputField( vbox2, loremIpsum( 
TEXT_LEN ) );
+    fac->createVSpacing( vbox2, 0.3 );
+    YLabel     * label2    = fac->createOutputField( vbox2, toPath( 
loremIpsum( TEXT_LEN ) ) );
+    fac->createVSpacing( vbox2, 0.3 );
+    YLabel     * label3    = fac->createOutputField( vbox2, loremIpsum( 
TEXT_LEN ) );
+    label1->setAutoWrap();
+    label2->setAutoWrap();
+    label3->setAutoWrap();
+
+    fac->createPushButton( vbox1, "&OK" );
+
+    dialog->waitForEvent();
+    dialog->destroy();
+}
+
+
+string toPath( const string & orig )
+{
+    string path;
+    path.reserve( orig.size() );
+
+    for ( char c: orig )
+    {
+        switch ( c )
+        {
+            case ' ':
+            case '\n':
+                path += "/";
+                break;
+
+            case '.':
+            case ',':
+                break;
+
+            default:
+                path += c;
+                break;
+        }
+    }
+
+    return path;
+}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-3.9.3/examples/LoremIpsum.h 
new/libyui-3.10.0/examples/LoremIpsum.h
--- old/libyui-3.9.3/examples/LoremIpsum.h      1970-01-01 01:00:00.000000000 
+0100
+++ new/libyui-3.10.0/examples/LoremIpsum.h     2020-06-04 13:53:49.000000000 
+0200
@@ -0,0 +1,82 @@
+/*
+  Copyright (c) [2020] SUSE LLC
+  
+  This library is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License as
+  published by the Free Software Foundation; either version 2.1 of the
+  License, or (at your option) version 3.0 of the License. This library
+  is distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+  License for more details. You should have received a copy of the GNU
+  Lesser General Public License along with this library; if not, write
+  to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+  Floor, Boston, MA 02110-1301 USA
+*/
+
+
+#ifndef LoremIpsum_h
+#define LoremIpsum_h
+
+#include <string>
+
+/**
+ * Return a text of length 'len' of the "lorem ipsum" text below.
+ * A length of -1 returns the complete text.
+ **/
+std::string loremIpsum( int len = -1 );
+
+
+std::string loremIpsumLong =
+    // Generated by https://loremipsum.io/generator/
+    "Lörem üpsum dolör sit amet, consectetür ädipiscing elit, sed dö "
+    "eiusmod tempor incididunt ut labore et dolore magna aliqua. Quis "
+    "commodo odio aenean sed adipiscing diam donec adipiscing "
+    "tristique. Fermentum posuere urna nec tincidunt praesent semper. Cras "
+    "fermentum odio eu feugiat pretium nibh ipsum consequat nisl. Ac felis "
+    "donec et odio. Semper eget duis at tellus at urna condimentum. "
+    "Pellentesque massa placerat duis ultricies lacus sed turpis. Aliquam "
+    "id diam maecenas ultricies mi eget mauris pharetra. Vulputate odio ut "
+    "enim blandit. Sit amet aliquam id diam maecenas ultricies mi. Mi sit "
+    "amet mauris commodo. Velit aliquet sagittis id consectetur purus "
+    "ut. Nam at lectus urna duis. Cras semper auctor neque vitae "
+    "tempus. Tristique et egestas quis ipsum suspendisse ultrices."
+    "\n"
+    "Auctor elit sed vulputate mi sit amet mauris commodo. Nunc eget lorem "
+    "dolor sed viverra ipsum. Id donec ultrices tincidunt arcu non "
+    "sodales. Eget felis eget nunc lobortis mattis aliquam faucibus "
+    "purus. Sit amet consectetur adipiscing elit. Faucibus et molestie ac "
+    "feugiat sed lectus vestibulum. Vel quam elementum pulvinar etiam "
+    "non. Ridiculus mus mauris vitae ultricies. Senectus et netus et "
+    "malesuada fames ac turpis egestas. Id leo in vitae turpis massa. "
+    "Condimentum lacinia quis vel eros. Porttitor massa id neque aliquam "
+    "vestibulum morbi. Vel eros donec ac odio tempor orci. Nec sagittis "
+    "aliquam malesuada bibendum. Tincidunt vitae semper quis lectus nulla "
+    "at volutpat diam ut. Vel pharetra vel turpis nunc eget lorem dolor "
+    "sed."
+    "\n"
+    "Ultricies integer quis auctor elit sed vulputate mi sit. Vel elit "
+    "scelerisque mauris pellentesque. Consequat id porta nibh venenatis "
+    "cras sed felis eget velit. Ornare massa eget egestas purus viverra. "
+    "Curabitur gravida arcu ac tortor dignissim convallis aenean et "
+    "tortor. Mauris vitae ultricies leo integer. Pellentesque eu tincidunt "
+    "tortor aliquam nulla facilisi. Consectetur a erat nam at lectus. Amet "
+    "tellus cras adipiscing enim eu turpis egestas pretium. Vehicula ipsum "
+    "a arcu cursus vitae. Massa sapien faucibus et molestie ac feugiat sed "
+    "lectus vestibulum. Turpis egestas sed tempus urna et. Iaculis eu non "
+    "diam phasellus. Consectetur lorem donec massa sapien. Lobortis "
+    "elementum nibh tellus molestie nunc non. Eget mauris pharetra et "
+    "ultrices neque ornare aenean euismod. Nec tincidunt praesent semper "
+    "feugiat. In massa tempor nec feugiat nisl.";
+
+
+std::string loremIpsum( int len )
+{
+    if ( len < 1 )
+        return loremIpsumLong;
+    else
+        return loremIpsumLong.substr( 0, len );
+}
+
+
+#endif // LoremIpsum_h
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-3.9.3/package/libyui-doc.spec 
new/libyui-3.10.0/package/libyui-doc.spec
--- old/libyui-3.9.3/package/libyui-doc.spec    2020-02-17 12:10:52.000000000 
+0100
+++ new/libyui-3.10.0/package/libyui-doc.spec   2020-06-04 13:53:49.000000000 
+0200
@@ -17,10 +17,10 @@
 
 
 %define parent libyui
-%define so_version 11
+%define so_version 12
 
 Name:           %{parent}-doc
-Version:        3.9.3
+Version:        3.10.0
 Release:        0
 Source:         %{parent}-%{version}.tar.bz2
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-3.9.3/package/libyui.changes 
new/libyui-3.10.0/package/libyui.changes
--- old/libyui-3.9.3/package/libyui.changes     2020-02-17 12:10:52.000000000 
+0100
+++ new/libyui-3.10.0/package/libyui.changes    2020-06-04 13:53:49.000000000 
+0200
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Thu Jun  4 11:11:20 UTC 2020 - Stefan Hundhammer <[email protected]>
+
+- Added autoWrap to label widget (bsc#1172513)
+- Bumped SO version to 12
+- 3.10.0
+
+-------------------------------------------------------------------
 Mon Feb 17 10:57:55 UTC 2020 - Stefan Hundhammer <[email protected]>
 
 - Removed obsolete old RPM group tags (bsc#1163594)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-3.9.3/package/libyui.spec 
new/libyui-3.10.0/package/libyui.spec
--- old/libyui-3.9.3/package/libyui.spec        2020-02-17 12:10:52.000000000 
+0100
+++ new/libyui-3.10.0/package/libyui.spec       2020-06-04 13:53:49.000000000 
+0200
@@ -16,11 +16,11 @@
 #
 
 Name:           libyui
-Version:        3.9.3
+Version:        3.10.0
 Release:        0
 Source:         %{name}-%{version}.tar.bz2
 
-%define so_version 11
+%define so_version 12
 %define bin_name %{name}%{so_version}
 
 # optionally build with code coverage reporting,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-3.9.3/src/YDialog.cc 
new/libyui-3.10.0/src/YDialog.cc
--- old/libyui-3.9.3/src/YDialog.cc     2020-02-17 12:10:52.000000000 +0100
+++ new/libyui-3.10.0/src/YDialog.cc    2020-06-04 13:53:49.000000000 +0200
@@ -50,6 +50,8 @@
        , shortcutCheckPostponed( false )
        , defaultButton( 0 )
        , isOpen( false )
+        , multiPassLayout( false )
+        , layoutPass( 0 )
        , lastEvent( 0 )
        {}
 
@@ -58,6 +60,8 @@
     bool               shortcutCheckPostponed;
     YPushButton *      defaultButton;
     bool               isOpen;
+    bool                multiPassLayout;
+    int                 layoutPass;
     YEvent *           lastEvent;
     YEventFilterList   eventFilterList;
 };
@@ -344,7 +348,7 @@
 #endif
 
     // Trigger geometry management
-    setSize( preferredWidth(), preferredHeight() );
+    doLayout();
 }
 
 
@@ -352,8 +356,30 @@
 YDialog::recalcLayout()
 {
     yuiDebug() << "Recalculating layout for " << this << endl;
+    doLayout();
+}
+
 
+void
+YDialog::doLayout()
+{
+    priv->layoutPass = 1;
     setSize( preferredWidth(), preferredHeight() );
+
+    if ( priv->multiPassLayout )
+    {
+        priv->layoutPass = 2;
+        setSize( preferredWidth(), preferredHeight() );
+    }
+
+    priv->layoutPass = 0;
+}
+
+
+int
+YDialog::layoutPass() const
+{
+    return priv->layoutPass;
 }
 
 
@@ -631,3 +657,12 @@
     return event;
 }
 
+
+void
+YDialog::requestMultiPassLayout()
+{
+    if ( ! priv->multiPassLayout )
+        yuiDebug() << "Multiple layout passes requested" << endl;
+
+    priv->multiPassLayout = true;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-3.9.3/src/YDialog.h 
new/libyui-3.10.0/src/YDialog.h
--- old/libyui-3.9.3/src/YDialog.h      2020-02-17 12:10:52.000000000 +0100
+++ new/libyui-3.10.0/src/YDialog.h     2020-06-04 13:53:49.000000000 +0200
@@ -143,6 +143,28 @@
     bool isTopmostDialog() const;
 
     /**
+     * Request multiple passes of the layout engine.
+     *
+     * This is intended for widgets that don't know their preferred width and
+     * height immediately because one depends on the other, for example labels
+     * with auto-wrapping: They know (roughly) the area they will need, but
+     * they can calculate their preferred height only when their width is
+     * known.
+     *
+     * Once set, this option cannot be unset; it remains set for the life
+     * time of the dialog.
+     **/
+    void requestMultiPassLayout();
+
+    /**
+     * Return the number of the current layout pass:
+     *   0: No layout going on right now
+     *   1: First pass
+     *   2: Second pass of a multi-pass layout
+     **/
+    int layoutPass() const;
+
+    /**
      * Close and delete this dialog (and all its children) if it is the topmost
      * dialog. If this is not the topmost dialog, this will throw an exception
      * if 'doThrow' is true (default).
@@ -379,6 +401,11 @@
     virtual void openInternal() = 0;
 
     /**
+     * Calculate the layout and set the size of the dialog and all widgets.
+     **/
+    void doLayout();
+
+    /**
      * Wait for a user event.
      *
      * Derived classes are required to implement this.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-3.9.3/src/YLabel.cc 
new/libyui-3.10.0/src/YLabel.cc
--- old/libyui-3.9.3/src/YLabel.cc      2020-02-17 12:10:52.000000000 +0100
+++ new/libyui-3.10.0/src/YLabel.cc     2020-06-04 13:53:49.000000000 +0200
@@ -29,6 +29,7 @@
 #include "YUILog.h"
 
 #include "YUISymbols.h"
+#include "YDialog.h"
 #include "YLabel.h"
 
 using std::string;
@@ -46,19 +47,21 @@
        , isHeading( isHeading )
        , isOutputField( isOutputField )
        , useBoldFont( false )
+        , autoWrap( false )
        {}
 
     string     text;
     bool       isHeading;
     bool       isOutputField;
     bool       useBoldFont;
+    bool        autoWrap;
 };
 
 
-YLabel::YLabel( YWidget *              parent,
+YLabel::YLabel( YWidget *      parent,
                const string &  text,
-               bool                    isHeading,
-               bool                    isOutputField )
+               bool            isHeading,
+               bool            isOutputField )
     : YWidget( parent )
     , priv( new YLabelPrivate( text, isHeading, isOutputField ) )
 {
@@ -108,6 +111,37 @@
 }
 
 
+bool YLabel::autoWrap() const
+{
+    return priv->autoWrap;
+}
+
+
+void YLabel::setAutoWrap( bool autoWrap )
+{
+    priv->autoWrap = autoWrap;
+
+    if ( autoWrap )
+    {
+        YDialog * dialog = findDialog();
+
+        if ( dialog )
+            dialog->requestMultiPassLayout();
+    }
+
+    setStretchable( YD_HORIZ, autoWrap );
+    setStretchable( YD_VERT,  autoWrap );
+}
+
+
+int YLabel::layoutPass()
+{
+    const YDialog * dialog = findDialog();
+
+    return dialog ? dialog->layoutPass() : 0;
+}
+
+
 const YPropertySet &
 YLabel::propertySet()
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-3.9.3/src/YLabel.h 
new/libyui-3.10.0/src/YLabel.h
--- old/libyui-3.9.3/src/YLabel.h       2020-02-17 12:10:52.000000000 +0100
+++ new/libyui-3.10.0/src/YLabel.h      2020-06-04 13:53:49.000000000 +0200
@@ -123,6 +123,27 @@
     virtual void setUseBoldFont( bool bold = true );
 
     /**
+     * Return 'true' if automatic word wrapping is enabled.
+     **/
+    bool autoWrap() const;
+
+    /**
+     * Enable or disable automatic word wrapping.
+     *
+     * This has implications for geometry management: An auto-wrapping label
+     * does not have any reasonable preferred size; it needs to be put into a
+     * parent widget (like a MinSize) that enforces a reasonable width. The
+     * height can be then be calculated from that width.
+     *
+     * Changing this setting takes only effect after the next layout geometry
+     * calculation.
+     *
+     * Derived classes should overwrite this, but call this base class function
+     * in the overwritten function.
+     **/
+    virtual void setAutoWrap( bool autoWrap = true );
+
+    /**
      * Set a property.
      * Reimplemented from YWidget.
      *
@@ -163,6 +184,17 @@
      **/
     virtual std::string debugLabel() const;
 
+protected:
+
+    /**
+     * Convenience method for the parent dialog's layoutPass():
+     * Return the number of the current layout pass.
+     *   0: No layout going on right now
+     *   1: First pass
+     *   2: Second pass of a multi-pass layout
+     **/
+    int layoutPass();
+
 private:
 
     ImplPtr<YLabelPrivate> priv;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-3.9.3/src/YUISymbols.h 
new/libyui-3.10.0/src/YUISymbols.h
--- old/libyui-3.9.3/src/YUISymbols.h   2020-02-17 12:10:52.000000000 +0100
+++ new/libyui-3.10.0/src/YUISymbols.h  2020-06-04 13:53:49.000000000 +0200
@@ -212,6 +212,7 @@
 // Widget and dialog options
 
 #define YUIOpt_animated                                "animated"
+#define YUIOpt_autoWrap                         "autoWrap"
 #define YUIOpt_applyButton                     "applyButton"
 #define YUIOpt_autoScrollDown                  "autoScrollDown"
 #define YUIOpt_autoShortcut                    "autoShortcut"


Reply via email to