From 1ef8342809275a90d6a490773e65bcde415babde Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 1 Aug 2002 09:52:41 +0000 Subject: in newt, have the resolutions sorted by resolution size (wilplizgg) --- perl-install/Xconfig/resolution_and_depth.pm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'perl-install/Xconfig') diff --git a/perl-install/Xconfig/resolution_and_depth.pm b/perl-install/Xconfig/resolution_and_depth.pm index 816af1916..500b431c1 100644 --- a/perl-install/Xconfig/resolution_and_depth.pm +++ b/perl-install/Xconfig/resolution_and_depth.pm @@ -125,9 +125,14 @@ sub filter_using_HorizSync { sub choose { my ($in, $default_resolution, @resolutions) = @_; - $in->ask_from_listf(_("Resolutions"), "", - sub { "$_[0]{X}x$_[0]{Y} $_[0]{Depth}bpp" }, - \@resolutions, $default_resolution || {}); + my $resolution = $default_resolution || {}; + $in->ask_from(_("Resolutions"), "", + [ { + val => \$resolution, type => 'list', sort => 0, + list => [ sort { $a->{X} <=> $b->{X} } @resolutions ], + format => sub { "$_[0]{X}x$_[0]{Y} $_[0]{Depth}bpp" }, + } ]) + and $resolution; } -- cgit v1.2.1