Hello community,

here is the log from the commit of package libyui-ncurses-rest-api for 
openSUSE:Factory checked in at 2020-07-09 13:16:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libyui-ncurses-rest-api (Old)
 and      /work/SRC/openSUSE:Factory/.libyui-ncurses-rest-api.new.3060 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libyui-ncurses-rest-api"

Thu Jul  9 13:16:30 2020 rev:4 rq:819367 version:0.2.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/libyui-ncurses-rest-api/libyui-ncurses-rest-api.changes
  2020-06-10 00:39:46.409613423 +0200
+++ 
/work/SRC/openSUSE:Factory/.libyui-ncurses-rest-api.new.3060/libyui-ncurses-rest-api.changes
        2020-07-09 13:16:33.200735939 +0200
@@ -1,0 +2,7 @@
+Mon Jun  8 14:37:04 UTC 2020 - Rodion Iafarov <riafa...@suse.com>
+
+- Trigger update on YCombobox, YSelectionBox, YInputField,
+  YMultiSelectionBox (bsc#1139747)
+- Add support for YDateField and YTimeField
+- Add support for YCheckBoxFrame
+-------------------------------------------------------------------

Old:
----
  libyui-ncurses-rest-api-0.1.2.tar.bz2

New:
----
  libyui-ncurses-rest-api-0.2.0.tar.bz2

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

Other differences:
------------------
++++++ libyui-ncurses-rest-api.spec ++++++
--- /var/tmp/diff_new_pack.0dvQEO/_old  2020-07-09 13:16:33.832737937 +0200
+++ /var/tmp/diff_new_pack.0dvQEO/_new  2020-07-09 13:16:33.836737950 +0200
@@ -18,10 +18,10 @@
 
 %define so_version 12
 %define bin_name %{name}%{so_version}
-%define libyui_devel_version libyui-devel >= 3.6.0
+%define libyui_devel_version libyui-devel >= 3.8.0
 
 Name:           libyui-ncurses-rest-api
-Version:        0.1.2
+Version:        0.2.0
 Release:        0
 Summary:        Libyui - The REST API plugin for the Ncurses frontend
 License:        LGPL-2.1-only OR LGPL-3.0-only

++++++ libyui-ncurses-rest-api-0.1.2.tar.bz2 -> 
libyui-ncurses-rest-api-0.2.0.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-ncurses-rest-api-0.1.2/README.md 
new/libyui-ncurses-rest-api-0.2.0/README.md
--- old/libyui-ncurses-rest-api-0.1.2/README.md 2020-06-08 17:08:54.000000000 
+0200
+++ new/libyui-ncurses-rest-api-0.2.0/README.md 2020-07-08 09:29:24.000000000 
+0200
@@ -4,5 +4,8 @@
 bindings for the 
[libyui-ncurses](https://github.com/libyui/libyui-ncurses-rest-api)
 UI frontend.
 
+This package contains ncurses specific handling of the actions. Library is 
dynamically
+loaded based on UI being used by the YaST application.
+
 See the libyui REST API 
[documentation](https://github.com/libyui/libyui-rest-api)
 for more details.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-ncurses-rest-api-0.1.2/SOURCECONF.cmake 
new/libyui-ncurses-rest-api-0.2.0/SOURCECONF.cmake
--- old/libyui-ncurses-rest-api-0.1.2/SOURCECONF.cmake  2020-06-08 
17:08:54.000000000 +0200
+++ new/libyui-ncurses-rest-api-0.2.0/SOURCECONF.cmake  2020-07-08 
09:29:24.000000000 +0200
@@ -1,11 +1,13 @@
 SET( ${TARGETLIB}_SOURCES
  YNCHttpUI.cc
+ YNCHttpWidgetsActionHandler.cc
  NCHttpWidgetFactory.cc
  NCHttpDialog.cc
 )
 
 SET( ${TARGETLIB}_HEADERS
  YNCHttpUI.h
+ YNCHttpWidgetsActionHandler.h
  NCHttpDialog.h
  NCHttpWidgetFactory.h
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-ncurses-rest-api-0.1.2/VERSION.cmake 
new/libyui-ncurses-rest-api-0.2.0/VERSION.cmake
--- old/libyui-ncurses-rest-api-0.1.2/VERSION.cmake     2020-06-08 
17:08:54.000000000 +0200
+++ new/libyui-ncurses-rest-api-0.2.0/VERSION.cmake     2020-07-08 
09:29:24.000000000 +0200
@@ -1,6 +1,6 @@
 SET( VERSION_MAJOR "0")
-SET( VERSION_MINOR "1" )
-SET( VERSION_PATCH "2" )
+SET( VERSION_MINOR "2" )
+SET( VERSION_PATCH "0" )
 SET( VERSION 
"${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${GIT_SHA1_VERSION}" )
 
 ##### This is need for the libyui core ONLY.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libyui-ncurses-rest-api-0.1.2/package/libyui-ncurses-rest-api.changes 
new/libyui-ncurses-rest-api-0.2.0/package/libyui-ncurses-rest-api.changes
--- old/libyui-ncurses-rest-api-0.1.2/package/libyui-ncurses-rest-api.changes   
2020-06-08 17:08:54.000000000 +0200
+++ new/libyui-ncurses-rest-api-0.2.0/package/libyui-ncurses-rest-api.changes   
2020-07-08 09:29:24.000000000 +0200
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Mon Jun  8 14:37:04 UTC 2020 - Rodion Iafarov <riafa...@suse.com>
+
+- Trigger update on YCombobox, YSelectionBox, YInputField,
+  YMultiSelectionBox (bsc#1139747)
+- Add support for YDateField and YTimeField
+- Add support for YCheckBoxFrame
+-------------------------------------------------------------------
 Thu Jun  4 13:17:49 UTC 2020 - Stefan Hundhammer <shundham...@suse.com>
 
 - Use new parent lib SO version libyui.so.12 (bsc#1172513)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libyui-ncurses-rest-api-0.1.2/package/libyui-ncurses-rest-api.spec 
new/libyui-ncurses-rest-api-0.2.0/package/libyui-ncurses-rest-api.spec
--- old/libyui-ncurses-rest-api-0.1.2/package/libyui-ncurses-rest-api.spec      
2020-06-08 17:08:54.000000000 +0200
+++ new/libyui-ncurses-rest-api-0.2.0/package/libyui-ncurses-rest-api.spec      
2020-07-08 09:29:24.000000000 +0200
@@ -18,10 +18,10 @@
 
 %define so_version 12
 %define bin_name %{name}%{so_version}
-%define libyui_devel_version libyui-devel >= 3.6.0
+%define libyui_devel_version libyui-devel >= 3.8.0
 
 Name:           libyui-ncurses-rest-api
-Version:        0.1.2
+Version:        0.2.0
 Release:        0
 Summary:        Libyui - The REST API plugin for the Ncurses frontend
 License:        LGPL-2.1-only OR LGPL-3.0-only
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-ncurses-rest-api-0.1.2/src/YNCHttpUI.cc 
new/libyui-ncurses-rest-api-0.2.0/src/YNCHttpUI.cc
--- old/libyui-ncurses-rest-api-0.1.2/src/YNCHttpUI.cc  2020-06-08 
17:08:54.000000000 +0200
+++ new/libyui-ncurses-rest-api-0.2.0/src/YNCHttpUI.cc  2020-07-08 
09:29:24.000000000 +0200
@@ -23,6 +23,7 @@
 #include "NCHttpWidgetFactory.h"
 #include "NCHttpDialog.h"
 #include "YHttpServer.h"
+#include "YNCHttpWidgetsActionHandler.h"
 
 #define YUILogComponent "ncurses-rest-api"
 #include <yui/YUILog.h>
@@ -42,7 +43,7 @@
 
     if (!YHttpServer::yserver()) {
         yuiMilestone() << "Creating HTTP server" << std::endl;
-        YHttpServer * yserver = new YHttpServer();
+        YHttpServer * yserver = new YHttpServer( new 
YNCHttpWidgetsActionHandler() );
         yserver->start();
     }
     if ( ! YNCHttpUI::ui() )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libyui-ncurses-rest-api-0.1.2/src/YNCHttpWidgetsActionHandler.cc 
new/libyui-ncurses-rest-api-0.2.0/src/YNCHttpWidgetsActionHandler.cc
--- old/libyui-ncurses-rest-api-0.1.2/src/YNCHttpWidgetsActionHandler.cc        
1970-01-01 01:00:00.000000000 +0100
+++ new/libyui-ncurses-rest-api-0.2.0/src/YNCHttpWidgetsActionHandler.cc        
2020-07-08 09:29:24.000000000 +0200
@@ -0,0 +1,53 @@
+/*
+  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 YUILogComponent
+#define YUILogComponent   "ncurses-rest-api"
+#endif //YUILogComponent
+
+#include "YUILog.h"
+
+#include "YNCHttpWidgetsActionHandler.h"
+
+void YNCHttpWidgetsActionHandler::activate_widget( YCheckBoxFrame * widget )
+{
+    activate_nc_widget( widget );
+}
+
+void YNCHttpWidgetsActionHandler::activate_widget( YComboBox * widget )
+{
+    activate_nc_widget( widget );
+}
+
+void YNCHttpWidgetsActionHandler::activate_widget( YDateField * widget )
+{
+    activate_nc_widget( widget );
+}
+
+void YNCHttpWidgetsActionHandler::activate_widget( YSelectionBox * widget )
+{
+    activate_nc_widget( widget );
+}
+
+void YNCHttpWidgetsActionHandler::activate_widget( YTimeField * widget )
+{
+    activate_nc_widget( widget );
+}
+
+void YNCHttpWidgetsActionHandler::activate_widget ( YMultiSelectionBox * 
widget, YItem * item )
+{
+    activate_nc_widget( widget, item );
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libyui-ncurses-rest-api-0.1.2/src/YNCHttpWidgetsActionHandler.h 
new/libyui-ncurses-rest-api-0.2.0/src/YNCHttpWidgetsActionHandler.h
--- old/libyui-ncurses-rest-api-0.1.2/src/YNCHttpWidgetsActionHandler.h 
1970-01-01 01:00:00.000000000 +0100
+++ new/libyui-ncurses-rest-api-0.2.0/src/YNCHttpWidgetsActionHandler.h 
2020-07-08 09:29:24.000000000 +0200
@@ -0,0 +1,73 @@
+/*
+  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 YNCHttpWidgetsActionHandler_h
+#define YNCHttpWidgetsActionHandler_h
+
+#include <iostream>
+#include <functional>
+#include <yui/YEvent.h>
+
+#include "YHttpWidgetsActionHandler.h"
+#include "YNCHttpUI.h"
+#include "YMenuItem.h"
+
+#include "NCWidget.h"
+
+class YNCHttpWidgetsActionHandler : public YHttpWidgetsActionHandler
+{
+
+public:
+
+    YNCHttpWidgetsActionHandler() {}
+    virtual ~YNCHttpWidgetsActionHandler() {}
+
+protected:
+
+    virtual void activate_widget( YCheckBoxFrame * widget );
+    virtual void activate_widget( YComboBox * widget );
+    virtual void activate_widget( YDateField * widget );
+    virtual void activate_widget( YSelectionBox * widget );
+    virtual void activate_widget( YTimeField * widget );
+
+    virtual void activate_widget ( YMultiSelectionBox * widget, YItem * item );
+
+private:
+
+    template<typename T>
+    void activate_nc_widget( T * widget ) {
+        if( widget->notify() && dynamic_cast<NCWidget*>( widget ) )
+        {
+            NCursesEvent event = NCursesEvent::Activated;
+            event.widget = dynamic_cast<NCWidget*>( widget );
+            YNCHttpUI::ui()->sendEvent( event );
+        }
+    }
+
+    template<typename T, typename I>
+    void activate_nc_widget( T * widget , I * item) {
+        if( widget->notify() && dynamic_cast<NCWidget*>( widget ) )
+        {
+            NCursesEvent event( NCursesEvent::menu );
+            event.selection = (YMenuItem *) item;
+            event.widget = dynamic_cast<NCWidget*>( widget );
+            YNCHttpUI::ui()->sendEvent( event );
+        }
+    }
+
+};
+
+#endif // YNCHttpWidgetsActionHandler_h


Reply via email to