Author: aschnell
Date: Fri Feb 15 12:46:34 2008
New Revision: 44503
URL: http://svn.opensuse.org/viewcvs/yast?rev=44503&view=rev
Log:
- first try of "Add Volume Group" dialog
Added:
branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm-dialogs.ycp
Modified:
branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm.ycp
Added: 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=44503&view=auto
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm-dialogs.ycp (added)
+++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm-dialogs.ycp Fri Feb 15 12:46:34 2008
@@ -0,0 +1,64 @@
+/**
+ * File: ep-lvm-dialogs.ycp
+ * Package: yast2-storage
+ * Summary: Expert Partitioner
+ * Authors: Arvin Schnell
+ *
+ */
+{
+ textdomain "storage";
+
+
+ // TODO: as module or even special widget
+ term CreateDualMultiSelectionBox(list<term> l)
+ {
+ return `HBox(
+ `MultiSelectionBox( "Available Physical Volumes:", l ),
+ `VBox(
+ `PushButton(`id(`add), "Add " + UI::Glyph(`ArrowRight)),
+ `PushButton(`id(`add_all), "Add All " + UI::Glyph(`ArrowRight)),
+ `VSpacing(1),
+ `PushButton(`id(`remove), UI::Glyph(`ArrowLeft) + " Remove"),
+ `PushButton(`id(`remove_all), UI::Glyph(`ArrowLeft) + " Remove All")
+ ),
+ `MultiSelectionBox( "Selected Physical Volumes:", [] )
+ );
+ }
+
+
+ void hoho()
+ {
+ map tg = Storage::GetTargetMap();
+ list<map> candidates = get_possible_pvs(tg);
+
+ candidates = filter(map candidate, candidates, { return candidate["used_by"]:"" == ""; });
+
+ list<term> also_candidates = maplist(map candidate, candidates, {
+ string device = candidate["device"]:"";
+ return `item(`id(device), device);
+ });
+
+ // TODO: use Wizard:: ?
+ UI::OpenDialog(`opt(`defaultsize),
+ `VBox(
+ `Heading("Add Volume Group"),
+ `InputField("Volume Group Name:"),
+ CreateDualMultiSelectionBox(also_candidates),
+ `HBox(
+ `PushButton(`id(`cancel), "Cancel"),
+ `PushButton(`id(`ok), `opt(`default), "OK")
+ )
+ )
+ );
+
+ any widget = nil;
+
+ repeat
+ {
+ widget = UI::UserInput();
+ }
+ until (widget == `cancel || widget == `ok);
+
+ UI::CloseDialog();
+ }
+}
Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm.ycp?rev=44503&r1=44502&r2=44503&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm.ycp Fri Feb 15 12:46:34 2008
@@ -8,25 +8,9 @@
{
textdomain "storage";
-
-
- void hoho()
- {
- // TODO: use Wizard:: ?
- UI::OpenDialog(`opt(`defaultsize),
- `VBox(
- `Label( "Top level dialog" ),
- `PushButton( `opt(`default), "OK\nLevel 1" )
- )
- );
-
- UI::UserInput();
-
- UI::CloseDialog();
- }
-
-
-
+
+ include "partitioning/ep-lvm-dialogs.ycp";
+
void CreateLvmPanel(any user_data)
{
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org