Author: aschnell
Date: Tue Apr 8 13:49:59 2008
New Revision: 46229
URL: http://svn.opensuse.org/viewcvs/yast?rev=46229&view=rev
Log:
- MiniWorkflow remembers title
Modified:
branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd-dialogs.ycp
branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm-dialogs.ycp
branches/tmp/aschnell/part-redesign/storage/src/modules/MiniWorkflow.ycp
Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd-dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd-dialogs.ycp?rev=46229&r1=46228&r2=46229&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd-dialogs.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd-dialogs.ycp Tue Apr 8 13:49:59 2008
@@ -44,8 +44,7 @@
{
any StepType()
{
- MiniWorkflow::SetContents(_("Add Partition"),
- Greasemonkey::Transform(`HVSquash(FramePartitionType(possibilities))),
+ MiniWorkflow::SetContents(Greasemonkey::Transform(`HVSquash(FramePartitionType(possibilities))),
"help");
MiniWorkflow::SetLastStep(false);
@@ -55,8 +54,7 @@
any StepSize()
{
- MiniWorkflow::SetContents(_("Add Partition"),
- Greasemonkey::Transform(`HVSquash(FrameSize(`part))),
+ MiniWorkflow::SetContents(Greasemonkey::Transform(`HVSquash(FrameSize(`part))),
"help");
MiniWorkflow::SetLastStep(false);
@@ -66,10 +64,9 @@
any StepFormatMount()
{
- MiniWorkflow::SetContents(_("Add Partition"),
- Greasemonkey::Transform(`HVSquash(`VStackFrames(
+ MiniWorkflow::SetContents(Greasemonkey::Transform(`HVSquash(`VStackFrames(
FrameFormat(`part),
- FrameMount(`part)
+ FrameMount(`part)
))),
"help");
@@ -82,7 +79,7 @@
widget = MiniWorkflow::UserInput();
if (widget == `crypt_fs)
- {
+ {
MiniWorkflow::SetLastStep(UI::QueryWidget(`id(`crypt_fs), `Value) != true);
}
else if (widget == `fs_options)
@@ -105,7 +102,7 @@
UI::ChangeWidget(`id(`huhu1), `Enabled, true);
UI::ChangeWidget(`id(`huhu2), `Enabled, false);
}
-
+
}
until (widget == `abort || widget == `back || widget == `next);
@@ -122,8 +119,7 @@
any StepPassword()
{
- MiniWorkflow::SetContents(_("Add Partition"),
- `HVSquash(FramePassword()),
+ MiniWorkflow::SetContents(`HVSquash(FramePassword()),
"help");
MiniWorkflow::SetLastStep(true);
@@ -153,7 +149,7 @@
"Password" : $[ `finish : `finish ]
];
- symbol ret = MiniWorkflow::Run(aliases, sequence, "Type");
+ symbol ret = MiniWorkflow::Run(_("Add Partition"), aliases, sequence, "Type");
return false;
}
@@ -164,27 +160,62 @@
boolean DlgEditPartition(string device)
{
- UI::OpenDialog(`opt(`decorated),
- // heading in a popup dialog
- `VBox(`Left(`Heading(_("Edit Partition"))),
- StackFrames([ FrameFormat(`part),
- FrameMount(`part) ]),
- `HBox(
- `PushButton(`id(`cancel), Label::CancelButton()),
- `PushButton(`id(`ok), `opt(`default), Label::OKButton())
- )
- )
- );
-
- symbol widget = nil;
+ any StepFormatMount()
+ {
+ MiniWorkflow::SetContents(Greasemonkey::Transform(`HVSquash(`VStackFrames(
+ FrameFormat(`part),
+ FrameMount(`part)
+ ))),
+ "help");
+
+ MiniWorkflow::SetLastStep(true);
+
+ symbol widget = nil;
+
+ repeat
+ {
+ widget = (symbol) MiniWorkflow::UserInput();
+ }
+ until (widget == `abort || widget == `back || widget == `next);
+
+ if (widget == `next)
+ {
+ if (UI::QueryWidget(`id(`crypt_fs), `Value) == true)
+ return `next;
+ else
+ return `finish;
+ }
+
+ return widget;
+ }
- repeat
+ any StepPassword()
{
- widget = (symbol) UI::UserInput();
+ MiniWorkflow::SetContents(`HVSquash(FramePassword()),
+ "help");
+
+ MiniWorkflow::SetLastStep(true);
+
+ any ret = MiniWorkflow::UserInput();
+
+ if (ret == `next)
+ return `finish;
+
+ return ret;
}
- until (widget == `cancel || widget == `ok);
- UI::CloseDialog();
+ map