Author: gs
Date: Tue Nov 13 14:31:42 2007
New Revision: 42014
URL: http://svn.opensuse.org/viewcvs/yast?rev=42014&view=rev
Log:
string visibleInfo
Modified:
branches/tmp/sh/mod-ui/ncurses/src/NCPkgTable.cc
branches/tmp/sh/mod-ui/ncurses/src/README_mod-ui
branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPackageSelector.cc
branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPackageSelector.h
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=42014&r1=42013&r2=42014&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCPkgTable.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCPkgTable.cc Tue Nov 13 14:31:42 2007
@@ -449,9 +449,7 @@
packager->fillPatchList( "installable" ); // default: installable patches
// set the visible info to long description
- //packager->setVisibleInfo ( NCPkgNames::PatchDescr() );
- YStringWidgetID * descrID = new YStringWidgetID( "patchdescr" );
- packager->setVisibleInfo ( descrID );
+ packager->setVisibleInfo ( NCPkgNames::PatchDescr()->toString() );
// show the package description of the current item
showInformation ();
@@ -462,9 +460,7 @@
{
packager->fillUpdateList();
// set the visible info to package description
- //packager->setVisibleInfo ( NCPkgNames::PkgInfo() );
- YStringWidgetID * infoID = new YStringWidgetID( "pkginfo");
- packager->setVisibleInfo ( infoID );
+ packager->setVisibleInfo ( NCPkgNames::PkgInfo()->toString() );
// show the package description of the current item
showInformation ();
break;
@@ -480,9 +476,7 @@
defaultGroup );
// set the visible info to package description
- //packager->setVisibleInfo ( NCPkgNames::PkgInfo() );
- YStringWidgetID * infoID = new YStringWidgetID( "pkginfo");
- packager->setVisibleInfo ( infoID );
+ packager->setVisibleInfo ( NCPkgNames::PkgInfo()->toString() );
// show the package description of the current item
showInformation ();
}
Modified: branches/tmp/sh/mod-ui/ncurses/src/README_mod-ui
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/README_mod-ui?rev=42014&r1=42013&r2=42014&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/README_mod-ui (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/README_mod-ui Tue Nov 13 14:31:42 2007
@@ -91,14 +91,12 @@
NCPopupInfo
-----------
-check NCPopupInfo->setNiceSize
+doesn't work corretcly if called from NCDialog
NCAskForDirectory/NCAskForFile
------------------------------
-TODO: CheckBox Show details doesn't work
- test examples FileSelection.ycp and FileSelection2.ycp thoroughly
- ComboBox entries are added twice
+ComboBox entries are added twice
NCMultiLineEdit
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=42014&r1=42013&r2=42014&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPackageSelector.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPackageSelector.cc Tue Nov 13 14:31:42 2007
@@ -105,7 +105,6 @@
NCPackageSelector::NCPackageSelector( YNCursesUI * ui, YWidget * wRoot, long modeFlags )
: y2ui( ui )
, widgetRoot ( wRoot )
- , visibleInfo( 0 )
, filterPopup( 0 )
, depsPopup( 0 )
, selectionPopup( 0 )
@@ -263,10 +262,9 @@
// create the search popup
searchPopup = new NCPkgPopupSearch( wpos( 1, 1 ), this );
-#if 0
+
// the dependency popup
depsPopup = new NCPkgPopupDeps( wpos( 3, 8 ), this );
-#endif
// the disk space popup
diskspacePopup = new NCPkgPopupDiskspace( wpos( (NCurses::lines() - 15)/2, NCurses::cols()/6 ), testMode );
@@ -483,7 +481,6 @@
{
bool retVal = false;
string currentId = "";
- //YCPValue currentId = YCPNull();
if ( event == NCursesEvent::handled )
return false;
@@ -546,7 +543,7 @@
//
// currently displayed package information
//
-void NCPackageSelector::setVisibleInfo( YWidgetID * info )
+void NCPackageSelector::setVisibleInfo( string info )
{
visibleInfo = info;
}
@@ -1499,24 +1496,24 @@
NCPkgTable * packageList = getPackageList();
if ( !packageList
- || !event.selection
- || !visibleInfo )
+ || !event.selection )
{
NCERR << "*** InformationHandler RETURN false ***" << endl;
return false;
}
-#if 0
- if ( visibleInfo->isEqual( event.selection ) )
+ string info = getMenuId( event.selection );
+
+ if ( visibleInfo == info )
{
// information selection has not changed
return true;
}
// set visibleInfo
- visibleInfo = event.selection;
+ visibleInfo = info;
//if ( visibleInfo->compare( NCPkgNames::Versions() ) == YO_EQUAL )
- if ( visibleInfo->toString() == "versions" )
+ if ( visibleInfo == NCPkgNames::Versions()->toString() )
{
// show the package table
const char * tableLayout = "`PkgSpecial( `id(\"availpkgs\"), `opt(`notify), \"pkgTable\" )";
@@ -1544,7 +1541,7 @@
}
// patches
//else if ( visibleInfo->compare( NCPkgNames::PatchPackages() ) == YO_EQUAL )
- else if ( visibleInfo->toString() == "patchpackages" )
+ else if ( visibleInfo == NCPkgNames::PatchPackages()->toString() )
{
// show the package table
const char * tableLayout = "`PkgSpecial( `id(\"patchpkgs\"), `opt(`notify), \"pkgTable\" )";
@@ -1571,7 +1568,7 @@
}
}
// else if ( visibleInfo->compare( NCPkgNames::PatchPackagesVersions() ) == YO_EQUAL )
- else if ( visibleInfo->toString() == "patchpackages" )
+ else if ( visibleInfo == NCPkgNames::PatchPackagesVersions()->toString() )
{
// show the package table
const char * tableLayout = "`PkgSpecial( `id(\"pkgsversions\"), `opt(`notify), \"pkgTable\" )";
@@ -1613,8 +1610,8 @@
}
packageList->setKeyboardFocus();
-#endif
- UIMIL << "Change package info to: " << visibleInfo->toString() << endl;
+
+ UIMIL << "Change package info to: " << visibleInfo << endl;
return true;
}
@@ -2601,14 +2598,8 @@
return false;
}
- if ( !visibleInfo )
- {
- NCERR << "Visible package information NOT set" << endl;
- return false;
- }
-
// if ( visibleInfo->compare( NCPkgNames::PatchDescr() ) == YO_EQUAL )
- if ( visibleInfo->toString() == "patchdescr" )
+ if ( visibleInfo == NCPkgNames::PatchDescr()->toString() )
{
string descr;
@@ -2646,7 +2637,7 @@
}
}
// else if ( visibleInfo->compare( NCPkgNames::PatchPackages() ) == YO_EQUAL )
- else if ( visibleInfo->toString() == "patchpackages" )
+ else if ( visibleInfo == NCPkgNames::PatchPackages()->toString() )
{
NCPkgTable *patchPkgList = dynamic_cast