Author: aschnell
Date: Fri Jun 6 17:58:47 2008
New Revision: 48128
URL: http://svn.opensuse.org/viewcvs/yast?rev=48128&view=rev
Log:
- cleanup
Modified:
branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd.ycp
branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm-dialogs.ycp
branches/tmp/aschnell/part-redesign/storage/src/include/lvm_pv_lib.ycp
branches/tmp/aschnell/part-redesign/storage/src/modules/StorageFields.ycp
Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd.ycp?rev=48128&r1=48127&r2=48128&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd.ycp Fri Jun 6 17:58:47 2008
@@ -251,26 +251,28 @@
string disk_device = (string) user_data;
string part_device = (string) UI::QueryWidget(`id(`table), `CurrentItem);
- if (widget == `add)
+ switch (widget)
{
- EpCreatePartition(disk_device);
- }
- else if (widget == `edit)
- {
- EpEditPartition(part_device);
- }
- else if (widget == `resize)
- {
- DlgResize(`part);
- }
- else if (widget == `delete)
- {
- if (EpDeleteDevice(part_device))
- {
- // TODO: update tree and tab (with focus)
- UpdateNavigationTree(nil);
- CreateHdDiskPartitionsTab(user_data);
- }
+ case `add:
+ EpCreatePartition(disk_device);
+ break;
+
+ case `edit:
+ EpEditPartition(part_device);
+ break;
+
+ case `resize:
+ DlgResize(`part);
+ break;
+
+ case `delete:
+ if (EpDeleteDevice(part_device))
+ {
+ // TODO: update tree and tab (with focus)
+ UpdateNavigationTree(nil);
+ CreateHdDiskPartitionsTab(user_data);
+ }
+ break;
}
}
@@ -346,21 +348,23 @@
{
string part_device = (string) user_data;
- if (widget == `edit)
- {
- EpEditPartition(part_device);
- }
- else if (widget == `resize)
- {
- DlgResize(`part);
- }
- else if (widget == `delete)
+ switch (widget)
{
- if (EpDeleteDevice(part_device))
- {
- // TODO: update tree (with focus)
- UpdateNavigationTree(nil);
- }
+ case `edit:
+ EpEditPartition(part_device);
+ break;
+
+ case `resize:
+ DlgResize(`part);
+ break;
+
+ case `delete:
+ if (EpDeleteDevice(part_device))
+ {
+ // TODO: update tree (with focus)
+ UpdateNavigationTree(nil);
+ }
+ break;
}
}
}
Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm-dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm-dialogs.ycp?rev=48128&r1=48127&r2=48128&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm-dialogs.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm-dialogs.ycp Fri Jun 6 17:58:47 2008
@@ -3,7 +3,6 @@
* Package: yast2-storage
* Summary: Expert Partitioner
* Authors: Arvin Schnell my_unflatten(list<symbol> fields)
+ list< list<symbol> > splitfields(list<symbol> fields)
{
- list
ret = [];
+ list< list<symbol> > ret = [];
list<symbol> tmp = [];
foreach(symbol field, fields, {
if (substring(tostring(field), 0, 8) == "`heading") {
- if (size(tmp) > 0)
+ if (size(tmp) > 1)
ret = add(ret, tmp);
tmp = [ field ];
} else {
tmp = add(tmp, field);
}
});
- if (size(tmp) > 0)
+ if (size(tmp) > 1)
ret = add(ret, tmp);
return ret;
@@ -806,19 +827,10 @@
});
};
- string content = mergestring(maplist(list<symbol> subfields, my_unflatten(fields), {
- return HTML::Heading(Heading(subfields[0]:`none)) +
- HTML::List(List(sublist(subfields, 1, size(subfields) - 1)));
- }), "");
-
- /*
- string content = mergestring(maplist(list<symbol> subfields, unflatten(symbol field, fields, {
- return substring(tostring(field), 0, 8) == "`heading";
- }), {
+ string content = mergestring(maplist(list<symbol> subfields, splitfields(fields), {
return HTML::Heading(Heading(subfields[0]:`none)) +
HTML::List(List(sublist(subfields, 1, size(subfields) - 1)));
}), "");
- */
return content;
}
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org