Author: kmachalkova
Date: Tue Jan 27 10:29:29 2009
New Revision: 55059
URL: http://svn.opensuse.org/viewcvs/yast?rev=55059&view=rev
Log:
Reverted buggy two-tabbed version
Modified:
trunk/packager/src/clients/webpin_package_search.ycp
Modified: trunk/packager/src/clients/webpin_package_search.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/src/clients/webpin_package_search.ycp?rev=55059&r1=55058&r2=55059&view=diff
==============================================================================
--- trunk/packager/src/clients/webpin_package_search.ycp (original)
+++ trunk/packager/src/clients/webpin_package_search.ycp Tue Jan 27 10:29:29 2009
@@ -25,7 +25,6 @@
import "Report";
list <map> search_results = [];
- list <map> all_selected = [];
map index = $[];
boolean AbortDialog() {
@@ -79,7 +78,7 @@
UI::ChangeWidget(`id("description"),`Value, ret);
}
- list CreatePackageListItems( list < map > results ) {
+ list CreatePackageList( list < map > results ) {
list pkg_items = [];
integer i = 0;
@@ -96,19 +95,7 @@
i = i+1;
});
return pkg_items;
- }
-
- void PopulatePackageList( list <map> which ) {
- list items = CreatePackageListItems( which );
-
- if (which != nil) {
- UI::ChangeWidget(`id("results"), `Items, items);
- UI::SetFocus(`id("results"));
- }
- else
- UI::SetFocus(`id("search_text"));
-
- }
+ }
list <map> FilterOutSelectedPackages() {
list <string> p = ( list <string> ) UI::QueryWidget(`id("results"), `SelectedItems);
@@ -155,12 +142,6 @@
}
symbol MainDialog() {
-
- term current_search_box = `MultiSelectionBox(`id ("results"), `opt (`notify, `hstretch),
- "", [] );
- term all_pkgs_box = `MultiSelectionBox(`id ("all"), `opt (`notify, `hstretch),
- "", [] );
-
Wizard::SetContents (
// TRANSLATORS: dialog caption
_("Package Search"),
@@ -199,12 +180,11 @@
//),
`VWeight (
2,
- `DumbTab(
- [ `item(`id("current_tab"), _("&Found Packages")),
- `item(`id("all_tab"), _("&All Selected Packages"))
- ],
- `ReplacePoint(`id(`rp), current_search_box)
- )
+ `MultiSelectionBox(
+ `id ("results"), `opt (`notify, `hstretch),
+ // TRANSLATORS: multi-selection box
+ _("&Found Packages"), []
+ )
),
//`HBox(
`Left( `Label( _("Package Description")) ),
@@ -235,8 +215,6 @@
UI::SetFocus(`id("search_text"));
- list <string> cached_selected_items = [];
-
any dialog_ret = nil;
while (true) {
dialog_ret = UI::UserInput();
@@ -258,14 +236,6 @@
break;
}
else if (dialog_ret == "search") {
-
- // remember packages selected so far
- if (search_results != nil && search_results != []) {
- list <map> selected = FilterOutSelectedPackages();
- all_selected = ( list <map> ) union( all_selected, selected );
- y2internal("all selected %1", all_selected);
- }
-
string search_expr = SearchExpression();
if (search_expr != "") {
@@ -278,7 +248,15 @@
search_params
);
Popup::ClearFeedback();
- PopulatePackageList( search_results );
+ list items = CreatePackageList( search_results );
+
+ if (search_results != nil) {
+ UI::ChangeWidget(`id("results"), `Items, items);
+ UI::SetFocus(`id("results"));
+ }
+ else
+ UI::SetFocus(`id("search_text"));
+
CreatePackageDescription();
}
//else
@@ -287,17 +265,6 @@
else if (dialog_ret == "results") {
CreatePackageDescription();
}
- else if (dialog_ret == "current_tab") {
- UI::ReplaceWidget(`id(`rp), current_search_box );
- PopulatePackageList( search_results );
- UI::ChangeWidget(`id("results"), `SelectedItems, cached_selected_items);
- CreatePackageDescription();
- }
- else if (dialog_ret == "all_tab") {
- cached_selected_items = (list <string>) UI::QueryWidget(`id("results"), `SelectedItems);
- UI::ReplaceWidget(`id(`rp), all_pkgs_box );
- //PopulatePackageList( all_selected );
- }
else if (dialog_ret == `abort || dialog_ret == `cancel) {
if (AbortDialog()) {
dialog_ret = `abort;
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org