Author: aschnell
Date: Wed Feb 20 14:28:34 2008
New Revision: 44691
URL: http://svn.opensuse.org/viewcvs/yast?rev=44691&view=rev
Log:
- run prepdisk
Modified:
branches/tmp/aschnell/part-redesign/storage/src/include/custom_part_dialogs.ycp
branches/tmp/aschnell/part-redesign/storage/src/include/ep-main.ycp
Modified: branches/tmp/aschnell/part-redesign/storage/src/include/custom_part_dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/custom_part_dialogs.ycp?rev=44691&r1=44690&r2=44691&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/include/custom_part_dialogs.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/include/custom_part_dialogs.ycp Wed Feb 20 14:28:34 2008
@@ -1592,62 +1592,57 @@
};
-define symbol ReallyInstPrepdisk( )
- ``{
- map targetMap = Storage::GetTargetMap();
+symbol ReallyInstPrepdisk()
+{
symbol ret = `none;
string doto = Storage::ChangeText();
- y2milestone( "ReallyInstPrepdisk doto:%1", doto );
- term dlg = `Empty();
- if( size(doto) == 0 )
- {
+ y2milestone("ReallyInstPrepdisk doto:%1", doto);
+
+ if (size(doto) == 0)
+ {
// popup text
- Popup::Message( _("No unsaved changes exist."));
+ Popup::Message(_("No unsaved changes exist."));
ret = `back;
- }
+ }
else
- {
- dlg = `VBox( `VSpacing(1),
- `HSpacing(60),
- // label text
- `Left(`Heading(_("Changes:"))),
- `RichText( doto ) );
+ {
+ term dlg = `VBox(`VSpacing(1),
+ `HSpacing(60),
+ // label text
+ `Left(`Heading(_("Changes:"))),
+ `RichText(doto));
UI::OpenDialog(`opt(`decorated, `warncolor),
`HBox(
- `HSpacing(1),
- `VBox(
- dlg,
- `VSpacing(1),
- // popup text
- `Heading(_(" Do you really want to execute these changes?")),
- `VSpacing(1),
-
- `HBox(
- // all right, start installation *now*
-
- `PushButton(`id(`back), Label::CancelButton()),
- `HStretch(),
- // button text
- `PushButton(`id(`apply), _("&Apply")),
- `PushButton(`id(`finish), Label::FinishButton() )
- // no, don't go on, i just changed my mind
- ),
- `VSpacing(0.2)
+ `HSpacing(1),
+ `VBox(
+ dlg,
+ `VSpacing(1),
+ // popup text
+ `Heading(_(" Do you really want to execute these changes?")),
+ `VSpacing(1),
+ `HBox(
+ `PushButton(`id(`back), Label::CancelButton()),
+ `HStretch(),
+ // button text
+ `PushButton(`id(`apply), _("&Apply")),
+ `PushButton(`id(`finish), Label::FinishButton() )
),
- `HSpacing(1)
- )
- );
+ `VSpacing(0.2)
+ ),
+ `HSpacing(1)
+ )
+ );
- ret = (symbol)UI::UserInput();
+ ret = (symbol) UI::UserInput();
UI::CloseDialog();
- }
+ }
- y2milestone( "ReallyInstPrepdisk ret=%1", ret );
+ y2milestone("ReallyInstPrepdisk ret=%1", ret);
return ret;
- };
+}
/**
Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-main.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/ep-main.ycp?rev=44691&r1=44690&r2=44691&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/include/ep-main.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-main.ycp Wed Feb 20 14:28:34 2008
@@ -364,9 +364,9 @@
return table_input;
}
-
+
void UpdateNavigationTree();
-
+
include "partitioning/ep-lib.ycp";
include "partitioning/ep-all.ycp";
@@ -442,13 +442,40 @@
return tree;
}
-
+
void UpdateNavigationTree()
{
list<term> tree = MakeNavigationTree();
TreePanel::Update(data, tree);
}
-
+
+
+ /**
+ * apply changes in running system
+ */
+ symbol DoApply()
+ {
+ symbol ret1 = ReallyInstPrepdisk();
+
+ if (ret1 == `back)
+ {
+ return `back;
+ }
+ else if (ret1 == `apply || ret1 == `finish)
+ {
+ symbol ret2 = (symbol) WFM::CallFunction("inst_prepdisk", [true, true]);
+ Storage::CreateTargetBackup("expert-partitioner");
+
+ if (ret2 != `next)
+ return `back;
+
+ if (ret1 == `apply)
+ return `back;
+ else
+ return `next;
+ }
+ }
+
term systemViewTreePanel =
`VBox(
@@ -501,6 +528,21 @@
}
}
}
+ else if (widget == `next)
+ {
+ if (Mode::normal())
+ {
+ if (DoApply() == `back)
+ {
+ // DoApply (inst_prepdisk) replaces the wizard content
+ // TODO: make nicer
+ Wizard::SetContentsButtons(_("Expert Partitioner"), content, "", back_label, next_label);
+ UpdateNavigationTree();
+ widget = nil;
+ continue;
+ }
+ }
+ }
}
until (widget == `back || widget == `abort || widget == `next);
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org