Author: aschnell
Date: Wed Jun 25 12:11:48 2008
New Revision: 48522
URL: http://svn.opensuse.org/viewcvs/yast?rev=48522&view=rev
Log:
- backup commit
Added:
branches/tmp/aschnell/part-redesign/storage/src/include/ep-dm-dialogs.ycp
Modified:
branches/tmp/aschnell/part-redesign/storage/src/include/ep-dialogs.ycp
branches/tmp/aschnell/part-redesign/storage/src/include/ep-dm-lib.ycp
branches/tmp/aschnell/part-redesign/storage/src/include/ep-dm.ycp
branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd-lib.ycp
branches/tmp/aschnell/part-redesign/storage/src/include/ep-lib.ycp
branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm-lib.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=48522&r1=48521&r2=48522&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 25 12:11:48 2008
@@ -8,6 +8,7 @@
textdomain "storage";
+ // TODO: see fate #304971
boolean YesNo(string text)
{
return Popup::YesNo(String::WrapAt(text, 50, ""));
Added: branches/tmp/aschnell/part-redesign/storage/src/include/ep-dm-dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/ep-dm-dialogs.ycp?rev=48522&view=auto
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/include/ep-dm-dialogs.ycp (added)
+++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-dm-dialogs.ycp Wed Jun 25 12:11:48 2008
@@ -0,0 +1,36 @@
+/**
+ * File: ep-dm-dialogs.ycp
+ * Package: yast2-storage
+ * Summary: Expert Partitioner
+ * Authors: Arvin Schnell
+ */
+{
+ textdomain "storage";
+
+
+ boolean DlgEditDmVolume(string device)
+ {
+ map data = $[ "flavour" : `dm ];
+
+ map target_map = Storage::GetTargetMap();
+ data = Storage::GetPartition(target_map, device);
+ data["format"] = false;
+
+ map aliases = $[
+ "FormatMount" : ``(MiniWorkflowStepFormatMount(data)),
+ "Password" : ``(MiniWorkflowStepPassword(data))
+ ];
+
+ map sequence = $[
+ "FormatMount" : $[ `next : "Password",
+ `finish : `finish ],
+ "Password" : $[ `finish : `finish ]
+ ];
+
+ string title = sformat(_("Edit DM %1"), device);
+
+ symbol widget = MiniWorkflow::Run(title, dm_icon, aliases, sequence, "FormatMount");
+
+ return widget == `finish;
+ }
+}
Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-dm-lib.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/ep-dm-lib.ycp?rev=48522&r1=48521&r2=48522&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/include/ep-dm-lib.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-dm-lib.ycp Wed Jun 25 12:11:48 2008
@@ -10,7 +10,7 @@
void EpEditDmDevice(string device)
{
- if (true /* DlgEditDmVolume(device) */)
+ if (DlgEditDmVolume(device))
{
UpdateNavigationTree(nil);
TreePanel::Create();
Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-dm.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/ep-dm.ycp?rev=48522&r1=48521&r2=48522&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/include/ep-dm.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-dm.ycp Wed Jun 25 12:11:48 2008
@@ -8,7 +8,7 @@
textdomain "storage";
- // include "partitioning/ep-dm-dialogs.ycp";
+ include "partitioning/ep-dm-dialogs.ycp";
include "partitioning/ep-dm-lib.ycp";
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=48522&r1=48521&r2=48522&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 Wed Jun 25 12:11:48 2008
@@ -13,7 +13,7 @@
if (YesNo(sformat(_("Really create new partition table on %1? This will delete all data
on %1 and all RAIDs and Volume Groups using %1."), disk_device)))
{
- map target_map = Storage::GetTargetMap();
+ map target_map = Storage::GetTargetMap();
Storage::DeletePartitionTable(disk_device, target_map[disk_device, "size_k"]:0);
UpdateNavigationTree(nil);
TreePanel::Create();
@@ -112,10 +112,11 @@
void EpDeletePartition(string device)
{
+ string parent = ParentDevice(device);
+
if (EpDeleteDevice(device))
{
- // TODO: update tree and tab (with focus)
- UpdateNavigationTree(nil);
+ UpdateNavigationTree(parent);
TreePanel::Create();
}
}
Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-lib.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/ep-lib.ycp?rev=48522&r1=48521&r2=48522&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/include/ep-lib.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-lib.ycp Wed Jun 25 12:11:48 2008
@@ -8,6 +8,28 @@
textdomain "storage";
+ string ParentDevice(string device)
+ {
+ map target_map = Storage::GetTargetMap();
+
+ map disk = target_map[device]:nil;
+ map part = nil;
+
+ if (disk == nil)
+ {
+ foreach(string s, map d, target_map, {
+ part = find(map p, d["partitions"]:[], { return p["device"]:"" == device; });
+ if (part != nil) {
+ disk = d;
+ break;
+ }
+ });
+ }
+
+ return disk["device"]:"";
+ }
+
+
boolean EpDeleteDevice(string id)
{
map tg = Storage::GetTargetMap();
Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm-lib.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm-lib.ycp?rev=48522&r1=48521&r2=48522&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm-lib.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm-lib.ycp Wed Jun 25 12:11:48 2008
@@ -82,9 +82,11 @@
void EpDeleteLogicalVolume(string device)
{
+ string parent = ParentDevice(device);
+
if (EpDeleteDevice(device))
{
- UpdateNavigationTree(`lvm); // TODO
+ UpdateNavigationTree(parent);
TreePanel::Create();
}
}
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org