Author: gs
Date: Tue Jul 24 13:57:35 2007
New Revision: 39634
URL: http://svn.opensuse.org/viewcvs/yast?rev=39634&view=rev
Log:
adapt NCMultiSelectionBox, NCCheckBox, NCSelectionBox, NWidgetFactory
(not yet finished)
Modified:
branches/tmp/sh/mod-ui/ncurses/src/NCCheckBox.cc
branches/tmp/sh/mod-ui/ncurses/src/NCCheckBox.h
branches/tmp/sh/mod-ui/ncurses/src/NCImage.cc
branches/tmp/sh/mod-ui/ncurses/src/NCImage.h
branches/tmp/sh/mod-ui/ncurses/src/NCMultiLineEdit.cc
branches/tmp/sh/mod-ui/ncurses/src/NCMultiLineEdit.h
branches/tmp/sh/mod-ui/ncurses/src/NCMultiSelectionBox.cc
branches/tmp/sh/mod-ui/ncurses/src/NCMultiSelectionBox.h
branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorPlugin.cc
branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorPlugin.h
branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorStart.cc
branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorStart.h
branches/tmp/sh/mod-ui/ncurses/src/NCProgressBar.cc
branches/tmp/sh/mod-ui/ncurses/src/NCProgressBar.h
branches/tmp/sh/mod-ui/ncurses/src/NCSelectionBox.cc
branches/tmp/sh/mod-ui/ncurses/src/NCSelectionBox.h
branches/tmp/sh/mod-ui/ncurses/src/NCWidgetFactory.cc
branches/tmp/sh/mod-ui/ncurses/src/NCWidgetFactory.h
branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.cc
branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.h
branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPackageSelector.cc
branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPackageSelector.h
branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDeps.cc
branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSearch.cc
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCCheckBox.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCCheckBox.cc?rev=39634&r1=39633&r2=39634&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCCheckBox.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCCheckBox.cc Tue Jul 24 13:57:35 2007
@@ -35,10 +35,10 @@
//
// DESCRIPTION :
//
-NCCheckBox::NCCheckBox( YWidget * parent, const YWidgetOpt & opt,
- const YCPString & nlabel,
+NCCheckBox::NCCheckBox( YWidget * parent,
+ const string & nlabel,
bool check )
- : YCheckBox( opt, nlabel )
+ : YCheckBox( parent, nlabel, check )
, NCWidget( parent )
, tristate( false )
, checkstate( check ? S_ON : S_OFF )
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCCheckBox.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCCheckBox.h?rev=39634&r1=39633&r2=39634&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCCheckBox.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCCheckBox.h Tue Jul 24 13:57:35 2007
@@ -63,8 +63,8 @@
public:
- NCCheckBox( YWidget * parent, const YWidgetOpt & opt,
- const YCPString & label,
+ NCCheckBox( YWidget * parent,
+ const string & label,
bool checked );
virtual ~NCCheckBox();
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCImage.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCImage.cc?rev=39634&r1=39633&r2=39634&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCImage.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCImage.cc Tue Jul 24 13:57:35 2007
@@ -28,9 +28,8 @@
//
// DESCRIPTION :
//
-NCImage::NCImage( YWidget * parent, const YWidgetOpt & opt,
- YCPString defaulttext )
- : YImage( opt )
+NCImage::NCImage( YWidget * parent, string defaulttext, bool animated )
+ : YImage( parent, defaulttext, animated )
, NCWidget( parent )
, label( defaulttext )
{
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCImage.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCImage.h?rev=39634&r1=39633&r2=39634&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCImage.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCImage.h Tue Jul 24 13:57:35 2007
@@ -49,7 +49,7 @@
public:
- NCImage( YWidget * parent, const YWidgetOpt & opt, YCPString defaulttext );
+ NCImage( YWidget * parent, string defaulttext, bool animated = false );
virtual ~NCImage();
virtual long nicesize( YUIDimension dim );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCMultiLineEdit.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCMultiLineEdit.cc?rev=39634&r1=39633&r2=39634&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCMultiLineEdit.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCMultiLineEdit.cc Tue Jul 24 13:57:35 2007
@@ -27,16 +27,14 @@
//
// DESCRIPTION :
//
-NCMultiLineEdit::NCMultiLineEdit( YWidget * parent, const YWidgetOpt & opt,
- const YCPString & nlabel,
- const YCPString & initialText )
- : YMultiLineEdit( opt, nlabel )
+NCMultiLineEdit::NCMultiLineEdit( YWidget * parent, const string & nlabel )
+ : YMultiLineEdit( parent, nlabel )
, NCPadWidget( parent )
{
WIDDBG << endl;
defsze = wsze( 5, 5 ) + 2;
setLabel( nlabel );
- setText( initialText );
+ //setText( initialText );
}
///////////////////////////////////////////////////////////////////
@@ -104,7 +102,7 @@
//
// DESCRIPTION :
//
-void NCMultiLineEdit::setLabel( const YCPString & nlabel )
+void NCMultiLineEdit::setLabel( const string & nlabel )
{
YMultiLineEdit::setLabel( nlabel );
NCPadWidget::setLabel( NCstring( nlabel ) );
@@ -113,18 +111,20 @@
///////////////////////////////////////////////////////////////////
//
//
-// METHOD NAME : NCMultiLineEdit::setText
+// METHOD NAME : NCMultiLineEdit::setValue
// METHOD TYPE : void
//
// DESCRIPTION :
//
-void NCMultiLineEdit::setText( const YCPString & ntext )
+void NCMultiLineEdit::setValue( const string & ntext )
{
+ YMultiLineEdit::setValue( ntext );
DelPad();
ctext = ntext;
Redraw();
}
+#if 0
///////////////////////////////////////////////////////////////////
//
//
@@ -140,6 +140,24 @@
}
return ctext.YCPstr();
}
+#endif
+
+///////////////////////////////////////////////////////////////////
+//
+//
+// METHOD NAME : NCMultiLineEdit::value
+// METHOD TYPE : string
+//
+// DESCRIPTION :
+//
+string NCMultiLineEdit::value()
+{
+ if ( myPad() ) {
+ ctext = NCstring( myPad()->getText() );
+ }
+ return ctext;
+}
+
///////////////////////////////////////////////////////////////////
//
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCMultiLineEdit.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCMultiLineEdit.h?rev=39634&r1=39633&r2=39634&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCMultiLineEdit.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCMultiLineEdit.h Tue Jul 24 13:57:35 2007
@@ -63,9 +63,8 @@
public:
- NCMultiLineEdit( YWidget * parent, const YWidgetOpt & opt,
- const YCPString & label,
- const YCPString & initialText );
+ NCMultiLineEdit( YWidget * parent, const string & label );
+ // FIXME ? missing argument const YCPString & initialText ); ?
virtual ~NCMultiLineEdit();
virtual long nicesize( YUIDimension dim );
@@ -79,11 +78,11 @@
**/
virtual void setSize( int newWidth, int newHeight );
- virtual void setLabel( const YCPString & nlabel );
- virtual void setText( const YCPString & ntext);
-
- virtual YCPString text();
+ virtual void setLabel( const string & nlabel );
+ virtual void setValue( const string & ntext);
+ virtual string value();
+
virtual NCursesEvent wHandleInput( wint_t key );
//virtual void setEnabling( bool do_bv ) { NCWidget::setEnabling( enabled=do_bv ); }
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCMultiSelectionBox.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCMultiSelectionBox.cc?rev=39634&r1=39633&r2=39634&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCMultiSelectionBox.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCMultiSelectionBox.cc Tue Jul 24 13:57:35 2007
@@ -28,9 +28,9 @@
//
// DESCRIPTION :
//
-NCMultiSelectionBox::NCMultiSelectionBox( YWidget * parent, const YWidgetOpt & opt,
- const YCPString & nlabel )
- : YMultiSelectionBox( opt, nlabel )
+NCMultiSelectionBox::NCMultiSelectionBox( YWidget * parent,
+ const string & nlabel )
+ : YMultiSelectionBox( parent, nlabel )
, NCPadWidget( parent )
{
WIDDBG << endl;
@@ -112,14 +112,33 @@
///////////////////////////////////////////////////////////////////
//
//
+// METHOD NAME : NCMultiSelectionBox::currentItem
+// METHOD TYPE : YItem *
+//
+//
+YItem * NCMultiSelectionBox::currentItem()
+{
+ if ( !myPad()->Lines() )
+ return 0;
+
+ int index = myPad()->CurPos().L;
+
+ NCMIL << "Index of current Item: " << index << endl;
+
+ return findItem( index );
+}
+
+///////////////////////////////////////////////////////////////////
+//
+//
// METHOD NAME : NCMultiSelectionBox::setCurrentItem
// METHOD TYPE : void
//
// DESCRIPTION :
//
-void NCMultiSelectionBox::setCurrentItem( int index )
+void NCMultiSelectionBox::setCurrentItem( YItem * item )
{
- myPad()->ScrlLine( index );
+ myPad()->ScrlLine( item->index() );
}
///////////////////////////////////////////////////////////////////
@@ -139,6 +158,19 @@
DrawPad();
}
+void NCMultiSelectionBox::addItem( YItem * item )
+{
+ vector Items( 2U, 0 );
+ if ( item )
+ {
+ YMultiSelectionBox::addItem( item );
+ Items[0] = new NCTableTag( item->selected() );
+ Items[1] = new NCTableCol( item->label(), NCTableCol::PLAIN );
+ myPad()->Append( Items );
+ DrawPad();
+ }
+}
+
///////////////////////////////////////////////////////////////////
//
//
@@ -268,7 +300,7 @@
//
// DESCRIPTION :
//
-void NCMultiSelectionBox::setLabel( const YCPString & nlabel )
+void NCMultiSelectionBox::setLabel( const string & nlabel )
{
YMultiSelectionBox::setLabel( nlabel );
NCPadWidget::setLabel( NCstring( nlabel ) );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCMultiSelectionBox.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCMultiSelectionBox.h?rev=39634&r1=39633&r2=39634&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCMultiSelectionBox.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCMultiSelectionBox.h Tue Jul 24 13:57:35 2007
@@ -103,6 +103,9 @@
virtual void startMultipleChanges() { startMultidraw(); }
virtual void doneMultipleChanges() { stopMultidraw(); }
+ virtual void selectItem( int index ) { setItemSelected( index, true ); }
+ virtual void deselectItem( int index ){ setItemSelected( index, false ); }
+
protected:
virtual const char * location() const { return "NCMultiSelectionBox"; }
@@ -110,19 +113,24 @@
virtual NCPad * CreatePad();
virtual void wRecoded();
- virtual void itemAdded( const YCPString & string, int index, bool selected );
+ //virtual void itemAdded( const YCPString & string, int index, bool selected );
+ virtual void addItem( YItem * item );
+
virtual void deleteAllItems();
virtual bool itemIsSelected( int index ) { return isItemSelected( index ); }
- virtual void selectItem( int index ) { setItemSelected( index, true ); }
- virtual void deselectItem( int index ){ setItemSelected( index, false ); }
+
+ virtual void selectItem( YItem * item, bool selected )
+ { setItemSelected( item->index(), selected ); }
+
virtual void selectAllItems() { setAllItemsSelected( true ); }
virtual void deselectAllItems() { setAllItemsSelected( false ); }
+ virtual int getCurrentItem();
+
public:
- NCMultiSelectionBox( YWidget * parent, const YWidgetOpt & opt,
- const YCPString & label );
+ NCMultiSelectionBox( YWidget * parent, const string & label );
virtual ~NCMultiSelectionBox();
virtual long nicesize( YUIDimension dim );
@@ -137,15 +145,14 @@
**/
virtual void setSize( int newWidth, int newHeight );
- virtual void setLabel( const YCPString & nlabel );
+ virtual void setLabel( const string & nlabel );
- virtual int getCurrentItem();
- virtual void setCurrentItem( int index );
+ virtual YItem * currentItem();
+ virtual void setCurrentItem( YItem * item );
virtual NCursesEvent wHandleInput( wint_t key );
- //virtual void setEnabling( bool do_bv ) { NCWidget::setEnabling( enabled=do_bv ); }
- virtual void setEnabled( bool do_bv );
+ virtual void setEnabled( bool do_bv );
virtual bool setKeyboardFocus() {
if ( !grabFocus() )
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorPlugin.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorPlugin.cc?rev=39634&r1=39633&r2=39634&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorPlugin.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorPlugin.cc Tue Jul 24 13:57:35 2007
@@ -54,13 +54,13 @@
// term of the package selection dialog, creates the widget
// tree and creates the NCPackageSelector.
//
-YWidget * NCPackageSelectorPlugin::createPackageSelector( YWidget * parent,
- YWidgetOpt & opt )
+YPackageSelector * NCPackageSelectorPlugin::createPackageSelector( YWidget * parent,
+ long modeFlags )
{
YWidget * w = 0;
try
{
- w = new NCPackageSelectorStart ( parent, opt, YD_HORIZ );
+ w = new NCPackageSelectorStart ( parent, modeFlags, YD_HORIZ );
}
catch (const std::exception & e)
{
@@ -70,6 +70,8 @@
{
UIERR << "Caught an unspecified exception" << endl;
}
+
+ // FIXME - remove debug logging
YDialog::currentDialog()->dumpWidgetTree();
NCWidget * firstChild = dynamic_cast(YDialog::currentDialog()->firstChild());
if ( firstChild )
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorPlugin.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorPlugin.h?rev=39634&r1=39633&r2=39634&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorPlugin.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorPlugin.h Tue Jul 24 13:57:35 2007
@@ -52,8 +52,8 @@
* This might return 0 if the plugin lib could not be loaded or if the
* appropriate symbol could not be located in the plugin lib.
**/
- virtual YWidget * createPackageSelector( YWidget * parent,
- YWidgetOpt & opt );
+ virtual YPackageSelector * createPackageSelector( YWidget * parent,
+ long modeFlags );
/**
* Fills the PackageSelector widget (runs the package selection).
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorStart.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorStart.cc?rev=39634&r1=39633&r2=39634&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorStart.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorStart.cc Tue Jul 24 13:57:35 2007
@@ -31,6 +31,7 @@
#include
#include
+#include "YPackageSelector.h"
#include "YCPDialogParser.h"
///////////////////////////////////////////////////////////////////
@@ -42,7 +43,7 @@
// DESCRIPTION :
//
NCPackageSelectorStart::NCPackageSelectorStart( YWidget * parent,
- const YWidgetOpt & opt,
+ long modeFlags,
YUIDimension dimension )
: NCLayoutBox( parent, dimension )
, widgetRoot( 0 )
@@ -55,11 +56,11 @@
// set the textdomain
setTextdomain( "packages" );
- // get the mode (the mode is also available in PackageSelector via const YWidgetOpt & opt)
- if ( opt.youMode.value() )
+ // get the mode (the mode is also available in PackageSelector via modeFlags)
+ if ( modeFlags & YPkg_OnlineUpdateMode )
youMode = true;
- if ( opt.updateMode.value() )
+ if ( modeFlags & YPkg_UpdateMode )
updateMode = true;
// Read the layout file and create the widget tree
@@ -92,7 +93,7 @@
{
NCMIL << "Widget tree of NCPackageSelector created" << endl;
- packager = new NCPackageSelector( ui, widgetRoot, opt );
+ packager = new NCPackageSelector( ui, widgetRoot, modeFlags );
// child handling is done by libyui now
//this->addChild( widgetRoot );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorStart.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorStart.h?rev=39634&r1=39633&r2=39634&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorStart.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorStart.h Tue Jul 24 13:57:35 2007
@@ -67,8 +67,9 @@
* Constructor
* creates the widget tree of the package selector
*/
- NCPackageSelectorStart( YWidget * parent,
- const YWidgetOpt & opt, YUIDimension dimension );
+ NCPackageSelectorStart( YWidget * parent,
+ long modeFlags,
+ YUIDimension dimension );
/**
* Destructor
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCProgressBar.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCProgressBar.cc?rev=39634&r1=39633&r2=39634&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCProgressBar.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCProgressBar.cc Tue Jul 24 13:57:35 2007
@@ -28,15 +28,14 @@
//
// DESCRIPTION :
//
-NCProgressBar::NCProgressBar( YWidget * parent, const YWidgetOpt & opt,
- const YCPString & nlabel,
- const YCPInteger & maxprogress,
- const YCPInteger & progress )
- : YProgressBar( opt, nlabel, maxprogress, progress )
+NCProgressBar::NCProgressBar( YWidget * parent,
+ const string & nlabel,
+ int maxValue )
+ : YProgressBar( parent, nlabel, maxValue )
, NCWidget( parent )
, label( nlabel )
- , maxval( maxprogress->value() )
- , cval( progress->value() )
+ , maxval( maxValue )
+ , cval( 0 ) // FIXME - was 4. param progress
, lwin( 0 )
, twin( 0 )
{
@@ -45,7 +44,7 @@
maxval = 1;
hotlabel = &label;
setLabel( nlabel );
- setProgress( progress );
+ //setProgress( progress );
wstate = NC::WSdumb;
}
@@ -179,7 +178,7 @@
//
// DESCRIPTION :
//
-void NCProgressBar::setLabel( const YCPString & nlabel )
+void NCProgressBar::setLabel( const string & nlabel )
{
label = NCstring( nlabel );
setDefsze();
@@ -187,6 +186,7 @@
Redraw();
}
+#if 0
///////////////////////////////////////////////////////////////////
//
//
@@ -205,6 +205,26 @@
Redraw();
YProgressBar::setProgress( nval );
}
+#endif
+
+///////////////////////////////////////////////////////////////////
+//
+//
+// METHOD NAME : NCProgressBar::setValue
+// METHOD TYPE : void
+//
+// DESCRIPTION :
+//
+void NCProgressBar::setValue( int newValue )
+{
+ cval = newValue;
+ if ( cval < 0 )
+ cval = 0;
+ else if ( cval > maxval )
+ cval = maxval;
+ Redraw();
+ YProgressBar::setValue( newValue );
+}
///////////////////////////////////////////////////////////////////
//
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCProgressBar.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCProgressBar.h?rev=39634&r1=39633&r2=39634&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCProgressBar.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCProgressBar.h Tue Jul 24 13:57:35 2007
@@ -63,10 +63,9 @@
public:
- NCProgressBar( YWidget * parent, const YWidgetOpt & opt,
- const YCPString & label,
- const YCPInteger & maxprogress,
- const YCPInteger & progress );
+ NCProgressBar( YWidget * parent,
+ const string & label,
+ int maxValue = 100 );
virtual ~NCProgressBar();
virtual long nicesize( YUIDimension dim );
@@ -81,11 +80,10 @@
**/
virtual void setSize( int newWidth, int newHeight );
- virtual void setLabel( const YCPString & nlabel );
+ virtual void setLabel( const string & nlabel );
- virtual void setProgress( const YCPInteger & nval );
+ virtual void setValue( int newValue );
- //virtual void setEnabling( bool do_bv ) { NCWidget::setEnabling( enabled=do_bv ); }
virtual void setEnabled( bool do_bv );
};
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCSelectionBox.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCSelectionBox.cc?rev=39634&r1=39633&r2=39634&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCSelectionBox.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCSelectionBox.cc Tue Jul 24 13:57:35 2007
@@ -27,9 +27,8 @@
//
// DESCRIPTION :
//
-NCSelectionBox::NCSelectionBox( YWidget * parent, const YWidgetOpt & opt,
- const YCPString & nlabel )
- : YSelectionBox( opt, nlabel )
+NCSelectionBox::NCSelectionBox( YWidget * parent, const string & nlabel )
+ : YSelectionBox( parent, nlabel )
, NCPadWidget( parent )
, biglist( false )
, immediate( opt.immediateMode.value() )
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCSelectionBox.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCSelectionBox.h?rev=39634&r1=39633&r2=39634&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCSelectionBox.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCSelectionBox.h Tue Jul 24 13:57:35 2007
@@ -60,8 +60,7 @@
public:
- NCSelectionBox( YWidget * parent, const YWidgetOpt & opt,
- const YCPString & label );
+ NCSelectionBox( YWidget * parent, const string & label );
virtual ~NCSelectionBox();
bool bigList() const { return biglist; }
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=39634&r1=39633&r2=39634&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCWidgetFactory.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCWidgetFactory.cc Tue Jul 24 13:57:35 2007
@@ -71,6 +71,7 @@
{
NCPushButton * pushButton = new NCPushButton( parent, label );
YUI_CHECK_NEW( pushButton );
+
return pushButton;
}
@@ -104,7 +105,10 @@
NCCheckBox *
NCWidgetFactory::createCheckBox( YWidget * parent, const string & label, bool isChecked )
{
- return 0; // FIXME: TO DO
+ NCCheckBox * checkBox = new NCCheckBox( parent, label, isChecked );
+ YUI_CHECK_NEW( checkBox );
+
+ return checkBox;
}
@@ -130,7 +134,10 @@
NCComboBox *
NCWidgetFactory::createComboBox( YWidget * parent, const string & label, bool editable )
{
- return 0; // FIXME: TO DO
+ NCComboBox * comboBox = new NCComboBox( parent, label, editable );
+ YUI_CHECK_NEW( comboBox );
+
+ return comboBox;
}
@@ -138,7 +145,10 @@
NCSelectionBox *
NCWidgetFactory::createSelectionBox( YWidget * parent, const string & label )
{
- return 0; // FIXME: TO DO
+ NCSelectionBox * selectionBox = new NCSelectionBox( parent, label );
+ YUI_CHECK_NEW( selectionBox );
+
+ return selectionBox;
}
@@ -162,9 +172,20 @@
NCProgressBar *
NCWidgetFactory::createProgressBar( YWidget * parent, const string & label, int maxValue )
{
- return 0; // FIXME: TO DO
+ NCProgressBar * progressBar = new NCProgressBar( parent, label, maxValue );
+ YUI_CHECK_NEW( progressBar );
+
+ return progressBar;
}
+NCRichText *
+NCWidgetFactory::createRichText( YWidget * parent, const string & text, bool plainTextMode )
+{
+ NCRichText * richText = new NCRichText( parent, text, plainTextMode );
+ YUI_CHECK_NEW( richText );
+
+ return richText;
+}
//
// Less Common Leaf Widgets
@@ -189,19 +210,12 @@
NCMultiLineEdit *
NCWidgetFactory::createMultiLineEdit( YWidget * parent, const string & label )
{
- return 0; // FIXME: TO DO
-}
-
-
-
-NCImage *
-NCWidgetFactory::createImage( YWidget * parent, const string & imagePath )
-{
- return 0; // FIXME: TO DO
+ NCMultiLineEdit * multiLineEdit = new NCMultiLineEdit( parent, label );
+ YUI_CHECK_NEW( multiLineEdit );
+
+ return multiLineEdit;
}
-
-
NCLogView *
NCWidgetFactory::createLogView( YWidget * parent, const string & label, int visibleLines, int storedLines )
{
@@ -210,12 +224,16 @@
-NCSelectionBox *
+NCMultiSelectionBox *
NCWidgetFactory::createMultiSelectionBox( YWidget * parent, const string & label )
{
- return 0; // FIXME: TO DO
+ NCMultiSelectionBox * multiSelectionBox = new NCMultiSelectionBox( parent, label );
+ YUI_CHECK_NEW( multiSelectionBox );
+
+ return multiSelectionBox;
}
+
//
// Layout Helpers
//
@@ -314,15 +332,6 @@
return replacePoint;
}
-NCRichText *
-NCWidgetFactory::createRichText( YWidget * parent, const string & text, bool plainTextMode )
-{
- NCRichText * richText = new NCRichText( parent, text, plainTextMode );
- YUI_CHECK_NEW( richText );
-
- return richText;
-}
-
NCImage *
NCWidgetFactory::createImage( YWidget * parent, const string & imageFileName, bool animated )
{
@@ -332,12 +341,13 @@
return image;
}
-NCPackageSelector *
+YPackageSelector *
NCWidgetFactory::createPackageSelector( YWidget * parent, long modeFlags )
{
- NCUI::ui()->setAutoActivateDialogs( false );
+ // FIXME
+ //YNCursesUI::ui()->setAutoActivateDialogs( false );
- NCPackageSelectorPlugin * plugin = NCUI::ui()->packageSelectorPlugin();
+ NCPackageSelectorPlugin * plugin = YNCursesUI::ui()->packageSelectorPlugin();
if ( plugin )
return plugin->createPackageSelector( parent, modeFlags );
@@ -350,7 +360,7 @@
{
YWidget * w = 0;
- NCPackageSelectorPlugin * plugin = packageSelectorPlugin();
+ NCPackageSelectorPlugin * plugin = YNCursesUI::ui()->packageSelectorPlugin();
if ( plugin )
{
@@ -360,11 +370,4 @@
return w;
}
-NCMultiLineEdit *
-NCWidgetFactory::createMultiLineEdit( YWidget * parent, const string & label )
-{
- NCMultiLineEdit * multiLineEdit = new NCMultiLineEdit( parent, label );
- YUI_CHECK_NEW( multiLineEdit );
-
- return multiLineEdit;
-}
+
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCWidgetFactory.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCWidgetFactory.h?rev=39634&r1=39633&r2=39634&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCWidgetFactory.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCWidgetFactory.h Tue Jul 24 13:57:35 2007
@@ -38,6 +38,7 @@
#include "NCMultiLineEdit.h"
#include "NCMultiSelectionBox.h"
#include "NCPackageSelectorStart.h"
+#include "NCPackageSelectorPlugin.h"
#include "NCProgressBar.h"
#include "NCPushButton.h"
#include "NCRadioButton.h"
@@ -79,14 +80,28 @@
virtual NCLayoutBox * createLayoutBox( YWidget * parent, YUIDimension dim );
- //
- // Common Leaf Widgets
- //
-
- virtual NCPushButton * createPushButton ( YWidget * parent, const string & label );
- virtual NCLabel * createLabel ( YWidget * parent, const string & text, bool isHeading = false, bool isOutputField = false );
- virtual NCInputField * createInputField ( YWidget * parent, const string & label, bool passwordMode = false );
- virtual NCCheckBox * createCheckBox ( YWidget * parent, const string & label, bool isChecked = false );
+ /**
+ * Creates a push button.
+ * @param label Label of the button
+ * @param default_button true if the button should be the dialogs default button
+ */
+
+ virtual NCPushButton * createPushButton ( YWidget * parent,
+ const string & label );
+
+ virtual NCLabel * createLabel ( YWidget * parent,
+ const string & text,
+ bool isHeading = false,
+ bool isOutputField = false );
+
+ virtual NCInputField * createInputField ( YWidget * parent,
+ const string & label,
+ bool passwordMode = false );
+
+ virtual NCCheckBox * createCheckBox ( YWidget * parent,
+ const string & label,
+ bool isChecked = false );
+
virtual NCRadioButton * createRadioButton ( YWidget * parent, const string & label, bool isChecked = false );
virtual NCComboBox * createComboBox ( YWidget * parent, const string & label, bool editable = false );
virtual NCSelectionBox * createSelectionBox ( YWidget * parent, const string & label );
@@ -95,35 +110,73 @@
virtual NCProgressBar * createProgressBar ( YWidget * parent, const string & label, int maxValue = 100 );
virtual NCRichText * createRichText ( YWidget * parent, const string & text, bool plainTextMode = false );
- //
- // Less Common Leaf Widgets
- //
-
virtual NCIntField * createIntField ( YWidget * parent, const string & label, int minVal, int maxVal, int initialVal );
virtual NCMenuButton * createMenuButton ( YWidget * parent, const string & label );
- virtual NCMultiLineEdit * createMultiLineEdit ( YWidget * parent, const string & label );
- virtual NCImage * createImage ( YWidget * parent, const string & imagePath );
- virtual NCLogView * createLogView ( YWidget * parent, const string & label, int visibleLines, int storedLines = 0 );
- virtual NCMultiSelectionBox * createMultiSelectionBox ( YWidget * parent, const string & label );
- virtual YPackageSelector * createPackageSelector ( YWidget * parent );
- virtual YWidget * createPkgSpecial ( YWidget * parent ); // NCurses only, will throw exception in the Qt UI
+ /**
+ * Creates a MultiLineEdit widget
+ * @param label label above the edit field
+ * @param text initial contents of the edit field
+ */
+ virtual NCMultiLineEdit * createMultiLineEdit ( YWidget * parent,
+ const string & label );
+ /**
+ * Creates an image widget
+ */
+ virtual NCImage * createImage ( YWidget * parent,
+ const string & imagePath,
+ bool animated = false );
+
+ /**
+ * 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 NCLogView * createLogView ( YWidget * parent,
+ const string & label,
+ int visibleLines,
+ int storedLines = 0 );
+
+ virtual NCMultiSelectionBox * createMultiSelectionBox ( YWidget * parent,
+ const string & label );
+
+ virtual YPackageSelector * createPackageSelector ( YWidget * parent,
+ long ModeFlags = 0 );
+
+ // NCurses only
+ virtual YWidget * createPkgSpecial ( YWidget * parent,
+ const string & subwidgetName );
+
//
// Layout Helpers
//
- virtual NCSpacing * createSpacing ( YWidget * parent, YUIDimension dim, bool stretchable = false, YLayoutSize_t size = 0.0 );
+ virtual NCSpacing * createSpacing ( YWidget * parent,
+ YUIDimension dim, bool stretchable = false,
+ YLayoutSize_t size = 0.0 );
+
virtual NCEmpty * createEmpty ( YWidget * parent );
- virtual NCAlignment * createAlignment ( YWidget * parent, YAlignmentType horAlignment, YAlignmentType vertAlignment );
- virtual NCSquash * createSquash ( YWidget * parent, bool horSquash, bool vertSquash );
+
+ virtual NCAlignment * createAlignment ( YWidget * parent,
+ YAlignmentType horAlignment,
+ YAlignmentType vertAlignment );
+
+ virtual NCSquash * createSquash ( YWidget * parent,
+ bool horSquash,
+ bool vertSquash );
//
// Visual Grouping
//
- virtual NCFrame * createFrame ( YWidget * parent, const string & label );
- virtual NCCheckBoxFrame * createCheckBoxFrame ( YWidget * parent, const string & label, bool checked );
+ virtual NCFrame * createFrame ( YWidget * parent,
+ const string & label );
+
+ virtual NCCheckBoxFrame * createCheckBoxFrame ( YWidget * parent,
+ const string & label,
+ bool checked );
//
// Logical Grouping
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=39634&r1=39633&r2=39634&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.cc Tue Jul 24 13:57:35 2007
@@ -347,7 +347,6 @@
ONCREATE;
return new NCLayoutBox( parent, dimension );
}
-#endif
YSingleChildContainerWidget * YNCursesUI::createReplacePoint( YWidget * parent )
{
@@ -384,6 +383,7 @@
ONCREATE;
return new NCCheckBoxFrame( parent, label, checked );
}
+#endif
///////////////////////////////////////////////////////////////////
//
@@ -391,6 +391,7 @@
//
///////////////////////////////////////////////////////////////////
+#if 0
YWidget * YNCursesUI::createEmpty( YWidget * parent )
{
ONCREATE;
@@ -414,6 +415,8 @@
return new NCLabel( parent, text, isHeading, isOutputField );
}
+#endif
+
YWidget * YNCursesUI::createLogView( YWidget * parent, YWidgetOpt & opt,
const YCPString & label,
int visibleLines,
@@ -423,6 +426,7 @@
return new NCLogView( parent, opt, label, visibleLines, maxLines );
}
+#if 0
YWidget * YNCursesUI::createPushButton( YWidget * parent,
const string & label )
{
@@ -460,14 +464,6 @@
return new NCInputField( parent, label, passwordMode );
}
-YWidget *YNCursesUI::createMultiLineEdit( YWidget * parent, YWidgetOpt & opt,
- const YCPString & label,
- const YCPString & initialText )
-{
- ONCREATE;
- return new NCMultiLineEdit( parent, opt, label, initialText );
-}
-
YWidget * YNCursesUI::createSelectionBox( YWidget * parent, YWidgetOpt & opt,
const YCPString & label )
{
@@ -489,12 +485,14 @@
return new NCComboBox( parent, opt, label );
}
+
YWidget * YNCursesUI::createTree( YWidget * parent, YWidgetOpt & opt,
const YCPString & label )
{
ONCREATE;
return new NCTree( parent, opt, label );
}
+#endif
YWidget * YNCursesUI::createTable( YWidget * parent, YWidgetOpt & opt,
vector<string> header )
@@ -503,6 +501,7 @@
return new NCTable( parent, opt, header, true );
}
+#if 0
YWidget * YNCursesUI::createProgressBar( YWidget * parent, YWidgetOpt & opt,
const YCPString & label,
const YCPInteger & maxprogress,
@@ -511,23 +510,7 @@
ONCREATE;
return new NCProgressBar( parent, opt, label, maxprogress, progress );
}
-
-YWidget * YNCursesUI::createImage( YWidget * parent, YWidgetOpt & opt,
- YCPByteblock /* not used */,
- YCPString defaulttext )
-{
- ONCREATE;
- return new NCImage( parent, opt, defaulttext );
-}
-
-YWidget * YNCursesUI::createImage( YWidget * parent, YWidgetOpt & opt,
- YCPString /* not used */,
- YCPString defaulttext )
-{
- ONCREATE;
- return new NCImage( parent, opt, defaulttext );
-}
-
+#endif
YWidget * YNCursesUI::createIntField( YWidget * parent, YWidgetOpt & opt,
const YCPString & label,
@@ -544,6 +527,7 @@
//
///////////////////////////////////////////////////////////////////
+
///////////////////////////////////////////////////////////////////
//
//
@@ -569,6 +553,7 @@
return plugin;
}
+#if 0
///////////////////////////////////////////////////////////////////
//
//
@@ -617,6 +602,7 @@
return w;
}
+#endif
///////////////////////////////////////////////////////////////////
//
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=39634&r1=39633&r2=39634&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.h Tue Jul 24 13:57:35 2007
@@ -37,6 +37,7 @@
class NCOptionalWidgetFactory;
class YSingleChildContainerWidget;
+
/**
* @short YaST2 Component: NCursesUI user interface
* The YaST2 Component realizes a NCursesUI based user interface with an
@@ -144,7 +145,7 @@
*/
virtual YLayoutBox * createSplit( YWidget * parent, YWidgetOpt & opt,
YUIDimension dimension );
-#endif
+
/**
* Creates a replace point.
*/
@@ -204,6 +205,8 @@
virtual YWidget * createLabel( YWidget * parent, const string & text,
bool isHeading, bool isOutputField );
+#endif
+
/**
* Creates a log view widget
* @param label label above the log view
@@ -214,16 +217,7 @@
const YCPString & label,
int visibleLines,
int maxLines );
-
- /**
- * Creates a MultiLineEdit widget
- * @param label label above the edit field
- * @param text initial contents of the edit field
- */
- virtual YWidget * createMultiLineEdit( YWidget * parent, YWidgetOpt & opt,
- const YCPString & label,
- const YCPString & text);
-
+#if 0
/**
* Creates a push button.
* @param label Label of the button
@@ -232,6 +226,8 @@
virtual YWidget * createPushButton( YWidget * parent,
const string & label );
+#endif
+
/**
* Creates a menu button.
* @param label Label of the button
@@ -239,6 +235,7 @@
virtual YWidget * createMenuButton( YWidget * parent, YWidgetOpt & opt,
const YCPString & label );
+#if 0
/**
* Creates a radio button and inserts it into a radio button group
* @param label Label of the radio button
@@ -286,13 +283,15 @@
*/
virtual YWidget * createTree( YWidget * parent, YWidgetOpt & opt,
const YCPString & label );
-
+#endif
+
/**
* Creates a table widget
*/
virtual YWidget * createTable( YWidget * parent, YWidgetOpt & opt,
vector<string> header );
+#if 0
/**
* Creates a progress bar
*/
@@ -315,6 +314,7 @@
YCPString filename,
YCPString defaulttext);
+#endif
/**
* Creates an IntField widget.
*/
@@ -322,25 +322,26 @@
const YCPString & label,
int minValue, int maxValue,
int initialValue );
-
+#if 0
/**
* Creates the PackageSelector widget (i.e. a widget tree).
*/
virtual YWidget * createPackageSelector( YWidget *parent,
YWidgetOpt &opt,
const YCPString & floppyDevice );
-
- /**
- * Fills the PackageSelector widget.
- */
- virtual YCPValue runPkgSelection( YWidget * packageSelector );
-
- /**
+ /**
* Creates a special subwidget used for Package Selection (which doesn't exist in QT-UI).
*/
virtual YWidget * createPkgSpecial( YWidget *parent,
YWidgetOpt &opt,
const YCPString &subwidget );
+
+#endif
+
+ /**
+ * Fills the PackageSelector widget.
+ */
+ virtual YCPValue runPkgSelection( YWidget * packageSelector );
/**
* UI-specific setLanguage() function.
Modified: branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPackageSelector.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPackageSelector.cc?rev=39634&r1=39633&r2=39634&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPackageSelector.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPackageSelector.cc Tue Jul 24 13:57:35 2007
@@ -50,6 +50,7 @@
#include "YWidgetID.h"
#include "YCPDialogParser.h"
+#include "YPackageSelector.h"
typedef zypp::ui::PatchContents ZyppPatchContents;
typedef zypp::ui::PatchContents::const_iterator ZyppPatchContentsIterator;
@@ -99,7 +100,7 @@
//
// Constructor
//
-NCPackageSelector::NCPackageSelector( YNCursesUI * ui, YWidget * wRoot, const YWidgetOpt & opt )
+NCPackageSelector::NCPackageSelector( YNCursesUI * ui, YWidget * wRoot, long modeFlags )
: y2ui( ui )
, widgetRoot ( wRoot )
, visibleInfo( 0 )
@@ -187,16 +188,15 @@
eventHandlerMap[ NCPkgNames::SearchHelp()->toString() ] = &NCPackageSelector::HelpHandler;
eventHandlerMap[ NCPkgNames::PatchHelp()->toString() ] = &NCPackageSelector::YouHelpHandler;
- // FIXME - YWidgetOpt hasn't members youMode and updateMode (what is used instead?)
-#if 0
- if ( opt.youMode.value() )
+
+ if ( modeFlags & YPkg_OnlineUpdateMode )
youMode = true;
- if ( opt.updateMode.value() )
+ if ( modeFlags & YPkg_UpdateMode )
updateMode = true;
-#endif
+
// read test source information
- if ( opt.testMode.value() )
+ if (modeFlags & YPkg_TestMode )
testMode = true;
saveState ();
Modified: branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPackageSelector.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPackageSelector.h?rev=39634&r1=39633&r2=39634&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPackageSelector.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPackageSelector.h Tue Jul 24 13:57:35 2007
@@ -123,7 +123,7 @@
* @param ui The NCurses UI
* @param opt The widget options
*/
- NCPackageSelector( YNCursesUI * ui, YWidget * wRoot, const YWidgetOpt & opt );
+ NCPackageSelector( YNCursesUI * ui, YWidget * wRoot, long modeFlags );
/**
* Destructor
Modified: branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDeps.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDeps.cc?rev=39634&r1=39633&r2=39634&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDeps.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDeps.cc Tue Jul 24 13:57:35 2007
@@ -45,12 +45,16 @@
Self & operator= (const Self &); // prohibit assignment
NCPkgPopupDeps * depsPopup; // to notify about changes
+
protected:
virtual NCursesEvent wHandleInput( wint_t ch );
+
public:
- NCProblemSelectionBox (YWidget * parent, const YWidgetOpt & opt,
- const YCPString & label, NCPkgPopupDeps * aDepsPopup)
- : NCSelectionBox (parent, opt, label), depsPopup (aDepsPopup) {}
+ NCProblemSelectionBox (YWidget * parent, const string & label,
+ NCPkgPopupDeps * aDepsPopup)
+ : NCSelectionBox( parent, label),
+ depsPopup (aDepsPopup) {}
+
virtual ~NCProblemSelectionBox () {}
};
@@ -61,12 +65,16 @@
Self & operator= (const Self &); // prohibit assignment
NCPkgPopupDeps * depsPopup;
+
protected:
virtual NCursesEvent wHandleInput( wint_t ch );
+
public:
- NCSolutionSelectionBox (YWidget * parent, const YWidgetOpt & opt,
- const YCPString & label, NCPkgPopupDeps * aDepsPopup)
- : NCMultiSelectionBox (parent, opt, label), depsPopup (aDepsPopup) {}
+ NCSolutionSelectionBox (YWidget * parent, const string & label,
+ NCPkgPopupDeps * aDepsPopup)
+ : NCMultiSelectionBox( parent, label)
+ , depsPopup (aDepsPopup) {}
+
virtual ~NCSolutionSelectionBox () {}
};
@@ -136,9 +144,7 @@
new NCSpacing( vSplit, YD_VERT, true, 0.4 );
// add the list containing packages with unresolved dependencies
- problemw = new NCProblemSelectionBox( vSplit, opt,
- _("&Problems"),
- this);
+ problemw = new NCProblemSelectionBox( vSplit, _("&Problems"), this);
opt.isHStretchable.setValue( true );
@@ -156,9 +162,7 @@
new NCSpacing( vSplit, YD_VERT, true, 0.8 ); // stretchable = true
// add the package list containing the dependencies
- solutionw = new NCSolutionSelectionBox ( vSplit, opt,
- _("P&ossible Solutions"),
- this);
+ solutionw = new NCSolutionSelectionBox ( vSplit, _("P&ossible Solutions"), this);
opt.isHStretchable.setValue( false );
Modified: branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSearch.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSearch.cc?rev=39634&r1=39633&r2=39634&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSearch.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSearch.cc Tue Jul 24 13:57:35 2007
@@ -131,7 +131,7 @@
// add the checkBox ignore case
NCLayoutBox * hSplit2 = new NCLayoutBox( vSplit, YD_HORIZ );
- ignoreCase = new NCCheckBox( hSplit2, opt, YCPString(NCPkgNames::IgnoreCase()), true );
+ ignoreCase = new NCCheckBox( hSplit2, NCPkgNames::IgnoreCase(), true );
//hSplit2->addChild( new NCSpacing( hSplit2, opt, 0.1, true, false ) );
new NCSpacing( hSplit2, YD_HORIZ, true, 0.1 );
@@ -147,11 +147,11 @@
NCLayoutBox * vSplit3 = new NCLayoutBox( frame, YD_VERT );
opt.isVStretchable.setValue( false );
- checkName = new NCCheckBox( vSplit3, opt, YCPString(NCPkgNames::CheckName()), true );
- checkSummary = new NCCheckBox( vSplit3, opt, YCPString(NCPkgNames::CheckSummary()), true );
- checkDescr = new NCCheckBox( vSplit3, opt, YCPString(NCPkgNames::CheckDescr()), false );
- checkProvides = new NCCheckBox( vSplit3, opt, YCPString(NCPkgNames::CheckProvides()), false );
- checkRequires = new NCCheckBox( vSplit3, opt, YCPString(NCPkgNames::CheckRequires()), false );
+ checkName = new NCCheckBox( vSplit3, NCPkgNames::CheckName(), true );
+ checkSummary = new NCCheckBox( vSplit3, NCPkgNames::CheckSummary(), true );
+ checkDescr = new NCCheckBox( vSplit3, NCPkgNames::CheckDescr(), false );
+ checkProvides = new NCCheckBox( vSplit3, NCPkgNames::CheckProvides(), false );
+ checkRequires = new NCCheckBox( vSplit3, NCPkgNames::CheckRequires(), false );
//vSplit->addChild( new NCSpacing( vSplit, opt, 0.8, false, true ) ); // VSpacing
new NCSpacing( vSplit, YD_VERT, false, 0.8 );
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org