summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-11-21 17:08:19 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-11-21 17:08:19 +0000
commitbda0cae3fedc4a4b2368f0647f392bffec327af0 (patch)
tree9f4b06f4f284a38f713b9c98b465cafd0d7645b8
parent2af32618df0bfc5f8802fe50ddd35cd06a59e128 (diff)
downloaddrakx-kbd-mouse-x11-bda0cae3fedc4a4b2368f0647f392bffec327af0.tar
drakx-kbd-mouse-x11-bda0cae3fedc4a4b2368f0647f392bffec327af0.tar.gz
drakx-kbd-mouse-x11-bda0cae3fedc4a4b2368f0647f392bffec327af0.tar.bz2
drakx-kbd-mouse-x11-bda0cae3fedc4a4b2368f0647f392bffec327af0.tar.xz
drakx-kbd-mouse-x11-bda0cae3fedc4a4b2368f0647f392bffec327af0.zip
move things (prepare next commit)
-rw-r--r--lib/Xconfig/monitor.pm19
1 files changed, 9 insertions, 10 deletions
diff --git a/lib/Xconfig/monitor.pm b/lib/Xconfig/monitor.pm
index 0c49360..b388397 100644
--- a/lib/Xconfig/monitor.pm
+++ b/lib/Xconfig/monitor.pm
@@ -97,20 +97,19 @@ sub choose {
push @l_monitors, $s;
$h_monitors{$s} = $_;
}
+ $h_monitors{"Plug'n Play"} = {};
ask_monitor:
+ my $merge_name = sub {
+ my ($monitor) = @_;
+ $monitor->{ModelName} ? $monitor->{VendorName} . '|' . $monitor->{ModelName} : $monitor->{VendorName};
+ };
my $merged_name = do {
- if ($monitor->{VendorName} eq "Plug'n Play") {
- $monitor->{VendorName};
- } else {
- my $merged_name = $monitor->{VendorName} . '|' . $monitor->{ModelName};
-
- if (!exists $h_monitors{$merged_name}) {
- $merged_name = is_valid($monitor) ? 'Custom' : good_default_monitor();
- } else {
- $merged_name;
- }
+ my $merged_name = $merge_name->($monitor);
+ if (!exists $h_monitors{$merged_name}) {
+ $merged_name = is_valid($monitor) ? 'Custom' : good_default_monitor();
}
+ $merged_name;
};
$in->ask_from_({ title => N("_: This is a display device\nMonitor"),