Mailinglist Archive: yast-commit (711 mails)

< Previous Next >
[yast-commit] r48380 - in /branches/tmp/aschnell/part-redesign/storage/src/include: ep-dialogs.ycp ep-lvm-dialogs.ycp ep-lvm.ycp
  • From: aschnell@xxxxxxxxxxxxxxxx
  • Date: Wed, 18 Jun 2008 10:11:47 -0000
  • Message-id: <20080618101148.1618630149@xxxxxxxxxxxxxxxx>
Author: aschnell
Date: Wed Jun 18 12:11:47 2008
New Revision: 48380

URL: http://svn.opensuse.org/viewcvs/yast?rev=48380&view=rev
Log:
- work on adding lvs

Modified:
branches/tmp/aschnell/part-redesign/storage/src/include/ep-dialogs.ycp
branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm-dialogs.ycp
branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm.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=48380&r1=48379&r2=48380&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
Jun 18 12:11:47 2008
@@ -93,12 +93,29 @@
break;

case `manual_size:
- // TODO
- string s = (string) UI::QueryWidget(`id(`size_input),
`Value);
- integer i = Storage::KmgtStrToByte(s);
- integer num_cyl = tointeger(float::ceil(tofloat(i) /
tofloat(data["cyl_size"]:1024)));
- data["region"] = [ slot[0]:0, num_cyl ];
+ {
+ switch (flavour)
+ {
+ case `part:
+ {
+ // TODO
+ string s = (string)
UI::QueryWidget(`id(`size_input), `Value);
+ integer i = Storage::KmgtStrToByte(s);
+ integer num_cyl = tointeger(float::ceil(tofloat(i)
/ tofloat(data["cyl_size"]:42)));
+ data["region"] = [ slot[0]:0, num_cyl ];
+ break;
+ }
+
+ case `lv:
+ {
+ string s = (string)
UI::QueryWidget(`id(`size_input), `Value);
+ integer i = Storage::KmgtStrToByte(s);
+ data["size_k"] = i / 1024;
+ break;
+ }
+ }
break;
+ }
}

if (flavour == `part && data["type"]:`unknown == `extended)

Modified:
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=48380&r1=48379&r2=48380&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm-dialogs.ycp
(original)
+++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm-dialogs.ycp
Wed Jun 18 12:11:47 2008
@@ -192,7 +192,7 @@

if (widget == `next)
{
- data["lvname"] = (string) UI::QueryWidget(`id(`lvname), `Value);
+ data["name"] = (string) UI::QueryWidget(`id(`lvname), `Value);
}

Debug("data", data);
@@ -203,11 +203,13 @@
}


- boolean DlgCreateLogicalVolume()
+ boolean DlgCreateLogicalVolume(string vg_name)
{
- map<string, any> data = $[ "flavour" : `lv ];
-
+ map<string, any> data = $[];

+ data["flavour"] = `lv;
+ data["vg_name"] = vg_name;
+
map<string, any> aliases = $[
"Name" : ``(MiniWorkflowStepLvName(data)),
"Size" : ``(MiniWorkflowStepSize(data)),
@@ -228,6 +230,9 @@

if (ret == `finish)
{
+ addLogicalVolume(data, vg_name);
+ UpdateNavigationTree(nil);
+ TreePanel::Create();
}

return false;

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=48380&r1=48379&r2=48380&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 Wed Jun
18 12:11:47 2008
@@ -144,21 +144,23 @@
string vg_device = (string) user_data;
string lv_device = (string) UI::QueryWidget(`id(`table), `CurrentItem);

- if (widget == `add)
- {
- DlgCreateLogicalVolume();
- }
- else if (widget == `edit)
- {
- DlgEditLogicalVolume(lv_device);
- }
- else if (widget == `resize)
- {
- DlgResizeLogicalVolumeNew(lv_device);
- }
- else if (widget == `delete)
+ switch (widget)
{
- EpDeleteDevice(lv_device);
+ case `add:
+ DlgCreateLogicalVolume(substring(vg_device, 5));
+ break;
+
+ case `edit:
+ DlgEditLogicalVolume(lv_device);
+ break;
+
+ case `resize:
+ DlgResizeLogicalVolumeNew(lv_device);
+ break;
+
+ case `delete:
+ EpDeleteDevice(lv_device);
+ break;
}
}


--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages