Author: gs
Date: Wed Jun 27 15:04:22 2007
New Revision: 39054
URL: http://svn.opensuse.org/viewcvs/yast?rev=39054&view=rev
Log:
adapt NCPushButton, NCRadioButton, NCLabel, NCSpacing,
NCTextEntry, NCAlignment, NCCheckBox to new API
Modified:
branches/tmp/sh/mod-ui/ncurses/src/NCAlignment.cc
branches/tmp/sh/mod-ui/ncurses/src/NCAskForDirectory.cc
branches/tmp/sh/mod-ui/ncurses/src/NCCheckBoxFrame.cc
branches/tmp/sh/mod-ui/ncurses/src/NCCheckBoxFrame.h
branches/tmp/sh/mod-ui/ncurses/src/NCDialog.cc
branches/tmp/sh/mod-ui/ncurses/src/NCEmpty.cc
branches/tmp/sh/mod-ui/ncurses/src/NCEmpty.h
branches/tmp/sh/mod-ui/ncurses/src/NCFrame.cc
branches/tmp/sh/mod-ui/ncurses/src/NCFrame.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/NCIntField.cc
branches/tmp/sh/mod-ui/ncurses/src/NCIntField.h
branches/tmp/sh/mod-ui/ncurses/src/NCLabel.cc
branches/tmp/sh/mod-ui/ncurses/src/NCLabel.h
branches/tmp/sh/mod-ui/ncurses/src/NCMenuButton.cc
branches/tmp/sh/mod-ui/ncurses/src/NCMultiLineEdit.cc
branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorPlugin.cc
branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorStart.cc
branches/tmp/sh/mod-ui/ncurses/src/NCPkgTable.cc
branches/tmp/sh/mod-ui/ncurses/src/NCPushButton.cc
branches/tmp/sh/mod-ui/ncurses/src/NCPushButton.h
branches/tmp/sh/mod-ui/ncurses/src/NCRadioButton.cc
branches/tmp/sh/mod-ui/ncurses/src/NCRadioButton.h
branches/tmp/sh/mod-ui/ncurses/src/NCRadioButtonGroup.cc
branches/tmp/sh/mod-ui/ncurses/src/NCRadioButtonGroup.h
branches/tmp/sh/mod-ui/ncurses/src/NCReplacePoint.cc
branches/tmp/sh/mod-ui/ncurses/src/NCReplacePoint.h
branches/tmp/sh/mod-ui/ncurses/src/NCRichText.cc
branches/tmp/sh/mod-ui/ncurses/src/NCSpacing.cc
branches/tmp/sh/mod-ui/ncurses/src/NCSpacing.h
branches/tmp/sh/mod-ui/ncurses/src/NCSquash.cc
branches/tmp/sh/mod-ui/ncurses/src/NCSquash.h
branches/tmp/sh/mod-ui/ncurses/src/NCTextEntry.cc
branches/tmp/sh/mod-ui/ncurses/src/NCTextEntry.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/NCPkgPopupDeps.cc
branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDescr.cc
branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDiskspace.cc
branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSearch.cc
branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSearch.h
branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSelection.cc
branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSelection.h
branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupTable.cc
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCAlignment.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCAlignment.cc?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCAlignment.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCAlignment.cc Wed Jun 27 15:04:22 2007
@@ -31,7 +31,7 @@
NCAlignment::NCAlignment( NCWidget * parent,
YAlignmentType halign,
YAlignmentType valign )
- : YAlignment( halign, valign )
+ : YAlignment( (YWidget *)parent, halign, valign )
, NCWidget( parent )
{
WIDDBG << endl;
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCAskForDirectory.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCAskForDirectory.cc?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCAskForDirectory.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCAskForDirectory.cc Wed Jun 27 15:04:22 2007
@@ -29,6 +29,8 @@
#include "NCFrame.h"
#include "NCi18n.h"
+#include "YWidgetID.h"
+
#include
#include
#include
@@ -102,17 +104,15 @@
opt.notifyMode.setValue( false );
- //the headline
- opt.isHeading.setValue( true );
-
- NCLabel * head = new NCLabel( split, opt, headline );
+ // the headline
+ NCLabel * head = new NCLabel( split, headline->toString(), true, false ); // isHeading = true
split->addChild( head );
- split->addChild( new NCSpacing( split, opt, 0.4, false, true ) );
+ split->addChild( new NCSpacing( split, YD_VERT, false, 0.4 ) );
opt.isHStretchable.setValue( true );
- NCFrame * frame = new NCFrame( split, opt, YCPString("" ) );
+ NCFrame * frame = new NCFrame( split, "" );
NCSplit * vSplit = new NCSplit( frame, opt, YD_VERT );
opt.isEditable.setValue( false );
@@ -123,7 +123,7 @@
dirName->setId( YCPString(idDirName->name()) );
- vSplit->addChild( new NCSpacing( vSplit, opt, 0.6, false, true ) );
+ vSplit->addChild( new NCSpacing( vSplit, YD_VERT, false, 0.6 ) );
split->addChild( frame );
@@ -132,15 +132,18 @@
split->addChild( hSplit );
// label for checkbox
detailed = new NCCheckBox( hSplit, opt, YCPString(_( "&Detailed View" )), false );
- detailed->setId( YCPString(idDetails->name()) );
+ YStringWidgetID * detailsID = YStringWidgetID( idDetails->name() );
+ detailed->setId( detailsID );
- hSplit->addChild( new NCSpacing( hSplit, opt, 0.1, true, false ) );
+ //hSplit->addChild( new NCSpacing( hSplit, opt, 0.1, true, false ) );
+ hSplit->addChild( new NCSpacing( hSplit, YD_HORIZ, true, 0.1 ) ); // stretchable = true
hSplit->addChild( detailed );
// add the list of directories
dirList = new NCDirectoryTable( split, opt, NCFileTable::T_Overview, iniDir );
- dirList->setId( YCPString(idDirList->name()) );
+ YStringWidgetID * dirListID = new YStringWidgetID( idDirList->name() );
+ dirList->setId( dirListID );
split->addChild( dirList );
split->addChild( new NCSpacing( split, opt, 0.4, false, true ) );
@@ -149,26 +152,31 @@
NCSplit * hSplit1 = new NCSplit( split, opt, YD_HORIZ );
split->addChild( hSplit1 );
opt.isHStretchable.setValue( true );
- hSplit1->addChild( new NCSpacing( hSplit1, opt, 0.2, true, false ) );
+ //hSplit1->addChild( new NCSpacing( hSplit1, opt, 0.2, true, false ) );
+ hSplit1->addChild( new NCSpacing( hSplit1, YD_HORIZ, true, 0.2 ) ); // stretchable = true
// add the OK button
opt.key_Fxx.setValue( 10 );
// the label of an OK button
- okButton = new NCPushButton( hSplit1, opt, YCPString(_( "&OK" )) );
- okButton->setId( YCPString(idOk->name()) );
+ okButton = new NCPushButton( hSplit1, _( "&OK" ) );
+ YStringWidgetID * okID = new YStringWidgetID (idOk->name() );
+ okButton->setId( okID );
hSplit1->addChild( okButton );
- hSplit1->addChild( new NCSpacing( hSplit1, opt, 0.4, true, false ) );
+ //hSplit1->addChild( new NCSpacing( hSplit1, opt, 0.4, true, false ) );
+ hSplit1->addChild( new NCSpacing( hSplit1, YD_HORIZ, true, 0.4 ) );
// add the Cancel button
opt.key_Fxx.setValue( 9 );
// the label of the Cancel button
- cancelButton = new NCPushButton( hSplit1, opt, YCPString(_( "&Cancel" )) );
- cancelButton->setId( YCPString(idCancel->name()) );
+ cancelButton = new NCPushButton( hSplit1, _( "&Cancel" ) );
+ YStringWidgetID * cancelID = new YStringWidgetID (idCancel->name() );
+ cancelButton->setId( cancelID );
hSplit1->addChild( cancelButton );
- hSplit1->addChild( new NCSpacing( hSplit1, opt, 0.2, true, false ) );
+ //hSplit1->addChild( new NCSpacing( hSplit1, opt, 0.2, true, false ) );
+ hSplit1->addChild( new NCSpacing( hSplit1, YD_HORIZ, true, 0.2 ) );
}
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCCheckBoxFrame.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCCheckBoxFrame.cc?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCCheckBoxFrame.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCCheckBoxFrame.cc Wed Jun 27 15:04:22 2007
@@ -28,9 +28,9 @@
//
// DESCRIPTION :
//
-NCCheckBoxFrame::NCCheckBoxFrame( NCWidget * parent, const YWidgetOpt & opt,
- const YCPString & nlabel, bool checked )
- : YCheckBoxFrame( opt, nlabel )
+NCCheckBoxFrame::NCCheckBoxFrame( NCWidget * parent, const string & nlabel,
+ bool checked )
+ : YCheckBoxFrame( (YWidget *)parent, nlabel, checked )
, NCWidget( parent )
{
WIDDBG << endl;
@@ -38,7 +38,8 @@
framedim.Pos = wpos( 1 );
framedim.Sze = wsze( 2 );
- setLabel( getLabel() );
+ //setLabel( getLabel() );
+ setLabel( YCheckBoxFrame::label() );
hotlabel = &label;
if ( invertAutoEnable() )
@@ -75,8 +76,10 @@
//space to add - keep vertical dim, add horizontal space
//for checkbox
wpair plussize = wpair(0,4);
- defsze = wsze( YContainerWidget::child(0)->nicesize( YD_VERT ),
- YContainerWidget::child(0)->nicesize( YD_HORIZ ) );
+ //defsze = wsze( YContainerWidget::child(0)->nicesize( YD_VERT ),
+ // YContainerWidget::child(0)->nicesize( YD_HORIZ ) );
+ defsze = wsze( firstChild()->preferredWidth(),
+ firstChild()->preferredHeight() );
if ( label.width() > (unsigned)defsze.W )
defsze.W = label.width();
defsze += framedim.Sze + plussize;
@@ -97,7 +100,8 @@
wsze csze( newheight, newwidth );
wRelocate( wpos( 0 ), csze );
csze = wsze::max( 0, csze - framedim.Sze );
- YContainerWidget::child(0)->setSize( csze.W, csze.H );
+ //YContainerWidget::child(0)->setSize( csze.W, csze.H );
+ firstChild()->setSize( csze.W, csze.H );
}
///////////////////////////////////////////////////////////////////
@@ -108,11 +112,11 @@
//
// DESCRIPTION :
//
-void NCCheckBoxFrame::setLabel( const YCPString & nlabel )
+void NCCheckBoxFrame::setLabel( const string & nlabel )
{
YCheckBoxFrame::setLabel( nlabel );
- label = NCstring( getLabel() );
+ label = NCstring( YCheckBoxFrame::label() );
label.stripHotkey();
Redraw();
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCCheckBoxFrame.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCCheckBoxFrame.h?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCCheckBoxFrame.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCCheckBoxFrame.h Wed Jun 27 15:04:22 2007
@@ -55,8 +55,8 @@
public:
- NCCheckBoxFrame( NCWidget * parent, const YWidgetOpt & opt,
- const YCPString & label, bool checked );
+ NCCheckBoxFrame( NCWidget * parent, const string & label,
+ bool checked );
virtual ~NCCheckBoxFrame();
virtual long nicesize( YUIDimension dim );
@@ -68,7 +68,7 @@
**/
virtual void setSize( int newWidth, int newHeight );
- virtual void setLabel( const YCPString & nlabel );
+ virtual void setLabel( const string & nlabel );
virtual void setEnabling( bool do_bv );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCDialog.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCDialog.cc?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCDialog.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCDialog.cc Wed Jun 27 15:04:22 2007
@@ -197,12 +197,14 @@
//
long NCDialog::nicesize( YUIDimension dim )
{
- if ( hasDefaultSize() || !numChildren() ) {
+ if ( hasDefaultSize() || !childrenCount() ) {
return dim == YD_HORIZ ? wGetDefsze().W : wGetDefsze().H;
}
- wsze csze( child( 0 )->nicesize( YD_VERT ),
- child( 0 )->nicesize( YD_HORIZ ) );
+ //wsze csze( child( 0 )->nicesize( YD_VERT ),
+ // child( 0 )->nicesize( YD_HORIZ ) );
+ wsze csze( firstChild()->preferredHeight(),
+ firstChild()->preferredWidth() );
csze = wsze::min( wGetDefsze(),
wsze::max( csze, wsze( 1 ) ) );
@@ -1382,11 +1384,14 @@
{
// Retrieve the widget's "shortcut property" that describes
// whatever it is - regardless of widget type (PushButton, ...)
- YCPSymbol propertyName( w->shortcutProperty() );
- YCPValue propertyValue = w->queryWidget( propertyName );
-
+ //YCPSymbol propertyName( w->shortcutProperty() );
+ //YCPValue propertyValue = w->queryWidget( propertyName );
// Get rid of unwanted '&' shortcut markers
- string desc = YShortcut::cleanShortcutString( propertyValue->asString()->value() );
+ //string desc = YShortcut::cleanShortcutString( propertyValue->asString()->value() );
+
+ // FIXME ??? correct string ???
+ string desc = w->debugLabel();
+
int no = fkey - KEY_F(1) + 1;
if ( no == 1 )
{
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCEmpty.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCEmpty.cc?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCEmpty.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCEmpty.cc Wed Jun 27 15:04:22 2007
@@ -28,8 +28,8 @@
//
// DESCRIPTION :
//
-NCEmpty::NCEmpty( NCWidget * parent, const YWidgetOpt & opt )
- : YEmpty( opt )
+NCEmpty::NCEmpty( NCWidget * parent )
+ : YEmpty( (YWidget *)parent )
, NCWidget( parent )
{
WIDDBG << endl;
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCEmpty.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCEmpty.h?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCEmpty.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCEmpty.h Wed Jun 27 15:04:22 2007
@@ -47,7 +47,7 @@
public:
- NCEmpty( NCWidget * parent, const YWidgetOpt & opt );
+ NCEmpty( NCWidget * parent );
virtual ~NCEmpty();
// virtual long nicesize( YUIDimension dim ){ return YEmpty::nicesize( dim ); }
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCFrame.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCFrame.cc?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCFrame.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCFrame.cc Wed Jun 27 15:04:22 2007
@@ -28,16 +28,16 @@
//
// DESCRIPTION :
//
-NCFrame::NCFrame( NCWidget * parent, const YWidgetOpt & opt,
- const YCPString & nlabel )
- : YFrame( opt, nlabel )
+NCFrame::NCFrame( NCWidget * parent, const string & nlabel )
+ : YFrame( (YWidget *)parent, nlabel )
, NCWidget( parent )
{
WIDDBG << endl;
wstate = NC::WSdumb;
framedim.Pos = wpos( 1 );
framedim.Sze = wsze( 2 );
- setLabel( getLabel() );
+ //setLabel( getLabel() );
+ setLabel( YFrame::label() );
hotlabel = &label;
}
@@ -64,8 +64,11 @@
//
long NCFrame::nicesize( YUIDimension dim )
{
- defsze = wsze( YContainerWidget::child(0)->nicesize( YD_VERT ),
- YContainerWidget::child(0)->nicesize( YD_HORIZ ) );
+ //defsze = wsze( YContainerWidget::child(0)->nicesize( YD_VERT ),
+ // YContainerWidget::child(0)->nicesize( YD_HORIZ ) );
+ defsze = wsze( firstChild()->preferredWidth(),
+ firstChild()->preferredHeight() );
+
if ( label.width() > (unsigned)defsze.W )
defsze.W = label.width();
defsze += framedim.Sze;
@@ -86,7 +89,8 @@
wsze csze( newheight, newwidth );
wRelocate( wpos( 0 ), csze );
csze = wsze::max( 0, csze - framedim.Sze );
- YContainerWidget::child(0)->setSize( csze.W, csze.H );
+ //YContainerWidget::child(0)->setSize( csze.W, csze.H );
+ firstChild()->setSize( csze.W, csze.H );
}
///////////////////////////////////////////////////////////////////
@@ -97,10 +101,11 @@
//
// DESCRIPTION :
//
-void NCFrame::setLabel( const YCPString & nlabel )
+void NCFrame::setLabel( const string & nlabel )
{
YFrame::setLabel( nlabel );
- label = NCstring( getLabel() );
+ //label = NCstring( getLabel() );
+ label = NCstring( YFrame::label() );
label.stripHotkey();
Redraw();
}
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCFrame.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCFrame.h?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCFrame.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCFrame.h Wed Jun 27 15:04:22 2007
@@ -53,8 +53,7 @@
public:
- NCFrame( NCWidget * parent, const YWidgetOpt & opt,
- const YCPString & label );
+ NCFrame( NCWidget * parent, const string & label );
virtual ~NCFrame();
virtual long nicesize( YUIDimension dim );
@@ -66,7 +65,7 @@
**/
virtual void setSize( int newWidth, int newHeight );
- virtual void setLabel( const YCPString & nlabel );
+ virtual void setLabel( const string & nlabel );
//virtual void setEnabling( bool do_bv );
//Use setEnabling() from the parent, it should work out (#256707) :-)
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=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCImage.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCImage.cc Wed Jun 27 15:04:22 2007
@@ -66,6 +66,16 @@
return dim == YD_HORIZ ? wGetDefsze().W : wGetDefsze().H;
}
+int NCImage::preferredWidth()
+{
+ return wGetDefsze().W;
+}
+
+int NCImage::preferredHeight()
+{
+ return wGetDefsze().H;
+}
+
///////////////////////////////////////////////////////////////////
//
//
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=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCImage.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCImage.h Wed Jun 27 15:04:22 2007
@@ -54,6 +54,9 @@
virtual long nicesize( YUIDimension dim );
+ virtual int preferredWidth();
+ virtual int preferredHeight();
+
/**
* Set the new size of the widget.
*
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCIntField.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCIntField.cc?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCIntField.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCIntField.cc Wed Jun 27 15:04:22 2007
@@ -89,6 +89,16 @@
return dim == YD_HORIZ ? wGetDefsze().W : wGetDefsze().H;
}
+int NCIntField::preferredWidth()
+{
+ return wGetDefsze().W;
+}
+
+int NCIntField::preferredHeight()
+{
+ return wGetDefsze().H;
+}
+
///////////////////////////////////////////////////////////////////
//
//
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCIntField.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCIntField.h?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCIntField.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCIntField.h Wed Jun 27 15:04:22 2007
@@ -78,6 +78,9 @@
virtual long nicesize( YUIDimension dim );
+ virtual int preferredWidth();
+ virtual int preferredHeight();
+
/**
* Set the new size of the widget.
*
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCLabel.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCLabel.cc?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCLabel.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCLabel.cc Wed Jun 27 15:04:22 2007
@@ -28,11 +28,11 @@
//
// DESCRIPTION :
//
-NCLabel::NCLabel( NCWidget * parent, const YWidgetOpt & opt,
- const YCPString & nlabel )
- : YLabel( opt, nlabel )
+NCLabel::NCLabel( NCWidget * parent, const string & nlabel,
+ bool isHeading, bool isOutputField )
+ : YLabel( (YWidget *)parent, nlabel, isHeading, isOutputField )
, NCWidget( parent )
- , heading( opt.isHeading.value() )
+ , heading( isHeading )
{
WIDDBG << endl;
setLabel( nlabel );
@@ -98,7 +98,7 @@
//
// DESCRIPTION :
//
-void NCLabel::setLabel( const YCPString & nlabel )
+void NCLabel::setLabel( const string & nlabel )
{
label = NCstring( nlabel );
NCDBG << "LABEL: " << NCstring(nlabel) << " Longest line: " << label.width()<< endl;
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCLabel.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCLabel.h?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCLabel.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCLabel.h Wed Jun 27 15:04:22 2007
@@ -52,8 +52,8 @@
public:
- NCLabel( NCWidget * parent, const YWidgetOpt & opt,
- const YCPString & text );
+ NCLabel( NCWidget * parent, const string & text,
+ bool isHeading, bool isOutputField );
virtual ~NCLabel();
virtual long nicesize( YUIDimension dim );
@@ -65,7 +65,7 @@
**/
virtual void setSize( int newWidth, int newHeight );
- virtual void setLabel( const YCPString & nlabel );
+ virtual void setLabel( const string & nlabel );
virtual void setEnabling( bool do_bv ) { NCWidget::setEnabling( enabled=do_bv ); }
virtual int preferredWidth();
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCMenuButton.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCMenuButton.cc?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCMenuButton.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCMenuButton.cc Wed Jun 27 15:04:22 2007
@@ -21,6 +21,8 @@
#include "NCMenuButton.h"
#include "NCPopupMenu.h"
+#include "YWidgetID.h"
+
///////////////////////////////////////////////////////////////////
//
//
@@ -193,7 +195,10 @@
return NCursesEvent::none;
NCursesEvent ret = NCursesEvent::menu;
- ret.selection = indexToId( selection );
+ // FIXME
+ YCPValue value = indexToId( selection );
+ YStringWidgetID * selectionID = new YStringWidgetID( value->toString());
+ ret.selection = selectionID;
return ret;
}
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=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCMultiLineEdit.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCMultiLineEdit.cc Wed Jun 27 15:04:22 2007
@@ -66,7 +66,7 @@
return dim == YD_HORIZ ? wGetDefsze().W : wGetDefsze().H;
}
-int NCMultiLineEditC::preferredWidth()
+int NCMultiLineEdit::preferredWidth()
{
defsze.W = ( 5 > labelWidht() ? 5 : labelWidht() ) + 2
return wGetDefsze().W;
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=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorPlugin.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorPlugin.cc Wed Jun 27 15:04:22 2007
@@ -109,7 +109,7 @@
else
{
NCERR << "PkgSpecial( " << subwidget->toString() << " ) not found - take default `Label" << endl;
- w = new NCLabel( dynamic_cast( parent ), opt, subwidget );
+ w = new NCLabel( dynamic_cast( parent ), subwidget->toString(), false, false );
}
return w;
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=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorStart.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorStart.cc Wed Jun 27 15:04:22 2007
@@ -97,7 +97,7 @@
NCDBG << "Widget tree of NCPackageSelector created" << endl;
// get the widget ID of the package table
- YWidget * pkg = YDialogParser::findWidgetWithId( widgetRoot, NCPkgNames::Packages() );
+ YWidget * pkg = YCPDialogParser::findWidgetWithId( widgetRoot, NCPkgNames::Packages() );
pkgList = dynamic_cast(pkg);
if ( pkgList )
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCPkgTable.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCPkgTable.cc?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCPkgTable.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCPkgTable.cc Wed Jun 27 15:04:22 2007
@@ -437,7 +437,10 @@
packager->fillPatchList( "installable" ); // default: installable patches
// set the visible info to long description
- packager->setVisibleInfo ( NCPkgNames::PatchDescr() );
+ //packager->setVisibleInfo ( NCPkgNames::PatchDescr() );
+ YStringWidgetID * descrID = new YStringWidgetID( "patchdescr" );
+ packager->setVisibleInfo ( descrID );
+
// show the package description of the current item
showInformation ();
break;
@@ -447,7 +450,9 @@
{
packager->fillUpdateList();
// set the visible info to package description
- packager->setVisibleInfo ( NCPkgNames::PkgInfo() );
+ //packager->setVisibleInfo ( NCPkgNames::PkgInfo() );
+ YStringWidgetID * infoID = new YStringWidgetID( "pkginfo");
+ packager->setVisibleInfo ( infoID );
// show the package description of the current item
showInformation ();
break;
@@ -462,7 +467,9 @@
defaultGroup );
// set the visible info to package description
- packager->setVisibleInfo ( NCPkgNames::PkgInfo() );
+ //packager->setVisibleInfo ( NCPkgNames::PkgInfo() );
+ YStringWidgetID * infoID = new YStringWidgetID( "pkginfo");
+ packager->setVisibleInfo ( infoID );
// show the package description of the current item
showInformation ();
}
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCPushButton.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCPushButton.cc?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCPushButton.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCPushButton.cc Wed Jun 27 15:04:22 2007
@@ -28,18 +28,17 @@
//
// DESCRIPTION :
//
-NCPushButton::NCPushButton( NCWidget * parent, const YWidgetOpt & opt,
- YCPString nlabel )
- : YPushButton( opt, nlabel )
+NCPushButton::NCPushButton( NCWidget * parent, const string & nlabel )
+ : YPushButton( (YWidget *)parent, nlabel )
, NCWidget( parent )
{
WIDDBG << endl;
setLabel( nlabel );
hotlabel = &label;
- if ( opt.isDefaultButton.value() )
+ if ( isDefaultButton() )
setKeyboardFocus();
-
- setFunctionHotkey( opt );
+ // FIXME !!!
+ //setFunctionHotkey( opt );
}
///////////////////////////////////////////////////////////////////
@@ -120,7 +119,7 @@
//
// DESCRIPTION :
//
-void NCPushButton::setLabel( const YCPString & nlabel )
+void NCPushButton::setLabel( const string & nlabel )
{
label = NCstring( nlabel );
label.stripHotkey();
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCPushButton.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCPushButton.h?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCPushButton.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCPushButton.h Wed Jun 27 15:04:22 2007
@@ -51,8 +51,7 @@
public:
- NCPushButton( NCWidget * parent, const YWidgetOpt & opt,
- YCPString label );
+ NCPushButton( NCWidget * parent, const string & label );
virtual ~NCPushButton();
virtual long nicesize( YUIDimension dim );
@@ -69,7 +68,7 @@
virtual NCursesEvent wHandleInput( wint_t key );
- virtual void setLabel( const YCPString & nlabel );
+ virtual void setLabel( const string & nlabel );
virtual void setEnabling( bool do_bv ) { NCWidget::setEnabling( enabled=do_bv ); }
virtual bool setKeyboardFocus() {
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCRadioButton.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCRadioButton.cc?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCRadioButton.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCRadioButton.cc Wed Jun 27 15:04:22 2007
@@ -32,8 +32,8 @@
// DESCRIPTION :
//
NCRadioButton::NCRadioButton( NCWidget * parent,
- const YCPString & nlabel )
- : YRadioButton( parent, nlabel )
+ const string & nlabel )
+ : YRadioButton( dynamic_cast(parent), nlabel )
, NCWidget( parent )
, checked( false )
{
@@ -101,7 +101,7 @@
//
// DESCRIPTION :
//
-void NCRadioButton::setLabel( const YCPString & nlabel )
+void NCRadioButton::setLabel( const string & nlabel )
{
label = NCstring( nlabel );
label.stripHotkey();
@@ -110,6 +110,7 @@
Redraw();
}
+#if 0
///////////////////////////////////////////////////////////////////
//
//
@@ -122,6 +123,7 @@
{
setValue( newval->value() );
}
+#endif
///////////////////////////////////////////////////////////////////
//
@@ -131,7 +133,7 @@
//
// DESCRIPTION :
//
-void NCRadioButton::setValue( const bool & newval )
+void NCRadioButton::setValue( bool newval )
{
if ( newval != checked ) {
checked = newval;
@@ -142,6 +144,7 @@
}
}
+#if 0
///////////////////////////////////////////////////////////////////
//
//
@@ -154,6 +157,7 @@
{
return YCPBoolean( checked );
}
+#endif
///////////////////////////////////////////////////////////////////
//
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCRadioButton.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCRadioButton.h?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCRadioButton.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCRadioButton.h Wed Jun 27 15:04:22 2007
@@ -48,14 +48,14 @@
virtual const char * location() const { return "NCRadioButton"; }
- virtual void setValue( const bool & checked );
+ // virtual void setValue( const bool & checked );
virtual void wRedraw();
public:
NCRadioButton( NCWidget * parent,
- const YCPString & label );
+ const string & label );
virtual ~NCRadioButton();
virtual long nicesize( YUIDimension dim );
@@ -70,12 +70,12 @@
**/
virtual void setSize( int newWidth, int newHeight );
- virtual void setLabel( const YCPString & nlabel );
+ virtual void setLabel( const string & nlabel );
// virtual void setValue( const YCPBoolean & newval );
// virtual YCPBoolean getValue();
- virtual void setValue ( bool newval ){ checked = newval; }
+ virtual void setValue ( bool newval );
virtual bool value() { return checked; }
virtual NCursesEvent wHandleInput( wint_t key );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCRadioButtonGroup.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCRadioButtonGroup.cc?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCRadioButtonGroup.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCRadioButtonGroup.cc Wed Jun 27 15:04:22 2007
@@ -28,8 +28,8 @@
//
// DESCRIPTION :
//
-NCRadioButtonGroup::NCRadioButtonGroup( NCWidget * parent, const YWidgetOpt & opt )
- : YRadioButtonGroup( opt )
+NCRadioButtonGroup::NCRadioButtonGroup( NCWidget * parent )
+ : YRadioButtonGroup( dynamic_cast(parent) )
, NCWidget( parent )
, focusId( 0 )
{
@@ -100,6 +100,8 @@
//
void NCRadioButtonGroup::focusNextButton( )
{
+ // FIXME
+#if 0
if ( focusId < buttonlist.size() -1 )
focusId++;
else if ( focusId == buttonlist.size() -1 )
@@ -107,7 +109,8 @@
NCRadioButton * button = dynamic_cast(buttonlist[focusId]);
if ( button )
- button->setKeyboardFocus();
+ button->setKeyboardFocus();
+#endif
}
///////////////////////////////////////////////////////////////////
@@ -120,6 +123,7 @@
//
void NCRadioButtonGroup::focusPrevButton()
{
+#if 0
if ( focusId > 0 )
focusId--;
else if ( focusId == 0 )
@@ -128,10 +132,12 @@
NCRadioButton * button = dynamic_cast(buttonlist[focusId]);
if ( button )
button->setKeyboardFocus();
+#endif
}
void NCRadioButtonGroup::setEnabling( bool do_bv )
{
+#if 0
NCRadioButton * button;
for ( unsigned int i = 0; i < buttonlist.size(); i++ )
@@ -140,4 +146,5 @@
if ( button )
button->setEnabling( enabled=do_bv );
}
+#endif
}
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCRadioButtonGroup.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCRadioButtonGroup.h?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCRadioButtonGroup.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCRadioButtonGroup.h Wed Jun 27 15:04:22 2007
@@ -49,7 +49,7 @@
public:
- NCRadioButtonGroup( NCWidget * parent, const YWidgetOpt & opt );
+ NCRadioButtonGroup( NCWidget * parent );
virtual ~NCRadioButtonGroup();
//virtual long nicesize( YUIDimension dim ) { return YRadioButtonGroup::nicesize( dim ); }
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCReplacePoint.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCReplacePoint.cc?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCReplacePoint.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCReplacePoint.cc Wed Jun 27 15:04:22 2007
@@ -28,8 +28,8 @@
//
// DESCRIPTION :
//
-NCReplacePoint::NCReplacePoint( NCWidget * parent, const YWidgetOpt & opt )
- : YReplacePoint( opt )
+NCReplacePoint::NCReplacePoint( NCWidget * parent )
+ : YReplacePoint( (YWidget *)parent )
, NCWidget( parent )
{
WIDDBG << endl;
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCReplacePoint.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCReplacePoint.h?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCReplacePoint.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCReplacePoint.h Wed Jun 27 15:04:22 2007
@@ -47,7 +47,7 @@
public:
- NCReplacePoint( NCWidget * parent, const YWidgetOpt & opt );
+ NCReplacePoint( NCWidget * parent );
virtual ~NCReplacePoint();
//virtual long nicesize( YUIDimension dim ) { return YReplacePoint::nicesize( dim ); }
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCRichText.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCRichText.cc?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCRichText.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCRichText.cc Wed Jun 27 15:04:22 2007
@@ -23,6 +23,8 @@
#include "stringutil.h"
#include <sstream>
+#include "YWidgetID.h"
+
#if 0
#undef DBG_CLASS
#define DBG_CLASS "_NCRichText_"
@@ -321,7 +323,9 @@
string ycpstr;
NCstring::RecodeFromWchar( anchors[armed].target, "UTF-8", &ycpstr );
NCMIL << "LINK: " << ycpstr << endl;
- ret.selection = YCPString( ycpstr );
+ YStringWidgetID * selectionID = new YCPStringWidgetID( ycpstr );
+ //ret.selection = YCPString( ycpstr );
+ ret.selection = selectionID;
}
break;
}
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCSpacing.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCSpacing.cc?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCSpacing.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCSpacing.cc Wed Jun 27 15:04:22 2007
@@ -28,12 +28,15 @@
//
// DESCRIPTION :
//
-NCSpacing::NCSpacing( NCWidget * parent, const YWidgetOpt & opt,
- float size, bool horizontal, bool vertical )
- : YSpacing( opt, size, horizontal, vertical )
+NCSpacing::NCSpacing( NCWidget * parent,
+ YUIDimension dim,
+ bool stretchable,
+ YLayoutSize_t layoutUnits )
+ : YSpacing( (YWidget *)parent, dim, stretchable )
, NCWidget( parent )
{
WIDDBG << endl;
+#if 0
if ( horizontal && vertical ) {
l = "NC(B)Spacing";
}
@@ -46,6 +49,15 @@
else {
l = "NC(N)Spacing";
}
+#endif
+
+ if ( dim == YD_VERT )
+ l = "NC(V)Spacing";
+ else if ( dim == YD_HORIZ )
+ l = "NC(H)Spacing";
+ else
+ l = "NC(N)Spacing";
+
wstate = NC::WSdumb;
skipNoDimWin = true;
}
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCSpacing.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCSpacing.h?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCSpacing.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCSpacing.h Wed Jun 27 15:04:22 2007
@@ -49,8 +49,8 @@
public:
- NCSpacing( NCWidget * parent, const YWidgetOpt & opt,
- float size, bool horizontal, bool vertical );
+ NCSpacing( NCWidget * parent, YUIDimension dim,
+ bool stretchable, YLayoutSize_t layoutUnits );
virtual ~NCSpacing();
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCSquash.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCSquash.cc?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCSquash.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCSquash.cc Wed Jun 27 15:04:22 2007
@@ -28,9 +28,9 @@
//
// DESCRIPTION :
//
-NCSquash::NCSquash( NCWidget * parent, const YWidgetOpt & opt,
+NCSquash::NCSquash( NCWidget * parent,
bool hsquash, bool vsquash )
- : YSquash( opt, hsquash, vsquash )
+ : YSquash( (YWidget *)parent, hsquash, vsquash )
, NCWidget( parent )
{
WIDDBG << endl;
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCSquash.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCSquash.h?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCSquash.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCSquash.h Wed Jun 27 15:04:22 2007
@@ -47,8 +47,7 @@
public:
- NCSquash( NCWidget * parent, const YWidgetOpt & opt,
- bool hsquash, bool vsquash );
+ NCSquash( NCWidget * parent, bool hsquash, bool vsquash );
virtual ~NCSquash();
//virtual long nicesize( YUIDimension dim ) { return YSquash::nicesize( dim ); }
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCTextEntry.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCTextEntry.cc?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCTextEntry.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCTextEntry.cc Wed Jun 27 15:04:22 2007
@@ -37,15 +37,15 @@
//
// DESCRIPTION :
//
-NCTextEntry::NCTextEntry( NCWidget * parent, const YWidgetOpt & opt,
- const YCPString & nlabel,
- const YCPString & ntext,
+NCTextEntry::NCTextEntry( NCWidget * parent,
+ const string & nlabel,
+ bool passwordMode,
unsigned maxInput,
unsigned maxFld )
- : YTextEntry( opt, nlabel )
+ : YTextEntry( dynamic_cast(parent), nlabel, passwordMode )
, NCWidget( parent )
, mayedit( true )
- , passwd( opt.passwordMode.value() )
+ , passwd( passwordMode )
, lwin( 0 )
, twin( 0 )
, maxFldLength ( maxFld )
@@ -67,7 +67,8 @@
setLabel( nlabel );
hotlabel = &label;
- setText( ntext );
+ // not longer on params
+ //setText( ntext );
}
@@ -200,7 +201,7 @@
//
// DESCRIPTION :
//
-void NCTextEntry::setLabel( const YCPString & nlabel )
+void NCTextEntry::setLabel( const string & nlabel )
{
label = NCstring( nlabel );
label.stripHotkey();
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCTextEntry.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCTextEntry.h?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCTextEntry.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCTextEntry.h Wed Jun 27 15:04:22 2007
@@ -90,9 +90,9 @@
public:
- NCTextEntry( NCWidget * parent, const YWidgetOpt & opt,
- const YCPString & label,
- const YCPString & text,
+ NCTextEntry( NCWidget * parent,
+ const string & label,
+ bool passwordMode,
unsigned maxInput = 0,
unsigned maxFld = 0 );
virtual ~NCTextEntry();
@@ -112,7 +112,7 @@
**/
virtual void setSize( int newWidth, int newHeight );
- virtual void setLabel( const YCPString & nlabel );
+ virtual void setLabel( const string & nlabel );
virtual void setText( const YCPString & ntext );
virtual YCPString getText();
@@ -120,7 +120,7 @@
virtual void setValue( const std::string & ntext ); // new for setText()
virtual string value(); // new for getText()
- virtual void setValidChars( const YCPString & validchars );
+ virtual void setValidChars( const string & validchars );
virtual NCursesEvent wHandleInput( wint_t key );
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=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.cc Wed Jun 27 15:04:22 2007
@@ -355,10 +355,10 @@
dimension );
}
-YSingleChildContainerWidget * YNCursesUI::createReplacePoint( YWidget * parent, YWidgetOpt & opt )
+YSingleChildContainerWidget * YNCursesUI::createReplacePoint( YWidget * parent )
{
ONCREATE;
- return new NCReplacePoint( dynamic_cast( parent ), opt );
+ return new NCReplacePoint( dynamic_cast( parent ) );
}
YSingleChildContainerWidget * YNCursesUI::createAlignment( YWidget * parent,
@@ -370,29 +370,27 @@
halign, valign );
}
-YSingleChildContainerWidget * YNCursesUI::createSquash( YWidget * parent, YWidgetOpt & opt,
- bool hsquash,
- bool vsquash )
+YSingleChildContainerWidget * YNCursesUI::createSquash( YWidget * parent,
+ bool hsquash,
+ bool vsquash )
{
ONCREATE;
- return new NCSquash( dynamic_cast( parent ), opt,
+ return new NCSquash( dynamic_cast( parent ),
hsquash, vsquash );
}
-YSingleChildContainerWidget * YNCursesUI::createFrame( YWidget * parent, YWidgetOpt & opt,
- const YCPString & label )
+YSingleChildContainerWidget * YNCursesUI::createFrame( YWidget * parent,
+ const string & label )
{
ONCREATE;
- return new NCFrame( dynamic_cast( parent ), opt,
- label );
+ return new NCFrame( dynamic_cast( parent ), label );
}
-YSingleChildContainerWidget * YNCursesUI::createCheckBoxFrame( YWidget * parent, YWidgetOpt & opt,
- const YCPString & label, bool checked )
+YSingleChildContainerWidget * YNCursesUI::createCheckBoxFrame( YWidget * parent,
+ const string & label, bool checked )
{
ONCREATE;
- return new NCCheckBoxFrame( dynamic_cast( parent ), opt,
- label, checked );
+ return new NCCheckBoxFrame( dynamic_cast( parent ), label, checked );
}
///////////////////////////////////////////////////////////////////
@@ -401,28 +399,29 @@
//
///////////////////////////////////////////////////////////////////
-YWidget * YNCursesUI::createEmpty( YWidget * parent, YWidgetOpt & opt )
+YWidget * YNCursesUI::createEmpty( YWidget * parent )
{
ONCREATE;
- return new NCEmpty( dynamic_cast( parent ), opt );
+ return new NCEmpty( dynamic_cast( parent ) );
}
-YWidget * YNCursesUI::createSpacing( YWidget * parent, YWidgetOpt & opt,
- float size,
- bool horizontal, bool vertical )
+YWidget * YNCursesUI::createSpacing( YWidget * parent,
+ YUIDimension dim,
+ bool stretchable,
+ YLayoutSize_t layoutUnits )
{
ONCREATE;
- return new NCSpacing( dynamic_cast( parent ), opt,
- size, horizontal, vertical );
+ return new NCSpacing( dynamic_cast( parent ), dim,
+ stretchable, layoutUnits );
}
-YWidget * YNCursesUI::createLabel( YWidget * parent, YWidgetOpt & opt,
- const YCPString & text )
+YWidget * YNCursesUI::createLabel( YWidget * parent, const string & text,
+ bool isHeading, bool isOutputField )
{
ONCREATE;
- return new NCLabel( dynamic_cast( parent ), opt,
- text );
+ return new NCLabel( dynamic_cast( parent ), text,
+ isHeading, isOutputField );
}
YWidget * YNCursesUI::createRichText( YWidget * parent, YWidgetOpt & opt,
@@ -443,12 +442,11 @@
label, visibleLines, maxLines );
}
-YWidget * YNCursesUI::createPushButton( YWidget * parent, YWidgetOpt & opt,
- const YCPString & label )
+YWidget * YNCursesUI::createPushButton( YWidget * parent,
+ const string & label )
{
ONCREATE;
- return new NCPushButton( dynamic_cast( parent ), opt,
- label );
+ return new NCPushButton( dynamic_cast( parent ), label );
}
YWidget * YNCursesUI::createMenuButton( YWidget * parent, YWidgetOpt & opt,
@@ -460,7 +458,7 @@
}
YWidget * YNCursesUI::createRadioButton( YWidget * parent,
- const YCPString & label )
+ const string & label )
{
ONCREATE;
return new NCRadioButton( dynamic_cast( parent ),
@@ -476,13 +474,13 @@
label, checked );
}
-YWidget * YNCursesUI::createTextEntry( YWidget * parent, YWidgetOpt & opt,
- const YCPString & label,
- const YCPString & text )
+YWidget * YNCursesUI::createTextEntry( YWidget * parent,
+ const string & label,
+ bool passwordMode )
{
ONCREATE;
- return new NCTextEntry( dynamic_cast( parent ), opt,
- label, text );
+ return new NCTextEntry( dynamic_cast( parent ),
+ label, passwordMode );
}
YWidget *YNCursesUI::createMultiLineEdit( YWidget * parent, YWidgetOpt & opt,
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=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.h Wed Jun 27 15:04:22 2007
@@ -120,7 +120,7 @@
/**
* Creates a replace point.
*/
- virtual YSingleChildContainerWidget * createReplacePoint( YWidget * parent, YWidgetOpt & opt );
+ virtual YSingleChildContainerWidget * createReplacePoint( YWidget * parent );
/**
* Creates an alignment widget
@@ -132,9 +132,9 @@
/**
* Creates a squash widget
*/
- virtual YSingleChildContainerWidget * createSquash( YWidget * parent, YWidgetOpt & opt,
- bool hsquash,
- bool vsquash );
+ virtual YSingleChildContainerWidget * createSquash( YWidget * parent,
+ bool hsquash,
+ bool vsquash );
/**
* Creates a radio button group.
@@ -144,11 +144,11 @@
/**
* Creates a frame widget
*/
- virtual YSingleChildContainerWidget * createFrame( YWidget * parent, YWidgetOpt & opt,
- const YCPString & label );
+ virtual YSingleChildContainerWidget * createFrame( YWidget * parent,
+ const string & label );
- virtual YSingleChildContainerWidget * createCheckBoxFrame( YWidget * parent, YWidgetOpt & opt,
- const YCPString & label,
+ virtual YSingleChildContainerWidget * createCheckBoxFrame( YWidget * parent,
+ const string & label,
bool checked );
//
// Widget creation functions - leaf widgets
@@ -157,15 +157,15 @@
/**
* Creates an empty widget
*/
- virtual YWidget * createEmpty( YWidget * parent, YWidgetOpt & opt );
+ virtual YWidget * createEmpty( YWidget * parent );
/**
* Creates a spacing widget
*/
- virtual YWidget * createSpacing( YWidget * parent, YWidgetOpt & opt,
- float size,
- bool horizontal,
- bool vertical );
+ virtual YWidget * createSpacing( YWidget * parent,
+ YUIDimension dim,
+ bool stretchable,
+ YLayoutSize_t layoutUnits );
/**
* Creates a label.
@@ -173,8 +173,8 @@
* @param heading true if the label is a Heading()
* @param output_field true if the label should look like an output field (3D look)
*/
- virtual YWidget * createLabel( YWidget * parent, YWidgetOpt & opt,
- const YCPString & text );
+ virtual YWidget * createLabel( YWidget * parent, const string & text,
+ bool isHeading, bool isOutputField );
/**
* Creates a rich text widget
@@ -208,8 +208,8 @@
* @param label Label of the button
* @param default_button true if the button should be the dialogs default button
*/
- virtual YWidget * createPushButton( YWidget * parent, YWidgetOpt & opt,
- const YCPString & label );
+ virtual YWidget * createPushButton( YWidget * parent,
+ const string & label );
/**
* Creates a menu button.
@@ -224,7 +224,7 @@
* @param rbg the radio button group the new button will belong to
*/
virtual YWidget * createRadioButton( YWidget * parent,
- const YCPString & label );
+ const string & label );
/**
* Creates a check box
@@ -238,9 +238,9 @@
/**
* Creates a text entry or password entry field.
*/
- virtual YWidget * createTextEntry( YWidget * parent, YWidgetOpt & opt,
- const YCPString & label,
- const YCPString & text );
+ virtual YWidget * createTextEntry( YWidget * parent,
+ const string & label,
+ bool passwordMode );
/**
* Creates a selection box
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=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPackageSelector.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPackageSelector.cc Wed Jun 27 15:04:22 2007
@@ -635,7 +635,7 @@
YWidget * filterLabel = YCPDialogParser::findWidgetWithId( widgetRoot, NCPkgNames::Filter() );
if ( filterLabel )
{
- static_cast(filterLabel)->setLabel( label );
+ static_cast(filterLabel)->setLabel( label->toString() );
}
}
@@ -731,7 +731,7 @@
YWidget * filterLabel = YCPDialogParser::findWidgetWithId( widgetRoot, NCPkgNames::Filter() );
if ( filterLabel )
{
- static_cast(filterLabel)->setLabel( YCPString(NCPkgNames::SearchResults()) );
+ static_cast(filterLabel)->setLabel( NCPkgNames::SearchResults() );
}
return true;
@@ -783,7 +783,7 @@
if ( filterLabel )
{
- static_cast(filterLabel)->setLabel( YCPString(NCPkgNames::SearchResults()) );
+ static_cast(filterLabel)->setLabel( NCPkgNames::SearchResults() );
}
return true;
@@ -842,15 +842,15 @@
if ( filter == "installable" )
{
// show common label "Online Update Patches"
- static_cast(filterLabel)->setLabel( YCPString(NCPkgNames::YOUPatches()) );
+ static_cast(filterLabel)->setLabel( NCPkgNames::YOUPatches() );
}
else if ( filter == "installed" )
{
- static_cast(filterLabel)->setLabel( YCPString(NCPkgNames::InstPatches()) );
+ static_cast(filterLabel)->setLabel( NCPkgNames::InstPatches() );
}
else
{
- static_cast(filterLabel)->setLabel( YCPString(NCPkgNames::Patches()) );
+ static_cast(filterLabel)->setLabel( NCPkgNames::Patches() );
}
}
@@ -905,7 +905,7 @@
YWidget * filterLabel = YCPDialogParser::findWidgetWithId( widgetRoot, NCPkgNames::Filter() );
if ( filterLabel )
{
- static_cast(filterLabel)->setLabel( YCPString(NCPkgNames::UpdateProblem()) );
+ static_cast(filterLabel)->setLabel( NCPkgNames::UpdateProblem() );
}
return true;
@@ -1156,7 +1156,7 @@
YWidget * filterLabel = YCPDialogParser::findWidgetWithId( widgetRoot, NCPkgNames::Filter() );
if ( filterLabel )
{
- static_cast(filterLabel)->setLabel( label );
+ static_cast(filterLabel)->setLabel( label->toString() );
}
}
@@ -3058,7 +3058,7 @@
YWidget * diskSpace = YCPDialogParser::findWidgetWithId( widgetRoot, NCPkgNames::Diskspace() );
if ( diskSpace )
{
- static_cast(diskSpace)->setLabel( label );
+ static_cast(diskSpace)->setLabel( label->toString() );
}
// check whether required diskspace enters the warning range
@@ -3147,7 +3147,7 @@
YWidget * diskSpace = YCPDialogParser::findWidgetWithId( widgetRoot, NCPkgNames::Diskspace() );
if ( diskSpace )
{
- static_cast(diskSpace)->setLabel( label );
+ static_cast(diskSpace)->setLabel( label->toString() );
}
}
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=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDeps.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDeps.cc Wed Jun 27 15:04:22 2007
@@ -127,15 +127,17 @@
opt.notifyMode.setValue( true );
- vSplit->addChild( new NCSpacing( vSplit, opt, 0.8, false, true ) );
+ //vSplit->addChild( new NCSpacing( vSplit, opt, 0.8, false, true ) );
+ vSplit->addChild( new NCSpacing( vSplit, YD_VERT, true, 0.8 ) );
- // FIXME: add the headline
// opt.isHeading.setValue( true );
+ //head = new NCLabel( vSplit, opt, YCPString("") );
- head = new NCLabel( vSplit, opt, YCPString("") );
+ head = new NCLabel( vSplit, "", true, false ); // isHeading = true
vSplit->addChild( head );
- vSplit->addChild( new NCSpacing( vSplit, opt, 0.4, false, true ) );
+ //vSplit->addChild( new NCSpacing( vSplit, opt, 0.4, false, true ) );
+ vSplit->addChild( new NCSpacing( vSplit, YD_VERT, true, 0.4 ) );
// add the list containing packages with unresolved dependencies
problemw = new NCProblemSelectionBox( vSplit, opt,
@@ -147,14 +149,16 @@
// opt.isHeading.setValue( false );
//vSplit->addChild( new NCSpacing( vSplit, opt, 0.2, false, true ) );
+ vSplit->addChild( new NCSpacing( vSplit, YD_VERT, true, 0.2 ) ); // stretchable = true
details = new NCTextEntry( vSplit, opt,
YCPString( "" ), YCPString( "" ),
200, 200 );
vSplit->addChild( details );
- vSplit->addChild( new NCSpacing( vSplit, opt, 0.8, false, true ) );
-
+ //vSplit->addChild( new NCSpacing( vSplit, opt, 0.8, false, true ) );
+ vSplit->addChild( 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"),
@@ -165,7 +169,8 @@
// FIXME
//opt.isHeading.setValue( true );
- vSplit->addChild( new NCSpacing( vSplit, opt, 0.6, false, true ) );
+ //vSplit->addChild( new NCSpacing( vSplit, opt, 0.6, false, true ) );
+ vSplit->addChild( new NCSpacing( vSplit, YD_VERT, false, 0.6 ) ); // stretchable = false
NCSplit * hSplit = new NCSplit( vSplit, opt, YD_HORIZ );
vSplit->addChild( hSplit );
@@ -174,17 +179,18 @@
// add the solve button
opt.key_Fxx.setValue( 10 );
- solveButton = new NCPushButton( hSplit, opt, YCPString(NCPkgNames::SolveLabel()) );
+ solveButton = new NCPushButton( hSplit, NCPkgNames::SolveLabel() );
//solveButton->setId( NCPkgNames::Solve () );
YStringWidgetID * solveID = new YStringWidgetID("solve");
solveButton->setId( solveID );
hSplit->addChild( solveButton );
- hSplit->addChild( new NCSpacing( hSplit, opt, 0.2, true, false ) );
+ //hSplit->addChild( new NCSpacing( hSplit, opt, 0.2, true, false ) );
+ hSplit->addChild( new NCSpacing( hSplit, YD_HORIZ, true, 0.2 ) ); // stretchable = true
// add the cancel button
opt.key_Fxx.setValue( 9 );
- cancelButton = new NCPushButton( hSplit, opt, YCPString(NCPkgNames::CancelLabel()) );
+ cancelButton = new NCPushButton( hSplit, NCPkgNames::CancelLabel() );
// cancelButton->setId( NCPkgNames::Cancel () );
YStringWidgetID * cancelID = new YStringWidgetID("cancel");
cancelButton->setId( cancelID );
@@ -206,7 +212,7 @@
// set headline and table type
if ( head )
- head->setLabel( YCPString(NCPkgNames::PackageDeps()) );
+ head->setLabel( NCPkgNames::PackageDeps() );
// evaluate the result and fill the list with packages
// which have unresolved deps
Modified: branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDescr.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDescr.cc?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDescr.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDescr.cc Wed Jun 27 15:04:22 2007
@@ -32,6 +32,7 @@
#include "NCRichText.h"
#include "NCZypp.h"
+#include "NCi18n.h"
#include "NCPkgPopupDescr.h"
#include "NCPackageSelector.h"
@@ -84,21 +85,22 @@
NCSplit * split = new NCSplit( this, opt, YD_VERT );
addChild( split );
- split->addChild( new NCSpacing( split, opt, 0.8, false, true ) );
+ //split->addChild( new NCSpacing( split, opt, 0.8, false, true ) );
+ split->addChild( new NCSpacing( split, YD_VERT, false, 0.8 ) ); // stretchable = false
- // FIXME - add the headline
- // opt.isHeading.setValue( true );
- headline = new NCLabel( split, opt, YCPString( "" ) );
+ headline = new NCLabel( split, "", true, false ); // isHeading = true
split->addChild( headline );
- split->addChild( new NCSpacing( split, opt, 0.4, false, true ) );
+ //split->addChild( new NCSpacing( split, opt, 0.4, false, true ) );
+ split->addChild( new NCSpacing( split, YD_VERT, false, 0.4 ) );
// add the rich text widget for the package description
opt.isVStretchable.setValue( true );
descrText = new NCRichText( split, opt, YCPString( "" ) );
split->addChild( descrText );
- split->addChild( new NCSpacing( split, opt, 0.6, false, true ) );
+ //split->addChild( new NCSpacing( split, opt, 0.6, false, true ) );
+ split->addChild( new NCSpacing( split, YD_VERT, true, 0.6 ) ); // stretchable = true
// add the package table (use default type T_Packages)
pkgTable = new NCPkgTable( split, opt );
@@ -106,17 +108,21 @@
pkgTable->fillHeader();
split->addChild( pkgTable );
- split->addChild( new NCSpacing( split, opt, 0.6, false, true ) );
-
+ //split->addChild( new NCSpacing( split, opt, 0.6, false, true ) );
+ split->addChild( new NCSpacing( split, YD_VERT, true, 0.6 ) );
+
opt.isHStretchable.setValue( false );
- NCLabel * helplb = new NCLabel( split, opt, YCPString(NCPkgNames::DepsHelpLine()) );
+ //NCLabel * helplb = new NCLabel( split, opt, YCPString(NCPkgNames::DepsHelpLine()) );
+ // a help line for the dependency popup
+ NCLabel * helplb = new NCLabel( split, _( " [+] Select [-] Delete [>] Update " ), false, false );
split->addChild( helplb );
- split->addChild( new NCSpacing( split, opt, 0.6, false, true ) );
+ //split->addChild( new NCSpacing( split, opt, 0.6, false, true ) );
+ split->addChild( new NCSpacing( split, YD_VERT, false, 0.6 ) ); // stretchable = false
// add the OK button
opt.key_Fxx.setValue( 10 );
- okButton = new NCPushButton( split, opt, YCPString(NCPkgNames::OKLabel()) );
+ okButton = new NCPushButton( split, NCPkgNames::OKLabel() );
YStringWidgetID * okID = new YStringWidgetID( "ok" );
okButton->setId( okID );
@@ -143,7 +149,7 @@
pkgTable->drawList();
- headline->setLabel( YCPString(pkgPtr->summary()) );
+ headline->setLabel( pkgPtr->summary() );
descrText->setText( YCPString(packager->createDescrText(pkgPtr->description())) );
Modified: branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDiskspace.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDiskspace.cc?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDiskspace.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDiskspace.cc Wed Jun 27 15:04:22 2007
@@ -105,9 +105,10 @@
NCSplit * split = new NCSplit( this, opt, YD_VERT );
addChild( split );
- // FIXME - add the headline
// opt.isHeading.setValue( true );
- head = new NCLabel( split, opt, YCPString( "" ) );
+ //head = new NCLabel( split, opt, YCPString( "" ) );
+
+ head = new NCLabel( split, "", true, false ); // isHeading = true
split->addChild( head );
vector<string> header;
@@ -125,7 +126,7 @@
// add the ok button
opt.key_Fxx.setValue( 10 );
- okButton = new NCPushButton( split, opt, YCPString(NCPkgNames::OKLabel()) );
+ okButton = new NCPushButton( split, NCPkgNames::OKLabel() );
YStringWidgetID * okID = new YStringWidgetID( "ok" );
okButton->setId( okID );
@@ -402,7 +403,7 @@
void NCPkgPopupDiskspace::showInfoPopup( string headline )
{
if ( head )
- head->setLabel( YCPString( headline ) );
+ head->setLabel( headline );
// update values in partition table
fillPartitionTable();
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=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSearch.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSearch.cc Wed Jun 27 15:04:22 2007
@@ -58,9 +58,9 @@
, packager( pkger )
{
if ( !packager->isYouMode() )
- createLayout( YCPString(NCPkgNames::PackageSearch()) );
+ createLayout( _( "Package Search" ) );
else
- createLayout( YCPString( _("Search for Patch Name") ) );
+ createLayout( _("Search for Patch Name") );
}
///////////////////////////////////////////////////////////////////
@@ -83,7 +83,7 @@
//
// DESCRIPTION :
//
-void NCPkgPopupSearch::createLayout( const YCPString & headline )
+void NCPkgPopupSearch::createLayout( const string & headline )
{
YWidgetOpt opt;
@@ -91,19 +91,22 @@
NCSplit * vSplit = new NCSplit( this, opt, YD_VERT );
addChild( vSplit );
- vSplit->addChild( new NCSpacing( vSplit, opt, 0.8, false, true ) );
+ //vSplit->addChild( new NCSpacing( vSplit, opt, 0.8, false, true ) );
+ vSplit->addChild( new NCSpacing( vSplit, YD_VERT, false, 0.8 ) ); // stretchable = false
- // FIXME - add the headline
- // opt.isHeading.setValue( true );
- NCLabel * head = new NCLabel( vSplit, opt, headline );
+ //NCLabel * head = new NCLabel( vSplit, opt, headline );
+ NCLabel * head = new NCLabel( vSplit, headline, true, false ); // isHeading = true
vSplit->addChild( head );
- vSplit->addChild( new NCSpacing( vSplit, opt, 0.6, false, true ) );
+ //vSplit->addChild( new NCSpacing( vSplit, opt, 0.6, false, true ) );
+ vSplit->addChild( new NCSpacing( vSplit, YD_VERT, false, 0.6 ) );
// add the input field (a editable combo box)
opt.isHStretchable.setValue( true );
- NCFrame * frame0 = new NCFrame( vSplit, opt, YCPString("" ) );
+ //NCFrame * frame0 = new NCFrame( vSplit, opt, YCPString("" ) );
+ NCFrame * frame0 = new NCFrame( vSplit, "" );
+
NCSplit * vSplit2 = new NCSplit( frame0, opt, YD_VERT );
opt.isEditable.setValue( true );
@@ -114,7 +117,9 @@
searchExpr->itemAdded( YCPString( "" ), // set initial value
0, // index
false ); // not selected
- vSplit2->addChild( new NCSpacing( vSplit, opt, 0.6, false, true ) );
+ //vSplit2->addChild( new NCSpacing( vSplit, opt, 0.6, false, true ) );
+ vSplit2->addChild( new NCSpacing( vSplit, YD_VERT, false, 0.6 ) );
+
vSplit->addChild( frame0 );
if ( !packager->isYouMode() )
@@ -123,15 +128,19 @@
NCSplit * hSplit2 = new NCSplit( vSplit, opt, YD_HORIZ );
vSplit->addChild( hSplit2 );
ignoreCase = new NCCheckBox( hSplit2, opt, YCPString(NCPkgNames::IgnoreCase()), true );
- hSplit2->addChild( new NCSpacing( hSplit2, opt, 0.1, true, false ) );
+ //hSplit2->addChild( new NCSpacing( hSplit2, opt, 0.1, true, false ) );
+ hSplit2->addChild( new NCSpacing( hSplit2, YD_HORIZ, true, 0.1 ) );
hSplit2->addChild( ignoreCase );
- vSplit->addChild( new NCSpacing( vSplit, opt, 0.6, false, true ) ); // VSpacing
-
+ //vSplit->addChild( new NCSpacing( vSplit, opt, 0.6, false, true ) ); // VSpacing
+ vSplit->addChild( new NCSpacing( vSplit, YD_VERT, false, 0.6 ) );
+
// add a frame containing the other check boxes
opt.isHStretchable.setValue( true );
opt.isVStretchable.setValue( true );
- NCFrame * frame = new NCFrame( vSplit, opt, YCPString(NCPkgNames::SearchIn()) );
+ //NCFrame * frame = new NCFrame( vSplit, opt, YCPString(NCPkgNames::SearchIn()) );
+ // label of a frame in search popup (without hotkey)
+ NCFrame * frame = new NCFrame( vSplit, _( " Search in " ) );
NCSplit * vSplit3 = new NCSplit( frame, opt, YD_VERT );
opt.isVStretchable.setValue( false );
@@ -150,7 +159,8 @@
frame->addChild( vSplit3 );
vSplit->addChild( frame );
- vSplit->addChild( new NCSpacing( vSplit, opt, 0.8, false, true ) ); // VSpacing
+ //vSplit->addChild( new NCSpacing( vSplit, opt, 0.8, false, true ) ); // VSpacing
+ vSplit->addChild( new NCSpacing( vSplit, YD_VERT, false, 0.8 ) );
}
NCSplit * hSplit3 = new NCSplit( vSplit, opt, YD_HORIZ );
@@ -158,22 +168,25 @@
// add the cancel and the ok button
opt.key_Fxx.setValue( 10 );
- okButton = new NCPushButton( hSplit3, opt, YCPString(NCPkgNames::OKLabel()) );
+ okButton = new NCPushButton( hSplit3, NCPkgNames::OKLabel() );
YStringWidgetID * okID = new YStringWidgetID("ok");
okButton->setId( okID );
opt.key_Fxx.setValue( 9 );
opt.isVStretchable.setValue( false );
- cancelButton = new NCPushButton( hSplit3, opt, YCPString(NCPkgNames::CancelLabel()) );
+ cancelButton = new NCPushButton( hSplit3, NCPkgNames::CancelLabel() );
YStringWidgetID * cancelID = new YStringWidgetID("cancel");
cancelButton->setId( cancelID );
opt.isHStretchable.setValue( true );
- hSplit3->addChild( new NCSpacing( hSplit3, opt, 0.2, true, false ) );
+ //hSplit3->addChild( new NCSpacing( hSplit3, opt, 0.2, true, false ) );
+ hSplit3->addChild( new NCSpacing( hSplit3, YD_HORIZ, true, 0.2 ) ); // stretchable = true
hSplit3->addChild( okButton );
- hSplit3->addChild( new NCSpacing( hSplit3, opt, 0.4, true, false ) );
+ //hSplit3->addChild( new NCSpacing( hSplit3, opt, 0.4, true, false ) );
+ hSplit3->addChild( new NCSpacing( hSplit3, YD_HORIZ, true, 0.4 ) );
hSplit3->addChild( cancelButton );
- hSplit3->addChild( new NCSpacing( hSplit3, opt, 0.2, true, false ) );
+ //hSplit3->addChild( new NCSpacing( hSplit3, opt, 0.2, true, false ) );
+ hSplit3->addChild( new NCSpacing( hSplit3, YD_HORIZ, true, 0.2 ) );
}
Modified: branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSearch.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSearch.h?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSearch.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSearch.h Wed Jun 27 15:04:22 2007
@@ -78,7 +78,7 @@
virtual long nicesize(YUIDimension dim);
- void createLayout( const YCPString & headline );
+ void createLayout( const string & headline );
NCursesEvent & showSearchPopup( );
Modified: branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSelection.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSelection.cc?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSelection.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSelection.cc Wed Jun 27 15:04:22 2007
@@ -28,6 +28,7 @@
#include
#include "NCZypp.h"
+#include "NCi18n.h"
#ifdef FIXME
#define LOCALE Y2PM::getPreferredLocale()
@@ -54,11 +55,11 @@
{
case S_Pattern:
case S_Selection: {
- createLayout( YCPString(NCPkgNames::SelectionLabel()) );
+ createLayout( NCPkgNames::SelectionLabel() );
break;
}
case S_Language: {
- createLayout( YCPString(NCPkgNames::LanguageLabel()) );
+ createLayout( NCPkgNames::LanguageLabel() );
break;
}
default:
@@ -90,7 +91,7 @@
//
// DESCRIPTION :
//
-void NCPkgPopupSelection::createLayout( const YCPString & label )
+void NCPkgPopupSelection::createLayout( const string & label )
{
YWidgetOpt opt;
@@ -101,10 +102,8 @@
opt.notifyMode.setValue( false );
- // FIXME - the headline
- // opt.isHeading.setValue( true );
-
- NCLabel * head = new NCLabel( split, opt, label );
+ //NCLabel * head = new NCLabel( split, opt, label );
+ NCLabel * head = new NCLabel( split, label, true, false ); // isHeading = true
split->addChild( head );
// add the selection list
@@ -132,22 +131,27 @@
sel->fillHeader();
split->addChild( sel );
+ // FIXME
opt.notifyMode.setValue( true );
- NCLabel * help = new NCLabel( split, opt, YCPString(NCPkgNames::DepsHelpLine()) );
+ //NCLabel * help = new NCLabel( split, opt, YCPString(NCPkgNames::DepsHelpLine()) );
+ // a help line for the dependency popup
+ NCLabel * help = new NCLabel( split, _( " [+] Select [-] Delete [>] Update " ), false, false );
split->addChild( help );
- split->addChild( new NCSpacing( split, opt, 0.4, false, true ) );
-
+ //split->addChild( new NCSpacing( split, opt, 0.4, false, true ) );
+ split->addChild( new NCSpacing( split, YD_VERT, false, 0.4 ) );
+
// add an OK button
opt.key_Fxx.setValue( 10 );
- okButton = new NCPushButton( split, opt, YCPString(NCPkgNames::OKLabel()) );
+ okButton = new NCPushButton( split, NCPkgNames::OKLabel() );
YStringWidgetID * okID = new YStringWidgetID("ok");
okButton->setId( okID );
split->addChild( okButton );
- split->addChild( new NCSpacing( split, opt, 0.4, false, true ) );
+ //split->addChild( new NCSpacing( split, opt, 0.4, false, true ) );
+ split->addChild( new NCSpacing( split, YD_VERT, false, 0.4 ) );
}
///////////////////////////////////////////////////////////////////
Modified: branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSelection.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSelection.h?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSelection.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSelection.h Wed Jun 27 15:04:22 2007
@@ -69,7 +69,7 @@
virtual long nicesize(YUIDimension dim);
- void createLayout( const YCPString & label );
+ void createLayout( const string & label );
/**
* Fills the list with the available selections (and the status info)
Modified: branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupTable.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupTable.cc?rev=39054&r1=39053&r2=39054&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupTable.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupTable.cc Wed Jun 27 15:04:22 2007
@@ -31,6 +31,8 @@
#include "NCPkgTable.h"
#include "NCZypp.h"
+#include "NCi18n.h"
+
#include
#include
@@ -84,19 +86,26 @@
NCSplit * split = new NCSplit( this, opt, YD_VERT );
addChild( split );
- split->addChild( new NCSpacing( split, opt, 0.6, false, true ) );
+ //split->addChild( new NCSpacing( split, opt, 0.6, false, true ) );
+ split->addChild( new NCSpacing( split, YD_VERT, false, 0.6 ) ); // stretchable = false
- // FIXME - add the headline
- // opt.isHeading.setValue( true );
- NCLabel * head = new NCLabel( split, opt, YCPString(NCPkgNames::AutoChangeLabel()) );
+ //NCLabel * head = new NCLabel( split, opt, YCPString(NCPkgNames::AutoChangeLabel()) );
+
+ // the headline of the popup containing a list with packages with status changes
+ NCLabel * head = new NCLabel( split, _( "Automatic Changes" ), true, false ); // isHeading = true
split->addChild( head );
- split->addChild( new NCSpacing( split, opt, 0.6, false, true ) );
- // FIXME
- // opt.isHeading.setValue( false );
- NCLabel * lb1 = new NCLabel( split, opt, YCPString(NCPkgNames::AutoChangeText1()) );
+ //split->addChild( new NCSpacing( split, opt, 0.6, false, true ) );
+ split->addChild( new NCSpacing( split, YD_VERT, false, 0.6 ) );
+
+ //NCLabel * lb1 = new NCLabel( split, opt, YCPString(NCPkgNames::AutoChangeText1()) );
+ // text part1 of popup with automatic changes (it's a label; text continous)
+ NCLabel * lb1 = new NCLabel( split, _( "In addition to your manual selections, the following" ), false, false );
+
split->addChild( lb1 );
- NCLabel * lb2 = new NCLabel( split, opt, YCPString(NCPkgNames::AutoChangeText2()) );
+ //NCLabel * lb2 = new NCLabel( split, opt, YCPString(NCPkgNames::AutoChangeText2()) );
+ // text part2 of popup with automatic changes
+ NCLabel * lb2 = new NCLabel( split, _( "packages have been changed to resolve dependencies:" ), false, false );
split->addChild( lb2 );
// add the package table (use default type T_Packages)
@@ -112,27 +121,31 @@
opt.isHStretchable.setValue( true );
- hSplit->addChild( new NCSpacing( hSplit, opt, 0.2, true, false ) );
+ //hSplit->addChild( new NCSpacing( hSplit, opt, 0.2, true, false ) );
+ hSplit->addChild( new NCSpacing( hSplit, YD_HORIZ, true, 0.2 ) ); // stretchable = true
// add the OK button
opt.key_Fxx.setValue( 10 );
- okButton = new NCPushButton( hSplit, opt, YCPString(NCPkgNames::OKLabel()) );
+ okButton = new NCPushButton( hSplit, NCPkgNames::OKLabel() );
YStringWidgetID * okID = new YStringWidgetID( "ok" );
okButton->setId( okID );
hSplit->addChild( okButton );
- hSplit->addChild( new NCSpacing( hSplit, opt, 0.4, true, false ) );
+ //hSplit->addChild( new NCSpacing( hSplit, opt, 0.4, true, false ) );
+ hSplit->addChild( new NCSpacing( hSplit, YD_HORIZ, true, 0.4 ) );
// add the Cancel button
opt.key_Fxx.setValue( 9 );
- cancelButton = new NCPushButton( hSplit, opt, YCPString(NCPkgNames::CancelLabel()) );
+ cancelButton = new NCPushButton( hSplit, NCPkgNames::CancelLabel() );
YStringWidgetID * cancelID = new YStringWidgetID( "cancel" );
cancelButton->setId( cancelID );
hSplit->addChild( cancelButton );
- hSplit->addChild( new NCSpacing( hSplit, opt, 0.2, true, false ) );
+ //hSplit->addChild( new NCSpacing( hSplit, opt, 0.2, true, false ) );
+ hSplit->addChild( new NCSpacing( hSplit, YD_HORIZ, true, 0.2 ) );
- split->addChild( new NCSpacing( split, opt, 0.6, false, true ) );
+ //split->addChild( new NCSpacing( split, opt, 0.6, false, true ) );
+ split->addChild( new NCSpacing( split, YD_VERT, false, 0.6 ) );
}
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org