Author: gs
Date: Wed Aug 20 15:58:21 2008
New Revision: 50239
URL: http://svn.opensuse.org/viewcvs/yast?rev=50239&view=rev
Log:
multi line support added (extra column)
Modified:
trunk/ncurses/src/NCTable.cc
Modified: trunk/ncurses/src/NCTable.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses/src/NCTable.cc?rev=50239&r1=50238&r2=50239&view=diff
==============================================================================
--- trunk/ncurses/src/NCTable.cc (original)
+++ trunk/ncurses/src/NCTable.cc Wed Aug 20 15:58:21 2008
@@ -34,22 +34,38 @@
InitPad();
// !!! head is UTF8 encoded, thus should be vector<NCstring>
- _header.assign( tableHeader->columns(), NCstring( "" ) );
-
- for ( int col = 0; col < tableHeader->columns(); col++ )
+ if ( !multiselect )
+ {
+ _header.assign( tableHeader->columns(), NCstring( "" ) );
+ for ( int col = 0; col < tableHeader->columns(); col++ )
+ {
+ if ( hasColumn( col ) )
+ {
+ // set aligmant first
+ setAlignment( col, alignment( col ) );
+ // and then append header
+ _header[ col ] += NCstring( tableHeader->header( col ) ) ;
+ }
+ }
+ }
+ else
{
- if ( hasColumn( col ) )
+ _header.assign( tableHeader->columns()+1, NCstring( "" ) );
+
+ for ( int col = 1; col <= tableHeader->columns(); col++ )
{
- // set aligmant first
- setAlignment( col, alignment( col ) );
- // and then append header
- _header[ col ] += NCstring( tableHeader->header( col ) ) ;
+ if ( hasColumn( col-1 ) )
+ {
+ // set aligmant first
+ setAlignment( col, alignment( col ) );
+ // and then append header
+ _header[ col ] += NCstring( tableHeader->header( col-1 ) ) ;
+ }
}
}
hasHeadline = myPad()->SetHeadline( _header );
-#warning FIXME: Handle multi selection
}
@@ -164,20 +180,43 @@
YTableItem *item = dynamic_cast