Hello community, here is the log from the commit of package libyui-ncurses for openSUSE:Factory checked in at 2019-09-23 13:16:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libyui-ncurses (Old) and /work/SRC/openSUSE:Factory/.libyui-ncurses.new.7948 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libyui-ncurses" Mon Sep 23 13:16:08 2019 rev:47 rq:730776 version:2.52.1 Changes: -------- --- /work/SRC/openSUSE:Factory/libyui-ncurses/libyui-ncurses.changes 2019-07-08 14:59:46.634421363 +0200 +++ /work/SRC/openSUSE:Factory/.libyui-ncurses.new.7948/libyui-ncurses.changes 2019-09-23 13:16:09.853118451 +0200 @@ -1,0 +2,7 @@ +Fri Sep 13 16:08:14 CEST 2019 - [email protected] + +- handle new libyui feature dealing with scrollbar position + of RichText widget (bsc#1150498) +- 2.50.1 + +------------------------------------------------------------------- Old: ---- libyui-ncurses-2.52.0.tar.bz2 New: ---- libyui-ncurses-2.52.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libyui-ncurses-doc.spec ++++++ --- /var/tmp/diff_new_pack.q22vwp/_old 2019-09-23 13:16:10.321118367 +0200 +++ /var/tmp/diff_new_pack.q22vwp/_new 2019-09-23 13:16:10.321118367 +0200 @@ -20,7 +20,7 @@ %define so_version 10 Name: %{parent}-doc -Version: 2.52.0 +Version: 2.52.1 Release: 0 Source: %{parent}-%{version}.tar.bz2 ++++++ libyui-ncurses.spec ++++++ --- /var/tmp/diff_new_pack.q22vwp/_old 2019-09-23 13:16:10.333118365 +0200 +++ /var/tmp/diff_new_pack.q22vwp/_new 2019-09-23 13:16:10.341118364 +0200 @@ -17,7 +17,7 @@ Name: libyui-ncurses -Version: 2.52.0 +Version: 2.52.1 Release: 0 Source: %{name}-%{version}.tar.bz2 ++++++ libyui-ncurses-2.52.0.tar.bz2 -> libyui-ncurses-2.52.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-ncurses-2.52.0/VERSION.cmake new/libyui-ncurses-2.52.1/VERSION.cmake --- old/libyui-ncurses-2.52.0/VERSION.cmake 2019-07-02 15:44:07.000000000 +0200 +++ new/libyui-ncurses-2.52.1/VERSION.cmake 2019-09-13 17:09:30.000000000 +0200 @@ -1,6 +1,6 @@ SET( VERSION_MAJOR "2" ) SET( VERSION_MINOR "52" ) -SET( VERSION_PATCH "0" ) +SET( VERSION_PATCH "1" ) 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-2.52.0/package/libyui-ncurses-doc.spec new/libyui-ncurses-2.52.1/package/libyui-ncurses-doc.spec --- old/libyui-ncurses-2.52.0/package/libyui-ncurses-doc.spec 2019-07-02 15:44:07.000000000 +0200 +++ new/libyui-ncurses-2.52.1/package/libyui-ncurses-doc.spec 2019-09-13 17:09:30.000000000 +0200 @@ -19,7 +19,7 @@ %define so_version 10 Name: %{parent}-doc -Version: 2.52.0 +Version: 2.52.1 Release: 0 Source: %{parent}-%{version}.tar.bz2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-ncurses-2.52.0/package/libyui-ncurses.changes new/libyui-ncurses-2.52.1/package/libyui-ncurses.changes --- old/libyui-ncurses-2.52.0/package/libyui-ncurses.changes 2019-07-02 15:44:07.000000000 +0200 +++ new/libyui-ncurses-2.52.1/package/libyui-ncurses.changes 2019-09-13 17:09:30.000000000 +0200 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Fri Sep 13 16:08:14 CEST 2019 - [email protected] + +- handle new libyui feature dealing with scrollbar position + of RichText widget (bsc#1150498) +- 2.50.1 + +------------------------------------------------------------------- Fri Jun 28 13:52:07 UTC 2019 - Ladislav Slezák <[email protected]> - Send the notify events also when some widgets are changed via the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-ncurses-2.52.0/package/libyui-ncurses.spec new/libyui-ncurses-2.52.1/package/libyui-ncurses.spec --- old/libyui-ncurses-2.52.0/package/libyui-ncurses.spec 2019-07-02 15:44:07.000000000 +0200 +++ new/libyui-ncurses-2.52.1/package/libyui-ncurses.spec 2019-09-13 17:09:30.000000000 +0200 @@ -17,7 +17,7 @@ Name: libyui-ncurses -Version: 2.52.0 +Version: 2.52.1 Release: 0 Source: %{name}-%{version}.tar.bz2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-ncurses-2.52.0/src/NCPad.cc new/libyui-ncurses-2.52.1/src/NCPad.cc --- old/libyui-ncurses-2.52.0/src/NCPad.cc 2019-07-02 15:44:07.000000000 +0200 +++ new/libyui-ncurses-2.52.1/src/NCPad.cc 2019-09-13 17:09:30.000000000 +0200 @@ -90,14 +90,14 @@ if ( nsze.H > MAX_PAD_HEIGHT ) { - yuiDebug() << "TRUCNATE PAD: " << nsze.H << " > " << MAX_PAD_HEIGHT << std::endl; - NCursesPad::resize( PAD_PAGESIZE, nsze.W ); - _vheight = nsze.H; + yuiDebug() << "TRUNCATE PAD: " << nsze.H << " > " << MAX_PAD_HEIGHT << std::endl; + NCursesPad::resize( PAD_PAGESIZE, nsze.W ); + _vheight = nsze.H; } else { - NCursesPad::resize( nsze.H, nsze.W ); - _vheight = 0; + NCursesPad::resize( nsze.H, nsze.W ); + _vheight = 0; } yuiDebug() << "Pageing ?: " << pageing() << std::endl; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-ncurses-2.52.0/src/NCRichText.cc new/libyui-ncurses-2.52.1/src/NCRichText.cc --- old/libyui-ncurses-2.52.0/src/NCRichText.cc 2019-07-02 15:44:07.000000000 +0200 +++ new/libyui-ncurses-2.52.1/src/NCRichText.cc 2019-09-13 17:09:30.000000000 +0200 @@ -1121,7 +1121,7 @@ void NCRichText::HScroll( unsigned total, unsigned visible, unsigned start ) { NCPadWidget::HScroll( total, visible, start ); - // no hyperlink handling needed, because Ritchtext does not HScroll + // no hyperlink handling needed, because Richtext does not HScroll } @@ -1285,3 +1285,73 @@ } +std::string NCRichText::vScrollValue() const +{ + const NCPad* mypad = myPad(); + + if ( !mypad ) + return ""; + + return std::to_string( mypad->CurPos().L ); +} + + +void NCRichText::setVScrollValue( const std::string & newValue ) +{ + NCPad* mypad = myPad(); + + if ( !mypad || newValue.empty() ) + return; + + if ( newValue == "minimum" ) + mypad->ScrlLine( 0 ); + else if ( newValue == "maximum" ) + mypad->ScrlLine( mypad->maxy() ); + else + { + try + { + mypad->ScrlLine( std::stoi( newValue ) ); + } + catch (...) + { + yuiError() << "failed to set vertical scroll value '" << newValue << "'" << endl; + } + } +} + + +std::string NCRichText::hScrollValue() const +{ + const NCPad* mypad = myPad(); + + if ( !mypad ) + return ""; + + return std::to_string( mypad->CurPos().C ); +} + + +void NCRichText::setHScrollValue( const std::string & newValue ) +{ + NCPad* mypad = myPad(); + + if ( !mypad || newValue.empty() ) + return; + + if ( newValue == "minimum" ) + mypad->ScrlCol( 0 ); + else if ( newValue == "maximum" ) + mypad->ScrlCol( mypad->maxx() ); + else + { + try + { + mypad->ScrlCol( std::stoi( newValue ) ); + } + catch (...) + { + yuiError() << "failed to set horizontal scroll value '" << newValue << "'" << endl; + } + } +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-ncurses-2.52.0/src/NCRichText.h new/libyui-ncurses-2.52.1/src/NCRichText.h --- old/libyui-ncurses-2.52.0/src/NCRichText.h 2019-07-02 15:44:07.000000000 +0200 +++ new/libyui-ncurses-2.52.1/src/NCRichText.h 2019-09-13 17:09:30.000000000 +0200 @@ -206,8 +206,8 @@ virtual NCPad * CreatePad(); virtual void DrawPad(); - virtual void HScroll( unsigned total, unsigned visible, unsigned start ); - virtual void VScroll( unsigned total, unsigned visible, unsigned start ); + virtual void HScroll( unsigned total, unsigned visible, unsigned start ) override; + virtual void VScroll( unsigned total, unsigned visible, unsigned start ) override; virtual bool handleInput( wint_t key ); @@ -226,7 +226,7 @@ virtual NCursesEvent wHandleInput( wint_t key ); - virtual void setValue( const std::string & ntext ); + virtual void setValue( const std::string & ntext ) override; virtual void setEnabled( bool do_bv ); @@ -237,6 +237,15 @@ return true; } + + virtual std::string vScrollValue() const override; + + virtual void setVScrollValue( const std::string & newValue ) override; + + virtual std::string hScrollValue() const override; + + virtual void setHScrollValue( const std::string & newValue ) override; + };
