Author: aschnell
Date: Thu Jul 24 14:48:00 2008
New Revision: 49393
URL: http://svn.opensuse.org/viewcvs/yast?rev=49393&view=rev
Log:
- work on helptexts
Modified:
branches/tmp/aschnell/part-redesign/storage/src/include/ep-all.ycp
branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd.ycp
branches/tmp/aschnell/part-redesign/storage/src/modules/StorageFields.ycp
Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-all.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/ep-all.ycp?rev=49393&r1=49392&r2=49393&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/include/ep-all.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-all.ycp Thu Jul 24 14:48:00 2008
@@ -30,6 +30,8 @@
))
);
- Wizard::RestoreHelp("Help about view with all devices");
+ string helptext = _("<p>Help about view with all devices TODO.</p>");
+
+ Wizard::RestoreHelp(helptext + StorageFields::TableHelptext(fields));
}
}
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=49393&r1=49392&r2=49393&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 Thu Jul 24 14:48:00 2008
@@ -98,6 +98,8 @@
)
)
);
+
+ Wizard::RestoreHelp(StorageFields::TableHelptext(fields));
}
@@ -201,6 +203,8 @@
)
)
);
+
+ Wizard::RestoreHelp(StorageFields::OverviewHelptext(fields));
}
@@ -267,6 +271,8 @@
`MenuButton(_("Expert..."), expert_cmds)
)
));
+
+ Wizard::RestoreHelp(StorageFields::TableHelptext(fields));
}
@@ -366,6 +372,8 @@
)
)
);
+
+ Wizard::RestoreHelp(StorageFields::OverviewHelptext(fields));
}
Modified: branches/tmp/aschnell/part-redesign/storage/src/modules/StorageFields.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/modules/StorageFields.ycp?rev=49393&r1=49392&r2=49393&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/modules/StorageFields.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/modules/StorageFields.ycp Thu Jul 24 14:48:00 2008
@@ -97,7 +97,7 @@
case `mount_point:
// Column header
- header = add(header, _("Mount"));
+ header = add(header, _("Mount Point"));
break;
case `mount_by:
@@ -197,6 +197,50 @@
}
+ string Helptext(symbol field, symbol style)
+ {
+ string ret = "<p>";
+
+ switch (field)
+ {
+ case `used_by:
+ // description of a table column or overview entry
+ ret = ret + "<b>Used By</b> tells if a device is used by
+e.g. RAID or LVM. If you do not use such things, it is perfectly normal for
+this column to be empty.";
+ break;
+
+ case `mount_point:
+ // description of a table column or overview entry
+ ret = ret + "<b>Mount Point</b> shows where the file system is
+or will be mounted.";
+
+ if (Mode::normal() || true)
+ // description of a table column or overview entry
+ ret = ret + " " + "An asterisk (*) after the mount point
+indicates a file system that is currently not mounted (for example, because it
+has the <tt>noauto</tt> option set in <tt>/etc/fstab</tt>).";
+ break;
+
+ case `mount_by:
+ // description of a table column or overview entry
+ ret = ret + "<b>Mount By</b> indicates how the file system is
+mounted: (Kernel) by Kernel Name, (Label) by File System Label, (UUID) by File
+System UUID, (ID) by Device ID, and (Path) by Device Path.";
+ break;
+
+ default:
+ y2error("unknown field %1", field);
+ ret = ret + "error";
+ break;
+ }
+
+ ret = ret + "</p>";
+
+ return ret;
+ }
+
+
string MakeSubInfo(map disk, map part, symbol field, symbol style)
{
map data = (part == nil ? disk : part);
@@ -328,7 +372,7 @@
{
string value = "";
if (data["mount"]:"" != "") {
- map tmp = $[ `device : "Kernel", `uuid : "UUID", `label : "Label", `id : "Id", `path : "Path" ];
+ map tmp = $[ `device : "Kernel", `uuid : "UUID", `label : "Label", `id : "ID", `path : "Path" ];
symbol mount_by = data["mountby"]:`device;
value = tmp[mount_by]:"";
}
@@ -803,11 +847,23 @@
}
+ global string TableHelptext(list<symbol> fields)
+ {
+ string initial = "<p>The table contains:</p>";
+
+ string helptext = list::reduce(string tmp, symbol field, initial, fields, {
+ return tmp + Helptext(field, `table);
+ });
+
+ return helptext;
+ }
+
+
/**
* The device must be the device entry in the target-map, e.g. "/dev/sda1",
* not something like "LABEL=test".
*/
- global string OverviewContent(list<symbol> fields, map