Author: kmachalkova Date: Tue Mar 18 18:11:12 2008 New Revision: 45559 URL: http://svn.opensuse.org/viewcvs/yast?rev=45559&view=rev Log: help text handling Modified: branches/tmp/bubli/ncurses-pkg/src/NCPkgMenuHelp.cc branches/tmp/bubli/ncurses-pkg/src/NCPkgMenuHelp.h branches/tmp/bubli/ncurses-pkg/src/NCPkgNames.cc branches/tmp/bubli/ncurses-pkg/src/NCPkgNames.h Modified: branches/tmp/bubli/ncurses-pkg/src/NCPkgMenuHelp.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/bubli/ncurses-pkg/src/NCPkgMenuHelp.cc?rev=45559&r1=45558&r2=45559&view=diff ============================================================================== --- branches/tmp/bubli/ncurses-pkg/src/NCPkgMenuHelp.cc (original) +++ branches/tmp/bubli/ncurses-pkg/src/NCPkgMenuHelp.cc Tue Mar 18 18:11:12 2008 @@ -17,6 +17,7 @@ #include "Y2Log.h" #include "NCPkgMenuHelp.h" +#include "NCPkgNames.h" /* @@ -45,6 +46,9 @@ filterHelp = new YMenuItem( _("&How To Use the Filters") ); items.push_back( filterHelp ); + menuHelp = new YMenuItem( _("&Useful Functions in Menu") ); + items.push_back( menuHelp ); + addItems( items); } @@ -53,6 +57,54 @@ if (!event.selection) return false; - NCINT << "zatim nic" << endl; + string text = ""; + string headline = NCPkgNames::PackageHelp(); + + if ( event.selection == generalHelp ) + { + text += NCPkgNames::HelpPkgGen1(); + text += NCPkgNames::HelpPkgGen2(); + text += NCPkgNames::HelpPkgGen3(); + text += NCPkgNames::HelpPkgGen4(); + text += NCPkgNames::HelpPkgGen5(); + text += NCPkgNames::HelpPkgGen6(); + + } + else if ( event.selection == statusHelp ) + { + text += NCPkgNames::HelpOnStatus1(); + text += NCPkgNames::HelpOnStatus2(); + text += NCPkgNames::HelpOnStatus4(); + text += NCPkgNames::HelpOnStatus5(); + text += NCPkgNames::HelpOnStatus6(); + text += NCPkgNames::HelpOnStatus7(); + } + else if ( event.selection == menuHelp ) + { + text += NCPkgNames::HelpPkgMenu1(); + text += NCPkgNames::HelpPkgMenu2(); + text += NCPkgNames::HelpPkgMenu3(); + text += NCPkgNames::HelpPkgMenu4(); + } + else if ( event.selection == filterHelp ) + { + text += NCPkgNames::HelpOnFilters1(); + text += NCPkgNames::HelpOnFilters2(); + text += NCPkgNames::HelpOnFilters3(); + text += NCPkgNames::HelpOnFilters4(); + text += NCPkgNames::HelpOnFilters5(); + } + else + NCINT << "zatim nic" << endl; + + NCPopupInfo * pkgHelp = new NCPopupInfo( wpos( (NCurses::lines()*8)/100, (NCurses::cols()*18)/100 ), + headline, + text + ); + pkgHelp->setNiceSize( (NCurses::cols()*65)/100, (NCurses::lines()*85)/100 ); + pkgHelp->showInfoPopup( ); + + YDialog::deleteTopmostDialog(); + return true; } Modified: branches/tmp/bubli/ncurses-pkg/src/NCPkgMenuHelp.h URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/bubli/ncurses-pkg/src/NCPkgMenuHelp.h?rev=45559&r1=45558&r2=45559&view=diff ============================================================================== --- branches/tmp/bubli/ncurses-pkg/src/NCPkgMenuHelp.h (original) +++ branches/tmp/bubli/ncurses-pkg/src/NCPkgMenuHelp.h Tue Mar 18 18:11:12 2008 @@ -38,13 +38,14 @@ YMenuItem *generalHelp; YMenuItem *statusHelp; YMenuItem *filterHelp; + YMenuItem *menuHelp; NCPkgMenuHelp (YWidget *parent, string label); virtual ~NCPkgMenuHelp(); void createLayout(); - bool handleEvent (const NCursesEvent & event); + bool handleEvent (const NCursesEvent & event); }; Modified: branches/tmp/bubli/ncurses-pkg/src/NCPkgNames.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/bubli/ncurses-pkg/src/NCPkgNames.cc?rev=45559&r1=45558&r2=45559&view=diff ============================================================================== --- branches/tmp/bubli/ncurses-pkg/src/NCPkgNames.cc (original) +++ branches/tmp/bubli/ncurses-pkg/src/NCPkgNames.cc Tue Mar 18 18:11:12 2008 @@ -865,118 +865,162 @@ return value; } -const string NCPkgNames::HelpPkgInst1() +const string NCPkgNames::HelpPkgGen1() { // part1 of help text package installation - static const string value = _( "<p>The package installation dialog offers the features to customize your SuSE Linux installation. You have the opportunity to make your own decision about the installation or removal of particular packages. For example, select additional categories for installation (see menu <i>Filter</i>) or deselect unwanted packages.</p>" ); + static const string value = _( "<h3>Welcome to package selector</h3><p>This tool will help you to manage software installed on your system. You can install, update or remove single packages, as well as patterns (sets of packages serving certain purpose) or languages. Usually, you don't need to care about package dependencies when installing or removing anything - solver will do it for you. Package selector consists of three main parts: <b>filters, package table<b> and <b>menu</b>.</p>" ); return value; + } -const string NCPkgNames::HelpPkgInst12() +const string NCPkgNames::HelpPkgGen2() { // part of help text package installation - static const string value = _( "<p>The list shows all packages belonging to the current filter with status information in the first column. To change the package status, see <i>Actions</i>.</p>" ); + static const string value = _( "<p><b>Filters</b> (left panel) are designed to make orientation in great amount of packages easier. They enable displaying e.g. only packages from certain repository, or in a selected pattern (for example, Games or C/C++ Development) as well as searching for particular keywords. More information on filters can be found in <i>How to use filters</i>.</p>" ); return value; } -const string NCPkgNames::HelpPkgInst13() +const string NCPkgNames::HelpPkgGen3() { // additional help text for post installation - static const string value = _( "<p>Be careful when deleting packages and always pay attention to <i>Warning</i> pop-ups.</p>" ); + static const string value = _( "<p><b>Package table</b> is the main component of package selector. You will see a list of packages matching current filter (for example, selected RPM group or search result) there. Each line of package table has several columns:</p>" ); return value; } -const string NCPkgNames::HelpPkgInst2() +const string NCPkgNames::HelpPkgGen4 () { // part2 of help text package installation - static const string value = _( "Description of the menus:<br><p><b>Filter:</b> the packages shown in the package list match the selected filter, such as an RPM group, a keyword, or a category of packages (like Development or Games).</p>" ); + static const string value = _( "<ol><li>Package status ( for more information see <i>Package Status and Symbols</i> )</li><li>Package name</li><li>Package summary</li><li>Available version ( on some of the configured repositories )</li><li>Installed version( empty for not yet installed packages )</li><li>Package size</li></ol>" ); + return value; } -const string NCPkgNames::HelpPkgInst3() +const string NCPkgNames::HelpPkgGen5() { // part3 of help text package installation - static const string value = _( "<p><b>Actions:</b> provides the possibilities to change the status of the selected package (or all packages in the list), for example, to delete a package or select an additional package for installation. The status change can also be done directly by pressing the key specified in the menu item (for detailed information about the package status, see 'Help on package status').</p>" ); + static const string value = _( "<p><b>Actions</b> menu just below the table provides the possibilities to change the status of selected package (or all packages in the list), for example, to delete a package or select an additional package for installation. The status change can also be done directly by pressing the key specified in the menu item (for detailed information about the package status, see <i>Package Status and Symbols</i>).</p>" ); return value; } -const string NCPkgNames::HelpPkgInst4() +const string NCPkgNames::HelpPkgGen6() { // part4 of help text package installation - static const string value = _( "<p><b>Information:</b> you have the possibility to view different information about the selected package in the window on the bottom of the dialog, such as the long description, all available versions of the package, or the file list.</p>" ); + static const string value = _( "<p><b>Menu</b> provides functions related to package dependencies handling, displaying relevant information on packages and several other useful actions, such as opening repository editor. For more information, see <i>Useful Functions in Menu</i>.</p>" ); return value; } -const string NCPkgNames::HelpPkgInst5() +const string NCPkgNames::HelpPkgMenu1() { // part5 of help text package installation - static const string value = _( "<p><b>Etc.:</b> The menu item 'Dependencies' offers different settings for the dependency checking. Automatic dependency check means check after every change of the package status whether all requirements are fulfilled or whether conflicts occurred.</p>" ); + static const string value = _( "<p><b>Dependencies:</b> This menu offers various actions related to package dependency handling. By default, the package dependencies are checked with every status change (<i>Automatic Dependency Check</i> is on) You will be informed about package conflicts in a dialog proposing possible conflict resolution. To resolve the conflict, select one of the offered solutions and press 'OK -- Try Again'.</p>" ); return value; } -const string NCPkgNames::HelpPkgInst6() +const string NCPkgNames::HelpPkgMenu2() { - // part6 of help text package installation - static const string value = _( "<p>To save or load a package selection, choose 'Selections'.</p>" ); + // part5 of help text package installation + static const string value = _( "<p>To disable dependency checking on every status change, toggle <i>Automatic Dependency Check</i> off. In that case, you can check dependencies manually by selecting <i>Check Dependencies Now</i> item. <i>Verify system</i> entry will check package dependencies and resolve conflicts non-interactively, marking missing packages for automatic installation, if necessary. For debugging purpose, you may use <i>Generate Dependency Solver Testcase</i>. It will dump package dependencies data into <tt>/var/log/YaST2/solverTestcase</tt> directory. This is usually what you need when asked for \"solver testcase\" in bugzilla.</p>" ); return value; } -const string NCPkgNames::HelpOnSearch() +const string NCPkgNames::HelpPkgMenu3() { - // help text package search - static const string value = _( "<p>Enter a keyword for your package search. It is possible to enter only parts of a package name, for example, to search for all 3D packages with \"3d\".<br> If you are looking for a term in a package description, click the appropriate check box. Start the search with 'Enter'.</p>" ); + // part5 of help text package installation + static const string value = _( "<p><b>View:</b> here you have the possibility to choose which information about the selected package will be displayed in the window below the package table. Available options are: package description (default), technical data (version, size, license etc.) package versions (all available), file list (all files included in the package) and dependencies (provides, requires etc.).</p>" ); return value; } -const string NCPkgNames::HelpOnStatus1() +const string NCPkgNames::HelpPkgMenu4() { - // part 1 of help text package status - static const string value = _( "<p>The package status can be changed using the <i>Actions</i> menu or the keys specified in the menu items. For example, use '+' to install an additional package. The \"Taboo\" status means the package should not be installed or the installed version should always be kept.</p>" ); + // part5 of help text package installation + static const string value = _( "<p><b>Extras:</b> miscellaneous functions reside here. <i>Export Package List to File</i> will dump data on installed packages, patterns and languages into specified XML file. This file can be later read by <i>Import Package List from File</i> option e.g. on different computer. It will bring the set of packages on the target computer into the same state as described in provided XML file. <i>Show Available Disk Space</i> will show a popup table displaying disk usage and free disk space on currently mounted partition. <i>Configure Package Repositories</i> will open repositories manager.</p>" ); return value; } -const string NCPkgNames::HelpOnStatus2() +const string NCPkgNames::HelpPkgInst6() +{ + // part6 of help text package installation + static const string value = _( "<p>To save or load a package selection, choose 'Selections'.</p>" ); + return value; +} + +const string NCPkgNames::HelpOnStatus1() { // part 1 of help text package status - static const string value = _( "<p>By default, the package dependencies are checked with every status change. You will be informed about package conflicts and additionally required packages will be selected (the menu item <i>Etc.</i>/<i>Dependencies</i> offers different settings). To resolve the conflict, select one of the offered solution and press 'OK -- Try Again'.</p>" ); + static const string value = _( "<p>The package status can be changed using the <i>Actions</i> menu or the keys specified in the menu items. For example, use '+' to install an additional package.</p><p>The \"Taboo\" status means the package should never be installed. Similarly \"Locked\" status means that installed version of this package should always be kept.</p>" ); return value; } -const string NCPkgNames::HelpOnStatus3() +const string NCPkgNames::HelpOnStatus2() { // part 2 of help text package status - static const string value = _( "<p>You can also use <b>RET</b> or <b>SPACE</b> to toggle the package status." ); + static const string value = _( "<p>You can also use <b>RET</b> or <b>SPACE</b> to toggle the package status.The <i>Actions</i> menu also provides the possibility to change the status for all packages in the list (select 'All Listed Packages').</p>" ); return value; } - const string NCPkgNames::HelpOnStatus4() { // part 3 of help text package status - static const string value = _( "<br>The meaning of the status flags:" ); + static const string value = _( "The meaning of the status flags:" ); return value; } const string NCPkgNames::HelpOnStatus5() { // help text package status - static const string value = _( "<p><b> + </b>: this package is selected for installation</p><p><b>a+ </b>: automatically selected for installation</p><p><b> > </b>: update this package</p><p><b>a> </b>: automatic update</p><p><b> i </b>: this package is installed</p><p><b> - </b>: the package will be deleted</p><p><b>---</b>: never install this package</p>" ); + static const string value = _( "<p><b> + </b>: package will be installed</p><p><b>a+ </b>: package will be installed automatically</p><p><b> > </b>: package will be updated</p><p><b>a> </b>: package will be automatically updated</p><p><b> i </b>: package is installed</p><p><b> - </b>: package will be deleted</p><p><b>---</b>: never install this package (taboo)</p>" ); return value; } const string NCPkgNames::HelpOnStatus6() { // help text package status - static const string value = _( "<p><b>-i-</b>: the package is \"protected\" -- keep the installed version and never update or delete it.</p>" ); + static const string value = _( "<p><b>-i-</b>: keep the installed version and never update or delete it ( package locked )</p>" ); + return value; +} + +const string NCPkgNames::HelpOnFilters1() +{ + // help text package status + static const string value = _( "<p>Out of all available packages, <b>Filters</b> allow you to filter out only those you are interested in. 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>" ); + return value; +} + +const string NCPkgNames::HelpOnFilters2() +{ + // help text package status + static const string value = _( "<p><b>Patterns</b> describe the features and functions system should have (for example, X server or Console tools). Each pattern contains a set of packages it requires (must have), recommends (should have) and suggests (may have). If you trigger pattern for installation (update, deletion), solver will be run and change the status of subordinate packages accordingly.</p>" ); + return value; +} + +const string NCPkgNames::HelpOnFilters3() +{ + // help text package status + static const string value = _( "<p><b>Languages</b> are package containers very much like patterns. They contain packages with translations, dictionaries and other language-specific files for selected language. <b>RPM Groups</b> are however not package containers that can be installed. Instead, membership in certain RPM group is a property of package itself. They have hierarchical (tree) structure. <b>Repositories</b> filter enables displaying packages coming only from specific repository. </p>" ); return value; } -const string NCPkgNames::HelpOnStatus7() +const string NCPkgNames::HelpOnFilters4() +{ + // help text package search + static const string value = _( "<p>To use <b>Search</b> filter, enter a keyword (or part of keyword) for package search. For example, search for all 3D packages using expression \"3d\". It is also possible to search in package descriptions, RPM provides, or requires. Just select the appropriate check box. Start the search by hitting 'Search' button.</p>" ); + return value; +} + +const string NCPkgNames::HelpOnFilters5() { // help text package status - static const string value = _( "<p>The <i>Actions</i> menu also provides the possibility to change the status for all packages in the list (select 'All Listed Packages').</p>" ); +static const string value = _( "<p><b>Installation summary</b> presents a summary of packages, whose status has changed in this session (for example, they were marked for installation, or removal), either by user, or automatically by the solver.</p>" ); return value; } +const string NCPkgNames::HelpOnStatus3() +{ + // part 1 of help text package status + static const string value = _( "<p>By default, the package dependencies are checked with every status change. You will be informed about package conflicts and additionally required packages will be selected (the menu item <i>Etc.</i>/<i>Dependencies</i> offers different settings). To resolve the conflict, select one of the offered solution and press 'OK -- Try Again'.</p>" ); + return value; +} + + const string NCPkgNames::HelpOnUpdate() { // help text package status Modified: branches/tmp/bubli/ncurses-pkg/src/NCPkgNames.h URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/bubli/ncurses-pkg/src/NCPkgNames.h?rev=45559&r1=45558&r2=45559&view=diff ============================================================================== --- branches/tmp/bubli/ncurses-pkg/src/NCPkgNames.h (original) +++ branches/tmp/bubli/ncurses-pkg/src/NCPkgNames.h Tue Mar 18 18:11:12 2008 @@ -260,18 +260,25 @@ /** * Part 1 of help text package installation */ - static const string HelpPkgInst1(); + static const string HelpPkgGen1(); /** * Part 12 of help text package installation */ - static const string HelpPkgInst12(); + static const string HelpPkgGen2(); /** * Part 13 of help text package installation */ - static const string HelpPkgInst13(); - + static const string HelpPkgGen3(); + static const string HelpPkgGen4(); + static const string HelpPkgGen5(); + static const string HelpPkgGen6(); + + static const string HelpPkgMenu1(); + static const string HelpPkgMenu2(); + static const string HelpPkgMenu3(); + static const string HelpPkgMenu4(); /** * help text package status */ @@ -283,6 +290,12 @@ static const string HelpOnStatus6(); static const string HelpOnStatus7(); + static const string HelpOnFilters1(); + static const string HelpOnFilters2(); + static const string HelpOnFilters3(); + static const string HelpOnFilters4(); + static const string HelpOnFilters5(); + static const string YouHelp1(); static const string YouHelp2(); static const string YouHelp3(); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org