summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-08-01 09:52:41 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-08-01 09:52:41 +0000
commit1ef8342809275a90d6a490773e65bcde415babde (patch)
treee023562d78e6bdcef14bcf0a3911f55e5bb1fa5d
parent119361dd54102e2eceddbf0d8af56da953c1d4db (diff)
downloaddrakx-1ef8342809275a90d6a490773e65bcde415babde.tar
drakx-1ef8342809275a90d6a490773e65bcde415babde.tar.gz
drakx-1ef8342809275a90d6a490773e65bcde415babde.tar.bz2
drakx-1ef8342809275a90d6a490773e65bcde415babde.tar.xz
drakx-1ef8342809275a90d6a490773e65bcde415babde.zip
in newt, have the resolutions sorted by resolution size (wilplizgg)
-rw-r--r--perl-install/Xconfig/resolution_and_depth.pm11
1 files changed, 8 insertions, 3 deletions
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;
}