Author: aschnell
Date: Tue Jun 24 22:27:07 2008
New Revision: 48517
URL: http://svn.opensuse.org/viewcvs/yast?rev=48517&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-lib.ycp
branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd.ycp
branches/tmp/aschnell/part-redesign/storage/src/include/ep-lib.ycp
branches/tmp/aschnell/part-redesign/storage/src/include/ep-main.ycp
branches/tmp/aschnell/part-redesign/storage/src/include/ep-raid-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=48517&r1=48516&r2=48517&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 Tue Jun 24 22:27:07 2008
@@ -8,6 +8,12 @@
textdomain "storage";
+ void Error(string text)
+ {
+ Popup::Error(String::WrapAt(text, 50, ""));
+ }
+
+
symbol MiniWorkflowStepPartitionSize(map &data)
{
y2milestone("MiniWorkflowStepPartitionSize data:%1", data);
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=48517&r1=48516&r2=48517&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 Tue Jun 24 22:27:07 2008
@@ -8,7 +8,7 @@
textdomain "storage";
- map GetPossibleSlots(map tg, map disk, string disk_device)
+ map GetPossibleSlots(map disk, string disk_device)
{
list<map> slots = [];
Storage::GetUnusedPartitionSlots(disk_device, slots);
@@ -51,10 +51,10 @@
*/
void EpCreatePartition(string disk_device)
{
- map tg = Storage::GetTargetMap();
- map disk = tg[disk_device]:$[];
+ map target_map = Storage::GetTargetMap();
+ map disk = target_map[disk_device]:$[];
- map slots = GetPossibleSlots(tg, disk, disk_device);
+ map slots = GetPossibleSlots(disk, disk_device);
if (size(slots) > 0)
{
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=48517&r1=48516&r2=48517&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 Tue Jun 24 22:27:07 2008
@@ -300,7 +300,6 @@
string device = (string) user_data;
map target_map = Storage::GetTargetMap();
- map disk = Storage::GetDisk(target_map, device);
map data = $[ `overview : $[ `create : CreateHdDiskOverviewTab,
`handle : HandleHdDiskOverviewTab,
@@ -312,7 +311,7 @@
UI::ReplaceWidget(`tree_panel,
Greasemonkey::Transform(
`VBox(
- `IconAndHeading(sformat(_("Hard Disk: %1"), StorageSettings::DisplayName(disk)), hd_icon),
+ `IconAndHeading(sformat(_("Hard Disk: %1"), device), hd_icon),
TabPanel::DumbTab(`id(`tab), [
`item(`id(`overview), _("Overview")),
`item(`id(`partitions), _("Partitions"))
@@ -337,7 +336,6 @@
string device = (string) user_data;
map target_map = Storage::GetTargetMap();
- map part = Storage::GetPartition(target_map, device);
list<symbol> fields = StorageSettings::FilterOverview([ `heading_device, `device, `size, `udev_path,
`udev_id, `used_by, `heading_filesystem,
@@ -348,7 +346,7 @@
Greasemonkey::Transform(
`VBox(
`HStretch(),
- `IconAndHeading(sformat(_("Partition: %1"), StorageSettings::DisplayName(part)), hd_part_icon),
+ `IconAndHeading(sformat(_("Partition: %1"), device), hd_part_icon),
StorageFields::Overview(fields, target_map, device),
`HBox(
`PushButton(`id(`edit), _("Edit...")),
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=48517&r1=48516&r2=48517&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 Tue Jun 24 22:27:07 2008
@@ -52,7 +52,6 @@
// YesNo popup text %1 is replaced by a disk name e.g. /dev/hda
else if( Popup::YesNo( sformat(_("Really delete all partitions on %1?"), id )))
{
- focusline = id;
deleteAllDevPartitions( disk, Stage::initial(), bsd_label );
}
}
@@ -74,8 +73,6 @@
// else there must be already existing partition: mark it
// with "delete = true"
- focusline = id;
-
y2milestone( "delete part %1", part );
/////////////////////////////////////////////////////
// check if the partition can be deleted
@@ -120,24 +117,10 @@
Storage::DeleteDevice( disk["device"]:"",
part["device"]:"" );
}
- focusline = Storage::GetIdSmaller( disk["device"]:"",
- part["nr"]:0 );
- }
- if( search( id, "/dev/md" )==0 )
- {
- map raid = Storage::GetDisk( Storage::GetTargetMap(), "/dev/md" );
- UI::ReplaceWidget( `id(`raid_button),
- RaidButton(size(raid["partitions"]:[])) );
- }
- else if( search( id, "/dev/loop" )==0 ||
- search( id, "/dev/mapper/" )==0 )
- {
- map dev = Storage::GetDisk( Storage::GetTargetMap(), "/dev/loop" );
- UI::ReplaceWidget( `id(`loop_button),
- LoopButton(size(dev["partitions"]:[])) );
+ return true;
}
}
- return true;
+ return false;
}
}
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=48517&r1=48516&r2=48517&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 Tue Jun 24 22:27:07 2008
@@ -23,7 +23,7 @@
void Debug(string text, any value)
{
- // return;
+ return;
import "ValueBrowser";
UI::OpenDialog(`MinSize(50, 20,
Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-raid-lib.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/ep-raid-lib.ycp?rev=48517&r1=48516&r2=48517&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/include/ep-raid-lib.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-raid-lib.ycp Tue Jun 24 22:27:07 2008
@@ -26,11 +26,26 @@
void EpResizeRaid(string device)
{
+ map target_map = Storage::GetTargetMap();
+ map volume = Storage::GetPartition(target_map, device);
+
+ if (!volume["create"]:false)
+ {
+ Error(sformat(_("The RAID %1 is already created on disk. It cannot be
+resized. To resize %1, remove it and create it again."), device));
+ return;
+ }
+
DlgResizeRaid(device);
}
-
+
void EpDeleteRaid(string device)
{
+ if (EpDeleteDevice(device))
+ {
+ UpdateNavigationTree(`md);
+ TreePanel::Create();
+ }
}
}
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org