Author: aschnell
Date: Mon Jun 16 18:46:28 2008
New Revision: 48342
URL: http://svn.opensuse.org/viewcvs/yast?rev=48342&view=rev
Log:
- backup commit
Modified:
branches/tmp/aschnell/part-redesign/storage/src/include/ep-dialogs.ycp
branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd-dialogs.ycp
branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd-lib.ycp
branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd.ycp
branches/tmp/aschnell/part-redesign/storage/src/include/ep-main.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=48342&r1=48341&r2=48342&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 Mon Jun 16 18:46:28 2008
@@ -3,7 +3,6 @@
* Package: yast2-storage
* Summary: Expert Partitioner
* Authors: Arvin Schnell
- *
*/
{
textdomain "storage";
@@ -74,21 +73,38 @@
{
widget = MiniWorkflow::UserInput();
- if (widget == `max_size)
- {
- UI::ChangeWidget(`id(`manual_size_attachment), `Enabled, false);
- }
- else if (widget == `manual_size)
+ switch (widget)
{
- UI::ChangeWidget(`id(`manual_size_attachment), `Enabled, true);
+ case `max_size:
+ UI::ChangeWidget(`id(`manual_size_attachment), `Enabled, false);
+ break;
+
+ case `manual_size:
+ UI::ChangeWidget(`id(`manual_size_attachment), `Enabled, true);
+ break;
}
}
until (widget == `abort || widget == `back || widget == `next);
if (widget == `next)
{
- // TODO
- data["manual_size"] = UI::QueryWidget(`id(`size), `Value);
+ switch ((symbol) UI::QueryWidget(`id(`size), `Value))
+ {
+ case `max_size:
+ data["region"] = slot;
+ break;
+
+ case `manual_size:
+ // TODO
+ break;
+ }
+
+ if (flavour == `part && data["type"]:`unknown == `extended)
+ {
+ widget = `finish;
+ }
+
+ Debug(data);
}
y2milestone("MiniWorkflowStepSize data:%1 ret:%2", data, widget);
@@ -216,6 +232,8 @@
if (widget == `next)
{
+ // TODO
+ widget = `finish;
}
y2milestone("MiniWorkflowStepFormatMount data:%1 ret:%2", data, widget);
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=48342&r1=48341&r2=48342&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 Mon Jun 16 18:46:28 2008
@@ -54,14 +54,18 @@
if (widget == `next)
{
- if (UI::QueryWidget(`id(`primary), `Value) == true)
- data["type"] = `primary;
+ data["type"] = UI::QueryWidget(`id(`partition_type), `Value);
- if (UI::QueryWidget(`id(`logical), `Value) == true)
- data["type"] = `logical;
+ map r = Storage::NextPartition(data["disk_device"]:"", data["type"]:`none);
+ data["device"] = r["device"]:"";
- if (UI::QueryWidget(`id(`extended), `Value) == true)
- data["type"] = `extended;
+ if (data["type"]:`unknown == `extended)
+ {
+ data["fsid"] = Partitions::fsid_extended_win;
+ data["used_fs"] = `unknown;
+ }
+
+ Debug(data);
}
y2milestone("MiniWorkflowStepPartitionType data:%1 ret:%2", data, widget);
@@ -101,6 +105,12 @@
string start = size(slots) == 1 ? "Size" : "Type";
+ if (start == "Size")
+ {
+ map r = Storage::NextPartition(data["disk_device"]:"", data["type"]:`none);
+ data["device"] = r["device"]:"";
+ }
+
symbol widget = MiniWorkflow::Run(_("Add Partition"), aliases, sequence, start);
return widget == `finish;
Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd-lib.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd-lib.ycp?rev=48342&r1=48341&r2=48342&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd-lib.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd-lib.ycp Mon Jun 16 18:46:28 2008
@@ -50,7 +50,7 @@
/**
* argument is device of hard disk
*/
- boolean EpCreatePartition(string disk_device)
+ void EpCreatePartition(string disk_device)
{
map tg = Storage::GetTargetMap();
map disk = tg[disk_device]:$[];
@@ -59,16 +59,25 @@
if (size(slots) > 0)
{
- map data = $[ "slots" : slots,
- "cyl_size" : disk["cyl_size"]:0 ];
+ map data = $[ "disk_device" : disk_device,
+ "cyl_size" : disk["cyl_size"]:0,
+ "slots" : slots ];
if (DlgCreatePartition(data))
{
+ Debug(data);
y2milestone("create partition with %1", data);
+
+ symbol mby = data["mountby"]:Storage::GetMountBy(data["device"]:"");
+ Storage::CreatePartition(data["disk_device"]:"", data["device"]:"",
+ data["type"]:`primary,
+ data["fsid"]:Partitions::fsid_native,
+ data["region",0]:0, data["region",1]:0, mby);
+ Storage::ChangeVolumeProperties(data);
+
+ UpdateNavigationTree(data["device"]:"");
}
}
-
- return false;
}
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=48342&r1=48341&r2=48342&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 Mon Jun 16 18:46:28 2008
@@ -157,8 +157,8 @@
map target_map = Storage::GetTargetMap();
- list<symbol> fields = StorageFields::Filter([ `heading_device, `device, `size, `udev_path,
- `udev_id, `used_by, `heading_hd, `vendor,
+ list<symbol> fields = StorageFields::Filter([ `heading_device, `device, `size, `udev_path,
+ `udev_id, `used_by, `heading_hd, `vendor,
`model, `bus, `bios_id, `disk_label ]);
UI::ReplaceWidget(`tab_panel,
@@ -256,15 +256,15 @@
case `add:
EpCreatePartition(disk_device);
break;
-
+
case `edit:
EpEditPartition(part_device);
break;
-
+
case `resize:
DlgResize(`part);
break;
-
+
case `delete:
if (EpDeleteDevice(part_device))
{
@@ -353,11 +353,11 @@
case `edit:
EpEditPartition(part_device);
break;
-
+
case `resize:
DlgResize(`part);
break;
-
+
case `delete:
if (EpDeleteDevice(part_device))
{
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=48342&r1=48341&r2=48342&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 Mon Jun 16 18:46:28 2008
@@ -19,6 +19,13 @@
import "DualMultiSelectionBox";
+ void Debug(any value)
+ {
+ // import "ValueBrowser";
+ // ValueBrowser::BrowseTree(value);
+ }
+
+
void UpdateNavigationTree(any new_focus);
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org