Author: gs Date: Thu May 3 16:06:30 2012 New Revision: 68082 URL: http://svn.opensuse.org/viewcvs/yast?rev=68082&view=rev Log: add description and help for the new filter groups Modified: trunk/ncurses-pkg/src/NCPkgFilterClassification.cc trunk/ncurses-pkg/src/NCPkgFilterClassification.h trunk/ncurses-pkg/src/NCPkgStrings.cc Modified: trunk/ncurses-pkg/src/NCPkgFilterClassification.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses-pkg/src/NCPkgFilterClassification.cc?rev=68082&r1=68081&r2=68082&view=diff ============================================================================== --- trunk/ncurses-pkg/src/NCPkgFilterClassification.cc (original) +++ trunk/ncurses-pkg/src/NCPkgFilterClassification.cc Thu May 3 16:06:30 2012 @@ -82,14 +82,22 @@ addItem( unneeded ); showPackages(); + showDescription(); +} + +YItem * NCPkgFilterClassification::getCurrentGroup() +{ + int index = getCurrentItem(); + + return itemAt( index ); + } bool NCPkgFilterClassification::showPackages( ) { NCPkgTable * packageList = packager->PackageList(); - int index = getCurrentItem(); - YItem * group = itemAt( index ); + YItem * group = getCurrentGroup(); if ( !group ) return false; @@ -179,13 +187,39 @@ return false; } + +void NCPkgFilterClassification::showDescription( ) +{ + string description; + + YItem * group = getCurrentGroup(); + + if ( group == recommended ) + { + description = _("This is a list of useful packages. They are automatically selected for installation (unless the option <b>Ignore Recommended Packages</b> from <b>Dependencies</b> menu is set)."); + } + else if ( group == suggested ) + { + description = _("It's suggested to install these packages because they fit to already installed packages. The decision to install it is by the user."); + } + else if ( group == orphaned ) + { + description = _("The solver has detected that these packages are without a repository, i.e. updates aren't possible."); + } + else if ( group == unneeded ) + { + description = _("These packages might be unneeded because former dependencies don't apply any longer."); + } + packager->FilterDescription()->setText ( description ); +} + /////////////////////////////////////////////////////////////////// // // // METHOD NAME : NCPkgFilterRepo::wHandleInput // METHOD TYPE : NCursesEvent // -// DESCRIPTION : default boring handle-input +// DESCRIPTION : show packages for selected group // NCursesEvent NCPkgFilterClassification::wHandleInput( wint_t ch ) @@ -203,6 +237,7 @@ case KEY_HOME: { ret = NCursesEvent::handled; showPackages(); + showDescription(); break; } Modified: trunk/ncurses-pkg/src/NCPkgFilterClassification.h URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses-pkg/src/NCPkgFilterClassification.h?rev=68082&r1=68081&r2=68082&view=diff ============================================================================== --- trunk/ncurses-pkg/src/NCPkgFilterClassification.h (original) +++ trunk/ncurses-pkg/src/NCPkgFilterClassification.h Thu May 3 16:06:30 2012 @@ -74,7 +74,7 @@ YItem *unneeded; bool check (ZyppSel selectable, ZyppPkg pkg, YItem * group ); - + public: /** @@ -89,20 +89,19 @@ virtual ~NCPkgFilterClassification() {}; /** - * Add one line to the selection box - * @param YItem item The package classification, e.g. recommeded, suggested - * @param bool selected Line selected + * Get currently selected package group item */ - //virtual void addLine( YItem * item, bool selected ); + YItem * getCurrentGroup(); virtual NCursesEvent wHandleInput ( wint_t ch ); /** * Fill package list - * */ bool showPackages( ); + + void showDescription( ); }; #endif Modified: trunk/ncurses-pkg/src/NCPkgStrings.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses-pkg/src/NCPkgStrings.cc?rev=68082&r1=68081&r2=68082&view=diff ============================================================================== --- trunk/ncurses-pkg/src/NCPkgStrings.cc (original) +++ trunk/ncurses-pkg/src/NCPkgStrings.cc Thu May 3 16:06:30 2012 @@ -210,7 +210,7 @@ const string NCPkgStrings::HelpOnFilters1() { // help text package status - static const string value = _( "<p><b>Filters</b> allow you to filter all available packages according to\nthe selected criteria. Package filters are based on package properties (repository, RPM group), package \"containers\" (patterns, languages) or search results. Select the desired filter from the drop-down menu. Specific filters are described below.</p>" ); + static const string value = _( "<p><b>Filters</b> allow you to filter all available packages according to\nthe selected criteria. Package filters are based on package properties (repository, RPM group), package \"containers\" (patterns, languages), package classification or search results. Select the desired filter from the drop-down menu. Specific filters are described below.</p>" ); return value; } @@ -238,7 +238,7 @@ const string NCPkgStrings::HelpOnFilters5() { // help text package status -static const string value = _( "The <b>Installation summary</b> presents an overview of packages whose\nstatus has changed during this session (e.g. marked for installation or\nremoval), either by the user or automatically by the solver.</p>" ); +static const string value = _( "The <b>Installation summary</b> presents an overview of packages whose\nstatus has changed during this session (e.g. marked for installation or\nremoval), either by the user or automatically by the solver.\nThe filter <b>Package Classification</b> provides information about <i>Recommended</i>, <i>Suggested</i>, <i>Orphaned</i> and <i>Unneeded</i> packages.</p>" ); return value; } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org