Author: aschnell
Date: Wed Jul 16 15:27:41 2008
New Revision: 49176
URL: http://svn.opensuse.org/viewcvs/yast?rev=49176&view=rev
Log:
- work on format and mount dialog
Modified:
branches/tmp/aschnell/part-redesign/storage/src/include/ep-dialogs.ycp
Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/ep-dialogs.ycp?rev=49176&r1=49175&r2=49176&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/include/ep-dialogs.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-dialogs.ycp Wed Jul 16 15:27:41 2008
@@ -20,8 +20,10 @@
}
- symbol MiniWorkflowStepFormatMount(map &data)
+ symbol MiniWorkflowStepFormatMount(map &orig_data)
{
+ map data = orig_data;
+
y2milestone("MiniWorkflowStepFormatMount data:%1", data);
symbol flavour = data["flavour"]:`none;
@@ -30,7 +32,6 @@
boolean crypt_fs = false; // TODO
string mount = data["mount"]:"";
boolean do_mount = mount != "";
- map > fs_options = data["fs_options"]:$[];
if (data["new"]:false && !data["formatmount_proposed"]:false)
{
@@ -43,12 +44,11 @@
used_fs = Partitions::DefaultBootFs();
// TODO
- do_format = true;
+ data["format"] = true;
data["fsid"] = Partitions::fsid_native;
mount = mount_point_proposal;
do_mount = mount != "";
data["used_fs"] = used_fs;
- fs_options = FileSystems::DefaultFormatOptions(data);
}
term tmp1 = `Empty();
@@ -120,8 +120,12 @@
switch (widget)
{
case `fs:
- symbol new_fs = (symbol) UI::QueryWidget(`id(`fs), `Value);
- // TODO
+ symbol used_fs = (symbol) UI::QueryWidget(`id(`fs), `Value);
+ if (used_fs != data["used_fs"]:`none)
+ {
+ data["used_fs"] = used_fs;
+ data = filter(string key, any value, data, { return key != "fs_options"; });
+ }
break;
case `crypt_fs:
@@ -129,16 +133,26 @@
break;
case `fs_options:
+ map fs_options = FileSystems::DefaultFormatOptions(data);
+ if (size(fs_options) > 0 && !haskey(data, "fs_options"))
+ data["fs_options"] = FileSystems::DefaultFormatOptions(data);
+
map filesystems = FileSystems::GetAllFileSystems(true, true);
- fs_options = FileSystemOptions(fs_options, filesystems[data["used_fs"]:`unknown]:$[]);
+ data["fs_options"] = FileSystemOptions(data["fs_options"]:$[], filesystems[data["used_fs"]:`unknown]:$[]);
break;
case `fstab_options:
- // TODO
+ string fstopt = FileSystems::DefaultFstabOptions(data);
+ if (size(fstopt) > 0 && !haskey(data, "fstopt"))
+ data["fstopt"] = fstopt;
+
data = FstabOptions(data, data);
break;
case `do_format:
+ // TODO
+ data["used_fs"] = (symbol) UI::QueryWidget(`id(`fs), `Value);
+
UI::ChangeWidget(`id(`do_format_attachment), `Enabled, true);
UI::ChangeWidget(`id(`do_not_format_attachment), `Enabled, false);
MiniWorkflow::SetLastStep(UI::QueryWidget(`id(`crypt_fs), `Value) != true);
@@ -177,11 +191,15 @@
data["enc_type"] = `none;
data["format"] = do_format;
- data["fs_options"] = fs_options;
data["mount"] = do_mount ? mount : "";
+ if (!data["format"]:false)
+ data = filter(string key, any value, data, { return key != "fs_options"; });
+
if (!do_format || !crypt_fs)
widget = `finish;
+
+ orig_data = data;
}
y2milestone("MiniWorkflowStepFormatMount data:%1 ret:%2", data, widget);
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org