summaryrefslogtreecommitdiffstats
path: root/perl-install/Xconfig/resolution_and_depth.pm
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 /perl-install/Xconfig/resolution_and_depth.pm
parent119361dd54102e2eceddbf0d8af56da953c1d4db (diff)
downloaddrakx-backup-do-not-use-1ef8342809275a90d6a490773e65bcde415babde.tar
drakx-backup-do-not-use-1ef8342809275a90d6a490773e65bcde415babde.tar.gz
drakx-backup-do-not-use-1ef8342809275a90d6a490773e65bcde415babde.tar.bz2
drakx-backup-do-not-use-1ef8342809275a90d6a490773e65bcde415babde.tar.xz
drakx-backup-do-not-use-1ef8342809275a90d6a490773e65bcde415babde.zip
in newt, have the resolutions sorted by resolution size (wilplizgg)
Diffstat (limited to 'perl-install/Xconfig/resolution_and_depth.pm')
-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;
}