Hello community, here is the log from the commit of package libyui-ncurses for openSUSE:Factory checked in at 2017-11-23 09:39:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libyui-ncurses (Old) and /work/SRC/openSUSE:Factory/.libyui-ncurses.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libyui-ncurses" Thu Nov 23 09:39:58 2017 rev:36 rq:543944 version:2.49.0 Changes: -------- --- /work/SRC/openSUSE:Factory/libyui-ncurses/libyui-ncurses.changes 2017-08-12 20:00:56.360812255 +0200 +++ /work/SRC/openSUSE:Factory/.libyui-ncurses.new/libyui-ncurses.changes 2017-11-23 09:40:15.513612039 +0100 @@ -1,0 +2,6 @@ +Wed Nov 15 15:30:34 UTC 2017 - shundham...@suse.de + +- Send a widget ID with Shift-F6 for automated testing (fate#324098) +- 2.49.0 + +------------------------------------------------------------------- Old: ---- libyui-ncurses-2.48.4.tar.bz2 New: ---- libyui-ncurses-2.49.0.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libyui-ncurses-doc.spec ++++++ --- /var/tmp/diff_new_pack.ONoch8/_old 2017-11-23 09:40:17.521538780 +0100 +++ /var/tmp/diff_new_pack.ONoch8/_new 2017-11-23 09:40:17.525538634 +0100 @@ -20,7 +20,7 @@ %define so_version 8 Name: %{parent}-doc -Version: 2.48.4 +Version: 2.49.0 Release: 0 Source: %{parent}-%{version}.tar.bz2 @@ -31,7 +31,7 @@ BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: graphviz-gnome -BuildRequires: libyui-devel >= 3.0.4 +BuildRequires: libyui-devel >= 3.4.0 BuildRequires: texlive-latex Url: http://github.com/libyui/ ++++++ libyui-ncurses.spec ++++++ --- /var/tmp/diff_new_pack.ONoch8/_old 2017-11-23 09:40:17.553537612 +0100 +++ /var/tmp/diff_new_pack.ONoch8/_new 2017-11-23 09:40:17.557537466 +0100 @@ -17,7 +17,7 @@ Name: libyui-ncurses -Version: 2.48.4 +Version: 2.49.0 Release: 0 Source: %{name}-%{version}.tar.bz2 @@ -33,7 +33,7 @@ BuildRequires: gcc-c++ BuildRequires: pkg-config -%define libyui_devel_version libyui-devel >= 3.0.4 +%define libyui_devel_version libyui-devel >= 3.4.0 BuildRequires: %{libyui_devel_version} BuildRequires: ncurses-devel ++++++ libyui-ncurses-2.48.4.tar.bz2 -> libyui-ncurses-2.49.0.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-ncurses-2.48.4/VERSION.cmake new/libyui-ncurses-2.49.0/VERSION.cmake --- old/libyui-ncurses-2.48.4/VERSION.cmake 2017-08-07 16:00:58.008836040 +0200 +++ new/libyui-ncurses-2.49.0/VERSION.cmake 2017-11-20 17:15:10.844081564 +0100 @@ -1,12 +1,12 @@ SET( VERSION_MAJOR "2" ) -SET( VERSION_MINOR "48" ) -SET( VERSION_PATCH "4" ) +SET( VERSION_MINOR "49" ) +SET( VERSION_PATCH "0" ) SET( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${GIT_SHA1_VERSION}" ) ##### This is need for the libyui core, ONLY. ##### These will be overridden from exports in LibyuiConfig.cmake SET( SONAME_MAJOR "5" ) -SET( SONAME_MINOR "0" ) +SET( SONAME_MINOR "1" ) SET( SONAME_PATCH "0" ) SET( SONAME "${SONAME_MAJOR}.${SONAME_MINOR}.${SONAME_PATCH}" ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-ncurses-2.48.4/package/libyui-ncurses-doc.spec new/libyui-ncurses-2.49.0/package/libyui-ncurses-doc.spec --- old/libyui-ncurses-2.48.4/package/libyui-ncurses-doc.spec 2017-08-07 16:00:58.012836040 +0200 +++ new/libyui-ncurses-2.49.0/package/libyui-ncurses-doc.spec 2017-11-20 17:15:10.848081564 +0100 @@ -19,7 +19,7 @@ %define so_version 8 Name: %{parent}-doc -Version: 2.48.4 +Version: 2.49.0 Release: 0 Source: %{parent}-%{version}.tar.bz2 @@ -30,8 +30,8 @@ BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: graphviz-gnome -BuildRequires: libyui-devel >= 3.0.4 BuildRequires: texlive-latex +BuildRequires: libyui-devel >= 3.4.0 Url: http://github.com/libyui/ Summary: Libyui-ncurses documentation diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-ncurses-2.48.4/package/libyui-ncurses.changes new/libyui-ncurses-2.49.0/package/libyui-ncurses.changes --- old/libyui-ncurses-2.48.4/package/libyui-ncurses.changes 2017-08-07 16:00:58.012836040 +0200 +++ new/libyui-ncurses-2.49.0/package/libyui-ncurses.changes 2017-11-20 17:15:10.848081564 +0100 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Wed Nov 15 15:30:34 UTC 2017 - shundham...@suse.de + +- Send a widget ID with Shift-F6 for automated testing (fate#324098) +- 2.49.0 + +------------------------------------------------------------------- Mon Aug 7 13:21:35 UTC 2017 - mvid...@suse.com - Adjusted to increased so version of the base library (bsc#1052217) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-ncurses-2.48.4/package/libyui-ncurses.spec new/libyui-ncurses-2.49.0/package/libyui-ncurses.spec --- old/libyui-ncurses-2.48.4/package/libyui-ncurses.spec 2017-08-07 16:00:58.012836040 +0200 +++ new/libyui-ncurses-2.49.0/package/libyui-ncurses.spec 2017-11-20 17:15:10.848081564 +0100 @@ -17,7 +17,7 @@ Name: libyui-ncurses -Version: 2.48.4 +Version: 2.49.0 Release: 0 Source: %{name}-%{version}.tar.bz2 @@ -33,7 +33,7 @@ BuildRequires: gcc-c++ BuildRequires: pkg-config -%define libyui_devel_version libyui-devel >= 3.0.4 +%define libyui_devel_version libyui-devel >= 3.4.0 BuildRequires: %{libyui_devel_version} BuildRequires: ncurses-devel diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-ncurses-2.48.4/src/NCDialog.cc new/libyui-ncurses-2.49.0/src/NCDialog.cc --- old/libyui-ncurses-2.48.4/src/NCDialog.cc 2017-08-07 16:00:58.016836040 +0200 +++ new/libyui-ncurses-2.49.0/src/NCDialog.cc 2017-11-20 17:15:10.852081564 +0100 @@ -30,6 +30,7 @@ #include "NCMenuButton.h" #include <yui/YShortcut.h> #include "NCtoY2Event.h" +#include "YNCursesUI.h" #include <yui/YDialogSpy.h> #include <yui/YDialog.h> @@ -1095,6 +1096,24 @@ break; + case KEY_F( 18 ): // = Shift-F6 on e.g. a linux console + { + yuiMilestone() << "Asking for widget ID" << std::endl; + YWidget * widget = YNCursesUI::ui()->askSendWidgetID(); + + if ( widget ) + { + NCPushButton * button = dynamic_cast<NCPushButton *>( widget ); + + if ( button ) + { + Activate( *button ); + pendingEvent = getInputEvent( KEY_RETURN ); + } + } + } + break; + case CTRL( 'D' ): hch = getch( -1 ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-ncurses-2.48.4/src/NCPopupTextEntry.cc new/libyui-ncurses-2.49.0/src/NCPopupTextEntry.cc --- old/libyui-ncurses-2.48.4/src/NCPopupTextEntry.cc 2017-08-07 16:00:58.020836040 +0200 +++ new/libyui-ncurses-2.49.0/src/NCPopupTextEntry.cc 2017-11-20 17:15:10.856081564 +0100 @@ -25,6 +25,7 @@ #define YUILogComponent "ncurses" #include <yui/YUILog.h> #include "NCPopupTextEntry.h" +#include "NCInputField.h" NCPopupTextEntry::NCPopupTextEntry( const wpos at, @@ -63,3 +64,22 @@ return false; } + + +std::string NCPopupTextEntry::askForText( const wpos at, + const std::string & label, + const std::string & text, + unsigned maxInput, + unsigned maxFld ) +{ + NCPopupTextEntry * dialog = new NCPopupTextEntry( at, label, text, maxInput, maxFld, + NCInputField::PLAIN); + YUI_CHECK_NEW( dialog ); + std::string result; + + dialog->post(); + result = dialog->value(); + YDialog::deleteTopmostDialog(); + + return result; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-ncurses-2.48.4/src/NCPopupTextEntry.h new/libyui-ncurses-2.49.0/src/NCPopupTextEntry.h --- old/libyui-ncurses-2.48.4/src/NCPopupTextEntry.h 2017-08-07 16:00:58.020836040 +0200 +++ new/libyui-ncurses-2.49.0/src/NCPopupTextEntry.h 2017-11-20 17:15:10.856081564 +0100 @@ -58,6 +58,12 @@ void setValue( const std::string & ntext ) { wtext->setValue( ntext ); } std::string value() { return wtext->value(); } + + static std::string askForText( const wpos at, + const std::string & label, + const std::string & text = "", + unsigned maxInput = 0, + unsigned maxFld = 0 ); }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-ncurses-2.48.4/src/YNCursesUI.cc new/libyui-ncurses-2.49.0/src/YNCursesUI.cc --- old/libyui-ncurses-2.48.4/src/YNCursesUI.cc 2017-08-07 16:00:58.032836040 +0200 +++ new/libyui-ncurses-2.49.0/src/YNCursesUI.cc 2017-11-20 17:15:10.864081564 +0100 @@ -42,6 +42,8 @@ #include "NCWidgetFactory.h" #include "NCOptionalWidgetFactory.h" #include "NCPackageSelectorPluginStub.h" +#include "NCPopupTextEntry.h" +#include "NCi18n.h" extern std::string language2encoding( std::string lang ); @@ -423,3 +425,24 @@ } } + +YWidget * YNCursesUI::askSendWidgetID() +{ + std::string id = NCPopupTextEntry::askForText( wpos( 0, 0 ), + _("Enter Widget ID:"), // label + "" ); // initial text + + if ( ! id.empty() ) + { + try + { + return sendWidgetID( id ); + } + catch ( YUIWidgetNotFoundException & ex ) + { + YUI_CAUGHT( ex ); + } + } + + return 0; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-ncurses-2.48.4/src/YNCursesUI.h new/libyui-ncurses-2.49.0/src/YNCursesUI.h --- old/libyui-ncurses-2.48.4/src/YNCursesUI.h 2017-08-07 16:00:58.032836040 +0200 +++ new/libyui-ncurses-2.49.0/src/YNCursesUI.h 2017-11-20 17:15:10.864081564 +0100 @@ -118,6 +118,12 @@ * (including loading the plugin lib) if it does not exist yet. **/ NCPackageSelectorPluginStub * packageSelectorPlugin(); + + /** + * Open a pop-up dialog to ask the user for a widget ID and then send it + * with sendWidgetID(). This returns the widget or 0 if not found. + **/ + YWidget * askSendWidgetID(); };