Author: lslezak Date: Tue Dec 23 09:49:34 2008 New Revision: 54342 URL: http://svn.opensuse.org/viewcvs/yast?rev=54342&view=rev Log: - repositories.ycp - configure 'keeppackages' repository option (bnc#402617) Modified: trunk/packager/package/yast2-packager.changes trunk/packager/src/clients/repositories.ycp Modified: trunk/packager/package/yast2-packager.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/package/yast2-packager.changes?rev=54342&r1=54341&r2=54342&view=diff ============================================================================== --- trunk/packager/package/yast2-packager.changes (original) +++ trunk/packager/package/yast2-packager.changes Tue Dec 23 09:49:34 2008 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Tue Dec 23 09:46:51 CET 2008 - lslezak@suse.cz + +- repositories.ycp - configure 'keeppackages' repository option + (bnc#402617) + +------------------------------------------------------------------- Mon Dec 22 14:46:43 CET 2008 - lslezak@suse.cz - hide the [Back] button in the repository manager (bnc#440569) Modified: trunk/packager/src/clients/repositories.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/src/clients/repositories.ycp?rev=54342&r1=54341&r2=54342&view=diff ============================================================================== --- trunk/packager/src/clients/repositories.ycp (original) +++ trunk/packager/src/clients/repositories.ycp Tue Dec 23 09:49:34 2008 @@ -69,6 +69,8 @@ const string priority_label = _("&Priority"); + const string keeppackages_label = _("Keep Downloaded Packages"); + // current view: // selected service (or empty) if all services are selected string displayed_service = ""; @@ -207,6 +209,7 @@ "type" : generalData["type"]:"", "priority" : source["priority"]:default_priority, "service" : source["service"]:"", + "keeppackages" : source["keeppackages"]:false, ]; return out; @@ -327,8 +330,9 @@ if (repo_mode) { - // priority is displayed only for repositories + // priority and keeppackages are displayed only for repositories UI::ChangeWidget (`id (`priority), `Value, info["priority"]:default_priority); + UI::ChangeWidget (`id (`keeppackages), `Value, info["keeppackages"]:false); } } @@ -614,6 +618,7 @@ UI::ReplaceWidget(`id(`tabrp), TableWidget(repo_mode)); UI::ReplaceWidget(`id(`priorp), repo_mode ? `IntField(`id(`priority), `opt(`notify), priority_label, 0, 200, default_priority) : `Empty()); + UI::ReplaceWidget(`id(`keeppkg_rp), repo_mode ? `CheckBox(`id(`keeppackages), `opt(`notify), keeppackages_label) : `Empty()); } void RemoveReposFromService(string service_alias) @@ -720,6 +725,11 @@ `Left (`CheckBox (`id (`autorefresh), `opt(`notify), _("Automatically &Refresh"))) ) ), + `HSquash(`VBox( + `Label(""), + `ReplacePoint(`id(`keeppkg_rp), `CheckBox(`id(`keeppackages), `opt(`notify), keeppackages_label)) + ) + ), `HSquash(`ReplacePoint(`id(`priorp), `IntField(`id(`priority), `opt(`notify), priority_label, 0, 200, default_priority))), `HStretch() ), @@ -815,8 +825,12 @@ help_text = help_text + _("<P><B>Priority of a Repository</B><BR> Priority of a repository is an integer value between 0 (the highest priority) and 200 (the lowest priority). Default priority is 99. If a package is available in more repositories the repository with the highest priority is used.</P>"); + // help text, continued help_text = help_text + _("<P>Use the tree displayed on the left side for navigation in repositories and services.</P>"); + // help text, continued + help_text = help_text + _("<P><B>Keep Downloaded Packages</B><BR>Check this option to keep downloaded packages in a local cache so they can be reused later when the packages are reinstalled. If unchecked the downloaded packages are deleted after installation.</P>") + _("<P>The default local cache is located in directory <B>/var/cache/zypp/packages</B>, the location can be changed in <B>/etc/zypp/zypp.conf</B> file.</P>"); + Wizard::SetNextButton(`next, Label::OKButton() ); Wizard::SetAbortButton(`abort, Label::CancelButton() ); @@ -1402,6 +1416,25 @@ y2error("Ignoring event `priority: the widget should NOT be displayed in service mode!"); } } + else if (input == `keeppackages) + { + if (repository_view) + { + // refresh the value in the table + boolean new_keep = (boolean)UI::QueryWidget(`id(`keeppackages), `Value); + y2internal("New keep packages option: %1", new_keep); + + sourceState[ "keeppackages" ] = new_keep; + sourceStatesOut[ global_current ] = sourceState; + + // do not refresh the item in the table + current = -1; + } + else + { + y2error("Ignoring event `keeppackages: the widget should NOT be displayed in service mode!"); + } + } else if (input != `table) { y2warning("Unknown user input: %1", input); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org