Author: aschnell Date: Tue Dec 22 16:17:46 2009 New Revision: 60184 URL: http://svn.opensuse.org/viewcvs/yast?rev=60184&view=rev Log: - use helpButton feature Modified: trunk/storage/storage/src/include/ep-hd-lib.ycp 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=60184&r1=60183&r2=60184&view=diff ============================================================================== --- trunk/storage/storage/src/include/ep-hd-lib.ycp (original) +++ trunk/storage/storage/src/include/ep-hd-lib.ycp Tue Dec 22 16:17:46 2009 @@ -366,6 +366,7 @@ list <map> myparts = target_map[ device, "partitions"]:[]; string mypart_table_type = target_map[ device, "label" ]:Storage::DefaultDiskLabel( mysize ); + // helptext string helptext = _("<p>Select one or more (if available) hard disks that will have the same partition layout as this disk.</p> @@ -373,18 +374,6 @@ more partitions. After cloning, these partitions will be deleted.</p>"); - 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 = []; @@ -457,15 +446,16 @@ `MultiSelectionBox(`id(`tdisk), _("Available target disks:"), ui_items ), `VSpacing(1), `ButtonBox( - `PushButton(`id(`help), Label::HelpButton()), + `PushButton(`id(`help), `opt(`helpButton), Label::HelpButton()), `PushButton(`id(`ok), `opt(`default), Label::OKButton()), `PushButton(`id(`cancel), Label::CancelButton()) ) ) )); + UI::ChangeWidget(`help, `HelpText, helptext); + any ret = nil; - boolean run_raid_setup = false; while(ret != `ok && ret != `cancel) { @@ -473,9 +463,8 @@ if( ret == `ok) { list <string> selected_disks = (list <string>) UI::QueryWidget(`id(`tdisk), `SelectedItems); - boolean any_disk_selected = !isempty(selected_disks); - if (!any_disk_selected) { + if (isempty(selected_disks)) { Popup::Error(_("Select some target disk for creating a clone")); UI::SetFocus(`id(`tdisk)); ret = nil; @@ -541,10 +530,6 @@ Storage::SetRecursiveRemoval( recursive ); } - else if (ret == `help) { - HelpDialog(); - continue; - } } UI::CloseDialog(); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org