diff options
author | Olivier Blin <oblin@mandriva.com> | 2007-09-28 15:13:39 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2007-09-28 15:13:39 +0000 |
commit | 03580c07c5a712562e05bd5cd948acdc9dbc041d (patch) | |
tree | 66a56ee996e8dbcfd4731f987e38257101bf89ea /lib/mouse.pm | |
parent | aa468afdcd897ae3752661f488ff8edc2e8c44e9 (diff) | |
download | drakx-kbd-mouse-x11-03580c07c5a712562e05bd5cd948acdc9dbc041d.tar drakx-kbd-mouse-x11-03580c07c5a712562e05bd5cd948acdc9dbc041d.tar.gz drakx-kbd-mouse-x11-03580c07c5a712562e05bd5cd948acdc9dbc041d.tar.bz2 drakx-kbd-mouse-x11-03580c07c5a712562e05bd5cd948acdc9dbc041d.tar.xz drakx-kbd-mouse-x11-03580c07c5a712562e05bd5cd948acdc9dbc041d.zip |
make mice list dynamic, since it probes pci bus
Diffstat (limited to 'lib/mouse.pm')
-rw-r--r-- | lib/mouse.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/mouse.pm b/lib/mouse.pm index 3afcca0..a5c2ee1 100644 --- a/lib/mouse.pm +++ b/lib/mouse.pm @@ -17,7 +17,7 @@ use log; my @mouses_fields = qw(nbuttons MOUSETYPE Protocol name EmulateWheel); -my %mice = +sub all_mice() { arch() =~ /^sparc/ ? ( 'sunmouse' => @@ -92,6 +92,7 @@ my %mice = [ [ 0, 'none', 'Microsoft', N_("No mouse") ], ] ], ); +} #- Logitech MX700 #- @@ -186,13 +187,14 @@ sub fullnames() { ''; } } @{$::b->[1]}; - } %mice; + } all_mice(); } sub fullname2mouse { my ($fname, %opts) = @_; my ($type, @l) = split '\|', $fname; my $name = pop @l; #- ensure we get rid of "[Other]" + my %mice = all_mice(); if (my @devices = @{$mice{$type}[0]}) { member($opts{device}, @devices) or delete $opts{device}; |