Hello community,

here is the log from the commit of package libyui for openSUSE:Factory checked 
in at 2019-12-14 12:03:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libyui (Old)
 and      /work/SRC/openSUSE:Factory/.libyui.new.4691 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libyui"

Sat Dec 14 12:03:11 2019 rev:47 rq:755571 version:3.9.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/libyui/libyui.changes    2019-11-20 
10:26:23.262552124 +0100
+++ /work/SRC/openSUSE:Factory/.libyui.new.4691/libyui.changes  2019-12-14 
12:04:05.967396518 +0100
@@ -1,0 +2,7 @@
+Fri Nov 29 14:38:54 UTC 2019 - Rodion Iafarov <[email protected]>
+
+- Add support to operate on many widgets with rest-api (bsc#1132247)
+- Increase SO version to 11
+- 3.9.0
+
+-------------------------------------------------------------------
@@ -1010 +1016,0 @@
-
@@ -1104 +1109,0 @@
-
@@ -1111 +1115,0 @@
-
@@ -1114 +1117,0 @@
-
@@ -1120 +1122,0 @@
-
@@ -1154 +1155,0 @@
-
@@ -1178 +1178,0 @@
-
@@ -1196 +1195,0 @@
-
@@ -1204 +1202,0 @@
-
@@ -1209 +1206,0 @@
-
@@ -1226 +1222,0 @@
-
@@ -1247 +1242,0 @@
-
@@ -1266 +1260,0 @@
-

Old:
----
  libyui-3.8.5.tar.bz2

New:
----
  libyui-3.9.0.tar.bz2

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

Other differences:
------------------
++++++ libyui-doc.spec ++++++
--- /var/tmp/diff_new_pack.Fdr8MO/_old  2019-12-14 12:04:06.615396405 +0100
+++ /var/tmp/diff_new_pack.Fdr8MO/_new  2019-12-14 12:04:06.619396405 +0100
@@ -17,10 +17,10 @@
 
 
 %define parent libyui
-%define so_version 10
+%define so_version 11
 
 Name:           %{parent}-doc
-Version:        3.8.5
+Version:        3.9.0
 Release:        0
 Source:         %{parent}-%{version}.tar.bz2
 

++++++ libyui.spec ++++++
--- /var/tmp/diff_new_pack.Fdr8MO/_old  2019-12-14 12:04:06.631396403 +0100
+++ /var/tmp/diff_new_pack.Fdr8MO/_new  2019-12-14 12:04:06.631396403 +0100
@@ -17,11 +17,11 @@
 
 
 Name:           libyui
-Version:        3.8.5
+Version:        3.9.0
 Release:        0
 Source:         %{name}-%{version}.tar.bz2
 
-%define so_version 10
+%define so_version 11
 %define bin_name %{name}%{so_version}
 
 # optionally build with code coverage reporting,

++++++ libyui-3.8.5.tar.bz2 -> libyui-3.9.0.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-3.8.5/VERSION.cmake 
new/libyui-3.9.0/VERSION.cmake
--- old/libyui-3.8.5/VERSION.cmake      2019-11-13 15:29:39.000000000 +0100
+++ new/libyui-3.9.0/VERSION.cmake      2019-12-10 14:22:52.000000000 +0100
@@ -1,6 +1,6 @@
 SET( VERSION_MAJOR "3")
-SET( VERSION_MINOR "8" )
-SET( VERSION_PATCH "5" )
+SET( VERSION_MINOR "9" )
+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 "10" )
+SET( SONAME_MAJOR "11" )
 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.8.5/package/libyui-doc.spec 
new/libyui-3.9.0/package/libyui-doc.spec
--- old/libyui-3.8.5/package/libyui-doc.spec    2019-11-13 15:29:39.000000000 
+0100
+++ new/libyui-3.9.0/package/libyui-doc.spec    2019-12-10 14:22:52.000000000 
+0100
@@ -17,10 +17,10 @@
 
 
 %define parent libyui
-%define so_version 10
+%define so_version 11
 
 Name:           %{parent}-doc
-Version:        3.8.5
+Version:        3.9.0
 Release:        0
 Source:         %{parent}-%{version}.tar.bz2
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-3.8.5/package/libyui.changes 
new/libyui-3.9.0/package/libyui.changes
--- old/libyui-3.8.5/package/libyui.changes     2019-11-13 15:29:39.000000000 
+0100
+++ new/libyui-3.9.0/package/libyui.changes     2019-12-10 14:22:52.000000000 
+0100
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Fri Nov 29 14:38:54 UTC 2019 - Rodion Iafarov <[email protected]>
+
+- Add support to operate on many widgets with rest-api (bsc#1132247)
+- Increase SO version to 11
+- 3.9.0
+
+-------------------------------------------------------------------
 Wed Nov 13 14:06:51 UTC 2019 - Stefan Hundhammer <[email protected]>
 
 - Don't use tab in string literal
@@ -31,7 +38,7 @@
 
 - Added CurrentItem property to new ItemSelector widget for consistency
   (bsc#1084674)
-- 3.8.1 
+- 3.8.1
 
 -------------------------------------------------------------------
 Thu Sep 19 09:34:27 UTC 2019 - Stefan Hundhammer <[email protected]>
@@ -1007,7 +1014,6 @@
 
   perl -p -i -e 's/getNotify/notify/g' *.cc pkg/*.c
 
-
 * Added function key methods for NCurses F-key support:
 
   - YWidget::functionKey()
@@ -1101,23 +1107,19 @@
 
   This had cluttered the API for a long time.
 
-
 * Got rid of all YCP data types in all widget classes:
 
     * YCPString                -> std::string
     * YCPInteger       -> int
     * YCPBoolean       -> bool
 
-
 * In function parameters, std::string is generally passed as const std::string 
& .
 
-
 * All widgets: No longer implementing changeWidget() / queryWidget() directly,
   now using setProperty() / getProperty().
   Reason: No more YCP depencency in YWidget derived classes.
   See YRadioButton or YTextEntry for examples.
 
-
 * All widgets: widgetClass() now returns const char *, no longer char *
   (gcc had already complained in abuild about this)
   auto-replace this with:
@@ -1151,7 +1153,6 @@
 
   This doesn't do the work completely, but it's a good starting point.
 
-
 * All widgets: The parameters of YWidget::setSize() are now int, no longer 
long.
   The reasoning is the same as with long nicesize() vs. int preferredWidth().
 
@@ -1175,7 +1176,6 @@
   gcc should complain about missing places. Also remember to check for '%ld' in
   y2debug() etc. calls and replace most of them with '%d'.
 
-
 * Factories:
     * Derived UIs now are required to implement:
         * YWidgetFactory * createWidgetFactory()
@@ -1193,7 +1193,6 @@
   The idea of this class is to bundle all the "misc UI functionality" methods.
   See YApplication.h for details.
 
-
 * YDialog:
 
     * YUI::currentDialog() is now moved to YDialog::currentDialog()
@@ -1201,12 +1200,10 @@
       i.e. there is no more need to check for a 0 pointer after currentDialog()
       (but exceptions need to be caught somewhere)
 
-
 * YSplit:
 
    * renamed to YLayoutBox
 
-
 * YRadioButton:
 
     * Made all memeber variables private.
@@ -1223,7 +1220,6 @@
     * new method: useBoldFont()  (instead of YWidgetOpt::boldFont() )
     * new method: boldFont()
 
-
 * YTextEntry:
 
     * Made all memeber variables private.
@@ -1244,7 +1240,6 @@
     * overloaded virtual setInputMaxLength( int ) is now required to call
       YTextEntry::setInputMaxLength() at its end
 
-
 * YPushButton:
 
     * Made all memeber variables private.
@@ -1264,7 +1259,6 @@
   * no more std::vector<YRadioButton *> buttons,
     use iterators with buttonsBegin() and buttonsEnd() instead
 
-
 * YWidgetFactory:
   * createHeading()    is no longer virtual - remove from derived factory
   * createOutputField() is no longer virtual - remove from derived factory
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-3.8.5/package/libyui.spec 
new/libyui-3.9.0/package/libyui.spec
--- old/libyui-3.8.5/package/libyui.spec        2019-11-13 15:29:39.000000000 
+0100
+++ new/libyui-3.9.0/package/libyui.spec        2019-12-10 14:22:52.000000000 
+0100
@@ -16,11 +16,11 @@
 #
 
 Name:           libyui
-Version:        3.8.5
+Version:        3.9.0
 Release:        0
 Source:         %{name}-%{version}.tar.bz2
 
-%define so_version 10
+%define so_version 11
 %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.8.5/src/YDumbTab.h 
new/libyui-3.9.0/src/YDumbTab.h
--- old/libyui-3.8.5/src/YDumbTab.h     2019-11-13 15:29:39.000000000 +0100
+++ new/libyui-3.9.0/src/YDumbTab.h     2019-12-10 14:22:52.000000000 +0100
@@ -143,6 +143,13 @@
      **/
     virtual std::string debugLabel() const;
 
+    /**
+    * Activate selected tab. Can be used in tests to simulate user input.
+    *
+    * Derived classes are required to implement this.
+    **/
+    virtual void activate() = 0;
+
 private:
 
     // Disable unwanted base class methods
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-3.8.5/src/YItemSelector.h 
new/libyui-3.9.0/src/YItemSelector.h
--- old/libyui-3.8.5/src/YItemSelector.h        2019-11-13 15:29:39.000000000 
+0100
+++ new/libyui-3.9.0/src/YItemSelector.h        2019-12-10 14:22:52.000000000 
+0100
@@ -186,6 +186,12 @@
      **/
     const char * userInputProperty() { return YUIProperty_Value; }
 
+    /**
+     * Activate selected item. Can be used in tests to simulate user input.
+     *
+     * Derived classes are required to implement this.
+     **/
+    virtual void activateItem( YItem * item ) = 0;
 
 protected:
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-3.8.5/src/YMenuButton.cc 
new/libyui-3.9.0/src/YMenuButton.cc
--- old/libyui-3.8.5/src/YMenuButton.cc 2019-11-13 15:29:39.000000000 +0100
+++ new/libyui-3.9.0/src/YMenuButton.cc 2019-12-10 14:22:52.000000000 +0100
@@ -264,3 +264,41 @@
        return YWidget::getProperty( propertyName );
     }
 }
+
+
+YMenuItem *
+YMenuButton::findItem( std::vector<std::string> & path ) const
+{
+    return findItem( path.begin(), path.end(), itemsBegin(), itemsEnd());
+}
+
+YMenuItem *
+YMenuButton::findItem( std::vector<std::string>::iterator path_begin,
+                       std::vector<std::string>::iterator path_end,
+                       YItemConstIterator begin,
+                       YItemConstIterator end ) const
+{
+    for ( YItemConstIterator it = begin; it != end; ++it )
+    {
+        YMenuItem * item = dynamic_cast<YMenuItem *>(*it);
+        // Test that dynamic_cast didn't fail
+        if ( !item )
+            return nullptr;
+
+        if( item->label() == *path_begin )
+        {
+            if ( std::next(path_begin) == path_end ) {
+                // Only return items which can trigger action, intermediate 
items only open nested popup, so continue looking
+                if( item->hasChildren() )
+                    continue;
+
+                return item;
+            }
+            // Look in child nodes and return if found one
+            YMenuItem * result = findItem( ++path_begin, path_end, 
item->childrenBegin(), item->childrenEnd() );
+            if ( result )
+                return result;
+        }
+    }
+    return nullptr;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-3.8.5/src/YMenuButton.h 
new/libyui-3.9.0/src/YMenuButton.h
--- old/libyui-3.8.5/src/YMenuButton.h  2019-11-13 15:29:39.000000000 +0100
+++ new/libyui-3.9.0/src/YMenuButton.h  2019-12-10 14:22:52.000000000 +0100
@@ -153,7 +153,20 @@
      **/
     virtual const YPropertySet & propertySet();
 
-protected:
+    /**
+     * Return item in the tree which matches path of labels or nullptr in case 
no
+     * item with such label was found and is a leaf, as other nodes do not 
trigger
+     * actions except showing children items.
+     * Accepts vector of strings which denote path to the node.
+     **/
+    YMenuItem * findItem( std::vector<std::string> & path ) const;
+
+    /**
+    * Activate the item selected in the tree. Can be used in tests to simulate 
user input.
+    *
+    * Derived classes are required to implement this.
+    **/
+    virtual void activateItem( YMenuItem * item ) = 0;
 
     /**
      * Recursively find the first menu item with the specified index.
@@ -161,6 +174,8 @@
      **/
     YMenuItem * findMenuItem( int index );
 
+protected:
+
     /**
      * Recursively find the first menu item with the specified index
      * from iterator 'begin' to iterator 'end'.
@@ -170,6 +185,19 @@
     YMenuItem * findMenuItem( int index, YItemConstIterator begin, 
YItemConstIterator end );
 
     /**
+     * Recursively looks for the first item in the tree of the menu items
+     * using depth first search.
+     * Return nullptr if item which matches full path is not found.
+     * Path is a vector of strings, where next element is a child item, so
+     * in case one needs to select File->Export->As PDF, for instance,
+     * Vector will look like [ "File", "Export", "As PDF" ].
+     */
+    YMenuItem * findItem( std::vector<std::string>::iterator path_begin,
+                          std::vector<std::string>::iterator path_end,
+                          YItemConstIterator begin,
+                          YItemConstIterator end ) const;
+
+    /**
      * Alias for findMenuItem(). Reimplemented to ensure consistent behaviour
      * with YSelectionWidget::itemAt().
      **/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-3.8.5/src/YRichText.h 
new/libyui-3.9.0/src/YRichText.h
--- old/libyui-3.8.5/src/YRichText.h    2019-11-13 15:29:39.000000000 +0100
+++ new/libyui-3.9.0/src/YRichText.h    2019-12-10 14:22:52.000000000 +0100
@@ -206,6 +206,12 @@
      */
     virtual void setHScrollValue( const std::string & newValue );
 
+    /**
+     * Derived classes should implement this, method is used to trigger event
+     * like user has pressed the link in the RichText
+     **/
+    virtual void activateLink( const std::string & url ) = 0;
+
 protected:
 
     ImplPtr<YRichTextPrivate> priv;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-3.8.5/src/YTree.cc 
new/libyui-3.9.0/src/YTree.cc
--- old/libyui-3.8.5/src/YTree.cc       2019-11-13 15:29:39.000000000 +0100
+++ new/libyui-3.9.0/src/YTree.cc       2019-12-10 14:22:52.000000000 +0100
@@ -169,3 +169,40 @@
 {
     return ! YSelectionWidget::enforceSingleSelection();
 }
+
+
+YTreeItem *
+YTree::findItem( std::vector<std::string> & path ) const
+{
+    return findItem( path.begin(), path.end(), itemsBegin(), itemsEnd());
+}
+
+
+YTreeItem *
+YTree::findItem( std::vector<std::string>::iterator path_begin,
+                       std::vector<std::string>::iterator path_end,
+                       YItemConstIterator begin,
+                       YItemConstIterator end ) const
+{
+    for ( YItemConstIterator it = begin; it != end; ++it )
+    {
+        YTreeItem * item = dynamic_cast<YTreeItem *>(*it);
+        // Test that dynamic_cast didn't fail
+        if (!item)
+            return nullptr;
+
+        if( item->label() == *path_begin )
+        {
+            if ( std::next(path_begin) == path_end )
+            {
+                return item;
+            }
+            // Look in child nodes and return if found one
+            YTreeItem * result = findItem( ++path_begin, path_end, 
item->childrenBegin(), item->childrenEnd() );
+            if ( result )
+                return result;
+        }
+    }
+
+    return nullptr;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-3.8.5/src/YTree.h new/libyui-3.9.0/src/YTree.h
--- old/libyui-3.8.5/src/YTree.h        2019-11-13 15:29:39.000000000 +0100
+++ new/libyui-3.9.0/src/YTree.h        2019-12-10 14:22:52.000000000 +0100
@@ -61,6 +61,15 @@
      **/
     YTree( YWidget * parent, const std::string & label, bool multiSelection, 
bool recursiveSelection);
 
+    /**
+     * Recursively looks for the first item in the tree of the menu items
+     * using depth first search.
+     * Return nullptr if item which matches full path is not found.
+     */
+    YTreeItem * findItem( std::vector<std::string>::iterator path_begin,
+                          std::vector<std::string>::iterator path_end,
+                          YItemConstIterator begin,
+                          YItemConstIterator end ) const;
 public:
     /**
      * Destructor.
@@ -172,6 +181,20 @@
      **/
     virtual YTreeItem * currentItem() = 0;
 
+    /**
+     * Return item in the tree which matches path of labels or nullptr in case 
no
+     * item with such label was found.
+     * Accepts vector of strings which denote path to the node.
+     **/
+    YTreeItem * findItem( std::vector<std::string> & path ) const;
+
+    /**
+    * Activate the item selected in the tree. Can be used in tests to simulate 
user input.
+    *
+    * Derived classes are required to implement this.
+    **/
+    virtual void activate() = 0;
+
 
 private:
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-3.8.5/src/YTreeItem.h 
new/libyui-3.9.0/src/YTreeItem.h
--- old/libyui-3.8.5/src/YTreeItem.h    2019-11-13 15:29:39.000000000 +0100
+++ new/libyui-3.9.0/src/YTreeItem.h    2019-12-10 14:22:52.000000000 +0100
@@ -27,8 +27,6 @@
 
 #include "YItem.h"
 
-
-
 /**
  * Item class for tree items.
  *


Reply via email to