Mailinglist Archive: yast-commit (819 mails)

< Previous Next >
[yast-commit] r54480 - in /trunk/storage: storage/src/include/ep-lib.ycp storage/src/include/ep-settings.ycp storage/src/modules/StorageSettings.ycp yast2-storage.spec.in
  • From: aschnell@xxxxxxxxxxxxxxxx
  • Date: Thu, 08 Jan 2009 17:30:52 -0000
  • Message-id: <E1LKyia-0005ss-O3@xxxxxxxxxxxxxxxx>
Author: aschnell
Date: Thu Jan 8 18:30:52 2009
New Revision: 54480

URL: http://svn.opensuse.org/viewcvs/yast?rev=54480&view=rev
Log:
- make use of multiset functions

Modified:
trunk/storage/storage/src/include/ep-lib.ycp
trunk/storage/storage/src/include/ep-settings.ycp
trunk/storage/storage/src/modules/StorageSettings.ycp
trunk/storage/yast2-storage.spec.in

Modified: trunk/storage/storage/src/include/ep-lib.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-lib.ycp?rev=54480&r1=54479&r2=54480&view=diff
==============================================================================
--- trunk/storage/storage/src/include/ep-lib.ycp (original)
+++ trunk/storage/storage/src/include/ep-lib.ycp Thu Jan 8 18:30:52 2009
@@ -10,13 +10,13 @@

list<string> AddedToList(list<string> old, list<string> new)
{
- return list::difference(sort(new), sort(old));
+ return multiset::difference(sort(new), sort(old));
}


list<string> RemovedFromList(list<string> old, list<string> new)
{
- return list::difference(sort(old), sort(new));
+ return multiset::difference(sort(old), sort(new));
}



Modified: trunk/storage/storage/src/include/ep-settings.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-settings.ycp?rev=54480&r1=54479&r2=54480&view=diff
==============================================================================
--- trunk/storage/storage/src/include/ep-settings.ycp (original)
+++ trunk/storage/storage/src/include/ep-settings.ycp Thu Jan 8 18:30:52 2009
@@ -30,13 +30,11 @@
{
list <term> PreselectVisibleFields()
{
- list <symbol> hidden_fields = StorageSettings::GetHiddenFields();
+ list<symbol> hidden_fields = StorageSettings::GetHiddenFields();
return maplist(integer i, Integer::Range(size(visible_fields)), {
string label = visible_fields[i, `label]:"";
list<symbol> fields = visible_fields[i, `fields]:[];
- boolean selected = list::reduce(boolean tmp, symbol field,
true, fields, {
- return tmp && !setcontains(hidden_fields, field);
- });
+ boolean selected = !multiset::includes(hidden_fields, fields);
return `item(`id(i), label, selected);
});
}
@@ -147,9 +145,9 @@
foreach(integer i, Integer::Range(size(visible_fields)), {
list<symbol> fields = visible_fields[i, `fields]:[];
if (contains(selected, i))
- hidden_fields = filter(symbol hidden_field, hidden_fields,
{ return !setcontains(fields, hidden_field); });
+ hidden_fields = multiset::difference(hidden_fields, fields);
else
- hidden_fields = toset(flatten([ hidden_fields, fields ]));
+ hidden_fields = multiset::union(hidden_fields, fields);
});

return hidden_fields;

Modified: trunk/storage/storage/src/modules/StorageSettings.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/modules/StorageSettings.ycp?rev=54480&r1=54479&r2=54480&view=diff
==============================================================================
--- trunk/storage/storage/src/modules/StorageSettings.ycp (original)
+++ trunk/storage/storage/src/modules/StorageSettings.ycp Thu Jan 8 18:30:52
2009
@@ -93,14 +93,14 @@
list<symbol> hidden = GetHiddenFields();

if (GetDisplayName() != `path)
- hidden = toset(add(hidden, `udev_path));
+ hidden = multiset::union(hidden, [ `udev_path ]);
else
- hidden = filter(symbol field, hidden, { return field != `udev_path;
});
+ hidden = multiset::difference(hidden, [ `udev_path ]);

if (GetDisplayName() != `id)
- hidden = toset(add(hidden, `udev_id));
+ hidden = multiset::union(hidden, [ `udev_id ]);
else
- hidden = filter(symbol field, hidden, { return field != `udev_id;
});
+ hidden = multiset::difference(hidden, [ `udev_id ]);

return filter(symbol field, fields, { return !setcontains(hidden,
field); });
}

Modified: trunk/storage/yast2-storage.spec.in
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/yast2-storage.spec.in?rev=54480&r1=54479&r2=54480&view=diff
==============================================================================
--- trunk/storage/yast2-storage.spec.in (original)
+++ trunk/storage/yast2-storage.spec.in Thu Jan 8 18:30:52 2009
@@ -3,10 +3,10 @@
@HEADER@
BuildRequires: blocxx-devel boost-devel gcc-c++ libxcrypt-devel openssl-devel
sablot swig
BuildRequires: docbook-xsl-stylesheets doxygen libxslt perl-XML-Writer
sgml-skel
-BuildRequires: update-desktop-files yast2 yast2-core-devel >= 2.18.0
yast2-devtools
+BuildRequires: update-desktop-files yast2 yast2-core-devel >= 2.18.1
yast2-devtools
BuildRequires: yast2-testsuite yast2-perl-bindings
Requires: yast2-storage-lib = %version yast2-perl-bindings parted mdadm
lvm2 dmraid
-Requires: multipath-tools kpartx cryptsetup yast2-core >= 2.18.0 yast2 >=
2.17.45
+Requires: multipath-tools kpartx cryptsetup yast2-core >= 2.18.1 yast2 >=
2.17.45
Requires: yast2-libyui >= 2.17.5
%ifarch s390 s390x
Requires: yast2-s390

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages