[yast-commit] r52683 - in /trunk/storage/storage/src: include/ep-hd-dialogs.ycp include/ep-hd-lib.ycp modules/Region.ycp
Author: aschnell Date: Wed Oct 29 16:18:26 2008 New Revision: 52683 URL: http://svn.opensuse.org/viewcvs/yast?rev=52683&view=rev Log: - tiny improvements Modified: trunk/storage/storage/src/include/ep-hd-dialogs.ycp trunk/storage/storage/src/include/ep-hd-lib.ycp trunk/storage/storage/src/modules/Region.ycp Modified: trunk/storage/storage/src/include/ep-hd-dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-hd-dialogs.ycp?rev=52683&r1=52682&r2=52683&view=diff ============================================================================== --- trunk/storage/storage/src/include/ep-hd-dialogs.ycp (original) +++ trunk/storage/storage/src/include/ep-hd-dialogs.ycp Wed Oct 29 16:18:26 2008 @@ -126,9 +126,11 @@ `LeftRadioButtonWithAttachment(`id(`manual_region), `opt(`notify), _("Custom Region"), `VBox(`id(`manual_region_attachment), `MinWidth(10, `IntField(`id(`start_cyl), `opt(`shrinkable), - _("Start Cylinder"), 0, cyl_count, region[0]:0)), - `MinWidth(10, `IntField(`id(`num_cyls), `opt(`shrinkable), - _("Number of Cylinders"), 1, cyl_count, region[1]:0)) + _("Start Cylinder"), 0, cyl_count, + Region::Start(region))), + `MinWidth(10, `IntField(`id(`end_cyl), `opt(`shrinkable), + _("End Cylinder"), 0, cyl_count, + Region::End(region))) )) ) ) @@ -180,6 +182,7 @@ Storage::KByteToHumanString(500*1024), Storage::KByteToHumanString(1024*1024))); widget = `again; + continue; } else if (size_k < min_size_k || size_k > max_size_k) { @@ -188,16 +191,18 @@ Storage::KByteToHumanString(min_size_k), Storage::KByteToHumanString(max_size_k))); widget = `again; + continue; } break; } case `manual_region: { - region = [ (integer) UI::QueryWidget(`id(`start_cyl), `Value), - (integer) UI::QueryWidget(`id(`num_cyls), `Value) ]; + integer s = (integer) UI::QueryWidget(`id(`start_cyl), `Value); + integer e = (integer) UI::QueryWidget(`id(`end_cyl), `Value); + region = [ s, e - s + 1 ]; - boolean valid = find(list<integer> slot, slots, { + boolean valid = Region::Length(region) > 0 && find(list<integer> slot, slots, { return Region::Inside(slot, region); }) != nil; @@ -206,6 +211,7 @@ // error popup Popup::Error(_("The region entered is invalid.")); widget = `again; + continue; } break; 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=52683&r1=52682&r2=52683&view=diff ============================================================================== --- trunk/storage/storage/src/include/ep-hd-lib.ycp (original) +++ trunk/storage/storage/src/include/ep-hd-lib.ycp Wed Oct 29 16:18:26 2008 @@ -135,8 +135,8 @@ if (size(ret) == 0) { // error popup - string text = sformat(_("It is not possible to create a partition on %1."), disk_device); - Popup::Warning(text); + Popup::Error(sformat(_("It is not possible to create a partition on %1."), + disk_device); } y2milestone("ret %1", ret); Modified: trunk/storage/storage/src/modules/Region.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/modules/Region.ycp?rev=52683&r1=52682&r2=52683&view=diff ============================================================================== --- trunk/storage/storage/src/modules/Region.ycp (original) +++ trunk/storage/storage/src/modules/Region.ycp Wed Oct 29 16:18:26 2008 @@ -11,19 +11,19 @@ module "Region"; - integer Start(list<integer> a) + global integer Start(list<integer> a) { return a[0]:0; } - integer Length(list<integer> a) + global integer Length(list<integer> a) { return a[1]:0; } - integer End(list<integer> a) + global integer End(list<integer> a) { return a[0]:0 + a[1]:0 - 1; } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
aschnell@svn.opensuse.org