diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-09-06 07:21:37 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-09-06 07:21:37 +0000 |
commit | f6811b4ae1d4159b3d53b185539ab7dffc9014f5 (patch) | |
tree | 80a0a329263a8840a60bc9935852e125b97ba69f /lib/Xconfig | |
parent | 2020825c6dc23ff765f1d1d57725e7d0b1b389f3 (diff) | |
download | drakx-kbd-mouse-x11-f6811b4ae1d4159b3d53b185539ab7dffc9014f5.tar drakx-kbd-mouse-x11-f6811b4ae1d4159b3d53b185539ab7dffc9014f5.tar.gz drakx-kbd-mouse-x11-f6811b4ae1d4159b3d53b185539ab7dffc9014f5.tar.bz2 drakx-kbd-mouse-x11-f6811b4ae1d4159b3d53b185539ab7dffc9014f5.tar.xz drakx-kbd-mouse-x11-f6811b4ae1d4159b3d53b185539ab7dffc9014f5.zip |
- keep the order from MonitorsDB file
(allows "Flat Panel 800x600" to be before "Flat Panel 1024x768")
(needs a nicely sorted MonitorsDB though)
Diffstat (limited to 'lib/Xconfig')
-rw-r--r-- | lib/Xconfig/monitor.pm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Xconfig/monitor.pm b/lib/Xconfig/monitor.pm index 365e2da..b5a05c3 100644 --- a/lib/Xconfig/monitor.pm +++ b/lib/Xconfig/monitor.pm @@ -89,7 +89,12 @@ sub choose { return $ok; } - my %h_monitors = map { ("$_->{VendorName}|$_->{ModelName}" => $_) } monitors_db(); + my (@l_monitors, %h_monitors); + foreach (monitors_db()) { + my $s = "$_->{VendorName}|$_->{ModelName}"; + push @l_monitors, $s; + $h_monitors{$s} = $_; + } ask_monitor: my $merged_name = do { @@ -111,7 +116,7 @@ sub choose { interactive_help_id => 'configureX_monitor' }, [ { val => \$merged_name, separator => '|', - list => ['Custom', "Plug'n Play", sort keys %h_monitors], + list => ['Custom', "Plug'n Play", @l_monitors], format => sub { $_[0] eq 'Custom' ? N("Custom") : $_[0] eq "Plug'n Play" ? N("Plug'n Play") . ($monitor->{VendorName} eq "Plug'n Play" ? " ($monitor->{ModelName})" : '') : $_[0] =~ /^Generic\|(.*)/ ? N("Generic") . "|$1" : |