[yast-commit] r41448 - in /branches/tmp/sh/mod-ui/ncurses/src: NCLogView.cc NCLogView.h NCWidgetFactory.cc YNCursesUI.cc YNCursesUI.h
Author: gs Date: Wed Oct 17 14:43:40 2007 New Revision: 41448 URL: http://svn.opensuse.org/viewcvs/yast?rev=41448&view=rev Log: adapt LogView widget Modified: branches/tmp/sh/mod-ui/ncurses/src/NCLogView.cc branches/tmp/sh/mod-ui/ncurses/src/NCLogView.h branches/tmp/sh/mod-ui/ncurses/src/NCWidgetFactory.cc branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.cc branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.h Modified: branches/tmp/sh/mod-ui/ncurses/src/NCLogView.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCLogView.cc?rev=41448&r1=41447&r2=41448&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/ncurses/src/NCLogView.cc (original) +++ branches/tmp/sh/mod-ui/ncurses/src/NCLogView.cc Wed Oct 17 14:43:40 2007 @@ -27,11 +27,11 @@ // // DESCRIPTION : // -NCLogView::NCLogView( YWidget * parent, const YWidgetOpt & opt, - const YCPString & nlabel, +NCLogView::NCLogView( YWidget * parent, + const string & nlabel, int visibleLines, int maxLines ) - : YLogView( opt, nlabel, visibleLines, maxLines ) + : YLogView( nlabel, visibleLines, maxLines ) , NCPadWidget( parent ) { WIDDBG << endl; @@ -104,7 +104,7 @@ // // DESCRIPTION : // -void NCLogView::setLabel( const YCPString & nlabel ) +void NCLogView::setLabel( const string & nlabel ) { YLogView::setLabel( nlabel ); NCPadWidget::setLabel( NCstring( nlabel ) ); @@ -113,12 +113,12 @@ /////////////////////////////////////////////////////////////////// // // -// METHOD NAME : NCLogView::setLogText +// METHOD NAME : NCLogView::displayLogText // METHOD TYPE : void // // DESCRIPTION : // -void NCLogView::setLogText( const YCPString & ntext ) +void NCLogView::displayLogText( const string & ntext ) { DelPad(); text = NCtext( NCstring(ntext), Columns() ); Modified: branches/tmp/sh/mod-ui/ncurses/src/NCLogView.h URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCLogView.h?rev=41448&r1=41447&r2=41448&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/ncurses/src/NCLogView.h (original) +++ branches/tmp/sh/mod-ui/ncurses/src/NCLogView.h Wed Oct 17 14:43:40 2007 @@ -55,14 +55,12 @@ public: - NCLogView( YWidget * parent, const YWidgetOpt & opt, - const YCPString & label, + NCLogView( YWidget * parent, + const string & label, int visibleLines, int maxLines ); virtual ~NCLogView(); - virtual long nicesize( YUIDimension dim ); - virtual int preferredWidth(); virtual int preferredHeight(); @@ -73,8 +71,8 @@ **/ virtual void setSize( int newWidth, int newHeight ); - virtual void setLabel( const YCPString & nlabel ); - virtual void setLogText( const YCPString & ntext); + virtual void setLabel( const string & nlabel ); + virtual void displayLogText( const string & ntext); virtual NCursesEvent wHandleInput( wint_t key ); Modified: branches/tmp/sh/mod-ui/ncurses/src/NCWidgetFactory.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCWidgetFactory.cc?rev=41448&r1=41447&r2=41448&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/ncurses/src/NCWidgetFactory.cc (original) +++ branches/tmp/sh/mod-ui/ncurses/src/NCWidgetFactory.cc Wed Oct 17 14:43:40 2007 @@ -225,7 +225,10 @@ NCLogView * NCWidgetFactory::createLogView( YWidget * parent, const string & label, int visibleLines, int storedLines ) { - return 0; // FIXME: TO DO + NCLogView * logView = new NCLogView( parent, label, visibleLines, storedLines ); + YUI_CHECK_NEW( logView ); + + return logView; } Modified: branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.cc?rev=41448&r1=41447&r2=41448&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.cc (original) +++ branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.cc Wed Oct 17 14:43:40 2007 @@ -345,16 +345,6 @@ /////////////////////////////////////////////////////////////////// -YWidget * YNCursesUI::createLogView( YWidget * parent, YWidgetOpt & opt, - const YCPString & label, - int visibleLines, - int maxLines ) -{ - ONCREATE; - return new NCLogView( parent, opt, label, visibleLines, maxLines ); -} - - YWidget * YNCursesUI::createMenuButton( YWidget * parent, YWidgetOpt & opt, const YCPString & label ) { Modified: branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.h URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.h?rev=41448&r1=41447&r2=41448&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.h (original) +++ branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.h Wed Oct 17 14:43:40 2007 @@ -137,17 +137,6 @@ virtual void closeDialog( YDialog * dialog ); /** - * Creates a log view widget - * @param label label above the log view - * @param visibleLines default number of vislible lines - * @param maxLines number of lines to store (use 0 for "all") - */ - virtual YWidget * createLogView( YWidget * parent, YWidgetOpt & opt, - const YCPString & label, - int visibleLines, - int maxLines ); - - /** * Creates a menu button. * @param label Label of the button */ -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
gs@svn.opensuse.org