[yast-commit] r41636 - in /branches/tmp/sh/mod-ui/ncurses/src: NCAskForDirectory.cc NCAskForFile.cc NCFileSelection.cc NCFileSelection.h
Author: gs Date: Tue Oct 30 12:01:36 2007 New Revision: 41636 URL: http://svn.opensuse.org/viewcvs/yast?rev=41636&view=rev Log: adapt to new YTable API Modified: branches/tmp/sh/mod-ui/ncurses/src/NCAskForDirectory.cc branches/tmp/sh/mod-ui/ncurses/src/NCAskForFile.cc branches/tmp/sh/mod-ui/ncurses/src/NCFileSelection.cc branches/tmp/sh/mod-ui/ncurses/src/NCFileSelection.h 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=41636&r1=41635&r2=41636&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/ncurses/src/NCAskForDirectory.cc (original) +++ branches/tmp/sh/mod-ui/ncurses/src/NCAskForDirectory.cc Tue Oct 30 12:01:36 2007 @@ -134,9 +134,17 @@ //hSplit->addChild( new NCSpacing( hSplit, opt, 0.1, true, false ) ); new NCSpacing( hSplit, YD_HORIZ, true, 0.1 ); // stretchable = true + + // create table header for table type T_Overview + YTableHeader * tableHeader = new YTableHeader(); + tableHeader->addColumn( 'L' + string(" ") ); + tableHeader->addColumn( 'L' + _( "Directory Name" ) ); // add the list of directories - dirList = new NCDirectoryTable( split, NCFileTable::T_Overview, iniDir ); + dirList = new NCDirectoryTable( split, + tableHeader, + NCFileTable::T_Overview, + iniDir ); YStringWidgetID * dirListID = new YStringWidgetID( idDirList ); dirList->setId( dirListID ); Modified: branches/tmp/sh/mod-ui/ncurses/src/NCAskForFile.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCAskForFile.cc?rev=41636&r1=41635&r2=41636&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/ncurses/src/NCAskForFile.cc (original) +++ branches/tmp/sh/mod-ui/ncurses/src/NCAskForFile.cc Tue Oct 30 12:01:36 2007 @@ -182,16 +182,32 @@ // HBox for the lists NCLayoutBox * hSplit1 = new NCLayoutBox( split, YD_HORIZ ); + // create table header for table type T_Overview + YTableHeader * dirHeader = new YTableHeader(); + dirHeader->addColumn( 'L' + " " ); + dirHeader->addColumn( 'L' + _("Directory name") ); + // add the list of directories opt.keyEvents.setValue( true ); - dirList = new NCDirectoryTable( hSplit1, NCFileSelection::T_Overview, YCPString(startDir) ); + dirList = new NCDirectoryTable( hSplit1, + dirHeader, + NCFileSelection::T_Overview, + YCPString(startDir) ); - YStringWidgetID * dirListID = new YStringWidgetID( idDirList ); dirList->setId( dirListID ); + + // create table header for table type T_Overview + YTableHeader * fileHeader = new YTableHeader(); + fileHeader->addColumn( 'L' + " " ); + fileHeader->addColumn( 'L' + _("File name") ); // add the list of files - fileList = new NCFileTable( hSplit1, NCFileSelection::T_Overview, filter, YCPString(startDir) ); + fileList = new NCFileTable( hSplit1, + fileHeader, + NCFileSelection::T_Overview, + filter, + YCPString(startDir) ); YStringWidgetID * dirFileID = new YStringWidgetID( idFileList ); fileList->setId( dirFileID ); Modified: branches/tmp/sh/mod-ui/ncurses/src/NCFileSelection.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCFileSelection.cc?rev=41636&r1=41635&r2=41636&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/ncurses/src/NCFileSelection.cc (original) +++ branches/tmp/sh/mod-ui/ncurses/src/NCFileSelection.cc Tue Oct 30 12:01:36 2007 @@ -182,9 +182,10 @@ // DESCRIPTION : // NCFileSelection::NCFileSelection( YWidget * parent, + YTableHeader * tableHeader, NCFileSelectionType type, const YCPString & iniDir ) - : NCTable( parent, 0 ) + : NCTable( parent, tableHeader ) , startDir( iniDir->value() ) , currentDir( iniDir->value() ) , tableType( type ) @@ -457,12 +458,13 @@ // DESCRIPTION : // NCFileTable::NCFileTable( YWidget * parent, + YTableHeader * tableHeader, NCFileSelectionType type, const YCPString & filter, const YCPString & iniDir ) - : NCFileSelection( parent, type, iniDir ) + : NCFileSelection( parent, tableHeader, type, iniDir ) { - fillHeader(); + //fillHeader(); string filterStr = filter->value(); const string delims( " \t" ); @@ -716,11 +718,12 @@ // DESCRIPTION : // NCDirectoryTable::NCDirectoryTable( YWidget * parent, + YTableHeader * tableHeader, NCFileSelectionType type, const YCPString & iniDir ) - : NCFileSelection( parent, type, iniDir ) + : NCFileSelection( parent, tableHeader, type, iniDir ) { - fillHeader(); + //fillHeader(); } /////////////////////////////////////////////////////////////////// Modified: branches/tmp/sh/mod-ui/ncurses/src/NCFileSelection.h URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCFileSelection.h?rev=41636&r1=41635&r2=41636&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/ncurses/src/NCFileSelection.h (original) +++ branches/tmp/sh/mod-ui/ncurses/src/NCFileSelection.h Tue Oct 30 12:01:36 2007 @@ -132,6 +132,7 @@ * Constructor */ NCFileSelection( YWidget * parent, + YTableHeader * tableHeader, NCFileSelectionType type, const YCPString & iniDir ); @@ -224,6 +225,7 @@ * Constructor */ NCFileTable( YWidget * parent, + YTableHeader * tableHeader, NCFileSelectionType type, const YCPString & filter, const YCPString & iniDir ); @@ -259,6 +261,7 @@ * Constructor */ NCDirectoryTable( YWidget * parent, + YTableHeader * tableHeader, NCFileSelectionType type, const YCPString & iniDir ); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
gs@svn.opensuse.org