Author: aschnell
Date: Tue Sep 2 10:39:44 2008
New Revision: 50553
URL: http://svn.opensuse.org/viewcvs/yast?rev=50553&view=rev
Log:
- work on messages
Modified:
trunk/storage/storage/src/include/ep-dm-lib.ycp
trunk/storage/storage/src/include/ep-dm.ycp
trunk/storage/storage/src/include/ep-hd-lib.ycp
trunk/storage/storage/src/include/ep-hd.ycp
trunk/storage/storage/src/include/ep-log.ycp
trunk/storage/storage/src/include/ep-lvm-lib.ycp
trunk/storage/storage/src/include/ep-main.ycp
trunk/storage/storage/src/include/ep-raid-lib.ycp
trunk/storage/storage/src/include/ep-settings.ycp
Modified: trunk/storage/storage/src/include/ep-dm-lib.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-dm-lib.ycp?rev=50553&r1=50552&r2=50553&view=diff
==============================================================================
--- trunk/storage/storage/src/include/ep-dm-lib.ycp (original)
+++ trunk/storage/storage/src/include/ep-dm-lib.ycp Tue Sep 2 10:39:44 2008
@@ -12,6 +12,7 @@
{
if (device == nil)
{
+ // error popup
Popup::Error(_("No DM device selected."));
return;
}
@@ -21,6 +22,7 @@
if (data["used_by"]:"" != "")
{
+ // error popup
Popup::Error(sformat(_("The DM %1 is in use. It cannot be
edited. To edit %1, make sure it is not used."), device));
return;
@@ -28,8 +30,6 @@
if (DlgEditDmVolume(data))
{
- Debug("edit dm from data", data);
-
Storage::ChangeVolumeProperties(data);
UpdateNavigationTree(nil);
Modified: trunk/storage/storage/src/include/ep-dm.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-dm.ycp?rev=50553&r1=50552&r2=50553&view=diff
==============================================================================
--- trunk/storage/storage/src/include/ep-dm.ycp (original)
+++ trunk/storage/storage/src/include/ep-dm.ycp Tue Sep 2 10:39:44 2008
@@ -31,6 +31,7 @@
Greasemonkey::Transform(
`VBox(
`HStretch(),
+ // heading
`IconAndHeading(_("Device Mapper (DM)"), dm_icon),
`Table(`id(`table), `opt(`keepSorting, `notify),
table_header, table_contents)
@@ -62,6 +63,7 @@
`VBox(
StorageFields::Overview(fields, target_map, dm_device),
`HBox(
+ // push button text
`PushButton(`id(`edit), _("Edit...")),
`HStretch()
)
@@ -94,8 +96,6 @@
{
string part_device = (string) user_data;
- Debug("part_device", substring(part_device, 5));
-
symbol Predicate(map disk, map partition)
{
return StorageFields::PredicateUsedByDevice(disk, partition, [ part_device ]);
@@ -134,9 +134,12 @@
UI::ReplaceWidget(`tree_panel,
Greasemonkey::Transform(
`VBox(
+ // heading
`IconAndHeading(sformat(_("DM Device: %1"), device), dm_icon),
`DumbTab(`id(`tab), [
+ // push button text
`item(`id(`overview), _("&Overview")),
+ // push button text
`item(`id(`devices), _("&Used Devices"))
],
`ReplacePoint(`id(`tab_panel), TabPanel::empty_panel)
Modified: trunk/storage/storage/src/include/ep-hd-lib.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-hd-lib.ycp?rev=50553&r1=50552&r2=50553&view=diff
==============================================================================
--- trunk/storage/storage/src/include/ep-hd-lib.ycp (original)
+++ trunk/storage/storage/src/include/ep-hd-lib.ycp Tue Sep 2 10:39:44 2008
@@ -292,8 +292,7 @@
if (!disk["dasdfmt"]:false)
{
// popup text, %1 is replaced by a dasd name e.g. /dev/dasda
- boolean doit = Popup::YesNo(sformat(
-_("Running dasdfmt deletes all data on the disk.
+ boolean doit = Popup::YesNo(sformat(_("Running dasdfmt deletes all data on the disk.
Really execute dasdfmt on disk %1?
"), device));
Modified: trunk/storage/storage/src/include/ep-hd.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-hd.ycp?rev=50553&r1=50552&r2=50553&view=diff
==============================================================================
--- trunk/storage/storage/src/include/ep-hd.ycp (original)
+++ trunk/storage/storage/src/include/ep-hd.ycp Tue Sep 2 10:39:44 2008
@@ -438,6 +438,7 @@
Greasemonkey::Transform(
`VBox(
`HStretch(),
+ // heading
`IconAndHeading(sformat(_("Partition: %1"), device), hd_part_icon),
StorageFields::Overview(fields, target_map, device),
`HBox(
Modified: trunk/storage/storage/src/include/ep-log.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-log.ycp?rev=50553&r1=50552&r2=50553&view=diff
==============================================================================
--- trunk/storage/storage/src/include/ep-log.ycp (original)
+++ trunk/storage/storage/src/include/ep-log.ycp Tue Sep 2 10:39:44 2008
@@ -18,8 +18,11 @@
UI::ReplaceWidget(`tree_panel,
Greasemonkey::Transform(
`VBox(
+ // heading
`IconAndHeading(_("Log"), log_icon),
+ // label for log view
`LogView(`id(`log), sformat(_("Contents of %1:"), file), 10, 0),
+ // push button text
`PushButton(`id(`update), _("Update"))
)
));
Modified: trunk/storage/storage/src/include/ep-lvm-lib.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-lvm-lib.ycp?rev=50553&r1=50552&r2=50553&view=diff
==============================================================================
--- trunk/storage/storage/src/include/ep-lvm-lib.ycp (original)
+++ trunk/storage/storage/src/include/ep-lvm-lib.ycp Tue Sep 2 10:39:44 2008
@@ -44,6 +44,7 @@
if (size(unused_pvs) < 1)
{
+ // error popup
Popup::Error(_("There are not enough suitable unused devices to create a volume group.
To use LVM, at least one unused partition of type 0x8e (or 0x83) or one unused
@@ -55,8 +56,6 @@
if (DlgCreateVolumeGroupNew(data))
{
- Debug("create vg from data", data);
-
string vg_name = data["name"]:"error";
integer pe_size = data["pesize"]:0;
@@ -77,6 +76,7 @@
{
if (device == nil)
{
+ // error popup
Popup::Error(_("No volume group selected."));
return;
}
@@ -89,8 +89,6 @@
symbol Commit()
{
- Debug("resize vg from data", data);
-
list<string> devices_old = (list<string>) union(data["devices"]:[], data["devices_add"]:[]);
devices_old = filter(string tmp, devices_old, { return !contains(data["devices_rem"]:[], tmp); });
list<string> devices_new = data["devices_new"]:[];
@@ -104,6 +102,7 @@
if (!RemovePvs(vgname, devices_removed))
{
+ // error popup
Popup::Error(_("Failed to remove some physical devices. TODO"));
// TODO: update data
@@ -128,6 +127,7 @@
{
if (device == nil)
{
+ // error popup
Popup::Error(_("No volume group selected."));
return;
}
@@ -139,7 +139,7 @@
if (count > 0)
{
- // Message popup
+ // message popup
Popup::Message(sformat(_("The volume group \"%1\" contains at least one logical
volume. It cannot be removed. Remove all logical volumes then
remove the volume group.
@@ -164,6 +164,7 @@
{
if (device == nil)
{
+ // error popup
Popup::Error(_("No logical volume selected."));
return;
}
@@ -177,6 +178,7 @@
if (target_map[device, "pe_free"]:0 == 0)
{
+ // error popup
Popup::Error(sformat(_("No free space left in the volume group \"%1\"."), vg_name));
return;
}
@@ -191,8 +193,6 @@
// ChangeVolumeProperties and thus addLogicalVolume need the device
data["device"] = device + "/" + data["name"]:"";
- Debug("create lv from data", data);
-
if (!addLogicalVolume(data, substring(device, 5)))
return `back;
@@ -213,6 +213,7 @@
{
if (device == nil)
{
+ // error popup
Popup::Error(_("No logical volume selected."));
return;
}
@@ -222,8 +223,6 @@
if (DlgEditLogicalVolume(data))
{
- Debug("edit lv from data", data);
-
Storage::ChangeVolumeProperties(data);
UpdateNavigationTree(nil);
@@ -237,6 +236,7 @@
{
if (device == nil)
{
+ // error popup
Popup::Error(_("No logical volume selected."));
return;
}
@@ -252,6 +252,7 @@
{
if (device == nil)
{
+ // error popup
Popup::Error(_("No logical volume selected."));
return;
}
Modified: trunk/storage/storage/src/include/ep-main.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-main.ycp?rev=50553&r1=50552&r2=50553&view=diff
==============================================================================
--- trunk/storage/storage/src/include/ep-main.ycp (original)
+++ trunk/storage/storage/src/include/ep-main.ycp Tue Sep 2 10:39:44 2008
@@ -174,17 +174,26 @@
// TODO: same ordering as with IterateTargetMap
tree = [ `item(`id(`all), `icon(all_icon), short_hostname, open(`all), [
+ // tree node label
`item(`id(`hd), `icon(hd_icon), _("Hard Disks"), open(`hd), subtree[`hd]:[]),
+ // tree node label
`item(`id(`md), `icon(raid_icon), _("RAID"), open(`md), subtree[`md]:[]),
+ // tree node label
`item(`id(`lvm), `icon(lvm_icon), _("Volume Management"), open(`lvm), subtree[`lvm]:[]),
+ // tree node label
`item(`id(`loop), `icon(loop_icon), _("Crypt Files"), open(`loop), subtree[`loop]:[]),
+ // tree node label
`item(`id(`dm), `icon(dm_icon), _("Device Mapper"), open(`dm), subtree[`dm]:[]),
+ // tree node label
`item(`id(`nfs), `icon(nfs_icon), _("NFS"), open(`nfs)/*, subtree[`nfs]:[]*/),
+ // tree node label
`item(`id(`unused), `icon(unused_icon), _("Unused Devices"), open(`unused))
]),
+ // tree node label
`item(`id(`settings), `icon(settings_icon), _("Settings"), open(`settings)) ];
if (Mode::normal())
+ // tree node label
tree = add(tree, `item(`id(`log), `icon(log_icon), _("Log"), open(`log)));
}
@@ -247,6 +256,7 @@
term contents = `MarginBox(0.5, 0.5,
`HBox(
`HWeight(30,
+ // tree node label
`Tree(`id(`tree), `opt(`notify), _("System View"), tree)
),
`HWeight(70,
Modified: trunk/storage/storage/src/include/ep-raid-lib.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-raid-lib.ycp?rev=50553&r1=50552&r2=50553&view=diff
==============================================================================
--- trunk/storage/storage/src/include/ep-raid-lib.ycp (original)
+++ trunk/storage/storage/src/include/ep-raid-lib.ycp Tue Sep 2 10:39:44 2008
@@ -44,6 +44,7 @@
if (size(unused_devices) < 2)
{
+ // error popup
Popup::Error(_("There are not enough suitable unused devices to create a RAID."));
return;
}
@@ -57,8 +58,6 @@
if (DlgCreateRaidNew(data))
{
- Debug("create raid from data", data);
-
integer nr = data["nr"]:0;
symbol raid_type = symbolof(toterm(data["raid_type"]:"raid0"));
@@ -89,6 +88,7 @@
{
if (device == nil)
{
+ // error popup
Popup::Error(_("No RAID selected."));
return;
}
@@ -98,6 +98,7 @@
if (data["used_by"]:"" != "")
{
+ // error popup, %1 is replaced by device name e.g. /dev/md1
Popup::Error(sformat(_("The RAID %1 is in use. It cannot be
edited. To edit %1, make sure it is not used."), device));
return;
@@ -105,8 +106,6 @@
if (DlgEditRaid(data))
{
- Debug("edit raid from data", data);
-
Storage::ChangeVolumeProperties(data);
UpdateNavigationTree(nil);
@@ -120,6 +119,7 @@
{
if (device == nil)
{
+ // error popup
Popup::Error(_("No RAID selected."));
return;
}
@@ -129,6 +129,7 @@
if (!data["create"]:false)
{
+ // error popup, %1 is replaced by device name e.g. /dev/md1
Popup::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;
@@ -136,6 +137,7 @@
if (data["used_by"]:"" != "")
{
+ // error popup, %1 is replaced by device name e.g. /dev/md1
Popup::Error(sformat(_("The RAID %1 is in use. It cannot be
resized. To resize %1, make sure it is not used."), device));
return;
@@ -143,8 +145,6 @@
if (DlgResizeRaid(data))
{
- Debug("resize raid from data", data);
-
integer raid_nr = data["nr"]:0;
list<string> devices_old = data["devices"]:[];
@@ -159,6 +159,7 @@
if (!RemoveDevices(raid_nr, devices_removed))
{
+ // error popup
Popup::Error(_("Failed to remove some devices. TODO"));
}
@@ -173,6 +174,7 @@
{
if (device == nil)
{
+ // error popup
Popup::Error(_("No RAID selected."));
return;
}
Modified: trunk/storage/storage/src/include/ep-settings.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-settings.ycp?rev=50553&r1=50552&r2=50553&view=diff
==============================================================================
--- trunk/storage/storage/src/include/ep-settings.ycp (original)
+++ trunk/storage/storage/src/include/ep-settings.ycp Tue Sep 2 10:39:44 2008
@@ -9,12 +9,19 @@
list< map