gnome-lirc-properties r68 - in trunk: . data gnome_lirc_properties
- From: hadess svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-lirc-properties r68 - in trunk: . data gnome_lirc_properties
- Date: Mon, 20 Oct 2008 10:19:21 +0000 (UTC)
Author: hadess
Date: Mon Oct 20 10:19:21 2008
New Revision: 68
URL: http://svn.gnome.org/viewvc/gnome-lirc-properties?rev=68&view=rev
Log:
2008-10-20 Bastien Nocera <hadess hadess net>
* data/20-x11-remotes.fdi:
* data/Makefile.am:
* gnome_lirc_properties/hardware.py: Move rejection of
Logitech Mini-Receivers and Video Bus devices to a HAL
fdi files
Added:
trunk/data/20-x11-remotes.fdi
Modified:
trunk/ChangeLog
trunk/data/Makefile.am
trunk/gnome_lirc_properties/hardware.py
Added: trunk/data/20-x11-remotes.fdi
==============================================================================
--- (empty file)
+++ trunk/data/20-x11-remotes.fdi Mon Oct 20 10:19:21 2008
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<deviceinfo version="0.2">
+ <device>
+ <match key="info.capabilities" contains="input.keys">
+ <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
+ string="Linux">
+ <!-- The Keyspan RF remote shows 2 devices, only the second one
+ with "mouse" capabilities is actually useful -->
+ <match key="info.product" string="Keyspan RF Remote for Front Row">
+ <match key="info.capabilities" contains="input.mouse">
+ <merge key="lirc.input.is_remote" type="bool">true</merge>
+ </match>
+ <match key="info.capabilities" contains="input.keypad">
+ <merge key="lirc.input.is_remote" type="bool">false</merge>
+ </match>
+ </match>
+
+ <!-- Add check for Logitech receivers -->
+ <match key="info.product" string="Logitech Logitech BT Mini-Receiver">
+ <merge key="lirc.input.is_remote" type="bool">false</merge>
+ </match>
+
+ <!-- Ignore ACPI Video Bus devices (as defined in drivers/acpi/video.c) -->
+ <match key="info.product" string="Video Bus">
+ <merge key="lirc.input.is_remote" type="bool">false</merge>
+ </match>
+
+ </match>
+ </match>
+ </device>
+</deviceinfo>
Modified: trunk/data/Makefile.am
==============================================================================
--- trunk/data/Makefile.am (original)
+++ trunk/data/Makefile.am Mon Oct 20 10:19:21 2008
@@ -21,6 +21,10 @@
desktop_in_files = gnome-lirc-properties.desktop.in
desktop_DATA = gnome-lirc-properties.desktop
+# Blacklist and whitelist of input devices
+fdidir = $(datadir)/hal/fdi/policy/10osvendor
+fdi_DATA = 20-x11-remotes.fdi
+
noinst_PROGRAMS = lirc-generate-linux-input
lirc_generate_linux_input_SOURCES = lirc-generate-linux-input.c
lirc_generate_linux_input_CFLAGS = $(GLIB_CFLAGS)
Modified: trunk/gnome_lirc_properties/hardware.py
==============================================================================
--- trunk/gnome_lirc_properties/hardware.py (original)
+++ trunk/gnome_lirc_properties/hardware.py Mon Oct 20 10:19:21 2008
@@ -178,6 +178,10 @@
NUMLOCK?
'''
+ is_remote = self.get('lirc.input.is_remote')
+ if is_remote == True or is_remote == False:
+ return not is_remote
+
# check if HAL considers this device a keyboard:
if self.has_capability('input.keyboard') or self.has_capability('input.keys'):
# read and parse key-code map from sysfs:
@@ -187,16 +191,6 @@
keys = [int(value, 16) for value in keys.split()]
keys = decode_bitmap(keys)
- # Ignore ACPI Video Bus devices (as defined in drivers/acpi/video.c)
- if str(self['info.product']) == 'Video Bus':
- return True
-
- # The Logitech Mini-Receivers, when in HID mode, only show
- # a portion of the keys on this interface (with a separate keyboard
- # and mouse still visible). We shouldn't try to configure that device
- if str(self['info.product']).startswith('Logitech ') and len(keys) >= 70:
- return True
-
# check that at least 85 key-codes are supported:
if len(keys) >= 85:
return True
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]