Author: kmachalkova
Date: Thu Nov 5 14:07:59 2009
New Revision: 59330
URL: http://svn.opensuse.org/viewcvs/yast?rev=59330&view=rev
Log:
Help + some l&f improvement
Modified:
branches/SuSE-Code-11-SP1-Branch/storage/storage/src/include/ep-hd-lib.ycp
branches/SuSE-Code-11-SP1-Branch/storage/storage/src/include/ep-hd.ycp
Modified: branches/SuSE-Code-11-SP1-Branch/storage/storage/src/include/ep-hd-lib.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/storage/storage/src/include/ep-hd-lib.ycp?rev=59330&r1=59329&r2=59330&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/storage/storage/src/include/ep-hd-lib.ycp (original)
+++ branches/SuSE-Code-11-SP1-Branch/storage/storage/src/include/ep-hd-lib.ycp Thu Nov 5 14:07:59 2009
@@ -356,6 +356,25 @@
list <map> myparts = target_map[ device, "partitions"]:[];
string mypart_table_type = target_map[ device, "label" ]:Storage::DefaultDiskLabel( mysize );
+ string helptext = _("Select one or more (if available) hard disks
+that will have the same partition layout as
+this disk.
+Disks marked with '*' sign contain one or
+more partitions.After cloning, these
+partitions will be deleted.");
+
+ void HelpDialog() {
+ UI::OpenDialog( `MinSize( 40,10,`VBox(
+ `RichText(helptext),
+ `VSpacing(1),
+ `PushButton(`id(`ok), Label::CloseButton())
+ )
+ ));
+
+ UI::UserInput();
+ UI::CloseDialog();
+ }
+
list <string> AvailableTargetDisks() {
list <string> items = [];
@@ -414,7 +433,10 @@
}
list<term> ui_items = maplist( string one_disk, mydisks, {
- return `item(`id(one_disk), sformat("%1 (%2)",one_disk,
+ boolean any_partitions = size( target_map[ one_disk, "partitions" ]:[]) > 0;
+
+ return `item(`id(one_disk), sformat("%1%2 (%3)",one_disk,
+ any_partitions ? "*" : "",
Storage::KByteToHumanString( target_map[one_disk, "size_k"]:42)));
});
@@ -476,7 +498,7 @@
map